Update material type by bapi

Hi all,
        I am  working on LSMW by BAPI method. i want to update the Material Type of a given material.So, I have gone to MM01 then I copy that material but in BAPI  I do not find any structure related to Refrence Material No. Field. Kindly tell me the structure regarding this  Refrence Material No. field.
Sulabh

I doupt that you can change the material type, as it cannot be changed in the standard transaction MM02, and not in the MM17 mass maintenance transaction (which uses BAPI method).
A material type is usally changed with an extra transaction: MMAM as it has to perform a couple extra checks that are not needed in a standard maintenance.

Similar Messages

  • Changing Material Type using BAPI

    Hi All,
    I am trying to change a material. I able to change many fields of the material  except 'Material Type' using BAPI_MATERIAL_SAVEDATA. 
    Did any one used BAPI_MATERIAL_SAVEDATA or any other BAPIs to change the material type of a material? I do not want to develop BDC for the same as of now.
    Thanks in advance.
    Regards,
    Rama

    Did you use BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.
    Look also at this <a href="http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm">Sample Abap code on BAPI_PO_CHANGE</a>
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          PURCHASEORDER = T_POHEADER-PO
          POHEADER      = T_BAPI_POHEADER
          POHEADERX     = T_BAPI_POHEADERX
        TABLES
          RETURN        = T_BAPIRETURN
          POITEM        = T_BAPI_POITEM
          POITEMX       = T_BAPI_POITEMX.
      READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.
      ENDIF.
    Regards

  • 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

  • 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

  • BAPI by which we can update material master AFS data.

    Hello All,
    I want to update net weigt for a perticular material of material type FERT.
    I have data in my internal table.Is there any BAPI for updation.
    I want to update like .
    Goto MM02. and goto any FERT material.
    Goto Additional data button.
    GOto AFS weights and volumes tab.
    There we need to update netweight value corresponding to the size.
    So, Please let me know the various ways of updating.
    Please ,Ask me for any clarifications.
    Thanks,
    kumar
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Oct 26, 2009 9:25 AM

    Hello all,
    Did any one have any updates on my ques.. please.
    Thanks
    Kumar

  • How to Update material cost of user defined org specific cost type

    Hi,
    We need to update material cost sub elements of an item for an org specific and user defined cost type.
    I have inserted a sample row in the CST_ITEM_CST_DTLS_INTERFACE, and running open interface 'Mass Update Material Costs', but the program is not at all processing the rows, the Process_flag remains 1.
    insert into cst_item_cst_dtls_interface
    (inventory_item_id,
    organization_id,
    resource_id,
    usage_rate_or_amount,
    cost_element_ID,
    Process_Flag ,
    last_update_date,
    last_updated_by,
    creation_date,
    created_by
    values
    (96023,
    343,
    52538,
    0.00208012,
    1,
    1,
    sysdate,
    fnd_global.user_id,
    sysdate,
    fnd_global.user_id
    Can someone help me out with this, thanks.
    Regards
    Dasu

    I think there is some confusion.
    "Mass Edit Material Costs" program is used to apply new activity rates to item costs. For this, you don't have to insert records in the interface. You have to define/update the new activity rates using screen.
    To process records in the cost interface tables, you have to run the "Cost Import Process" program.
    For more details, refer to http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/cst/settas06.htm
    Hope this answers your question
    Sandeep Gandhi
    Omkar Technologies Inc.
    Independent Techno-functional Consultant

  • Functional Module or BAPI for changing Material Type

    Hi,
    There is a Transaction MMAM for changing the Material Type in SAP. Can anyone help me in figuring out a Functional Module which can change the Material Type like how MMAM transaction does. Is anyone aware of any FM or BAPI that can take import parameters as Material Number and New Material Type and change the material type to the New one.
    I tried using the BDC but got some performance issues with it.
    Thanks
    Vinay

    Could you please put some light on which part of the transaction MMAM is responsible in changing the Material type. I can understand that there may exist may checks in the Tx MMAM but I would like to know  where is the material Type getting changed in the Tx MMAM. On going through the Tx MMAM I have across many forms and function modules but its difficult to track the form/Function Module responsible for changing the Material Type. Please help me in this.

  • Consumable Material type tax register updation

    Dear friends
    When to capture and post the excise invoice for Consumable material type,
    Material need to update on 23 A register. But its is updating on 23C register.
    How to rectify this error?  Where we can assign the consumable material type with 23 A register?
    regards

    Hi,
    Check the Material & Chapter ID combination in J1ID transaction
    If you assign the material type as Raw Material in the above settings for your Material, Plant & Chapter ID combination, RG23A Register will be updated.
    Thanks & Regards,

  • Material type non valuated affected stock update?

    Hi expert,
    i created PO by using account assignment "A" and material number with material type non valuated (just qty update). At the same time i processed GR, the result wasn't as like as i expected. The asset value was raised and the qty was updated in the warehouse.
    Surprisingly, this result (qty update in warehouse) is also affected by using account assingment "K" & "F".
    As i know, the business process by using account assignment means consumption and stock mustn't be updated  in warehouse. So how could the material type non valuated's stock can be updated at the time i m doing consumption purchase? is there any config i miss in order to make it doesn't update the stock?
    thanks & Regards,
    AJ

    problem solved

  • BAPI to Update Material classification data

    Hi All,
      Is there a BAPI that can be used to update material classification data?
    Regards,
    Hari.

    Hi Hari,
    Please try this FM UPDATE_MATERIAL_CLASSIFICATION.
    Also check program standard SAP program RCCLBI03.
    Regards,
    Ferry Lianto

  • Quantity update of material type

    Hi all,
    I have a question with regards to material type.
    Letu2019s say if I can a new material type with both purchasing and sales view, and unchecked the u201CQuantity Updatingu201D checkbox, and checked the u201CValue Updatingu201D checkbox in the material type configuration.
    1 - May I know what does it means?
    Does it meant:
    2 u2013 When I did a goods receipt into the system, there will no stock quantity update in display in the MMBE, MB52 (i.e. not inventorized)?
    3 u2013 Does it means the tmaterial create will be inventorized?
    4 u2013 the stock quantity will not be capture in the system but only the value will show in the book?
    This a bit confuse topic.
    Thanks.

    hi
    quantity and value update is ticked for the materials which being inventerised generally in the plant
    now if u dont tick for the quantity update then the material will required the account assignment as it will not stocked in SL
    if u untick for value update and tick for quantity then the material can be stored in the SL ,means we can do the GR but the there will be    no accounting documents
    better we explain you why dont you try it yourself
    regards
    kunal

  • BAPIs for populating  Industry Sector and Material Type dropdowns

    Hi all,
    I have a requirement to create WebDynpro appliation,
    which is the replica of MM01 Transaction page.
    In the first page i want to populate Industry sector
    values and Material Type values in 2 dropdowns.
    Can anyone please tell me what are the BAPIs i need to
    call and how to find the required BAPIs?
    Thanks

    You can use the function module RFC_READ_TABLE.  The tables that you need to read are T137 for industry sector and T134 for material type. 
    Regards,
    Rich Heilman

  • Material Type value update activation

    There is a requirement to convert a material type from only qty update to Value update . The transactions like procurement and consumption are happening for this material type .
    In case , Value update is also activated for this material type and accounting view is created for these materials , what will be the  implications during the cut over activities .
    The suggestions and information from the members , who have experience in the similar scenario are welcome
    Regards
    Mani

    Hi,
    It is very well possible to have materials with value updation only.
    It is useful when no inventory i.e no stock is to be maintained. Only value is the required.
    For eg: Pipeline material is directly consumed. No inventory is required to be maintained against it.
    Such materials are also called as non-stockable materials.
    These materials will always be procured against an account assigment category in PO. The value is directly posted to Consumption Account picked via Acc *** Category during GR.
    No stock/inventory account will be posted during GR.
    Regards,
    Komal

  • Material Type: Value Updating Flag

    Hi
    For a material type, is there a possibility that only the 'Value Updating' flag is checked and the 'Quantity Updating' flag is unchecked? Is this a realistic scenario? Any reall-time example for such a scenario?
    In this case, is the material type considered as Inventory managed ?
    What is the implication of checking the 'Value Updating' flag?
    Does this mean that a Stock Account is associated with the material type?
    Thanks for your inputs here in advance
    Kind Regards
    ~P

    Hi,
    It is very well possible to have materials with value updation only.
    It is useful when no inventory i.e no stock is to be maintained. Only value is the required.
    For eg: Pipeline material is directly consumed. No inventory is required to be maintained against it.
    Such materials are also called as non-stockable materials.
    These materials will always be procured against an account assigment category in PO. The value is directly posted to Consumption Account picked via Acc *** Category during GR.
    No stock/inventory account will be posted during GR.
    Regards,
    Komal

  • Create material serial number and update class type and class

    Hi ,
    do we have any function to create material serial number and update class type, class and Characteristic Description?
    for transcation IQ04 0-Create material Serial number and IQ02 for change mat. serial number
    cheers,
    RAAG

    hi
    u  can  go to  iqo2 and click  class overview and assign the class type ,class and description.but u need to maintain  class for this first.
    it would be helpful for u  to  read iut  221 for work management
    for creation  of class,service object  etc.and understand the concept .
    all the best
    kr
    raj
    RAJ on Oct 14, 2008 3:20 PM

Maybe you are looking for

  • TS1717 The file "Itunes Library itl" cannot be read because it was created by a newer version of iTunes.

    When I launch iTunes from my main account iI get the message: "The file "Itunes Library itl" cannot be read because it was created by a newer version of iTunes." I only get this in this specific user account! My other user account can open and use iT

  • [b]How inserting an icon in a JTable[/b]

    I want to insert an icon in a JTable's column. But a different icon each time in order to represents details about a Jtree. I display an adress instead of an icon. If you could help me by a sample code, Thanks.

  • How do I make the screen stop moving?

    I must have clicked something I shouldn't.... Usually, I use my index finger to move the cursor around on the screen. But now, I can still do that, but everything on the screen moves side to side or up and down when I'm moving the cursor (moving my f

  • Goods Receipts for GL Account of Vendor

    Hi SAP Experts, Good day!  Is there a report that can be generated for all Goods Receipt of a particular vendor and GL Account?  For instance, all Goods Receipt for vendor "ABC" and GL Account "XYZ?" Thanks, Matt

  • PO conversion alongwith Receipts and Invoices

    Dear All What is the approach for the following case for conversion from one SOB to another SOB Purchase order created, PO receipt made (receive done, deliver pending), invoice created and matched with PO and Receipt (can be paid also) PO is open and