‎2006 Jul 06 3:44 AM
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
‎2006 Jul 06 5:12 AM
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