Automate

 View Only
  • 1.  Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Posted 01-17-2019 06:15
    Edited by Anonymous User 03-01-2024 14:07



  • 2.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Posted 01-17-2019 06:43
    Edited by Lee Henty 03-27-2024 12:42

    Hi Marco,
    Please check this if this is helpful.
    Tax Info 

    ------------------------------
    RahulGupta
    | India
    ------------------------------



  • 3.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Posted 01-18-2019 03:59
    Edited by Lee Henty 03-27-2024 12:42

    What we did was that we created a dummy material (flagged for deletion) that is extended to all of the sales organizations and including all the required tax classification for all tax/country combinations.

    When we extend a material to a sales organization, then we copy the settings of the dummy material, at least for the tax classification. Of course, in this case the script has to be separate from creating basic/plant etc.

    When a new tax/country combination or sales organization is introduced, then we have to update the dummy material.
    But it is still a lot easier, then maintaining an extremely complex matrix for the tax classification, and pulling it each time from a sharepoint list - it might have to be several thousand rows long and sharepoint cannot handle it anyway.

    So copying a dummy material has worked for us so far pretty well.

    P.S. Extending a material to a plant should not involve clicking on the Sales 1/2 views, so ideally it should not bring up tax class issues. Only if you extend the material to a sales org. But not if you extend it to a plant.

    ------------------------------
    Attila Nemeti | Master Data Specialist
    Celanese International Corporation | [City] | +3616277652
    ------------------------------



  • 4.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Employee
    Posted 01-21-2019 09:41
    Edited by Lee Henty 03-27-2024 12:43

    Hi Marco,

    You can record the tax classifications by the screen full as independent fields, i.e. tax class 1, tax class 2, etc. 

    You can also use a BAPI for this:  BAPI_MATERIAL_SAVEDATA.  It's especially helpful if you need to find a specific tax class in the table to update it.  If you want an example, please let me know.  

    For either approach, if you have a varying number by sales area, then you'll need to use IF statements to enter only the values you need for each one.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle North America
    ------------------------------



  • 5.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Posted 01-28-2021 09:49
    Edited by Lee Henty 03-27-2024 12:43

    Hello Sigrid,

    Now i have the request to read and maintain tax data in material master record, via bulk in one sales org. 
    I want to use transaction, maybe via MM02 do do that, i am not familiar in using BAPI at the moment.
    Do you have an example, a skript template which i can use?
    Many thanks for your support!

    Best Regards
    Marco



  • 6.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Employee
    Posted 01-28-2021 10:08
    Edited by Lee Henty 03-27-2024 12:44

    Hi Marco

    Some questions first, please.

    1. how many tax classes are you working with?
    2. are they consistent for the sales areas, i.e. the same?
    3. are you updating all of them or just selective tax classes?

    The answer to those questions would drive the best approach.  

    The simplest method would be if you have a list of materials and the sales area data to read them and update them in Transaction in one row.   If you use a BAPI or query to read them, you'll end up with a row per tax class for each material, so it's harder to format for input.

    Please advise,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 7.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Employee
    Posted 01-29-2021 16:25
    Edited by Lee Henty 03-27-2024 12:45

    @Marco

    The goal of the community to share questions and answers, learning from each other.   Please don't send me private messages, as it defeats the purpose. :) 

    Your reply to my questions:

    1. how many tax classes are you working with? At the moment maximum 6, MLAN.TAXM1 to MLAN.TAXM6
    2. are they consistent for the sales areas, i.e. the same? No, it depends on MLAN.ALAND, the delivering country
    3. are you updating all of them or just selective tax classes?  It must be possible to add new classes or to modify existing classes, if they are wrong. In my actual case 4 classes are already filled, we want to fill 2 more due to local legal requirements.

    To have also a history it would be fine to have one sheet with reading tax classes, the other sheet only to maintain or complete classes.  For only reading i have already made a query, Tables MARA, MLAN, and MVKE, that was easy, but i have nothing to maintain it via bulk with Winshuttle via MM02. 

    For 2 above, the consistency question had to do with the number of tax classes in your sales org/dist channel combination, and that they were all the same, i.e. tax class 1 is DE MWST, tax class 2 is US UTXJ, etc.  Also, are they the same across various sales org/dist channel combinations? 

    For 3 above, you state you want to update 2 but then you state you want to update all of them.  Which is it please?

    For output, you have options

    • Query, which you have done - best suited for input with loops 
    • Use a BAPI to extract based on a list of materials - best suited for input with loops, although you can copy the tax table and have individual fields for all 6 tax classes, giving you 18 output and input fields, basically flattening the data to one row
    • Use a Transaction GUI script based on a list of materials - best suited to input with a single row


    For loads:

    • For Transaction, you will have to use GUI scripting:
      • to position to the right row if you want to update individual tax classes 
      • or if you want to navigate through the tiny window that shows the tax classes, i.e. scroll down or hit page down, to either read or update all of them

                 Neither will work with batch/non-batch.

    • Or you can use BAPIs:
      • BAPI_MATERIAL_SAVEDATA to update the tax classes, passing in the material and then for taxes the departure country, type and class.
      • BAPI_MATERIAL_GET_ALL to read the tax classes, passing in material number, sales org and distribution channel

           You can format in a loop, which is the default, or single row, which means copying & pasting the tax table in Expert Mode and having input fields for each set of tax input fields - departure country1, tax type1, tax class1; departure country 2, tax type2, tax class2; etc  - flattening out the data.

    The loop is more flexible, but more work to format the input.  The flattened data is easier to use, but doesn't offer the same flexibility as a loop, in that you have to accommodate the number of tax classes you want to work with.

    You'll also have to consider the various sales org/distribution channel combinations you have.  For example in my demo system:

    • 1000/10 has 2 tax classes
    • 3000/10 has 7 tax classes

    So you'd either have to create scripts to handle each individually, or one script with the maximum number of tax classes and then use IF conditions to skip the input if they're blank.

    Loop input format example

    Flattened input example


    Those are you options.  Please think about what you want to do, what would be best for the people using the template.   Let us know, and I may have an example.

    Best Regards,
    Sigrid





    ​​

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 8.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Posted 02-03-2021 03:06
    Edited by Lee Henty 03-27-2024 12:46

    here is an example using BAPI_MATERIAL_SAVEDATA, this little script is part of a large chain used for MM upload:


    ------------------------------
    jan ketele | Sr engineer release mgt
    Xeikon Manufacturing NV | +3234431875
    ------------------------------



  • 9.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Employee
    Posted 02-03-2021 10:58
    Edited by Lee Henty 03-27-2024 12:47
      |   view attached

    Hi Marco

    Am attaching 4 variations in a workbook.

    Loop for all country, type and class combinations you want to load/update

    Flat V1 - copied the tax class table and removed the loop - input country, tax category and tax class for each.  You can extend and copy the table to handle more tax classes 


    Flat V2 - Like V1 but the country and tax type are hard coded in the script

    Flat V3 - like the Loop version but removed the loop.  This will post the material, country, type and class one at a time

    The template and all of the BAPI's are in the zip file.

    You can also use the BAPIs to download values.  Pick your favorite layout, keep the material, country and tax type as upload fields and change the map direction for the tax class to download.

    Again, you'll need to use GUI scripting with an Indexed IF on a single column to find the row, if you want to use Transaction.

    Hope this helps,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 10.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Posted 02-03-2021 11:35
    Edited by Lee Henty 03-27-2024 12:48

    Hello Sigrid, hello Jan,

    Many thanks you both for your support and the templates.
    I am going to work and test them, although i am not experienced working with BAPI, just Transaction and Query.
    It is a new challenge...

    Best Regards
    Marco
      



  • 11.  RE: Transaction MM01: Material Master Record creation, Tax Data in Material Master Record

    Employee
    Posted 02-03-2021 11:46
    Edited by Lee Henty 03-27-2024 12:49

    HI Marco - a BAPI is just a program with inputs and outputs, sort of like a transaction. 

    If you want to copy the table to have more versions, to to expert view, find the table like below, click on the line then right click on the table name and click copy
    click where you want to paste it, right click and do a paste

    now i have 2 copies of the tax table.  Again, this is if you want to 'flatten' it out and not use loops.

    The online training for BAPIs is here: https://customers.elearning.winshuttle.com/learner/courseinfo/id:186 

    BAPIs are great when transactions are complex and don't have positioning functions.  They're also very efficient.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------