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

Currency Amount Problem When Using BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
1,642

Hi,

I need to post accounting documents via BAPI_ACC_DOCUMENT_POST using an input file.

In the input file, I have the document currency, document amount, local currency and local amount.

How do I post the 2 currencies with their amounts for each document line?

I understand that I can use the CURRENCYAMOUNT-CURR_TYPE to state '00' or '10'. However, i'm not sure how to do it.

Let's say in my file, my company code is AU so the local currency is AUD. The document currency is USD.

E.g. in my code:

currencyamount-itemno_acc = '001'.

currencyamount-curr_type = '00'.

currencyamount-currency = 'USD'.

currencyamount-amt_doccur = 1000.

APPEND CURRENCYAMOUNT.

CLEAR CURRENCYAMOUNT.

In this case, BAPI will calculate the local amount based on the exchange rate in the SAP table.

However, in my case, I want to use the local currency and local amount in my input file.

Should the code be:

currencyamount-itemno_acc = '001'.

currencyamount-curr_type = '00'.

currencyamount-currency = 'USD'.

currencyamount-amt_doccur = 1000.

  • assuming USD1 = AUD1.5

currencyamount-EXCH_RATE = '1.5'.

APPEND CURRENCYAMOUNT.

CLEAR CURRENCYAMOUNT.

Thanks in advance!

Cheers,

Chelsea

1 REPLY 1
Read only

Former Member
0 Likes
548

Hello Chelsea,

I am not sure about your coding. If you are intrested you can try AC_DOCUMENT_DIRECT_INPUT FM it is having many many fields and also having local and global currency fields where you can pass the value.

Thanks,

Amit

Message was edited by: Amit Gupta