12-24-2010 8: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
12-27-2010 12:48 AM
try this option & fill the rest of the structure according to your needs
i_head-obj_type = 'BKPFF'.
i_head-obj_key = '$'.
i_head-obj_sys = l_logsys.
i_head-bus_act = 'RFBU'.
12-27-2010 12:48 AM
try this option & fill the rest of the structure according to your needs
i_head-obj_type = 'BKPFF'.
i_head-obj_key = '$'.
i_head-obj_sys = l_logsys.
i_head-bus_act = 'RFBU'.
12-27-2010 11:13 AM
* Populate header data of document
wa_docheader-obj_type = 'REACI'.
wa_docheader-obj_key = '$'.
wa_docheader-obj_sys = 'ECDCLNT090'. "Logical System
wa_docheader-bus_act = 'RMRP'.
01-31-2011 11:19 AM
Convinced business to accept the external reference as part of the integrated OBJ_KEY. They accepted it (as a good idea).
11-17-2023 5:55 PM
Hi Sr:
Please can you tell me what fields I put in the following fields:
OBJ_TYPE:
OBJ_KEY:
OBJ_SYS:
OBJ_KEY_R
Thanks for your help,
Regards,
Nelson D. Tovar