Skip to Content

This blog is in addition to my prior blogs: LSMW for Master Data upload Simple Explanation (Part – 1) & LSMW for Master Data upload Simple Explanation (Part – 2).

In my previous blogs for LSMW, I have mentioned the steps for simple LSMW (i.e., with single Structure). But, this is not the case with all the Masters.

Some of my friends insisted me to write a blog for LSMW Steps for the Masters that are having Multiple/ Hierarchical Structures like Maintenance Task List/ Bill of Material/ Routing/ Inspection Plans etc.

This blog dedicates to those Masters which are having Multiple/ Hierarchical Structures as mentioned above.

As only the certain Steps for hierarchical Structure LSMW differ from Single Structure LSMW, following points are not covered in this blog:

  1. Creating Project, Sub-Project and Object (Part – 1)

  2. Selecting Menu Items (Part – 1)

  3. Maintain Object Attributes (Part – 1)

11. Read Data (Part – 2)

12. Display Read Data (Part – 2)

13. Convert Data (Part – 2)

14. Display Convert Data (Part – 2)

15. Create Batch Input Session (Part – 2)

16. Run Batch Input Session (Part – 2)

The Points that will be covered in this blog will be:

  4. Object Overview and Field List

  5. Maintain Source Structures

  6. Maintain Source Fields

  7. Maintain Structure Relations

  8. Maintain Field Mapping and Conversion Rules

  9. Specify Files

10. Assign Files

Here I have taken the example of LSMW for General Maintenance Task List using Standard Program (i.e., Object – 0490 – Gen. task list, Method – 0000 – Create)

Below I am starting with the explanation of Step 4 assuming that Step 1 – Step 3 are understood from Blog mentioned above:

Step 4 – Object Overview and Field List:

  By pressing the /wp-content/uploads/2014/09/1_533739.png button in the Menu List Screen and then “List” button will show the screens as below:

/wp-content/uploads/2014/09/2_533740.png

Here in the “Target Fields” section you will find all the fields segregated in different structures as seen on the screen above (i.e., IBIPTLST – IBIP: Task List Header, IBIPTEXT – IBIP: Long Text, IBIPILOP – IBIP: Task List Operation and so on).

Here for simplicity, we can understand that each structure contributes to each screen (i.e., Here the structure IBIPTLST is for Task List Header, structure IBIPTEXT is for Long Text of Description in Header, IBIPTLOP is for Task List Operation and so on).

Please copy all the fields from different Structures and paste it based on separate in excel as shown in screenshot below. Here copy field RECORDNAME (RECORDNAME is in case of General Task List, If you are creating LSMW for any other master, please select any standard field like RECORDNAME which is present in all Structures) also, as we would require this field to co-relate between different Structures (How will be explained later):

/wp-content/uploads/2014/09/3_533789.png

Here I have selected 3 Basic Structures for General Maintenance Task List (i.e., IBIPTLST – Header, IBIPTLOP – Operations and IBIPMPAC – Maintenance Packages) you may select any Structures and their fields you wish to.

Step 5 – Maintain Source Structures:

Before moving to this step, we will just move to Step 7 “Maintain Structure Relations”. We will see the screen as shown below:

/wp-content/uploads/2014/09/4_533790.png

This screen shows the hierarchical arrangement of the Target Structures. We have to maintain the same hierarchical arrangement for Source Structure as well.

Now back to Step 5, Click on “Maintain Source Structure” and define the hierarchical Structures as shown below:

/wp-content/uploads/2014/09/5_533791.png

After defining the desired hierarchical Source Structures, press enter and press Save.

Step 6 – Maintain Source Fields:

Source fields will be the same which we have listed in Step 4 based on the hierarchical structures.

In SAP, click on “Maintain Source Fields” in the Menu List screen, which will guide you to the screen as shown below:

/wp-content/uploads/2014/09/6_533798.png

Select each Structure and press the /wp-content/uploads/2014/09/7_533799.png(Table Maintenance) button which will generate the field definition screen. Copy paste all the excel fields to the screen Structure by Structure.

/wp-content/uploads/2014/09/8_533800.png

The fields will look like as shown above. Now, press Save and Back to save this Structure field relation.

Step 7 – Maintain Structure Relations:

This Step is for maintaining relation between Hierarchical Source Structures to Hierarchical target Structures.

