ABAP Module Pool Programming – Screen Programming

Creating an ABAP Module Pool Programming to take input data on a screen and display the output on another screen.

SAP ABAP Interview Questions – Real Time

SAP ABAP Fundamentals

Best SAP ABAP Latest Course

Step 1: Go to SE80, select “Program” from the dropdown list and enter the name of the Module Pool Programming.

Best Exercise for Module pool Programming Practical 5 – How to Display Records on Table Control

Step 2: A pop-up will rise and ask you to create it. Click on Yes.

Step 3: Another Pop will come out to ask you to enter the name of the module pool program. Click on the “Create with TOP Include” checkbox and click on the tick button.

Step 4: Now enter the name of the TOP Include and continue saving it as a module pool program.

Provide Package name or TR details. Or Save it in a Local Package.

Step 5: Now double click on “Include ********_TOP “ on the screen for the Types & Data declaration.

Step 6: Now activate it.

Step 7: Now right-click on the Program name and create a screen.

Step 8: Give Screen Number “100” and click on Tick.

Step 9: Give a short description and click on Layout.

Step 10: Now Screen Painter will open. Click on “Dictionary/Program Fields Window”.

Step 11: Enter the name of the Work Area you created in TOP Include and click on “Get from Program” and select the fields you want to display.

Step 12: Now drag and drop it on the screen painter.

Step 13: Now select “Text tool” from the side panel and drop it next to the input tab and write the text which you want to display for the input field.

Step 14: Do the same for all the input fields as shown below.

Step 15: Now double click on the Input field and write the name for the input field as shown below

Step 16: Now select the Text tool to add some text on the screen, such as headings.

Step 17: Now create a button by clicking on the “Push Button” on the left toolbox and placing it on the screen wherever you want. Now double click on the button, and a pop-up will come out, enter the name of the button there and mention the function code “Fct Code” in that as shown below. Now save and activate the screen.

Step 18: Now go to the “Flow Logic” tab and uncomment the PBO and PAI modules respectively.

Step 19: Then double click on both the Modules and create them in the Main Program, for now as shown below.

Step 20: Now inside “MODULE user_command_0100 INPUT” write down the code shown below. Then save and activate it.

Step 21: Now create another screen by right-clicking on the program name as shown previously. Give screen number “200” and provide a short description as below.

Step 22: Now click on the “Layout” button and open the screen painter as shown previously for “screen 100”.

Step 23: Now a screen painter will open. Click on “Dictionary/Program Fields Window”.

Step 24: Enter the Work area name and click on the “Get From Program “ button and select the fields you want.

Step 25: Now drag and drop them wherever you want them on the screen. Pass the work area inside every input field and create a Screen Heading also using the left “Text Tool” as shown below.

Step 26: Create a “push button” on the screen as shown below.

Step 27: Now save and activate the screen and go to the tab “Flow Logic”. Uncomment every module under PBO and PAI sections. Double click on MODULE user_command_0200 INPUT and save it in the main program as shown previously with “screen100”.

Step 28: Now write this code inside the MODULE user_command_0200 INPUT.

Step 29: Now right-click on the program name and create-> Transaction.

Step 30: Enter the name of the Transaction code and a short description. Select the radio button “Program and screen (dialogue transaction)”.

Step 31: Now enter the screen number of that screen which you want to see first when you run your transaction code, here in our case we are adding screen number 100.

Step 32: Now save and activate the whole program by right-clicking on the main program name and clicking on the “Activate button”.

Step 33: Now run the Transaction code in the Transaction Box.



Best Laptops for ABAP Programmers

Step 1: Enter Material & Material Group & Hit the Enter.

This is the output.

If Data does not exist then it will show an error message as mentioned below.