LSMW - Update  Material master

Hi ,
     WHILE UPDATING THE EXISTING VIEW WITH NEW FIELDS IN MM02,i am passing the values only for the updated fields, at that time it is updating the existing values as blank values.
    And while adding the new views in the MM01 it is updating the values in the MARA MARC tables but those views i have added are not diplaing in the MM03 Tcode while in disply mode.
   Can any body please give the solution for this...
Regards,
Rajesh.

Hi,
are you checking the material exists or not in the BEGIN_OF_RECORD of field mappings ?
4-character transaction
SELECT SINGLE MATNR
              INTO V_MATNR
             FROM MARA
               WHERE MATNR = MATMAS_MRPVIEW-MATNR
IF SY-SUBRC = 0.
  BMM00-TCODE = 'MM01'.
ELSE.
  BMM00-TCODE = 'MM02'.
ENDIF.
i believe  you given it already. but check it again.
regards
srikanth

Similar Messages

  • LSMW FOR MATERIAL MASTER USING BAPI_MATERIAL_SAVEDATA -Adding Custom Fields

    Hi Gurus,
    I'm developing LSMW for Material Master Upload using BAPI method.
    Object:BUS1001006
    BAPI:BAPI_MATERIAL_SAVEDATA
    MESSAGE TYPE: MATMAS_BAPI
    BASIC TYPE : MATMAS_BAPI03.
    There is a requirement to use/map a custom field. Upon research custom field can be added to the parameter EXTENSIONIN and EXTENSIONINX, but I have no Idea on how to do it with LSMW. Please advise what approach is needed.
    Thanks and Regards,
    Jay

    Hi Gurus,
    I got the following code below.
    The custom field won't get updated.... Please advise on what should I do... I've checked different forums and still can't come up with the solution... Please advise..
    REPORT ztest_extend_matmas1.
    STRUCTURE
    TABLES:
    bapimathead, "Headerdata
    bapi_mara, "Clientdata
    bapi_marax, "Clientdatax
    bapi_marc, "Plantdata
    bapi_marcx, "Plantdatax
    bapi_makt, "Material description
    bapiparex, "Extensionstruktur
    bapiparexx,
    bapiret2. "Return messages
    DATA:
    bapi_te_mara LIKE bapi_te_mara,
    bapi_te_marax LIKE bapi_te_marax,
    v_file TYPE string.
    INTERNAL TABLE
    *to store the output data
    DATA:BEGIN OF it_material_number OCCURS 0.
            INCLUDE STRUCTURE bapimatinr.
    DATA:END OF it_material_number.
    *for materialtext
    DATA:BEGIN OF it_materialdesc OCCURS 0.
            INCLUDE STRUCTURE bapi_makt .
    DATA:END OF it_materialdesc.
    *für z-feld
    DATA:BEGIN OF it_bapiparex OCCURS 0.
            INCLUDE STRUCTURE bapiparex.
    DATA:END OF it_bapiparex.
    *für z-feldx
    DATA:BEGIN OF it_bapiparexx OCCURS 0.
            INCLUDE STRUCTURE bapiparexx.
    DATA:END OF it_bapiparexx.
    *to return messages
    DATA:BEGIN OF it_return2 OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA:END OF it_return2.
    DATA:BEGIN OF it_return OCCURS 0.
            INCLUDE STRUCTURE bapiret1.
    DATA:END OF it_return.
    DATA
    lt_messages      TYPE bapiret2_t.
    PROCESSING
    *bapimathead-material = it_material_number-material.
    bapimathead-material = '100-2520'.
    bapimathead-ind_sector = 'P'.
    bapimathead-matl_type = 'AEM'.
    bapimathead-basic_view = 'X'.
    bapimathead-purchase_view = 'X'.
    bapimathead-inp_fld_check = 'I'.
    *bapimathead-BASIC_VIEW = 'X'.
    *bapimathead-SALES_VIEW = 'X'.
    *bapimathead-PURCHASE_VIEW = 'X'.
    *bapimathead-MRP_VIEW = 'X'.
    *bapimathead-FORECAST_VIEW = 'X'.
    *bapimathead-WORK_SCHED_VIEW = 'X'.
    *bapimathead-PRT_VIEW = 'X'.
    *bapimathead-STORAGE_VIEW = 'X'.
    *bapimathead-WAREHOUSE_VIEW = 'X'.
    bapi_mara-matl_group = '0001'.
    bapi_mara-old_mat_no = '100-251'.
    bapi_mara-base_uom = 'ST'.
    bapi_marax-matl_group = 'X'.
    bapi_marax-old_mat_no = 'X'.
    bapi_marax-base_uom = 'X'.
    bapi_marc-plant = '1000'.
    bapi_marcx-plant = '1000'.
    it_materialdesc-langu = 'EN'.
    it_materialdesc-matl_desc = 'DESC'.
    APPEND it_materialdesc.
    *bapi_te_mara-material = it_material_number-material.
    bapimathead-material = '100-2520'.
    *bapi_te_mara-zzforst = '4148'.
    bapi_te_mara-material = '100-2520'.
    bapi_te_mara-zzmar_field1 = '4148'.
    *bapi_te_marax-material = it_material_number-material.
    bapimathead-material = '100-2520'.
    *bapi_te_marax-zzforst = 'X'.
    bapi_te_marax-material  = '100-2520'.
    bapi_te_marax-zzmar_field1 = 'X'.
    it_bapiparex-structure = 'BAPI_TE_MARA'.
    it_bapiparex-valuepart1 = bapi_te_mara.
    APPEND it_bapiparex.
    it_bapiparexx-structure = 'BAPI_TE_MARAX'.
    it_bapiparexx-valuepart1 = bapi_te_marax.
    APPEND it_bapiparexx.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata            = bapimathead
        clientdata          = bapi_mara
        clientdatax         = bapi_marax
        plantdata           = bapi_marc
        plantdatax          = bapi_marcx
      IMPORTING
        return              = it_return2
      TABLES
        materialdescription = it_materialdesc
        extensionin         = it_bapiparex
        extensioninx        = it_bapiparexx
        returnmessages      = lt_messages.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    THanks and Regards,
    Jay
    Edited by: jhayyy on May 17, 2011 6:54 AM

  • Using the APD to update material master in CRM

    Does anybody know if it is possible to update material master records in CRM from BW using the Analyses Process Designer with target CRM?
    I would prefer to know this before creating a custom data target adapter in the CRM SPRO, writing all the required function modules and then finding out that it does not work.
    Thanks,
    József.

    Which direction??
    Inbound/Outbound
    Inbound : IDOC_INPUT_MATMAS01

  • Issue in LSMW for material master using standard input program RMDATIND!!

    Hello guys,
    I have a issue in LSMW for material master.
    I have a custom field in MARA table. which I want to add in my LSMW.
    I added the field in BMMH1 structure. I'm passing the value to this field, But it is not populated in the table when I run it.
    Is there anything else I need to do apart from addition of field in the structure BMMH1.
    Thanks in advance for your help.
    Regards,
    Sumeet....

    see oss note 44410, it gives you a step by step overview.
    https://service.sap.com/sap/support/notes/44410

  • LSMW for Material master data

    Hi,
    Anybody can help me, how to make LSMW for Material master data.
    Thanks in Advance
    Arjun

    pls follow the thread:
    http://help.sap.com/saphelp_46c/helpdata/en/f6/ca0766a7a911d1950500a0c930e0da/frameset.htm
    regards,
    indranil

  • LSMW for material master upload

    Hi gurus
    i have one problem while uploading material master with LSMW.
    I have murged 2 company codes in one so while creating material master system is asking me tax classification data in sales view for 2 country sales org and distrubition channel. I am using sap std LSMW for material master creation.
    system is giving me error as " tax classification data not maintained completely".
    need your valuable help to solve this problem

    Tax classification data is mandatory field in Sales view of MM01.
    Check out you mapping for the tax classification fields. usually classification value is 0 OR 1.
    You can first test the values in MM01 Sales View with the legacy data you have and this way you will able to find the mandatory fields also and can see the valid values for the fields.
    Remember you may have more than one Tax Classification values depending on the country code.
    For that you can add those many columns in legacy data file and map them.
    Hope it helps.

  • LSMW FOR MATERIAL MASTER USING BAPI_MATERIAL_SAVEDATA

    Hi Gurus,
    Im trying to develop lsmw for material master upload using bapi method.
    Object:BUS1001006
    BAPI:BAPI_MATERIAL_SAVEDATA
    MESSAGE TYPE: MATMAS_BAPI
    BASIC TYPE : MATMAS_BAPI01.
    I m unable to find parameters to load gross_weight volume and volume unit and also problem loading the custom fields of material master. Any body who has worked on this one, can you please help me.
    Thanks
    venkat

    The BAPI_MATERAIL_SAVEDATA support the gross_weight or the volume via the tables UNITSOFMEASURE and UNITSOFMEASUREX.
    eg.
    UNIT_OF_WT =KG
    ALT_UNIT = PCS
    NUMERATOR = 1
    DENOMINATR =1
    GROSS_WT =1000
    All the customer specific field are supported by the EXTENSIONIN and EXTENSIONINX tables.

  • Updating Material Master Moving Average Price using BAPI

    Hi,
    We need to create a program using which we can update material master moving average price for a specific material.
    For this we are using BAPI_MATERIAL_SAVEDATA.
    when we are executing this bapi with inputs, it is showing data updated or created but when we are checking it in MAterial Master the data (MOving Price ) is not getting updated.
    Please advise,
    Thanks.

    I am trying to use BAPI_MATVAL_PRICE_CHANGE to change the price of a material in material master
    (The moving average price [MAP] in Accounting View 1)
    Using the BAPI, I enter
    --> RFC target are
    -> Material No.
    -> Valuation Area
    --> Prices table (I enter the new price that i want)
    when I run the BAPI, i get error message (This can be seen in the returns table)
    ID --> CKMLSENDPRICE
    MESSAGE NUMBER --> 701
    DETAILS --> No customizing data for Valuation Area XXXX found
    PLease advise.

  • Updating Material master purchase order text -LSMW

    Dear Experts
    How can update Purchase order Text  through LSMW, while am doing recording system is not recording this field from material master
    Regards
    Ajeesh.s

    Dear Expert
    Please throw some light on this issue
    Regards
    Ajeesh.s

  • LSMW - inforecord / material master - syntax error when converting data

    Hi all,
    I used LSMW for classification uploads (material master, vendor master) so far - it was easy :-). But..I tried to create/update inforecords by object 0060, method 0000, program RM06IBI0. I declared source structure, source fields, field mappings and conversion rules (in my batch input I use only fields which we defined as required for infrecs.), files etc. LSMW reads the data but when I try Convert data - the is syntax error in program /1CADMC/SAP_LSMW_CONV_00000018 and dump with message "For type "C", a maximum length specification of 65535 is allowed." When I tried to create material master (object 0020, method 0000), Convert data command worked the same.
    Any help would be appreciated. (? sample from your batch input file which works well to compare)
    Tomas

    Hi Tomas,
    Please do me a favor. In the initial screen of LSMW, there is a pushbutton for 'Personal Menu'. Once you press that it will pop-up a screen with a bunch of checkboxes. Select the checkbox for 'Display Conversion Program' and press enter. Now you should see the 'Display Conversion Program' option in your initial screen. Select that and go into the conversion program. Put a break-point in the conversion program on the statement 'perform execute_data_conversion.'.
    Debug it and find out exactly where the error is occuring. Perhaps that will help you figure out what the error is, if not, let the forum know where you hit the error. Even looking at the dump, you should get more information.
    Srinivas

  • Classification view creation via LSMW for Material master

    Hi,
    We are planning to have an LSMW for creation of material master along with classification view for configurable materials.
    Though we see a flag to indicate classification view  - XEIC1                        Indicator: take Classification view into account
    We do not see a structure where in we can pass all the characteristics and the corresponding values.
    Is this something possible only with BAPIs such as -> BAPI_OBJCL_CREATE after creation of other view for that material.
    Regards,
    HR

    Hi,
    Thanks for the response. This is helpful.
    However, we were intending to use a single LSMW for creation of all views of material master including classification view. Right now we are using Program RMDATIND as direct input method in LSMW.
    Please let me know if there is a way to use single LSMW for creation of all views of material master.
    Thanks
    HR
    Edited by: Hema Rao on Jan 8, 2009 7:58 AM

  • Update material master data BAPI_MATERIAL_SAVE DATA

    Hi All,
    I am using BAPI_MATERIAL_SAVE DATA Fm to update the material master data .
    I want to change material type vend (which already existed) to HIBE material type .
    Even though Basic data view populated its not updating in Material master .
    Which views do i need to populate to change material type one value to other value?

    if you use FM - BAPI_MATERIAL_SAVE DATA ,you can not update material type , use bdc program to update material type ,
    See the transaction : MMAM - No BAPI to update material type
    you need to use BDC Program.
    Reward Points if it is helpful
    Thanks
    Seshu

  • LSMW--Create Material master data

    Hi,
    When I use LSMW to create material master data, I set up all step, but when I go to last step "13 Run Batch Input Session", there is error message like "Select at least one view" in moudle SAPLMGMM, screen 0070, anybody can tell me what is problem, thanks a lot.

    Hi,
    This is due to error while recording for MM01,
    Please do a Repeat recording and ensure that once the material number, industry sector and material type is entered, on the next screen you need to select all or at least a single view to create the MMR.
    Regards
    Merwyn

  • LSMW datamigration material master with multiple distribution channels

    Hi,
    We plan on using the LSMW to migrate our customer's material master to a ECC 6.0 system.
    Currently we use the BMM00 and BMMH1 structures, but there I can specify only one distribution channel.
    Does anyone know how to include multiple distribution channels in LSMW material master migration?
    Thanks in advance for your support.
    Edited by: Mohammed Qasim Malik on Jan 21, 2008 10:01 AM

    you need an extra record in your source per distibution channel.
    Alternative you can create the extra record with a small Abap  code in LSMW in section __END_OF_RECORD__
    There you habe in standard the code:
    transfer_record.
    just add after this statement a statement that gets the additional wanted distribution channel into the  distribution channel field.
    BMM00-VTWEG =  'xx'.
    transfer_record.

  • Bapi or Function Module to update Material Master Data

    Hi Friends,
               could anyone let me know any BAPI's or Function Modules for Material Master UPdate.
    Thanks in Advance
    Regards
    Tina

    hi Tina,
    check this BAPi BAPI_MATERIAL_SAVEDATA to create and change the material master .
    Try ....
    BAPI_MATERIAL_SAVEDATA
    REPORT Z_BAPI_MAT.
                   STRUCTURE  DECLARATIONS                             *
    TABLES: BAPIMATHEAD,  "Headerdata
            BAPI_MARA,    "Clientdata
            BAPI_MARAX,   "Clientdatax
            BAPI_MARC,    "Plantdata
            BAPI_MARCX,   "Plantdatax
            BAPI_MAKT,    "Material description
            BAPIRET2.     "Return messages
    DATA:V_FILE TYPE STRING.
    DATA:
      BEGIN OF LSMW_MATERIAL_MASTER,
        MATNR(018) TYPE C,  "Material number
        MTART(004) TYPE C,  "Material type
        MBRSH(001) TYPE C,  "Industry sector
        WERKS(004) TYPE C,  "Plant
        MAKTX(040) TYPE C,  "Material description
        DISMM(002) TYPE C,  "Extra Field Added In the Program as itsrequired
        MEINS(003) TYPE C,  "Base unit of measure
        MATKL(009) TYPE C,  "Material group
        SPART(002) TYPE C,  "Division
        LABOR(003) TYPE C,  "Lab/office
        PRDHA(018) TYPE C,  "Product hierarchy
        MSTAE(002) TYPE C,  "X-plant matl status
        MTPOS_MARA(004) TYPE C,  "Gen item cat group
        BRGEW(017) TYPE C,  "Gross weight
        GEWEI(003) TYPE C,  "Weight unit
        NTGEW(017) TYPE C,  "Net weight
        GROES(032) TYPE C,  "Size/Dimensions
        MAGRV(004) TYPE C,  "Matl grp pack matls
        BISMT(018) TYPE C,  "Old material number
        WRKST(048) TYPE C,  "Basic material
        PROFL(003) TYPE C,  "DG indicator profile
        KZUMW(001) TYPE C,  "Environmentally rlvt
        BSTME(003) TYPE C,  "Order unit
        VABME(001) TYPE C,
        EKGRP(003) TYPE C,  "Purchasing group
        XCHPF(001) TYPE C,  "Batch management
        EKWSL(004) TYPE C,  "Purchasing key value
        WEBAZ(003) TYPE C,  "GR processing time
        MFRPN(040) TYPE C,  "Manufacturer part number
        MFRNR(010) TYPE C,  "Manufacturer number
        VPRSV(001) TYPE C,  "Price control indicator
        STPRS(015) TYPE C,  "Standard price
        BWPRH(014) TYPE C,  "Commercial price1
        BKLAS(004) TYPE C,  "Valuation class
      END OF LSMW_MATERIAL_MASTER.
                   INTERNAL TABLE DECLARATIONS                         *
    *to store the input data
    DATA:
      BEGIN OF it_matmaster OCCURS 0.
            INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
    DATA:
      END OF it_matmaster.
    *for material description
    DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
         INCLUDE STRUCTURE BAPI_MAKT .
    DATA:END OF IT_MATERIALDESC.
    *to return messages
    DATA:BEGIN OF IT_RETURN OCCURS 0.
         INCLUDE STRUCTURE BAPIRET2.
    DATA:END OF IT_RETURN.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1 .
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = 'P_FILE'
        IMPORTING
          FILE_NAME     = P_FILE.
                   TO UPLOAD THE DATA                                  *
    START-OF-SELECTION.
    V_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = V_FILE
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =  IT_MATMASTER
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
                   DATA POPULATIONS                                    *
    LOOP AT  IT_MATMASTER.
      BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
      BAPIMATHEAD-IND_SECTOR = IT_MATMASTER-Mbrsh.
      BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
      BAPIMATHEAD-BASIC_VIEW = 'X'.
      BAPIMATHEAD-PURCHASE_VIEW = 'X'.
      BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
      BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
      BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
      BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
      BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
      BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
      BAPI_MARAX-MATL_GROUP = 'X'.
      BAPI_MARAX-OLD_MAT_NO = 'X'.
      BAPI_MARAX-BASE_UOM = 'X'.
      BAPI_MARAX-BASIC_MATL = 'X'.
      BAPI_MARAX-MFR_NO = 'X'.
      BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
      BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
      BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
      BAPI_MARCX-PUR_GROUP = 'X'.
      IT_MATERIALDESC-LANGU = 'EN'.
      IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
      append IT_materialdesc.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          headdata                   = BAPIMATHEAD
          CLIENTDATA                 = BAPI_MARA
          CLIENTDATAX                = BAPI_MARAx
         PLANTDATA                  = BAPI_MARc
         PLANTDATAX                 = BAPI_MARcx
        FORECASTPARAMETERS         =
        FORECASTPARAMETERSX        =
        PLANNINGDATA               =
        PLANNINGDATAX              =
        STORAGELOCATIONDATA        =
        STORAGELOCATIONDATAX       =
        VALUATIONDATA              =
        VALUATIONDATAX             =
        WAREHOUSENUMBERDATA        =
        WAREHOUSENUMBERDATAX       =
        SALESDATA                  =
        SALESDATAX                 =
        STORAGETYPEDATA            =
        STORAGETYPEDATAX           =
        FLAG_ONLINE                = ' '
        FLAG_CAD_CALL              = ' '
       IMPORTING
         RETURN                     = IT_RETURN
       TABLES
         MATERIALDESCRIPTION        = IT_MATERIALDESC
        UNITSOFMEASURE             =
        UNITSOFMEASUREX            =
        INTERNATIONALARTNOS        =
        MATERIALLONGTEXT           =
        TAXCLASSIFICATIONS         =
        RETURNMESSAGES             =
        PRTDATA                    =
        PRTDATAX                   =
        EXTENSIONIN                =
        EXTENSIONINX               =
    WRITE:/    IT_RETURN-TYPE,
            2   IT_RETURN-ID,
            22  IT_RETURN-NUMBER,
            25  IT_RETURN-MESSAGE.
               IT_RETURN-LOG_NO,
               IT_RETURN-LOG_MSG_NO,
               IT_RETURN-MESSAGE_V1,
               IT_RETURN-MESSAGE_V2,
               IT_RETURN-MESSAGE_V3,
               IT_RETURN-MESSAGE_V4,
               IT_RETURN-PARAMETER,
               IT_RETURN-ROW,
               IT_RETURN-FIELD,
               IT_RETURN-SYSTEM.
    ENDLOOP.
    Regards,
    Naveen

Maybe you are looking for