How to Read multiple material master data in single idoc

Iam working inbound material master custoum idoc .IN a single idoc i am receiveing multiple materials data .
i want to read each material  data in idoc that data need to pass BAPI(perform REC_CREATION_MM Iin side this perform material posting bapi is there.).
Please provide any suggestion <removed by moderator>.this below logic is not working if idoc contain single material and last record in multiple material is not posting
lOOP AT idoc_data WHERE docnum = idoc_contrl-docnum.
if sy-tabix NE 1.
      If idoc_data-segnam = 'E1MARAM'.
        perform REC_CREATION_MM.
      endif.
    endif.
    CASE idoc_data-segnam.
      WHEN 'E1MARAM'.
        wa_E1MARAM = idoc_data-sdata .
        APPEND wa_E1MARAM TO it_E1MARAM.
        MOVE-CORRESPONDING wa_E1MARAM TO it_BAPIMARA.
        APPEND it_BAPIMARA.
        MOVE wa_E1MARAM-MATNR TO it_TABFILD-MATNR.
        MOVE wa_E1MARAM-MEINS TO it_TABFILD-MEINH.
        APPEND it_TABFILD.
      WHEN 'ZMM_C_CLFMAS01'.
        wa_ZMM_C_CLFMAS01 = idoc_data-sdata.
        APPEND  wa_ZMM_C_CLFMAS01 TO it_ZMM_C_CLFMAS01.
      WHEN 'E1MAKTM'.
        wa_E1MAKTM = idoc_data-sdata.
        APPEND  wa_E1MAKTM TO it_E1MAKTM.
        MOVE-CORRESPONDING wa_E1MAKTM TO it_BAPIMAKT .
        APPEND it_BAPIMAKT.
      WHEN 'E1MARCM'.
        wa_E1MARCM = idoc_data-sdata.
        APPEND wa_E1MARCM to it_E1MARCM.
        MOVE-CORRESPONDING wa_E1MARCM TO it_BAPIMARC .
        APPEND it_BAPIMARC.
     WHEN 'E1MVKEM'.
        wa_E1MVKEM = idoc_data-sdata.
        APPEND wa_E1MVKEM to it_E1MVKEM.
        MOVE-CORRESPONDING wa_E1MVKEM TO  it_BAPIMVKE .
        APPEND it_BAPIMVKE .
      WHEN 'E1MLANM'.
        if NOT idoc_data-sdata is INITIAL.
          wa_E1MLANM = idoc_data-sdata.
          if  NOT wa_e1mlanm is INITIAL.
            APPEND wa_E1MLANM TO it_E1MLANM.
            MOVE-CORRESPONDING wa_E1MLANM TO it_BAPIMLAN .
            APPEND it_BAPIMLAN .
          ENDIf.
        endif.
    ENDCASE.
  ENDLOOP.
Thanks
VIJAY
Edited by: Thomas Zloch on May 4, 2010 3:09 PM - priority normalized

Check the material available in MARC table in SE11 transaction against your plant.If it is not available please maintain through MM01 transaction.

