10. Module Pool Programming
10. Module Pool Programming
It is also called as dialog Programming. It is a pool of modules Screens, Includes, Transactions etc).
1) Tabs of a Screen :
F4 Help -> It tells us what are the various possible values for any Input field.
F1 Help -> It gives us the technical information of any field/column.
Select save.
Create screen.
Give number 100 and press enter.
Save it
Uncomment module.
Select yes.
Enter.
Uncomment SET PF-STATUS (Ctl+.)
Select yes.
Select yes.
Table 1.
Table 2.
Select Layout.
2
3
1
4 5. Click on
this box
6. Give table name and
field name
7. Select yes
9. Draw button
8. Select Pushbutton
Define structure
Save and activate.
Double click on screen 100 then again double click on PAI Module.
Execute in new window.
Sub screen
Create normal Screen and subscreen
Make all this field as output fields only.
Create Tcode and execute in new window.
Double Click on user_command_0100.
Save it.
Modal Dialog Box Screen.
Continue
Continue
Continue
Continue
Create internal table and work area for header and item table.
Continue
Continue
Continue
Continue
Continue –Complete
Create Tcode:
Double click on 100
ENDIF.
ENDMODULE.
Double on EXIT
Give function type and save it.
Double click on EXIT.
Save it.
Back
Double click on user_command_0100.
Back.
Click on layout.
Save it.
Uncomment Save.
Source Code:
*&---------------------------------------------------------------------*
*& Report ZPO_HEADER
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZPO_HEADER.
tables: zpoheader.
START-OF-SELECTION.
select SINGLE * from zpoheader into CORRESPONDING FIELDS OF it_data where orde
r_n = ord_num.
it_data-order_n = ord_num.
call SCREEN 0100.
end-of-selection.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'PFS'.
SET TITLEBAR 'TTL'.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module EXIT INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE exit INPUT.
set SCREEN 0.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
WHEN 'SAVE'.
PERFORM SAVE.
ENDCASE.
CLEAR: SY-UCOMM.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Form SAVE
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM save .
IF it_data-odate IS INITIAL.
it_data-odate = sy-datum.
ENDIF.
modify zpoheader from it_data.
MESSAGE 'Date saved succefully' TYPE 'S'.
SET SCREEN 0.
ENDFORM.
Create Tcode
1.Select table
controller with wizard
Drag and drop table.
Select Continue.
Give table name and continue.
Select internal program table.
Continue.
Select all fields.
Continue.
Select Scroll.
Continue.
Write a logic for item details
Tcode:SE38
Click on create.
Activate Program.
Select Display Object List
Give Description
Save it.
Follow same steps and create Subscreen 200
Save it.
1.Select dictionary/program field
Double click on screen 200.
2. Give table name 3. Click here
Save it.
b) Call the subscreen into sub screen area of main screen.
Create Tcode: