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

Modify Screen, Screen Required

Former Member
0 Likes
774

Hi,

I m trying to modify input zfield added in a standard tcode. This zfield need to be kept mandatory. The problem is that if i give value to the mandatory field BACK,LEAVE, CANCEL button in status bar works properly, if i dont give value , im unable to go BACK or LEAVE or CANCEL the screen. Though i have written code to LEAVE PROGRAM, it doesnt work on screen 111??

Thanks.

5 REPLIES 5
Read only

MarcinPciak
Active Contributor
0 Likes
709

To omit all mandatory checks and leave the program, you must first assign type function = E to given button i.e. EXIT, then create module in PAI


MODULE my_module AT EXIT-COMMAND.

Then in ABAP handle it as normal PAI module exiting your application


MODULE my_module INPUT.
  LEAVE PROGRAM.
ENDMODULE.

Regards

Marcin

Read only

0 Likes
709

Hi,

This is standard tcode and i have assigned E to BACK, LEAVE and CANCEL. If i fill the field with value, i can EXIT sucessfully. If i dont fill value and try to leave from screen BACK, LEAVE and CANCEL doesnt work.

Thanks.

Read only

0 Likes
709

As marcin said,

MODULE my_module AT EXIT-COMMAND.

add the above statement as the first statement in your PAI.

I think so you are using sy-ucomm for your function.

Read only

0 Likes
709

Hi,

in program SAPLMEGUI , screen 14 line no 18 CALL SUBSCREEN SUB0. -- This statement doesnt get into exit SAPLXM06, screen 111 when the mandatory zfield is not entered with value.

it triggers the exit, when i fill the zfield with value, enabling BACK,LEAVE, CANCEL to work.

I have written LEAVE PROGRAM based on sy-ucomm value in module input at exit-command

still not working!

thanks.

Read only

Former Member
0 Likes
709

HI Uma,

Put a check on sy-ucomm and execute you code only when it is not 'E'. else leave program.

Edited by: Harsh Bhalla on Nov 18, 2009 10:47 PM