Skip to Content
0
May 22, 2014 at 05:10 AM

Problem in FBV2 BDC

231 Views


Hi All,

I am changing parked documents and making them in save as complete status.

My program is :

loop on records

call transaction 'FV75' for parking.

if parking is done then

call transaction 'FBV2' for save as complete.

if error return error

endloop.

Input rec 1 rec 2 rec 3 rec 4

Expected output

Parked document Error Message Status 1234567890 account X requires an CO assignment error in Save as complete Customer A is not defined error in Parking 1234567891 Save as complete 1234567892 Save as complete

Actual Output

Parked document Error Message Status 1234567890 account X requires an CO assignment error in Save as complete Field INVFO-WAERS 1. 2 is not an input field error in Parking Field INVFO-WAERS 1. 2 is not an input field error in Parking Field INVFO-WAERS 1. 2 is not an input field error in Parking

If I am running my report with in same session then parked document is getting stuck into FBV2 session and hence when I am going for next record parking, it is opening the last parked document in change mode. As a result for all subsequent records it is giving error ' Field INVFO-WAERS 1. 2 is not an input field'.

please find recording for FBV2

IF lv_xwffr EQ lc_x. " WF is getting triggered for posting
PERFORM bdc_dynpro USING 'SAPMF05V' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR' 'RF05V-BUKRS'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'RF05V-BUKRS' lc_ABC.
PERFORM bdc_field USING 'RF05V-BELNR' lv_belnr.
PERFORM bdc_field USING 'RF05V-GJAHR' gv_curry.
PERFORM bdc_dynpro USING 'SAPMF05A' '1200'.
PERFORM bdc_field USING 'BDC_OKCODE' '=PBBP'.
PERFORM bdc_dynpro USING 'SAPMF05A' '1200'.
PERFORM bdc_field USING 'BDC_OKCODE' '/n'.
PERFORM bdc_field USING 'BDC_OKCODE' '/EEND'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE' '=YES'.

Please suggest me if I am doing any thing wrong.. I am not able to find.

Thanks in advance.