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: 

F-43 BDC, Multiple Posting key,

vidyasagarc
Explorer
0 Kudos

Hi Gurus,

                I am developing bdc for f-43, it is to insert salary details for one company code. it will be having multiple posting keys for one document, like one document may contain 10 line items, another may contain only 2 line items, with different posting keys, that means different screens, the problem here is

it is working good for posting key 40 and 50, when it comes to posting key 39 or 29, 1st  line item is being inserted correctly, when it comes to second line item

the data is not getting into screen, help me please.

perform bdc_dynpro      using 'SAPMF05A' '0304'.

perform bdc_field       using 'BDC_CURSOR'

                               'BSEG-SGTXT'.

perform bdc_field       using 'BDC_OKCODE'

                               '/00'.

perform bdc_field       using 'BSEG-WRBTR'

                               wa_item-wrbtr. "'5000'.

perform bdc_field       using 'BSEG-ZUONR'

                               wa_item-zuonr. "'Interest1'.

perform bdc_field       using 'BSEG-SGTXT'

                               wa_item-sgtxt. "'Interest for Arohi'.

perform bdc_field       using 'BSEG-GSBER'

                               WA_ITEM-GSBER.

PERFORM BDC_FIELD       USING 'BSEG-PRCTR'

                               WA_ITEM-PRCTR.

perform bdc_field       using 'RF05A-NEWBS'

                               wa_ITEM-newbs. "'40'.

perform bdc_field       using 'RF05A-NEWKO'

                               wa_ITEM-newko. "'45001100'.

perform bdc_field       using 'rf05a-newum'

                               wa_item-newum.

i am looping this thing for multiple posting keys changing screen numbers using case statement.

2 REPLIES 2

Former Member
0 Kudos

Hi

In this transaction, the screen sequence would vary based on the posting keys you enter.

Try the below options

1. Make a recording of the transaction with Posting keys 39 or 29 and include them in your code. You would then need to use  IF/ELSE  Statement  to handle based on ur posting key input.

This would work if u have fewer posting keys to upload.

2. Go for below BAPIS

BAPI_INCOMINGINVOICE_CREATE

BAPI_ACC_DOCUMENT_POST

former_member200345
Contributor
0 Kudos

Hi, It may be because of the field status groups maintained in the G/L master data. The fields at item level of a perticular G/L account are controlled by the Field status group maintained in the G/L Master data.