Skip to Content

Populating tax data in BAPI_SALESORDER_CREATEFROMDAT2 (Tax Code)

Jan 26 at 02:43 PM


avatar image

Hi all,

I am creating a sales order for online sales using BAPI_SALESORDER_CREATEFROMDAT2.

In the segment E1BPCOND i am passing the price conditions like PR00, MWST.

For MWST I am passing the tax % as received from the website. All good so far.

My issue is with the tax code. When I pass the tax code in E1BPCOND-TAX_CODE it does not show up in the sales order item. I also tried using E1BPSDITM-SD_TAXCODE but it didn't help.

Please advice how can I go about achieving this. Am I missing some additional parameters in the BAPI?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Veselina Peykova
Jan 27 at 07:18 AM

You kind of lost me with the explanation because you mention IDOC segments and then BAPI_SALESORDER_CREATEFROMDAT2 (by the way, you typed the FM name incorrectly both in the title and in the question body, please change it - so that it can be found easily by others).

Anyways, in SAP notes Expert Search app I looked for TAX_CODE, fuzzy threshold: 1.0 (exact); Components (start with): SD; released on: no restriction and one of the results is an old consulting note: 1042797 - BAPI: Tax_code not transferred.

I suggest that you read it and adjust the current solution according to the recommendation by SAP.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi, Thanks for pointing out. The name of the BAPI is indeed incorrectly spelled in the title and body. I have rectified it now. I had a look at the note and it advises to maintain the master data in SAP so that the tax code can automatically be determined.

Because the field for tax code is available in the BAPI wondering what functionality it supports. I want to drive the tax code and tax % determination through the BAPI. When I tested this the % is getting passed correctly but not the tax code.