Hi Sandrine,
You could try using a script recorded with GUI Scripting, but it could only be on one column, i.e. Country or Tax category. Since neither might be unique enough, it usually doesn't work.
Otherwise, a function module (BAPI) is the best way to go. Since SAP doesn't provide one, we do in our Winshuttle Function Module. It's called /WINSHTLQ/TRN_FUNC_CUSTOMER
I'm attaching a draft document that describes the functionality it has. Note there is other functionality in this function module for customer, as well. Please forgive typos, spelling and grammar.
- For this one I_MODE is TAX, and you pass in the customer number, sales org, dist channel and division all in ExportOthers
- For the tax classes use table T_KNVI. I used the change type (field KZ) of "U" for update.
- There is another table called GT_TAX_MSG that has the message associated with it called Message.
I am also attaching 2 examples. One does one tax country/category at a time, and one does it in a loop. Both only deal with tax classes and only do updates, so you can modify to meet your needs. You'd have to use Studio Direct to do so.
If you're not familiar with Direct, you're missing out :) Use the training links on the Community site for Direct OR contact your sales rep to get you information on Training and/or mentoring options.
Hope this helps.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
pse | Winshuttle North America
------------------------------
Original Message:
Sent: 08-28-2019 07:51
From: Sandrine Leclair
Subject: Customer master data - tax classification modification
Dear all,
I have to provide the possibility to update the tax classification in Customer master data (XD02 / Sales area data / Billing documents / Taxes), but I don't know how I can make sure the expected line will be updated (correct country and tax category).
Did someone already made this type of script ?
Thanks in advance for your support.
------------------------------
Sandrine Leclair | Business Application Manager ESE Group
ESE France | 0033 6 73 68 32 63
------------------------------