Application Development 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: 

BAPI_ACC_DOCUMENT_POST - without converting the amount in local currency

former_member300258
Participant

Hi

I am trying to do the posting through  BAPI_ACC_DOCUMENT_POST and it works fine. But the issue is the amount I am passing as local currency from excel was not accepted and the document currency was actually converted and filled in local currency. What to do to make the BAPI to accept the value for the local currency without being converted automatically.

Thanks in advance.

5 REPLIES 5

arindam_m
Active Contributor
0 Kudos

Hi,

I think you should check the following the structure BAPIACCR09, used in the BAPI for amount and currency. you can specify the amounts in the BAPI.

The line items populated will have similar lines as below:

  currencyamount_itab-itemno_acc = '00000001'.

  currencyamount_itab-amt_doccur = wa_usd_amount.

  currencyamount_itab-currency = 'USD'.

  currencyamount_itab-curr_type = '00'.

  APPEND currencyamount_itab.

You might have change the curr_type to '10'.

Cheers,

Arindam

0 Kudos

Hi Arindam,

Sorry for the late reply.

In fact I am not passing any value to curr_type and no luck even after passing as you suggested. Here is my code and the value being passed to amt_base is local currency which automatically gets converted by BAPI. But I want the local currency as such passing from the excel file without having converted.

T_CURRENCYAMOUNT-ITEMNO_ACC = ' 0000000001'.

T_CURRENCYAMOUNT-CURRENCY = 'CHF'.

T_CURRENCYAMOUNT-AMT_DOCCUR = WA_TAB-DOC_AMT. "1200.00"

T_CURRENCYAMOUNT-AMT_BASE = WA_TAB-LCL_AMT. "1220"

APPEND T_CURRENCYAMOUNT.

T_CURRENCYAMOUNT-ITEMNO_ACC = ' 0000000002'.

T_CURRENCYAMOUNT-CURRENCY = 'CHF'.

T_CURRENCYAMOUNT-AMT_DOCCUR = WA_TAB-DOC_AMT. "-1200.00"

T_CURRENCYAMOUNT-AMT_BASE = WA_TAB-LCL_AMT. "-1220.00"

APPEND T_CURRENCYAMOUNT.

arindam_m
Active Contributor
0 Kudos

Hi,

I think you might have to pass the local currency type to indicate its a posting in local currency. Also please check if the Account allows you to post in local currency. Sometimes they are configured to always do a conversion as per exchange rates in system and then posted.

Cheers,

Arindam

0 Kudos

Arindham - I don't find the currency type for local currency in the domain CURTP. while doing manually in FBB1 transaction, it accepts whatever the value we give in the local currency without converting. In that case, how can I do this with BAPI.

Thanks.

NooruBohra
Participant
0 Kudos

Hi Kalidas,

I am having similar issue with group currency, Did you find any solution for this?