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_ACC_DOCUMENT_POST, Taxes and remote enabled function models

Former Member
0 Likes
1,001

I am using BAPI_ACC_DOCUMENT_POST to create AR customer invoices but I’ve run into a problem with taxes. I would like to use just the information that a user going through FB70 would need to create the invoice but including taxes requires me to get the account and do the calculation for the taxes. I could solve all of my problems by using the FM CALCULATE_TAX_FROM_NET_AMOUNT except it’s not remote enabled.

I see two possible solutions:

1) Wrapper CALCULATE_TAX_FROM_NET_AMOUNT in a remote enabled function module.

.. OR ..

2) Require the user to provide the tax amount and the account that it should go to.

I don’t like (1) because the user has to install a custom FM on their system and I don’t like (2) because it’s not user friendly for them to have to calculate the taxes (depends on the jurisdiction) or happen to know the account number. So far it looks like (1) is the best choice.

Is there any better way to deal with this problem? Another FM besides BAPI_ACC_DOCUMENT_POST that handles taxes and is remote enabled? Another FM besides CALCULATE_TAX_FROM_NET_AMOUNT that calculates the taxes and returns the account number that’s remote enabled? Other alternatives?

Thanks in advance for any help,

Karl

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
788

Hi

I believe the best solution is include the fm CALCULATE_TAX_FROM_NET_AMOUNT in new RFC fm.

Max

5 REPLIES 5
Read only

Former Member
0 Likes
788

No guarantees, but look at <b>BAPI_ACC_BILLING_POST</b>.

Rob

Read only

0 Likes
788

BAPI_ACC_BILLING_POST has the same issue as BAPI_ACC_DOCUMENT_POST but thanks for the suggestion.

Read only

Former Member
0 Likes
789

Hi

I believe the best solution is include the fm CALCULATE_TAX_FROM_NET_AMOUNT in new RFC fm.

Max

Read only

0 Likes
788

I’ve already started coding a remote enabled FM to call CALCULATE_TAX_FROM_NET_AMOUNT. Thanks for confirming the path I’m taking

Read only

Former Member
0 Likes
788

Problem solved! I ended up writing my own wrapper but eventually discovered BBP_CALCULATE_TAX_FRM_NET_40B which does the same as CALCULATE_TAX_FROM_NET_AMOUNT and its remote enabled.