Skip to Content
Former Member
Dec 24, 2010 at 08:11 AM



Hi All

I'm using BAPI_ACC_DOCUMENT_CHECK, BAPI_ACC_DOCUMENT_POST & BAPI_TRANSACTION_COMMIT to create a Vendor Invoice. This is working fine, but I have a problem with the OBJ_KEY. In FBL1N, our Object key is usually a concatenation of DocumentNo|CompanyCode|FiscalYear. The Company Code and Fiscal Year is obviously quite easy to get, but how do I get the Document Number(BELNR) prior to running the BAPI_ACC_DOCUMENT_POST to enable me to populate the OBJ_KEY in full? If I leave out the OBJ_KEY, the BAPI fails - it does not by default create this concatenated field.

Best regards, Adrian