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 behaviour

Former Member
0 Likes
1,341

In my program I am passing on some values to Call Transaction 'CJ9C' using bdc_data. The objective is the called transaction should show result to the user and then the control should be returned to the calling program once user presses back button. However its not happeneing and the called transaction does NOT show anything to user but the control immediately returns to the calling program.

I tried sevaral options from ctu_param but its not happeneing.

Any clues would be helpful.

Thanks in advance

8 REPLIES 8
Read only

Former Member
0 Likes
1,237

Hi Sam,

Post the code that calls the transaction. Make sure you used the mode 'A' to call BDC in foreground and check in debugging whether the control is transferred to the called transaction.

Regards,

Karthik

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,237

Hi Sam,

     I am posting sample code for your reference which calls CO02 with user values and returns to calling program on pressing back. Check if it is useful.

        bdcdata-program = 'SAPLCOKO1'.

        bdcdata-dynpro = '110'.

        bdcdata-dynbegin = 'X'.

        bdcdata-fnam = 'CAUFVD-AUFNR'.

        bdcdata-fval = production_order.

        APPEND bdcdata.

        bdcdata-fnam = 'BDC_OKCODE'.

        bdcdata-fval = '=ENTE'. "Enter command

        APPEND bdcdata.

        opt-dismode = 'E'.

        CALL TRANSACTION 'CO02' USING bdcdata OPTIONS FROM opt.

Regards.

Read only

0 Likes
1,237

Hi Sam,

Are you using call transaction in side loop?? and when you loop start are you refreshing BDCDATA structure???

Please post your code once.

Thanks & Regards,

buz_sap

Read only

Former Member
0 Likes
1,237

Hello All,

Thanks for the response and sorry for not responding.

@Arun,

yes the code is similar to what you have given.

One important thing that I fogto to add in earliar posting is that the same code works FINE in background and NOT in foreground.

In foregreaound if I use 'A' mode it at least shows me it is going inside the code of CJ9C but if I use anyother mode , it is not even showing me its going insde.

Read only

0 Likes
1,237

Please use addition MESSAGES INTO msg_tab and see if you get any message after call transaction.

CALL TRANSACTION 'CO02' USING bdcdata OPTIONS FROM opt  MESSAGES INTO msg_tab.

Regards

Read only

0 Likes
1,237

I observed its not even going into code of CJ9C, the messages table is empty.

Read only

venkateswaran_k
Active Contributor
0 Likes
1,237

Is it working in   Foreground ?   - End to End ?    OR

it is working in background only...

Also, kindly update your sample code...

Secondly, how you are supplying data to BDC...  How are you reading the file? 

Please note that,  any GUI functions like upload/download does not work in Background....

Regards,

Venkat

Read only

Former Member
0 Likes
1,237

If there is an explicit commit in the transaction, BDC is terminated immediately.  If this is true of your process, there is nothing (for practical purposes) that you can do to make your proposed solution work.

Neal