Modulepool SUBSCREEN
Modulepool SUBSCREEN
It is the screen which will be called into another screen area of the Normal screen
Each screen area can hold only one sub screen.
Syntax to call the sub screen:
CALL SUBSCREEN
number>.
INCLUDING
<prog name>
<Screen
Goto----Secondary window------Dictionary
Click on pushbutton and drag into the lay out to provide the Display push button
Click on Create
Provide the description and click on Layout tab and provide the customer field like above
Now click on subscreen area button and drag into the screen(For customer address)
Now create one more screen area to call the second subscree(for customer company details
Save-----Back
Now create the subscreens
Now click on layout tab and create the screen with required fields like above
Now change the field name to WA_KNA1-KUNNR(for easy mapping in program ) and also for all the
fields
Click on Create
Click on Enter
Change the field name to WA_T001-BUKRS and for all other fields also
Click on Save------Back
Click on change
Uncomment MODULE STATUS_0100 below PBO and save and double click on it
Click on YES
MENU PAINTER : it is used to create the required menu items,toolbar item and function keys.
SE41 is the t.code to create the above.
Expand function keys
SAVE-----Check----Activate
Click on BACK---------se38--click on BACK(se51)
Some of the function codes
Fucnction
functioncode
BACK
BACK
SAVE
ENTER
/00
CANCEL
CANCEL
SAVE-----F3
Now provide the logic to call the subscreens into screen 200 under PBO
Save-----F3
Now provide the logic for screen 30 to display the customer address
Save---f3
Double click
" USER_COMMAND_0200
Click on CREATE
INPUT
Click on ENTER
Click on SAVE.
Testing
Execute the t.code ZTC_SUB
Creating the SELECTION-SCREEN with SELECT OPTIONS & PARAMENTER using Modulepool
Step 1: Go to SE38------provide the program name-------Click on Create
----- provide the required details
Click on Create
Save----check-----activate
Click on Back-----F3
Now uncomment PAI-----Double click on it to provide the logic for back
Also provide the deceleration and sub screen design for selection screen
Click on Save-check----activate
Now click on Back to call the sub screen 200 into the sub screen area (SEL-SCN) in 100.
Save--check----Activate
Program
REPORT
ZMODULE_DEMO.
data:Begin of wa_kna1,
kunnr like kna1-kunnr,
land1 like kna1-land1,
end of wa_kna1.
START-OF-SELECTION.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*&
Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
module STATUS_0100 output.
SET PF-STATUS 'ZBACK'.
* SET TITLEBAR 'xxx'.
endmodule.
" STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*&
Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
IF SY-UCOMM = 'BACK'.
leave to SCREEN 0.
endif.
endmodule.
Testing
Execute the program (F8)
" USER_COMMAND_0100
INPUT