‎2009 Aug 03 7:08 AM
Hi all,
I have used the BAPI_ACC_DOCUMENT_POST to create the customer invoice.But, when i run the program it is giving the error as
Error in document: BKPF $ DEVCLNT250
Incorrect entry in field OBJ_TYPE: BKPF
i am passing the entry as OBJ_TYPE = 'BKPF'.
Can anyone let me know wat shoud i pass to this parameter.
regards
Mustafa
‎2009 Aug 03 8:37 PM
The Document is created for customer invoice but the profit center and the value date is not uploading.It is giving the error as Profit center 1000/50001 does not exist. For any profit center it is giving the same error as it does not exist.
but when we post the document thru fb70 transaction it is getting posted with the profit center.
Can anyone let me know the possible reason for that.
regards
Mustafa
Edited by: Mustafa Shareef on Aug 3, 2009 9:37 PM
‎2009 Aug 03 7:12 AM
‎2009 Aug 03 8:07 AM
Please only post relevant portions of your code ***
Hi Raymond,
i have made the changes as per the note like making the fields blank for the obj_type,Obj_sys and OBJ_KEY. but it is giving the following error.
Error in document: BKPFF $ DEVCLNT250
E
FI/CO interface: Inconsistent FI/CO document header data for updating
E
Required field COMP_CODE was not transferred in parameter DOCUMENTHEADER.
regards
Mustafa
Edited by: Rob Burbank on Aug 3, 2009 5:34 PM
‎2009 Aug 03 8:10 AM
‎2009 Aug 03 9:58 AM
2 0AA98 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR
2 0AA98 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
2 0AA98 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
2 0AA98 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
2 0AA98 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
2 0AA98 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
3 0AA99 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR
3 0AA99 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
3 0AA99 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
3 0AA99 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
3 0AA99 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
3 0AA99 1000 1234556 3.8.09 3.8.09 Bapi Test 1000 SAR 790100 1000 200 SAR
i m using the above test template to create the customer invoice but it is giving the error as '-'cannot interpret as a number.i am concatenating the amount in doc. currency with '-'.but if i remove that variable and assign the values directly from excel file it is giving the error as GL Account is not assigned for line item 2.
i m able to uplaod the data for one customer and the document is getting created.but for multiple header data and their line items it is giving the error.
‎2009 Aug 03 10:06 AM
Try to use the function modules BAPI_CURRENCY_CONV_TO_EXTERNAL and BAPI_CURRENCY_CONV_TO_INTERNAL to convert currency amount ([Application Example|http://help.sap.com/saphelp_nw04/helpdata/EN/a5/3ec9664ac011d1894e0000e829fbbd/frameset.htm])
Look also at transaction BDBS which may generate a conversion FM between the BAPI parameter structure and a ddic structure.
Regards,
Raymond
‎2009 Aug 03 12:33 PM
‎2009 Aug 03 8:37 PM
The Document is created for customer invoice but the profit center and the value date is not uploading.It is giving the error as Profit center 1000/50001 does not exist. For any profit center it is giving the same error as it does not exist.
but when we post the document thru fb70 transaction it is getting posted with the profit center.
Can anyone let me know the possible reason for that.
regards
Mustafa
Edited by: Mustafa Shareef on Aug 3, 2009 9:37 PM
‎2009 Aug 03 9:43 PM
You need to take leading zeros in account fro profit center #. if your profit center is 50001, in database it is being stored as 0000050001.
you can sue function call CONVERSION_EXIT_ALPHA_INPUT to convert it to SAP internal format before passing it to BAPI