Wednesday, 9 July 2014

First Module Pool Program in SAP

First Module Pool Program in SAP

+ -
In the below example we will create a simple Module Pool Program to display hello world.
Go to SE80, select program from drop down, provide name as ZSAPN_HELLO_WORLD and press enter.
Creating Module Pool Program in SAP
A pop up will open click Yes.
Creating Module Pool Program in SAP
Provide a program name ZSAPN_HELLO_WORLD (same name as given above), select create with top include check box and enter.
Creating Module Pool Program in SAP
Provide a top include name, enter.
Creating Module Pool Program in SAP
Click Save on the pop up window.
Creating Module Pool Program in SAP
Save it in a local object.
Go to change mode, double click on program name, uncomment all include programs, double click on each include and create (TIP- Just double click on each include enter, enter, save in local object, save, back(F3)) .Now to double click on program name, right click , activate.
Creating Module Pool Program in SAP
Right click on program name, create, screen.
Creating Module Pool Program in SAP
Provide Screen number as (0100), enter.
Creating Module Pool Program in SAP
Provide short description and click on flow logic tab.
Creating Module Pool Program in SAP
Uncomment the available MODULES, double click to create them.
Creating Module Pool Program in SAP
Double click on MODULE STATUS_0100,yes, select main include and enter.
Creating Module Pool Program in SAP
Save, click back (F3) and create another module.
Click on Layout ( toolbar button), it will open Module Pool layout designer (If you are using it first time it might take some time...If you failed to open layout it might be due to some missing configuration, at that time contact basis/admin).
Creating Module Pool Program in SAP
The layout will be like below, drag and drop Text Field element on to screen area.
Creating Module Pool Program in SAP
Provide name and text.
Creating Module Pool Program in SAP
Save, close windows, go to flow logic, double click on each module and add below code.
Creating Module Pool Program in SAP
Double click on menu name and title to create GUI status for the program...checkout creating a custom menu in SAP to create menu.
Double click on program name, right click, activate.
To execute a module pool program we need to create a t-code, to create a t-code right click on program name, create, transaction.
Creating Module Pool Program in SAP
Provide a T-code name, short text and enter.
Creating Module Pool Program in SAP
Provide program name, screen number, save.
Creating Module Pool Program in SAP
Now T-code is created, execute the T-code and test.
Creating Module Pool Program in SAP

No comments:

Post a Comment