Quantcast
Channel: ABAP Development
Viewing all articles
Browse latest Browse all 948

Leave Module Pool screen when field is mandatory

$
0
0

Hello again!

 

This one is for the newbies out there or for those experienced ones who are new to Module Pool programming or Dynpro I must say. Main and the foremost objective of this post is to leave screen when any field is made mandatory in Module Pool (dialog) program. You should know how to program a module pool program including screens, PF-STATUS and user commands.

 

 

Create a new program and call a screen with any number. I give it as 0100.

Step 1.jpg


Now double click on screen number and create a screen as shown below.


Step 2.jpg

step 3.jpg

 

Step 4.jpg

 

Now you need to implement PBO and PAI modules. Do them as shown below.


Step 5.jpg


Now make a note in PAI that it is implemented as

 

MODULE USER_COMMAND_0100 AT EXIT-COMMAND.

 

AT EXIT COMMAND means that program will exit when you will press the exit button.

 

Now create a PF-STATUS as follows.

 

Step 6.jpg

 

Now double click on EXIT button and follow the screenshots.


Step 7.jpg


Here you need to select Function Type as E. This will exit you program on exit click while field is made mandatory. Activate you PF-STATUS, activate your screen and activate your program. Now run it. You will see it won't go back on BACK or CANCEL but it will leave program when EXIT is clicked.


Here you have implemented how to exit the program while any field is mandatory. It is a standard behavior like we see in IW52 or any other T-code.


Hope this helps!


Comments are welcome!


Viewing all articles
Browse latest Browse all 948

Trending Articles