Skip to Content

This document help us to understand the process of loading the multiple materials with multiple fields using the material using the local and application server file system.It has help us lot to meet business expectations and hence sharing with you all.Please refere to the link How to… MDG-M: Use the Data Import Framework | SCN

1.Define file converter type to be used during the file import

Untitled1.jpg

Define the converter type ZIB

Untitled2.jpg

2.Creation of BADI for file converter and BADI for implementation

Untitled3.jpg

click on create BADI implementation for BADI BADI_MDG_FILECONVERTER for enhancement spot

Untitled4.jpg

Provide Enhancement Implementation name and short text

Untitled22.jpg

Provide the BADI implementation Name and class

Untitled23.jpg

add filter value ZIB

Untitled5.jpg

Copy the sample class this will copy the sample code which needs to be modify as per requirement

Untitled6.jpg

Untitled7.jpg

click on the create classes,it will open up the copied methods.

click on method IF_EX_MDG_FILECONVERTOR~GET_DATA to see the code

Untitled8.jpg

you can modified code as per your requirement take help of your technical team to add the code for more number of fields which you will import using CSV file from your local or  Application

Untitled9.jpg

3.Importing the file using the webdynpro application MDG_FILE_UPLOAD_CMP, you can find this application in the role SAP_MDGM services folder adn you can add the same application for different roles.one can execute this application from NWBC work center or from roles as mention below.

Untitled10.jpg

execute the application as mention below,there are two options are available for import as shown below

we are moving with local file system.for importing the file from application you have do some additional setting like defining ports,fiel path as mention in configure document.We are focusing on import of material from local file system.

Untitled11.jpg

click on browse to select the file from application

Untitled12.jpg

select the fiel and click on add button to upload the file and Next..

Untitled24.jpg

it will Persistance choice 1,2 and 3.

1.will trigger the governance process with CR

2.will directly load the material in to active area.

3.it will send the error records to staging

in our case we are proceeding with 1 option and provide converter type ZIB as configure earlier.click next

Untitled14.jpg

provide the CR type MAT0B and click on next

Untitled15.jpg

click on start upload and click on next…

Untitled25.jpg

it will show you the generated CR number .know go to the NWBC click on my CR

Untitled26.jpg

it will display the CR which got created

Untitled18.jpg

once you open up the CR you have option to process the material one by on or process multiple ones.Activated the CR

Untitled19.jpg

the status of CR changed to final check and approved

Untitled20.jpg

go back to check in MM03 for the materials got created

Untitled21.jpg

I am attaching the sample file whic was give by SAP A-MATMAS.CSV for reference…still we are working on adding more number of fields and how they behave…but hope this will give some relief for us.

To report this post you need to login first.

13 Comments

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

  1. SATYAM RASTOGI

    Hi Shankar,

    Very Nicely documented the entire process for .CSV file import.

    Can you please tell me if we can also upload classification data using the same WD application and loading the data from local machine in .CSV format.

    If yes, then which BADI will be used for this activity?

    Can you please help me in achieving this requirement?

    Regards,

    Satyam

    (0) 
    1. shankar singh Post author

      Satyam,

      You can use same WD application for uploading the data but the Idoc used for the Classification data is different.Hence you have load the classfication seperatly with different CR and BADI.

         It is the same place mention in the doc. where you can define your own BADI with CLFMASS IDOC types and segments.

      (0) 
      1. SATYAM RASTOGI

        Hi Shankar,

        Thanks for the reply.

        Can you please share with us the template .CSV file for CLFMAS Idoc as well as  we are bit confused while preparing it in our landscape.

        We have included  fields like Object key,Class Type, Internal Char number,Char Value in the template. Please let us know if any other fields from AUSP table or any other table is required while loading the data though the above method mentioned in your beautiful doc.

        Also, please confirm on  the below statement and correct me if I am wrong.

        “After loading the MATMAS file for new material creation into ECC by this method, the new material numbers gets created by enabling key mapping in ECC, so I think we have to fill the newly generated material numbers in CLFMAS file also in place of object key after taking the extract of the new material numbers”.

        Awaiting for your prompt reply.

        Regards,

        Satyam

        (0) 
          1. shankar singh Post author

            Dear Satyam,

            we have used the same template,we have loaded with just material numbers and rest of the things were hard coaded system takes care automatically.

              Coming to AUSP it is an characteristic value which is again seperate IDoc type CHRMAS,we are still working on it.May be you can check with your developer how to take it forward.

            regards

            shankar

            (0) 
            1. SATYAM RASTOGI

              Hi Shankar,

              Thanks for the reply.

              Can we also generate the material numbers thought this file upload approach if we leave the MATNR field as blank in the excel file? If yes, then how can we configure it?

              For AUSP, my question was , that we load the Material data into the system , then if we want to load the classification data as well for those material numbers , then what should be the file structure like?

              Any Comments and help would be very helpful.

              Regards,

              Satyam

              (0) 
  2. Pawan Kumar Mahto

    Hi Shankar,

    I am not getting the option to upload materials through local drive, only DIF i can see, option to upload multiple materials is not showing up even i dont see it in the roles also, is it part of standard MDG functionaity or you customised the ui

    (0) 
    1. shankar singh Post author

      Dear Pawan,

      it is standard out of the box functionality only code added to BADI.Use WD MDG_FILE_UPLOAD_CMP ,also check whether SAP still supporting this.

      regards

      shankar

      (0) 
  3. Girish BS

    Hello Shankar,

     

    Good doc, but when i upload the material facing the error-

     

    “Material number does not exist for material”

     

    Any thoughts?

     

    Regards,

    Girish

    (0) 
  4. Goran Panic

    Hi  Shankar,

     

    Could you please share complete  code for BADI BADI_MDG_FILECONVERTER related to material import?

     

    Thank you in advance,

    Goran

    (0) 

Leave a Reply