Application Development 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: 

screen exit

Former Member
0 Kudos

hi there,

i have added some fields to CAT3 tcode(for ex. a text box, on i/o box and a push button). how do we write functionality for this like when the button is pressed some functionality should be done.

thanks in advance.

pawan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi pawan,

u may have added the fields using module pool programming..ther itself for that particular screen in which u have done the modification, u need to write the code in PAI(process after input)... eg, ur push button is identified with an ok_code name say 'PB'

so u write.

case sy-ucomm.

when 'PB'.

do something..

endcase..

similarly...an i/o box is identified by its name u ve specified....

Hope it helps,

Regards,

Bikash

6 REPLIES 6

Former Member
0 Kudos

Hi pawan,

u may have added the fields using module pool programming..ther itself for that particular screen in which u have done the modification, u need to write the code in PAI(process after input)... eg, ur push button is identified with an ok_code name say 'PB'

so u write.

case sy-ucomm.

when 'PB'.

do something..

endcase..

similarly...an i/o box is identified by its name u ve specified....

Hope it helps,

Regards,

Bikash

0 Kudos

hi

i have done like this.

in PAI module of subscreen.

IF SY-UCOMM = 'BTN'.

NAME = 'ABC'.

ENDIF.

NAME is the I/O box name. BTN1 is the function code for button. i activated everything including the enhancement project. even then, i dont see any 'ABC' when i press the button.

what could be the reason?

Former Member
0 Kudos

Hi pawan,

when any action is caused on the screeen such as button press, sy-ucomm contains the function code.

Check for this in PAI event of the screen in user-command module.

case sy-ucomm.

WHEN 'F_code of the button pressed'.

....

endcase.

Regards,

Tanveer.

Mark useful answers.

Former Member
0 Kudos

Hi,

If you have used screen exit to add more fields on a standard screen then you can write the code in function module exit in the same enhancement (SMOD object). FYI, every screen exit will have corresponding function exit(s) to perform input validation and to pass the data between main screen and screen exit.

If you want to validate the data from main screen also, then check for the existence of any other user exit that will triggered on the screen action/or at the end of the transaction.

If you have modified the standard screen itself to add the new fields, you have full control to play with the standard program itself as have already give the access key for changing it, so write your code in PAI of the screen.

Hope this helps.

Regards,

Nagaraju Chidurupalli.

Former Member
0 Kudos

Hello Pawan,

U have said u have also activated the enhancement so which enhancement are u talking abt. ALso the code which u have put in does ur screen go back through PBO and can u also ensure if the variable NAME is not getting initialised. Can u please provide details of the program and the screen where u have made changes.

0 Kudos

the enhancement name is CATS0007. tcode is CAT3.

customer screen is 2000. this is where i placed my elemts.

i have written the code in PAI of '2000' .