简体   繁体   中英

VA01 BDC_OKCODE /00 not working as expected

In my report I am calling the transaction VA01 with BDC data, and everything works as expected, the data is being filled correctly, but bdc_okcode /00 does not work.

I simply add the ok-code to the internal table:

gs_bdcdata-fnam = 'BDC_OKCODE'.
gs_bdcdata-fval = '/00'.
APPEND gs_bdcdata TO gt_bdcdata.

...

CALL TRANSACTION 'VA01' USING gt_bdcdata.

I get a popup that shows the ok code.

在此处输入图像描述

My expectation is that it should navigate to the next dynpro.

Also I tried to record the transaction through the transaction SHDB to see if I have to do something differently but the BDC data is basically the same. Playing back the recording shows the same popup with the code.

How can I solve that?

The MODE addition is not used by the CALL TRANSACTION. If one of the additions MODE or OPTIONS FROM is not used, the effect is the same as if mode had the content "A". Which means the call transaction stops by each screen.

It has to be called like this:

DATA lv_mode TYPE char1 VALUE 'N'. "N - BI won't stop, E - will stop by error, A - will stop at every screen

CALL TRANSACTION 'VA01' 
     USING gt_bdcdata
     MODE lv_mode.

A better option is to use the OPTIONS FROM addition, this gives you more opportunities:

DATA: ls_options TYPE ctu_params.

ls_options-dismode = 'N'. "see explanation above

CALL TRANSACTION 'VA01' 
     USING gt_bdcdata
     OPTIONS FROM ls_options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM