Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dialog programming menu painter not triggering...................

Former Member
0 Likes
1,124

Hello Abaper ,

I am having a requirement. I am designing a screen , in which has three mandatory fields . since it is the mandatory field , it will not trigger anything until the data has to be specified for that. If the use press the back button or exit button or cancel button it is not triggering . pls suggest me the way when the user press the back or cancel or exit , it should come out of the screen...

Points will be rewarded

Thanks & Warm regards

Nagaraj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
932

Hi,

1.Give your button Funtion Type "E".

2. In flow logic editor Under PAI

PROCESS AFTER INPUT.

MODULE CANCEL AT EXIT-COMMAND.

MODULE BACK AT EXIT-COMMAND.

In ABAP editor

MODULE CANCEL INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE BACK INPUT.

LEAVE TO SCREEN 100.

ENDMODULE.

7 REPLIES 7
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
932

while creating the pf status...it will ask the type of function in a window...

just provide there the 'Exit command option ' for the exit button.

plz revert if any probs occurs.

reward if usefull.

Read only

Former Member
0 Likes
932

Hi u need to use PF-STATUS

PF-STATUS is used to set the GUI Status of a screen, ie you can control the options on your menu bar, application toolbar, the function keys assigned to various options etc.

Implementing the status for a screen can be done in 2 ways:

1) Create the GUI status using the object list of the program or by using the transaction SE41. Then, assign it to the screen using SET PF-STATUS statement.

2) Create the GUI status by means of forward navigation, ie, use the SET PF-STATUS 'XXX' statement where 'XXX' is the name of the GUI status and double click on it to create it.

Status names can have a maximum of 20 characters.

After assigning a GUI status to a screen, this is inherited to all subsequent screens. In order to have a different status for each of the subsequent screens, you have to set a separate status for each screen.

In transaction SE41,

1) Give the program name and the status name and click on the Create button.

2) Go to 'Function keys' and expand.

3) On top of the save icon type SAVE, on top of the back icon type BACK, on top the the exit icon type EXIT etc ie on top of all the icons that you want to use, type the respective names that you want to give.

Whatever you have typed now becomes the function codes of these icons and can be used in your program.

For example you have a screen 100.

In the 'Element list' tab of the screen, give "ok_code" as the name where "OK" is the type of screen element. Activate screen.

The flow logic for the screen looks like this:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

Create the modules STATUS_0100 and USER_COMMAND_0100 in the main program by simply double clicking on them.

The code for these modules can be something like this:

MODULE status_0100 OUTPUT.

SET PF-STATUS 'Example'. "Example is the name of the GUI status

ENDMODULE.

MODULE user_command_0100 INPUT.

CASE ok_code.

WHEN 'SAVE'.

"call a subroutine to save the data or give statements to save data.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

Go thru this Link for More Info,

Thanks

Read only

Former Member
0 Likes
933

Hi,

1.Give your button Funtion Type "E".

2. In flow logic editor Under PAI

PROCESS AFTER INPUT.

MODULE CANCEL AT EXIT-COMMAND.

MODULE BACK AT EXIT-COMMAND.

In ABAP editor

MODULE CANCEL INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE BACK INPUT.

LEAVE TO SCREEN 100.

ENDMODULE.

Read only

0 Likes
932

Hi,

Just go to pf-status and open the pf-status in menu painter and double click on back icon. thee you change the function type as "E" as murila krishna told. SAVe and activate.

In code use the AT EXit-command to write your code.

Read only

Former Member
0 Likes
932

hi,

If possible keep a push button and write,

module exit at exit-command. "( in pai)

inside it...

case sy-ucomm.

when 'EXIT'.

leave to screen 0. set screen 0.

endcase.

hope it helps u..

regards,

sri

Read only

Former Member
0 Likes
932

hi nagaraj

check the code regarding back or exit in right format and whether its in right place or not i mean in PBO or PAI and once u check the menu painter also

even though if ur problem is there the send the code regarding that what u wrote

regards

sachin

Read only

Former Member
0 Likes
932

Hi,

write the below code in PAI of your program.

module user_command input.

case ok-code.

when 'BACK'.

set screen 0.

when 'EXIT'.

leave program.

when 'CANCEL'.

set screen 0.

end case.

endmodule.

define ok_code in your 'element list' of the program.

reward if helpful.

Regards

Venkat