cancel
Showing results for 
Search instead for 
Did you mean: 

Post Local currency via BAPI_ACC_DOCUMENT_POST

avijit_das
Explorer
0 Kudos

Hi,

We are trying to post FI receipt using BAPI_ACC_DOCUMENT_POST. Our company code currency is INR. While posting document with document currency USD, we want to post one line item with document currency amount = 0.00 USD and local currency amount as exchange difference amount. The same was possible via FB05.

EG: Via FB05

The same is required through BAPI. Kindly help.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor

Just create two records in currency amount table parameter, one with zero amount in document currency and one with not-zero amount in local currency.

    " Document currency with zero amount
    clear ls_currency.
    ls_currency-itemno_acc = item.
    ls_currency-amt_doccur = 0.
    ls_currency-currency   = waers.
    ls_currency-curr_type  = '00'.
    append ls_currency to lgt_currencyamount.
    " Local currency amount
    clear ls_currency.
    ls_currency-itemno_acc = item.
    ls_currency-amt_doccur = amount.
    ls_currency-currency   = hwaer.
    ls_currency-curr_type  = '10'.
    append ls_currency to lgt_currencyamount.
avijit_das
Explorer
0 Kudos

Thanks, we found the solution as suggested by you. The only different we did was to maintain the above code set for all itemno_acc in currency table and it worked.

Former Member
0 Kudos

Hi Avijit,

I am facing the same issue, but couldn't get the line items created for exchange difference using the BAPI. Can you please guide me or provide me the source code.

Regards

Sreeni

Answers (1)

Answers (1)

former_member334084
Discoverer
0 Kudos

Dear Das,,

It is possible with the BAPI BAPI_ACC_DOCUMENT_POST , however I can't access the source codes right now. The solution is to add another entry to the negative lines (when you detect it) and leave the amount 0.00 and it will correct for you.

Regards,

Nick Tang