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

BAPI simulating FB01 in test mode?

Former Member
0 Likes
1,196

Hi all,

I am looking for a BAPI or function module which can be used in order to simulate transaction FB01 in test mode.

We receive Idoc in USD and we want to calculate amount local currency just before execution of Idoc. In fact in some case if we do not calculate the balance the FI can not be create because balance is not equal to 0. Do you know a function module or BAPI which calculate amount from currency to local currency like FB01. We have exchange rate.

Explanation of test found using FB01:

01 H 100 USD -> 89,96 GBP

02 H 100 USD -> 89,96 GBP

03 S 200 USD -> 179,93 GBP (instead of 179,92)

When you simulate the document using transaction FB01 the item 01 becomes 89,97 GBP in order to have a balance equal to 0.

We want to have the same result using a function module that is to say.

01 H 100 USD -> 89,97 GBP

02 H 100 USD -> 89,96 GBP

03 S 200 USD -> 179,93 GBP (instead of 179,92)

I tried with BAPI_ACC_DOCUMENT_CHECK but I am unable have the local currency amount if I use exchange rate.

I need your help in order to find this....

Thanks for your help.

1 ACCEPTED SOLUTION
Read only

glauco
Active Contributor
0 Likes
646

Hi David.

There is a standard program which uses this BAPI in line 81 and post in line 117:

Program: ACC_BAPI_TEST_DOCUMENT

I think it's a good example of its use.

best regards,

Glauco

1 REPLY 1
Read only

glauco
Active Contributor
0 Likes
647

Hi David.

There is a standard program which uses this BAPI in line 81 and post in line 117:

Program: ACC_BAPI_TEST_DOCUMENT

I think it's a good example of its use.

best regards,

Glauco