Application Development 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: 

BDC for VI01 can't transfer

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member

I did finally once up with an answer to this one. 

Never cursor to a flag / check box (any object that is not a classical fields)!

Neal

1 REPLY 1

Former Member

I did finally once up with an answer to this one. 

Never cursor to a flag / check box (any object that is not a classical fields)!

Neal