how do i use alternative posting keys for customer line items in a BAPI posting to create FI doc?

1 day ago 1

hi, 

I'm penning an ABAP to station a lawsuit papers successful FI, that incorporate different GL / Tax items. 

i request to usage a antithetic posting cardinal (other than default  11 for a recognition to a lawsuit line). 

I would similar to usage '14' for the credit. 

I used: 

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader wa_header
  TABLES
    accountreceivable lt_accountrec
    accountgl      lt_accountgl
    currencyamount lt_item_currency
    accounttax     lt_item_tax
    return         lt_return.

where

 lt_accountgl        TYPE TABLE OF bapiacgl09,
      lt_item_currency  TYPE TABLE OF bapiaccr09,
      lt_accountrec     TYPE TABLE OF bapiacar09,
      lt_extension        TYPE TABLE OF bapiextc ,
      lt_item_tax       TYPE TABLE OF bapiactx09,
      lt_return         TYPE TABLE OF bapiret2. 

i utilized EXTENSION  to populate bschl (posting key) of the lawsuit enactment point successful my document. 

while moving done the BAPI, I saw that ACCIT had the posting cardinal substituted for the lawsuit enactment (based connected the extension), and it was carried done successful T_ACCIT / C_ACCIT tables portion moving done BAPI_ACC_DOCUMENT_POST. But eventually, determination was a relation CHECK_AND_FILL_ACC_DOCUMENT. 

in here, 

PERFORM fill_bapi_accit 

TABLES account_receivable....

account_gl...

currency_amount... 

Only axenic GL items stay successful the account_gl table.

The posting cardinal that one wanted for the lawsuit enactment disappeared.  Consequently, erstwhile the papers was posted, one did not person '14' arsenic the recognition posting key. It was the default '11' instead. 

Does immoderate 1 cognize however one tin propulsion successful my ain posting cardinal for lawsuit line?

I'm utilizing ECC 6 EHP 8. 

Read Entire Article