Similar Messages

  • How to maintain the material master data in plant

    Hi all,
    while creating BOM I am getting an error "no material master data in plant' can some one help me how to maintain the material master data in plant
    Regards,
    Balu

    Check the material available in MARC table in SE11 transaction against your plant.If it is not available please maintain through MM01 transaction.

  • How to Send the material master data from sap4.6c to ECC6.0

    Hi
        Friends this is shalini Shah, i got one requirement that is
    how to send the materail master data  from SAP 4.6C to ECC6.0 using XI.
    i  know the file to idoc and idoc to file scenarios but i don't know this one.
    please help me friends, Thanks in advance.
    Regards
    Shalini Shah

    Hi Shalini,
    To trigger IDoc these configurations should be done in the SAP 4.6, XI and ECC 6.0.
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3 (4.6 and ECC 6.0)
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    Also go ther the Blog <a href="/people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi Configuration for Pushing IDOC's from SAP to XI</a> By Swaroopa Vishwanath
    U need to import the IDoc types both inbound and outbound to XI.
    1. Create Inbound and Outbound Message interface.
    2. Do one to one message mapping.
    3. Define an Interface mapping.
    ID:
    1. Create 1 Sender aggrement.
    2. Create 1 Receiver aggrement.
    3. Define 1 RD and ID.
    4. Only create an receiver IDoc CC.
    Regards
    San
    <a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
    Where There is a <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/16">blog</a> there is a Way.

  • How InfoSpoke reads time dependent master data ?

    Hello Experts !!
    How InfoSpoke reads the time dependent master data ?
    What key date it reffers to ?
    Can you please explain, I want to use this concept in writing master data lookup for time dependent attributes of 0MATERIAL.
    Thank a lot !

    You can either specify the time period in the filtering area of infospoke or you can implement a transformation BAdI -OPENHUB_TRANSFORM to manipulate the data whichever way that suites your requirement. All time dependent infobjects have datefrom and dateto fields which you can use to choose your data range accordingly.
    Hope this helped you.

  • Material Master data transfer using IDOC

    Hi,
    I am working on integration scenario with SAp ECC. we are using SAp PI wherein SAP PI is posting data In SAP ECC using standard IDOC for Material master i.e MATMAS05
    You might be aware that while material master creation if we pass Plant value then we can activate all Plant related views i.e. Purchasing, sales plant general, MRP views and Accounting etc...
    I have a scenario where I want to activate only Sales plant general view...donot want MRP and purchasing views to get activated
    I tried passing only Plant and profit center value which required for sales plant general data view and keeping all other fields blank but it doesnot work.
    can you suggest a way.
    Cheers
    Rc
    P.s - I am using xml file which will be converted into IDOC by PI.

    you must not create all segments in the IDOC  if you dont want the views.
    e.g. E1MBEWM is used for the accounting data. without this you wont get that view.

  • How to upload multiple company codes data for single vendor by LSMW Idoc

    Hi ,
    My requ is like this.
    uploading data by LSMW Idoc method
    In source file we have two company codes data for single vendor.
    It should create vendor for two company codes.
    But its not creating its showing error.
    How to handle this?
    Thanks in Advance.

    have you ever see this docu:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/1a/178ac72d3011d3bc3500105a6588b2/content.htm
    You can use the recording function to create a new object (or a new "import method") if neither a standard batch input program nor a standard direct input program nor the BAPI/IDoc method is available for a data object.
    Recordings are static, thats why you cannot do such flexible things like  multiple company codes at the same time.
    But with IDOC method it is certainly possible, I have done it several times already.
    Unfortunatly the creator of this thread did not say what error he got with the IDOC method. Maybe he will add this. Otherwise I dont think that anybody can help

  • Re:Uploading of material master data using lsmw-idoc method

    Hi friends,
                While processing each idoc  one log on window is opening,and status of idoc is 51,eventhough i am passing material description to maktx of e1maktm,it is showing an 'No description is passed'.
    Colud you please tell me how to correct these errors,i am new to this lsmw-idoc method.
    Thanks in advance,
    Anusha.

    Thank you for reply.
    Actually I am uploading the data in flat file from file port to sap.
    In idoc inbound processing of lsmw i have created a file port and iam giving the logical system name of the same client.
    is this the correct procedure.
    Every time when i process each idoc one new logon window is opening and it is showing idoc status as 51.
    could you please tell me how to correct this one.

  • How to read multiple segments with same name in IDOC

    I want to read segments in IDOC say e1edk02.I am using orders05 idoc.
    BUT If I use the statement
    CONSTANTS :
                c_segnam1     type  char19 value  'E1EDK02'.
    read table idoc_data into wa_idocdata with key segnam = c_segnam1.
    It will read only one segment.but we are populating 2 e1edk02 segments.

    LOOP AT IDOC_DATA
        WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
        CASE IDOC_DATA-SEGNAM.
          WHEN 'E1EDK02'.
           MOVE IDOC_DATA-SDATA TO E1EDK02.
    reward if useful
    check FM idoc_input_orders for reference

  • How to maintain material master data in plant....

    Hi all,
    while creating BOM I am getting an error "no material master data in plant'  can some one help me how to maintain the material master data in plant
    Regards,
    Balu

    Hi,
    Please check the below link for MMR creaion .
    http://web.mit.edu/sapr3/windocs/bpmdb01m.htm
    Regards,

  • Extend material master data from one plant to another plant

    hi,
    how can i extend material master data from one plant to another plant.
    is there any sap standard transaction for this ie. bdc/t-code.
    thanks in advance.......
    rahul

    Hi
    If you want to extend the material form one plant to another then below are the possible options.
    1) MM01 - Use the material in the reference and fill in copy from and to then press enter to complete the extention.This is recommended only if you want to extend very less records.
    2) Use LSMW and record MM01 thru BDC recording available in LSMW and make the template in excel and convert it to .txt tab delimited format to upload more records.LSMW is the perfect tool and is used extensively in all the projects.
    3) Get the help from ABAPer to create upload program and include the BDC recording.
    There is no standard T code available in SAP becoz data mainatenance in the material master will be based on the industry.
    Hope it will help.
    Thanks/Karthik

  • Material master data upload in wms

    Dear all ,
    Kindly explain me how to upload the material master data in WMS.
    Thanx in advance.
    Regards,
    velu

    Hi Velu
    You have to load this in a normal way you do it with LSMW.
    Additionally you have to update the warehouse view fields too.
    Select the batch input recording in LSMW and go to the MM01 transaction enter all the required fields including WM views.
    If you handle material with fixed bin strategy & Replenishment scenario, you have to create a material by selecting the respective storage type in "selection view tab"
    Regards
    edwin

  • LSMW: Material Master Data migration

    I will be migrating material master data using LSMW IDOC.
    I also want to migrated associated material class data.
    The question is:
    How do I extract the material class data so that I can load them with LSMW IDOC CLFMAS after the materials are loaded?

    Hi,
    You have 2 possibilities.
    1. If it is 1:1 transfer for source SAP system to target SAP sytem ( without data modification ) you to establish the ALE interface and distriute by using the prg: RBDSECLF
    2. If it is a transfer of CLF data between 2 SAP systems where you need to modify the data based on some rules after you extract the data from the source system, you could extrace the data from Legacy by BAPI: BAPI_OBJCL_GETDETAIL. Once you extract the data, you could process as per the reqmt, & load the data by LSMW either by DI or by IDoc method.
    Hope this helps.
    Best Regards, Murugesh

  • How to delete MRP view data after create in Material master data ?

    Hi all ,
          After user  create a useless MRP view data in Material master data , how to remove it ?

    Hi
    Material master once created cannot be deleted.Only thing u can do is to mark it for deletion
    Go to Logistics > Materials management > Material master > Material > Flag for deletion > Immediately.
    Give the necessary data that is needed for the view you want to delete.
    Press and flag the view you want to delete.
    Now the view is flagged for deletion. This means that it's use is limited and it will be cleaned up or really deleted at the next clean up of the system.
    regards
    Anand

  • How to avoid material master data migration of inactive materials to SRM

    We are replicating material master from R3 4.6b to SRM 5.0 system.  Under COMMPR01 , we can see the product status as deleted or locked .
    How we can avoid the master data replication of  materials which are already flagged as inactive (deletion) in R3.
    Pls suggest.
    Regards,
    Avinash

    Hi
    Please try this ->
    1) It is possible to use product_id without needing to replicate material masters from R/3 to SRM. For this to work you have to set the flag "Do not check product" in customizing
    (see SRM Server > Master Data > Define External Web Services).
    We do it like that and it works perfect for us. Only annoyance is, that we have to put leading zeroes in the product_id field.
    "Do not check product" is used to avoid product check in SRM (to avoid replicating products into SRM), so they are not checked against SRM product master.
    But this is not related to R/3 check.
    In a classic or extended classic scenario, SRM will check that this material exists in the backend, especially for the current plant (location), before creating follow on doc.
    As you created your catalog item without zeros, I guess SRM is sending this material to R/3 that does not recognize it.
    Then you have this error message. Adapt your product IDs to be aligned with R/3 material master.
    2) Try to run the report BBP_PRODUCT_SETTINGS_MW, there you select user as SRM instead of CRM and select service product active
    3) Did you already checked OSS note 722600 and 366135 ? Also, Check the SAP OSS Notes -  786345, OSS Note 456753. It talks abt the internal and external representation of product ID in catalog and R3 system.
    Related useful pointers ->
    Product xx does not exist in plant xx or it has been flagged for deletion
    Stock reservation movement (field XWAOK) is not flagged in ECC ??
    Product XXX  does not exist in plant YYY or it has been flagged for delete.
    material deletion flag
    Product XXX does not exist in plant YYY or it has been flagged for deletion
    Hope this will help. Do let me know.
    Regards
    - Atul

  • Multiple group - single material master data

    Dear friends ,
    I am doing material master data as follows.
    Ex. Water Bottle - Material Group -  may be (Aqua) or (Bislary) or (Saiganga) or (Balley).
    means when i will make material master it will become 4 material master with 4 group as bellow.
    1) Water bottel-Aqua
    2 )water bottle-Bislary
    3 )Water bottle-Saiganga
    4) Water bottle-Balley.
    By my requirement is that it should be only one material master code , with facility of 4 material group.
    Whatever i need i will select at the time of PO.
    Regards,
    Mahesh.

    Hi,
    You just go for single material code creation as WATERBOTTLE and then as you needed, you can go for Split Valuation where same material WATERBOTTLE at a plant can have different stock quantity and value for different groupings {(Aqua) or (Bislary) or (Saiganga) or (Balley)}
    http://www.sap123.com/a/29/#split-valuation
    OR
    Go for Batch Management where you are just subdividing the material WATERBOTTLE according to the characteristics{(Aqua) or (Bislary) or (Saiganga) or (Balley)}
    https://wiki.sdn.sap.com/wiki/display/ERPLO/Batch+Management
    Regards,
    Biju K

Maybe you are looking for

  • Regarding graph in webdynpro

    Dear Frds   i am getting  x and y values from db i want to draw graph based on the above x and y values.. Is it possible to draw graph in webdynpro... like we normally draw graph in barcharts....... Thanks in advance Kumar

  • Tabs, toolbars and everything else gone

    Restarted my computer and Firefox tonight. My navigation toolbar in FF is gone, replaced by a little orange rectangle in the upper left corner of my FF window. I can't open new tabs - the orange rectangle insinuates that this is possible, but it actu

  • Will the Zoom R16 work as an interface in Logic Pro X under Mavericks?

    Hi. I have Mavericks and Logic Pro X on my Macbook Pro (late 2011). I have upgraded my Zoom R16 to the lates firmware (1.4) and uses the lates mac driver (1.4.0). The sound driver works great. I've tried all mackie control surface setup in Logic with

  • How to make a ADOBE FORM as interactive??

    Hi experts,                    Please anybody share how to make a ADOBE FORM interactive ? It means the content of the form ( text field etc.,) can be varied ( selected dynamically ) and also the form should be freeze later , so that it cannot be edi

  • Error on tomcat

    hi everybody i have tried to execute my messaging program with queue. but i am getting the following error javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNot