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: 

Tax Jurisdiction code and BAPI BAPI_SALESDOCU_CREATEFROMDATA1

Former Member
0 Kudos

I am using BAPI_SALESDOCU_CREATEFROMDATA1 to create sales orders. These orders are for people who do not have an SAP customer number and we do not want them to have a customer number. Because of this we are using a generic customer number so that requires us to change the ship-to and bill-to address. How am I suppose to do this? Right now I am using the partners structure BAPIPARTNR and passing it to the BAPI. I am using an existing partner number and overriding the name, address, district, etc... However I do not know, or know how to get, the Tax Jurisdiction code and that is required.

So, first, is there a better way to do this? Second, how do I get the tax jurisdiction code?

Davis

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi Davis,

Please check these FM perhaps they may help.

JURISDICTION_DETERMINE

JURISDICTION_CHECK

TAX_TXJCD_DETERMINE_TABLE

Regards,

Ferry Lianto

14 REPLIES 14

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check table KNA1-TXJCD?

Regards,

Ferry Lianto

0 Kudos

That won't help me because these are not customers in SAP. We are simply using a customer number and changing the relevant data. When we do this manually, through VA01, the tax code is automatically populated. When I use the BAPI it does not populate the tax code.

Regards,

Davis

ferry_lianto
Active Contributor
0 Kudos

Hi,

Which is the screen in VA01 that hold Tax Jurisdiction data?

Regards,

Ferry Lianto

0 Kudos

The Partner's screen on the header.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Sorry ... I could not find tax jurisdiction info (partner header screen) in my system.

Please press F1 on tax jurisdiction and check the technical information for field data reference.

Regards,

Ferry Lianto

0 Kudos

You may have to expand the fields on that section of the screen. It is located just under the Region (in the address block). Here is the information that F1 gives me:

Tax Jurisdiction Code

Specifies the tax authority to which taxes must be paid. It is always the city to which the goods were delivered.

Use

The tax location is used for calculating tax rates in the USA.

The tax location can be determined using the SAP regional structure or an external tool. The external tool takes precedence when determining the Tax Jurisdiction Code.

Technical info:

Program Name SAPLSZA1

Screen Number 0301

Program Name SAPLV09C

Status ADDRESS_DIALOG

<b> Table Name ADDR1_DATA

Field Name TAXJURCODE </b>

Data Element AD_TXJCD

DE Supplement 0

Parameter ID TXJ

Screen Field ADDR1_DATA-TAXJURCODE

Program Name SAPLV09C

Screen Number 5000

The field for the BAPI is BAPIPARTNR-TAXJURCODE

Davis

Message was edited by:

Davis

ferry_lianto
Active Contributor
0 Kudos

Hi Davis,

I checked in my other system (4.7), the tax jurisdiction is coming from customer master (XD03) under Address tab - Street Adress section.

So I guess you can check KNA1-TXJCD.

Regards,

Ferry Lianto

0 Kudos

We do have it stored there but these are not customers that I am dealing with (they don't have an entry in KNA1). Right now when we change the address of a partner (on an order) the tax jurisdiction is being populated automatically, based on the city and zipcode. Some zip codes will have more than one tax jurisdiction code so you will have to decide which one to use.

Regards,

Davis

ferry_lianto
Active Contributor
0 Kudos

Hi Davis,

Please check these FM perhaps they may help.

JURISDICTION_DETERMINE

JURISDICTION_CHECK

TAX_TXJCD_DETERMINE_TABLE

Regards,

Ferry Lianto

0 Kudos

Ferry,

That looks like it will work but the only problem is that some cities will have more than one tax code. When there is more than on a dialog box pops up asking for you to select one. This job is run in the background so dialogs won't work.

Davis

0 Kudos

Ferry,

The last FM works great! TAX_TXJCD_DETERMINE_TABLE

That FM returns a table of all tax codes for a given city/zip. This is exactly what I needed!

Thank you so much for finding this FM for me!

Davis

Former Member
0 Kudos

Is your generic customer number defined as a one-time-only customer?

Rob

0 Kudos

Rob,

I'm not sure what a one-time-only customer is. All I know is that we use this same customer number several times a day 5 days a week and each time it is for a new order/location.

Davis

ferry_lianto
Active Contributor
0 Kudos

Hi Davis,

Glad to help ...

Also you can try FM DETERMINE_TXJCD_EXTERNALLY with NO_DIALOG = 'X'.

The customer master program is using this FM to determine tax jurisdiction.

Regards,

Ferry Lianto