‎2007 Jan 19 10:57 PM
Hi Gurus,
I have created a screen and i have some buttons in the screen which are meant to call other transactions.
i used the following code in PAI:
case 'ok_code'.
WHEN 'BACK' OR 'CANC'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'SAVE'.
CLEAR ok_code.
WHEN 'BUTTON1'.
CALL TRANSACTION 'SE38'.
WHEN 'BUTTON2'.
CALL TRANSACTION 'SE11'.
WHEN OTHERS.
CLEAR ok_code.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE.
It does not work.
Regards,
Sukumar.
Message was edited by:
sukumar kumar
‎2007 Jan 19 11:09 PM
‎2007 Jan 19 11:09 PM
‎2007 Jan 19 11:23 PM
I have already declared ok_code.
DATA: ok_code TYPE sy-ucomm.
Regards,
Sukumar.
‎2007 Jan 19 11:35 PM
Hi Sukumar,
Did you declare the OK_CODE in the Module Pool? It should be declared in the Element list for ok.
Srini.
‎2007 Jan 19 11:35 PM
Hi,
Make sure you have given OK_CODE in the element list..
Meaning..If you go the element list of the screen..
At the end you a row which of type OK..Give OK_CODE in the name column for the corresponding row..
Then in the PAI..have the following code..
case <b>OK_CODE</b>.
WHEN 'BACK' OR 'CANC'.
Thanks,
Naren
‎2007 Jan 19 11:45 PM
Hi,
Guess i know what iam missing. I have to declare the custom buttons in the screen area, where do i do that.
Regards,
Sukumar.
‎2007 Jan 20 12:00 AM
there is small error in your program given sukumar...do give the OK_CODE in the single quote...you had mentioned CASE 'ok_code' this is wrong CASE ok_code.
Try this it must work if everthing is declared well...
Srini.
‎2007 Jan 20 12:01 AM
‎2007 Jan 20 12:07 AM
I guess i solved the problem. Since i had worked less on module pool. I had to give a function code for the buttons.
Thanks for the replies
Regards,
Sukumar.
‎2007 Jan 20 12:32 AM
‎2007 Mar 21 6:48 PM