Double click “Maintain Structure Relations” in the Menu List screen, which will guide you to the screen as shown below:

/wp-content/uploads/2014/09/9_533801.png

Select the first Structure and press /wp-content/uploads/2014/09/10_533803.pngand it will pop-up a dialog box with List of Source Structures you have defined as shown below:

/wp-content/uploads/2014/09/11_533805.png

Here select the appropriate Structure which will create a relationship between Source Structure to its respective Target Structure.

Repeat this process for all the Structures you require. Once all the relationship for all Source Structures is created to their respective Target Structures, your screen would look like as shown below:

/wp-content/uploads/2014/09/12_533806.png

Please note that not all Structures are required to be defined from the hierarchy, you may create any number of Structures but, you have to make sure that no upper hierarchy is missed. (For ex: I have not created Source Structure for IBIPTEXT i.e., Long Text Line as I don’t require it and it is not an UPPER HIERARCHY to any structure but on contrary, for using Structure IBIPMPAC, I need to create IBIPTLOP even if I don’t need any fields from IBIPTLOP as it is UPPER HIERARCHY to IBIPMPAC)

Once done, press Save and Back.

Step 8 – Maintain Field Mapping and Conversion Rules:

For Mapping Source fields to Target Fields, double click “Maintain Field Mapping and Conversion Rules” in the Menu List screen, which will guide you to the screen as shown below:

/wp-content/uploads/2014/09/13_533807.png

As we have copied the fields from the Program/ Recording itself as in Step 4, it will be easy to perform the field mapping in a simple step.


Go to Extras –> “Auto Field Mapping” which will pop-up a dialog box as shown below:

/wp-content/uploads/2014/09/14_533808.png

Perform the selection exactly as shown in the screen above and press Enter.

If you have any Date fields in your Field List, it will ask for your confirmation for every individual Fields as shown below and make selection as per your requirement (This is how system will interpret Date further throughout the program):

/wp-content/uploads/2014/09/15_533809.png

Press Enter for all the Date Fields and you will find the field mapping for all your Source Fields to Program/ Recording Fields as shown below:

/wp-content/uploads/2014/09/16_533810.png

Now, here we have a critical part to take care of in case of hierarchical Structure case.

In Step 4, we had selected field RECORDNAME also. But, here the question would come to your mind that, field RECORDNAME is not present in the Target Field list as it is a Technical Field.

To Show this Field please click on/wp-content/uploads/2014/09/17_533811.png button and select “Technical Field” check box as shown in screen below:

/wp-content/uploads/2014/09/18_533812.png

Once selected, you may find all the Technical Fields also displayed such as TCODE, RECORDNAME, etc.


You have to manually assign your Source field RECORDNAME to target field RECORDNAME without making any changes to technical codes already assigned to this field by selecting the field RECORDNAME and clicking on /wp-content/uploads/2014/09/19_533813.pngbutton.


Clicking on /wp-content/uploads/2014/09/19_533813.pngbutton, will pop-up a dialog box as shown below:

/wp-content/uploads/2014/09/20_533814.png

Select the field RECORDNAME and repeat the same for all your defined Structures (Please make sure that you select field RECORDNAME from respective Structure only. for ex: RECORDNAME field for IBIPTLST should be mapped with RECORDNAME field for ZIBIPTLST only, for IBIPTLOP with ZIBIPTLOP only and for IBIPMPAC with ZIBIPMPAC only)

In case of LSMW for General Task List, one small change is to be made in TCODE field. Here, standard LSMW program for General Task List has by mistake used TCODE IA01. Please replace IA01 to IA05 by double clicking on TCODE field (Double clicking will raise a warning message to not to change the standard setting. Please select “Yes” and make the necessary changes as guided). Again, please take care that no other changes are made.

Once above changes have been done, your screen would be like as shown below:

/wp-content/uploads/2014/09/21_533815.png

Confirm all the Fields are mapped correctly and press Save and Back.

Step 9 – Specify Files:

Here, this Step is having the most changes from what I have explained in my previous blog for single Structure.

Before performing this Step, you need to create your File format with exact field sequence and Structure sequence.

For creating the Format, simply transpose your Excel File fields from column to Row as shown below:

/wp-content/uploads/2014/09/22_534821.png

