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

Call Transaction

Former Member
0 Likes
806

Hi Experts,

I want to call the customised (z)transaction which executes shop material ...

the requirement is like i need to CALL this transaction programitically (CALL TRANSACTION ZXXXX)

and do all the processing of the screen in bacground .. and complete the transaction.......

For this i have thought of the folloging solution.

CALL TRANSACTION 'ZMMX' USING bdcdata_tab.

here i need to fill the BDC_DATA with my screen number and field values etc.... like this....

DATA class_name TYPE c LENGTH 30 VALUE 'CL_SPFLI_PERSISTENT'.

DATA: bdcdata_wa TYPE bdcdata,

bdcdata_tab TYPE TABLE OF bdcdata.

DATA opt TYPE ctu_params.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLSEOD'.

bdcdata_wa-dynpro = '1000'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_CURSOR'.

bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.

bdcdata_wa-fval = class_name.

APPEND bdcdata_wa TO bdcdata_tab.

1. but this processing is foreground .. all the screen of the Transaction appears on the Sreen..

2.one more problem is on the first screen of the CALL TRANSACTION ZXXXX ...

PUSHBUTTONS to go to next screen and fill the required values ....

so how can i fill the field -->bdcdata_wa-fval = 'SEOCLASS-CLSNAME' and bdcdata_wa-fval = class_name.

as shown above .

Please, provide the suitable solutions for the above two points or other better solution is welcomed...

regards,

Jay.

6 REPLIES 6
Read only

andreas_mann3
Active Contributor
0 Likes
689

look F1 to:

CALL TRANSACTION tcode USING bdcdata MODE mod MESSAGES INTO itab.

A.

Read only

Former Member
0 Likes
689

>1. but this processing is foreground .. all the screen of the Transaction appears on the Sreen..

You are using All screen mode. Use No screen mode. Then it will not run in Foreground.

Read only

Former Member
0 Likes
689

Hi Jay,

If you do not want the screens displayed while BDC processing choose the MODE as 'N'.

CALL TRANSACTION tcode USING bdcdata MODE 'N' MESSAGES INTO t_bdcmsgcoll.

N -> No Screen Mode.

By default it is All Screen Mode(A), which shows all the screens.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
689

First of all, there should be an action by screen...

 

 'BDC_OKCODE'      '/00'

Once this is done, you should use the addition MODE of the statement CALL TRANSACTION.

For more information of this addition, just go to abap editor, position the cursor on the call statement, and then press F1...


MODE possible values
E : display only in case of error
N : No display
A : all display 

So there can be different screens in the table bdcdata and each of them need a BDC_OKCODE.

Stephan

Read only

0 Likes
689
Addition BDC_CURSOR

is not mandatory...

Read only

Former Member
0 Likes
689

To process the call transaction in background use mode N addition with ur call transaction statement.

CALL TRANSACTION 'ZMMX' USING bdcdata_tab MODE 'N'.

For the button value pass OKCODE value.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = 'OK_code value'.

APPEND bdcdata_wa TO bdcdata_tab.

Edited by: Joyjit Ghosh on Aug 6, 2008 9:22 AM