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

module pool issue

santosh_kumar94
Participant
0 Likes
1,538

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 .

10 REPLIES 10
Read only

weltspion
Participant
0 Likes
1,451

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

Read only

Former Member
0 Likes
1,451

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

Read only

0 Likes
1,451

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.

Read only

sivaganesh_krishnan
Contributor
0 Likes
1,451

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

Read only

former_member188251
Active Participant
0 Likes
1,451

HI Santosh,

CALL TRANSACTION 'XXXX'.

LEAVE TO SCREEN 0 when 'BACK' button is pressed .

BR,

Shankar.

Read only

Former Member
0 Likes
1,451

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

Read only

Former Member
0 Likes
1,451

Hello Santosh,

     Use following code:

Calling Program:

       CALL TRANSACTION 'XYZ'.

Called Program:

       On exit or back or cancel.

       LEAVE TO SCREEN 0.

Cheers

 

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,451

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.

Read only

Former Member
0 Likes
1,451

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

Read only

0 Likes
1,451

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