As you can see above, I have created three separate sheets for different Structures, please create separate sheets for all the Structures you are having.

These sheets explain why we have used field RECORDNAME in all the Structures.

Here, I am creating two task lists with five Operations each with Maintenance Package for each operation. That means RECORNAME in first (Header) Structure will have two records (i.e., 1 and 2 for two task lists) in Second (Operation) Structure RECORNAME will have ten records (i.e., five records with value 1 and five records with value 2 for five operations in each task list) and in third (Maintenance Package) Structure RECORDNAME will have ten records for each operation. (Hope I have made it clear!!!)

Now, we have to select only the Data from each excel sheet (please select all the columns even if they are blank) and copy it to separate notepad files as shown below:

/wp-content/uploads/2014/09/23_533820.png

Now in SAP, Double click ”Specify Files” in the Menu List screen, which will guide you to the screen as shown below:

/wp-content/uploads/2014/09/24_533821.png

Select “Legacy Data – On the PC (Frontend)” and clicking on /wp-content/uploads/2014/09/25_533825.pngbutton will pop-up the dialog box as shown below:

/wp-content/uploads/2014/09/26_533826.png

In File field select the Notepad File for First Structure, in the Name Field assign any desired name and make other selections exactly as shown in the screen and click Enter.

Repeat the above process for all your Structure Notepad files. Once done uploading all the files, your screen will be like as shown below:

/wp-content/uploads/2014/09/27_533827.png

Press Back and Save.

Step 10 – Assign Files:

Double click “Assign Files” in the Menu List screen, which will guide you to the screen as shown below:

/wp-content/uploads/2014/09/28_533831.png

Here,double click on each Structure and select the respective Files for respective Structures.

Once done, your screen would look like as shown below:

/wp-content/uploads/2014/09/29_533832.png

Press Save and Back.

For Further process steps mentioned below, please refer to my previous blog post (Part-2) which I have mentioned at the starting of this post:

11. Read Data (Part – 2)

12. Display Read Data (Part – 2)

13. Convert Data (Part – 2)

14. Display Convert Data (Part – 2)

15. Create Batch Input Session (Part – 2)

16. Run Batch Input Session (Part – 2)

Hope I have cleared all your possible doubts by this post.

Would love to solve all the questions that comes to your mind…wish you would comment with the same.

To report this post you need to login first.

28 Comments

