Skip to Content
0
Former Member
Nov 04, 2013 at 05:22 PM

BDC for VI01 can't transfer

269 Views

I'm trying to write a BDC from VI01 to create Shipment cost documents. The last step is to go from the main screen to the settlement tab and click transfer and save. That code looks like:

PERFORM bdc_dynpro USING 'SAPLV54K' '0200'. PERFORM bdc_field USING 'BDC_CURSOR' 'VFKN-KOSTL(01)'. PERFORM bdc_field USING 'BDC_OKCODE' '=BACK'. PERFORM bdc_field USING 'VFKN-SAKTO(01)' wa_zshpcst_h-saknr. PERFORM bdc_field USING 'VFKN-KOSTL(01)' wa_zshpcst_h-kostl.

PERFORM bdc_dynpro USING 'SAPMV54A' '0040'. PERFORM bdc_field USING 'BDC_OKCODE' '=PABR'.

PERFORM bdc_dynpro USING 'SAPMV54A' '0042'. PERFORM bdc_field USING 'BDC_OKCODE' '/00'. PERFORM bdc_field USING 'BDC_CURSOR' 'VFKPD-SLFREI'. PERFORM bdc_field USING 'VFKPD-SLFREI' 'X'.

PERFORM bdc_dynpro USING 'SAPMV54A' '0040'. PERFORM bdc_field USING 'BDC_OKCODE' '=SICH'.

PERFORM bdc_transaction USING 'VI01'.

PERFORM close_group.

It hits '=PABR' and drops out of BDC mode no mater what I do. It also doesn't transfer the 'X' into VFKPD-SLFREI. Anyone have any thoughts on what could be going wrong? Is there something else I should be doing to issue the transfer?