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

rounding problems

former_member298059
Active Participant
0 Likes
1,552

Dear all,

We are using the BAPI_ACC_DOCUMENT_POST  to do a reclassification posting F-02 for manager motives.

We need to calculate the exchange tax. We do Amount in Local Currency / Amount in Forreing Currency.

The problem is that in the BADI  LV_EXCH_RATE has 13 decimals but GS_CURR-EXCH_RATE moves only 5 decimals so we have rounding problems. We are doing the accounting with GS_CURR-EXCH_RATE that has only 5 decimals.

Someone know how to move more than 5 decimals on the posting.

Cheers,

marta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,054

Marta,

why not try to round the variable before you pass it to the badi or round the o/p of the badi before passing it to further processing.

You can use the formatting options in the write statement CURR/DEC/ROUND to do this in a local variable and then pass the local variable to the badi or pass the o/p of the badi to a local variable, then round it and then use this rounded value.

Thanks,

Vikram.M

1 REPLY 1
Read only

Former Member
0 Likes
1,055

Marta,

why not try to round the variable before you pass it to the badi or round the o/p of the badi before passing it to further processing.

You can use the formatting options in the write statement CURR/DEC/ROUND to do this in a local variable and then pass the local variable to the badi or pass the o/p of the badi to a local variable, then round it and then use this rounded value.

Thanks,

Vikram.M