You must be Logged on to comment or reply to a post.

  1. Patrick S.

    Dear Chintan,

    after having seen your exceptional ( !!! ) step-by-step guideline, I have the ambition to try myself with LSMW.

    Thanks for putting this 3 master pieces online!

    Regards from Germany,

    P.

    (0) 
  2. Teena Jain

    Hi,

    i was trying to upload data using multiple structure..exactly as mentioned in the post.But while trying to execute the step “creating batch input..”,i am getting the error ‘source file could not be read/found’.

    i am attaching the screenshots for the same.

    /wp-content/uploads/2014/10/error1_566554.png

    /wp-content/uploads/2014/10/specifyfile_566591.png

    Can you please help in this regard as to where i would have gone wrong.

    P.S. I am a newbie to SAP ABAP and learning through google.

    (0) 
    1. Chintan Budhbhatti Post author

      Teena Jain

      Thank you for showing your interest and sharing this quetion, but if you go through Step 13 in below blog, it would explain how it is to be tackled:

      LSMW for Master Data upload Simple Explanation (Part – 2)

      Here in File access: Source, you have to select “Application Server” check box then in

      File access: Save  Incorrect data records, you have to select “Presentation Server” check box and also have to mention the values in field Physical file name.

      Hope this solves your query.

      Chin2.

      (0) 
        1. Chintan Budhbhatti Post author

          Teena Jain

          You can give any desired file name, it is just used to store the records for erroneous data to SAP server. You can give your master’s name as well.

          It does not have any relevance to any field but rather it just creates a file.

          Hope I have solved your query.

          Chin2.

          (0) 
          1. Teena Jain

            i tried what you suggested, and it created a batch session.But while running the session, it is displaying error with regard to the data given.

            I am not basically aware of the transaction – general maintenance task list.

            Here are the screenshots for the same.

            create batch input.png

            create batch input1.png

            execute batch input.png

            (0) 
            1. Chintan Budhbhatti Post author

              Teena Jain

              This is not an LSMW error.

              As the error itself suggests, you have not maintained the external number ranges for your task lists.

              Please check your settings at the path mentioned below and maintain the external number range if required:

              Plant Maintenance and Customer Service –> Maintenance Plans, Work Centers, Task Lists and PRTs –> Task Lists –> Control Data –>  Define Number Ranges for General Maintenance Task Lists.

              Also, this error not being directly related to LSMW, it might divert the blog’s topic here.

              Hence, if you have any further queries, I would suggest you to create a discussion question.

              Hope this input helps.

              Chin2.

              (0) 
                1. Chintan Budhbhatti Post author

                  Teena Jain

                  Sorry but I didnt mean that your query is out of blogs content.

                  I just mean to say that the error which you are getting here is related to General Task List configuration settings.

                  I have given you the appropriate steps to solve your query. Please follow them to get the exact solution.

                  Also, the last point I mentioned was any further discussion required pertaining to your error may divert the post hence any further questions regarding the same error, I would request you to post a question.

                  You may feel free to ask any other questions regarding LSMW.

                  Sorry once again if I was wrong in my writtings.

                  Chin2.

                  (0) 
  3. Zović Danijel

    Great post!

    I just have one question about the data you put in your example. I understand RECORDNAME for Header (ZIBIPTLST.txt) file and for Operation (ZIBIPTLOP.txt) file, but in Package (ZIBIPMPAC.txt) file, how do you assign records to exact operation?

    ZIBIPTLSPT.txt

    1          DIESLGEN …

    2          DIESLGEN …

    ZIBIPTLOP.txt

    1          0010     … – this operation is assigned to first task list

    1          0020     … – this operation is also assigned to first task list

    2          0010     … – this operation is assgined to second task list

    2          0020     … – this operation is also assigne to second task list

    ZIBIPMPAC.txt

    1          T1     – to which operation is that record assigned?

    1          T1     – to which operation is that record assigned?

    1          T1     – etc.

    What if I want to assign 3 packages for operation 0010 from first task list, and 2 packages to 0020 operation from first task list? Which values goes to RECORDNAME field in ZIBIPMPAC.txt to map specific operation?

    Regards,

    Danijel Zović

    (0) 
    1. Chintan Budhbhatti Post author

      Zović Danijel

      Sorry for the late reply…..

      Its a nice question here from your end…. Have a clear look at the File ZIBIPMPAC.txt, here the number of rows is equal to the number of rows in ZIBIPTLOP.txt file.

      Hence LSMW will have one to one relation in that case.

      If it is not working properly in your case, the alternate solution you can use here is to use one more field to have a link between operation and Package(similar to RECORDNAME).

      If you have a close look on the fields, one field we I have used and which can be used as a link between Operation and Package is TCODE field.

      Map the TCODE field manually both in Operation and Package (but consider this field only for rows comparison between Operation and Package and not as TCODE value).

      Note: The Values of this field (what I have used) can be Operation Number to link between Operation and Packages.

      I have successfully used this field as you can see in the screen shot below:

      Untitled.png

      Thanks once again for asking this question.

      Please do write if you need any further clarification.

      Chin2.

      (0) 
      1. Zović Danijel

        Thanks for your replay,

        I have already solved that problem. I created an additional field and I name it RECORDNAME2 on the operation level, and I created an additional field with the same name on the packages level. So that was my connection between operations and packages which is basically the same solution that you propose with TCODE filed.

        Regards,

        Danijel Zović

        (0) 
  4. Sundar Desai

    Hi Chintan,

    I am facing issues while uploading Equipment Task List Operations & Components. I am able to read the header details but not operation & components. Please refer the below thread where issue is illustrated in detail with screen shots. Appreciate your help!!!

    http://scn.sap.com/thread/3878435

    Thanks,

    Sundar

    (0) 
  5. Shivkumar Iyer

    Hello Chintan

    Thank you for the wonderful documents you have created on LSMW.  These are really simple and easy to understand.

    We appreciate your efforts in sharing your knowledge.

    Best Regards

    Shiv

    (0) 
  6. Bartosz Bien

    Hi all

    I did all what was described here, but during Read step, Task List operations are only written when ARBPL/work center  on header file = ARBPL on all linked operations – but in reality those can differ. Does anyone encounter the same?

    (0) 

Leave a Reply