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: 

Call Transaction with selected screen no.

Former Member
0 Kudos

Dear All,

how we can use "call transaction" statement with selected screen?

Suppose I have 5 screens in one module pool program and having same tcode. I want to call the Tcode with Call Transaction and with particular screen on condition based.

Please advice.

Thanks & Regards

H.P. Singh

15 REPLIES 15

Former Member
0 Kudos

HI,

Can u tell me with same tcode for all screens how u r identifing when to call which screen in the program ?

0 Kudos

Hi, thnks for reply !

I think I could not put my question in right way.

I mean, can I call different screen no. with same tCode.

suppose I have 1000, 2000, 3000 screens. and I have created one Tcode ZTCS with 1000 screen no.

Now, can I call the same tcode with call transaction statement for different screen say 2000 or 3000. or I have to create seperate tcode for 2000 screen and 3000 screen.

Thanks & Regards

Harpal Singh.

0 Kudos

hi,

It depends on ur requirement tat u require tcode . Or u can use call screen 2000 , 3000 when ever u want to call the screen ,if u call process is initial screen is 1000 then u have to goto the neaxt screen then use call screen.

Or if there is a need tat u have to call the 2000 screen directly then assign tcode .

hope this may help u.

0 Kudos

You are right we can move from one screen to another with CALL SCREEN statement. But my requirement is different.

Ex: I have two tcode.

1. ZTcode1.

2. ZTcode2 ( Having Screens 1000, 2000, 3000 and default is 1000).

If I call ZTCode2 from ZTCode1 using call transaction statement it will open with 1000 screen.

But Now can I open ZTCode2's 2000 screen from ZTcode1 using call transaction statement without chaning default 1000 screen.

thanks & regards

H.P.

0 Kudos

Ok, then use submit program to ZTCODE2 from ZTCODE1 passing the inital screen parameter

SUBMIT ZPRNT WITH SELECTION-TABLE SELTAB AND RETURN.

0 Kudos

1st thing to Madhukar..

SUBMIT donot work with module pool programs.

now,

for the solution.... you can try

CALL TRANSACTION ta [USING bdc_tab [bdc_options

see the standard codumentation of SUBMIT for more help..

this BDC_TAB can be field with particular screen details which you need.

0 Kudos

yes tat is right but i think so that 's a report program ..

0 Kudos

>

> ...how we can use "call transaction" statement with selected screen?

> .... I have 5 screens in one module pool program and having same tcode. .......

> H.P. Singh

so its not a report.. and why would you need 5 different in a report

0 Kudos

OK.SOM..

But tell me one thing for my knowlege is this the solution tat we will be calling the BDC till the screen we want & futher process will be done manualy ?

0 Kudos

>

> OK.SOM..

> But tell me one thing for my knowlege is this the solution tat we will be calling the BDC till the screen we want & futher process will be done manualy ?

No,

we wont create any BDC..its just the screen details that we pass though bdc_tab parameter... just the same as u pass details to submit for reports, similarly call transaction with bdc_tab for tcodes...

[CAL LTRANSACTION|http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSACTION.htm]

go though this link

0 Kudos

thanks to all for response.

I try with the BDC_OPTION and inform u.

Thanks & regards

H.P.

0 Kudos

Thanks to all. Below is the mentioned code working fine.

DATA: bdcdata_wa TYPE bdcdata,

bdcdata_tab TYPE TABLE OF bdcdata.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPMZ_VMS'. "

bdcdata_wa-dynpro = '1500'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=NEW'.

APPEND bdcdata_wa TO bdcdata_tab.

CALL TRANSACTION 'ZVMS' USING bdcdata_tab mode 'E'.

                      • or if we want to execute thru SE93 tcode with BDC Code. Both are working fine **************************

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLSEUK'."'SAPLSEOD'.

bdcdata_wa-dynpro = '0390'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'TSTC-TCODE'.

bdcdata_wa-fval = 'ZVMS'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=CHNG'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLSEUK'.

bdcdata_wa-dynpro = '0310'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_CURSOR'.

bdcdata_wa-fval = 'TSTC-DYPNO'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'TSTC-DYPNO'.

bdcdata_wa-fval = '2000'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=WB_EXEC'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLSPO1'."'SAPLSEOD'.

bdcdata_wa-dynpro = '0100'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=YES'.

APPEND bdcdata_wa TO bdcdata_tab.

CALL TRANSACTION 'SE93' USING bdcdata_tab mode 'E'.

But there is one little problem next screen does not come back to the calling screen.

Thanks & Regards

Harpal Singh.

Former Member
0 Kudos

Hi,

Use Call Screen command.

Regards

SH

former_member1245113
Active Contributor

Hi,

Simply Create 5 Tcodes for your Module Pool Programs.

now it is clear that you have different Screen assigned to each tcode.

based on the condition call that transaction.

Like VA01, VA02, VA03, MD82, VA31, VA32 Etc, they all have same program but start with diff Screens

for more info go to SE80 and place SAPMV45A and go Tcodes and Check for clarity

" We can not call Module Pool Screens directly in Call Transaction
" It is mandatory to provide the First Screen while creating TCode For Module Pool Programs
" To the best of my knowledge we can use SKIP INITIAL Screen but can not call any screen we want directly
Hope this serves your purpose.

Cheerz

Ram

Former Member
0 Kudos

Problem resolved.

Thanks to all.