2013 Sep 28 12:57 PM
hi,
i have an issue in module pool.
based on the requirement i have designed 4 push button . every push button will call one transaction code.
my issue is : suppose i push any button..it will go to a tocde. when i try to come back from that tcode
it is coming fully out. i want that when i press back it should come to my screen.
user want like that.so that he can come back and go to another one. and so on .
what should i do .
2013 Sep 28 8:49 PM
Hi Santosh!
Try not to use the type 'T' with direct call of the tcode.
Instead use a regular value and check SY-UCOMM in PAI (your OK-Code). Call your transaction (the program behind it) with SUBMIT ... AND RETURN then. The next program line could be a LEAVE TO SCREEN 0, or any screen you like to go to next.
Kind regrards
Torsten
2013 Sep 29 3:10 AM
Hi Santosh,
In your PAI, you CALL TRANCEACTION xx, it will automatically return back, if the next program using LEAVE SCREEN as back.
regards,
Acher
2013 Sep 30 6:56 AM
hi Acher,
thanks for reply . i tried with call transaction 'xxxx'. it working now for other tcodes. but for this tcode 'AUT10'. if i am using " call transaction 'AUT10'. " error is coming.. 'invalid variant called'. what error is this ? can u plz help me in solving this error.
2013 Sep 29 4:17 AM
Hi Sanosh,
In your called transcation you must have written LEAVE PROGRAM for BACK button. Change that to LEAVE TO SCREEN 0 . It will make you to come back to your main screen where you have many push buttons.
Hope this helps,
Regards,
Sivaganesh
2013 Sep 29 4:54 AM
HI Santosh,
CALL TRANSACTION 'XXXX'.
LEAVE TO SCREEN 0 when 'BACK' button is pressed .
BR,
Shankar.
2013 Sep 29 11:27 AM
Hi Santosh,
In Module Pool Programming we have to deal with layers of screens.
I Think the t-code is for some other linked report.
After Call Transaction dont use any leave to screen or leave program.
1.if you are calling a report use submit report and return.
2. if you are calling some other module pool tcode then in the called tcode u should write leave to screen 0.
Hope this helps.
Regards,
Ashish Chauhan
2013 Sep 29 1:50 PM
Hello Santosh,
Use following code:
Calling Program:
CALL TRANSACTION 'XYZ'.
Called Program:
On exit or back or cancel.
LEAVE TO SCREEN 0.
Cheers
2013 Sep 30 5:18 AM
Hello Santhosh.
You can record BDC and trigger CALL TRANSACTION like
CALL TRANSACTION 'Tcode' USING bdcdata OPTIONS from opt.
where bdcdata LIKE BDCDATA OCCURS 0 WITH HEADER LINE
and opt TYPE CTU_PARAMS.
For instance,
bdcdata-program = 'SAPLCOKO1'.
bdcdata-dynpro = '110'.
bdcdata-dynbegin = 'X'.
bdcdata-fnam = 'CAUFVD-AUFNR'.
bdcdata-fval = order_no.
APPEND bdcdata.
bdcdata-fnam = 'BDC_OKCODE'.
bdcdata-fval = '=ENTE'. "Enter
APPEND bdcdata.
opt-dismode = 'E'.
CALL TRANSACTION 'CO03' USING bdcdata OPTIONS FROM opt.
Regards.
2013 Sep 30 5:49 AM
Hi Santosh,
in the module pool please check your screen with the transaction call buttons, that in Other Arttributes field Next Screen is set to the screen itself.
Then CALL TRANSACTION in your code should work and come back to your screen after leaving the called transcation. If this is a SAP standard tcode, you should have to do nothing else.
Regards,
Klaus
2013 Sep 30 6:57 AM
hi klaus,
thanks for reply . i tried with call transaction 'xxxx'. it working now for other tcodes. but for this tcode 'AUT10'. if i am using " call transaction 'AUT10'. " error is coming.. 'invalid variant called'. what error is this ? can u plz help me in solving this error