Application Development and Automation 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: 
Read only

Problem in BAPI for FB70

Former Member
0 Likes
1,348

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,153

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

8 REPLIES 8
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,153

Look at this OSS [ Note 561175 - BAPI posting in accounting with FI as reference|https://service.sap.com/sap/support/notes/561175] which should solve your problem.

Regards,

Raymond

Read only

0 Likes
1,153
      • 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

Read only

0 Likes
1,153

As specified in the note you must fill COMP_CODE in DOCUMENTHEADER.

Regards,

Raymond

Read only

0 Likes
1,153

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.

Read only

0 Likes
1,153

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

Read only

Former Member
0 Likes
1,153

There was a problem with the template.

Solved now..

Read only

Former Member
0 Likes
1,154

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

Read only

0 Likes
1,153

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