X-plant matl status

Dear All,
Will blocking material thru "X-plant material status" in MMR(for a particular transaction) cause problem in entering goods thru MB1C. Since I'm getting this error "No posting can be possible for this material type". If no, what the thing I would be missing to configure? I tried on OBYC but it's in Display mode and I'm unable to trace any relevant info.?
Regards
Samier

Dear JC/SK,
My issue is that after all necessary enterprise structure assignments and creation of relevant MMRs, when I go to MB1C and try to enter material XXXX into initial stock using movement type 561, this error mentioned earlier comes. I've also ticked both Qty/value updation for material type in OMS2 and even I tried thru checking only one of them, one by one but to no avail.
Where am I going wrong?
Regards
Samier

Similar Messages

  • Cross plant material status

    Hi,
    cross plant material status is " client depandent ",or " indipaendent" ?
    regards

    Hi
    I believe that "Cross Plant Matl.Status" is <b>Client dependent.</b>
    <b>Reason:</b>
    Cross Plant Matl.Status is a field in Material Master which should either be created in different clients or upload it individually. When we change any field in the material master there is no Transport Request generated and so this is Client dependent.
    Please correct me if i am wrong.
    Regards
    Vijay

  • User-exit or BADI required for changing Plant-sp.matl status in MM02

    Hi Folks,
    Our user requirement is when standard price is 0, we should assign value 'Z4' to Plant-sp.matl status(in MRP1 and Costing1 tabsin MM02) . Could any one suggest me a user-exit name or a BADI name to change Plant-sp.matl status in MM02. <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards,
    Ramineni.
    Edited by: Alvaro Tejada Galindo on Aug 22, 2008 5:59 PM

    hi,
    u can use it.
    u can use this exit also.
    MGA00001
    EXIT_SAPLMGMU_001
    i hav done  this coding in this exit and it is working.
    not same of ur requirement but try somthing like this.
    tables : mara,makt.
    data : it_mara type mara occurs 0 with header line,
           it_makt type makt occurs 0 with header line,
           it_marc type marc occurs 0 with header line,
           it_mbew type mbew occurs 0 with header line.
           select * from mara into table it_mara .
           if it_mara[] is not initial.
           select * from makt into table it_makt for all entries
           in it_mara where matnr = it_mara-matnr.
           endif.
          loop at it_makt.
          if stext-maktx = it_makt-maktx.
           if it_makt[] is not initial.
          select * from marc into table it_marc for all entries
          in it_makt where matnr = it_makt-matnr.
          select * from mbew into table it_mbew for all entries
          in it_makt where matnr = it_makt-matnr.
           endif.
        read table it_marc with key matnr = it_makt-matnr.
          if wmarc-werks = it_marc-werks.
       read table it_mbew with key matnr = it_makt-matnr.
       if wmbew-bwtar = it_mbew-bwtar.  " 'VAL_OPEX' or wmbew-bwtar = 'VAL_CAPEX'.
          message e001(zgm_msg).
            endif.
            endif.
            endif.
            clear it_makt.
            clear it_marc.
            clear it_mbew.
            endloop.

  • Update the x plant material status and plant speific material status

    HI Experts,
    I am new to abap. In my requriment i want to update the status of x-plant material status (MSTAE) in MARA  and
    plant specific material status (MMSTA) in MARC. In master data the status of those fields is blank. Insted of balnk i have to upload '01' or '02'.
    using BAPI_MATERIAL_SAVEDATA  i am unable to upload. its not working.
    is there any another way to upload that two plants status.
    thanks in advance
    sravan

    Hi martin,
    i think insted of it_*** (internal table) we have to use work area. please make sure conform this one.
    i am giving my logic wat i have written and my requirement also...
    The process to update material master data status is described in 'xxxxx' Mark and Release Cost Estimates and BAPu201D.
    u2022     As a result of releasing a standard cost, certain master data elements need to be updated by the Cost accountant in order to enable further activities within SAP.
    u2022     All material codes for which Cost Accounting has released a new standard cost, need to have their Material Status indicators changed from 02 (reviewed) to 03 (released).  This removes the system blocks on certain activities within SAP like purchasing, production and Sales.  The status will be needed to change in two views of the Material Master. 
    u2022     The u201CX-plant matl statusu201D field on the Basic Data 1 view
    u2022     The u201CPlant-sp. matl statusu201C field on the Costing 1 view
    This update should be automated
    Select materials for which a price change document was posted based on selection parameters.
    Select price change documents for company code defined in selection screen since last run date
    u2022     Reference procedure = PRCHG (MLHD-AWTYP)
    u2022     Entered on MLHD-CPUDT u2013 verify against last run date to include in selection
    u2022     Entered at MLHD-CPUTM u2013 verify against last run date to include in selection
    u2022     Store last run date and time by company code, so that it can be picked up in the next run. (store in table TVARVC?)
    Select only the documents of plants which belong to the company code in table MLIT. The link between company code and plant can be found in table T001K.
    u2022     Valuation area = Plant MLIT-BWKEY
    u2022     Create a list of all materials MLIT-MATNR
    The next 2 updates should happen independently;
    u2022     Update the u201CPlant-sp. matl statusu201C field (MARC-MMSTA) on all plant views belonging to the company on the Costing 1 view to status 3 with as prerequisite;
    u2022     The current plant material status is 02
    u2022     This action must be done on all plants belonging to the company code
    u2022     Update the u201CX-plant matl statusu201D field (MARA-MSTAE) on the Basic Data 1 view to status 3 with as prerequisite;
    u2022     The current X-plant material status is 02.
    in pt_final1 i get the data corresponing to given tables.
    LOOP AT PT_FINAL1 INTO GS_FINAL1.
    *HEADER DATA
      GS_HEAD-MATERIAL = GS_FINAL1-MATNR.
      GS_HEAD-IND_SECTOR = GS_FINAL1-MBRSH.
      GS_HEAD-MATL_TYPE = GS_FINAL1-MTART.
      GS_HEAD-BASIC_VIEW = 'X'.
      GS_HEAD-COST_VIEW = 'X'.
    APPEND GS_FINAL1 TO IT_FINAL1.
    *CLIENTDATA
      GS_CLNT-PUR_STATUS = GS_FINAL1-MSTAE.
      GS_CLNTX-PUR_STATUS = 'X'.
    *PLANT DATA
      GS_PLNT-PLANT      = GS_FINAL1-WERKS.
      GS_PLNT-PUR_STATUS = GS_FINAL1-MMSTA.
      GS_PLNTX-PUR_STATUS = 'X'.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          HEADDATA    = GS_HEAD
          CLIENTDATA  = GS_CLNT
          CLIENTDATAX = GS_CLNTX
          PLANTDATA   = GS_PLNT
          PLANTDATAX  = GS_PLNTX
        IMPORTING
          RETURN      = GS_RET.
        Commit to release the locks
       RETURN-TYPE is 'E' in case of error, else 'S'.
      IF GS_RET-TYPE = 'E'.
        LOOP AT IT_RET.
          WRITE: / RETURNMES-MESSAGE.
        ENDLOOP.
      ELSEIF GS_RET-TYPE = 'S'..
        WRITE: / 'PLANT MATERIAL STATUS '.
      ENDIF.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDLOOP.

  • PLant specific status

    Hi all,
    How can we configure new plant specific statuses in the system.
    How can the plant specific ststuses can be made mandatory to be filled during material master creation.
    Is it possible to automatically populate a status(For eg ZM) at th time of creating a material.
    PLease help me.
    Karthick P

    Hi
    You can define the Plant specific status in OMS4 as suggested by Mr Vivek and also the settings are global but if you assign the same plant specific material status key in BD1 then for that material it will active on client level and if you assign in MRP1 view then it will active for specific plant only.Also you can do mandatory from T code OMS9> Field sele group 51 and maintain MARC-MMSTA as required entry for your material type wise.
    Correct me if am wrong.
    Regards
    Anupam Sharma

  • Plant Specific and X-Plant Material Status

    Hi,
    Could anyone please answer the following:
    1.What is the TCode to configure Plant Specific Material Status?
    2.Would there be any conflict if both X-Plant Material Status and Plant Specific Material Status can be configured together? My client would like to Stop Manufacturing in one plant and keep others unblocked.
    Thank you,
    Sam

    hi
    1.What is the TCode to configure Plant Specific Material Status?
    t code is OMS4 ,block the production tabs in the indicator
    2.Would there be any conflict if both X-Plant Material Status and Plant Specific Material Status can be configured together? My client would like to Stop Manufacturing in one plant and keep others unblocked.
    *if u want plant specific block then do not use this indicator in basic data 1 view ,use it in purchasing view *
    select the material in mm02 with plant and store then in pur view material plant status give this indicator
    regards
    kunal
    award if useful

  • X-Plant Material status.

    Hi All,
    X-Plant material status means that we define a status saying that the material can be procured or blocked or not blocked.
    configuration path:-IMG Path: Logistics General -> Material Master -> Settings for Key Fields -> Define Material Statuses.
    My question is. these material status are created by us from the path mentioned above, but how does it stop the procurment.
    Please explain in detail.
    Regards,
    Ramya.

    Hi,
    If you are connecting between the systems this problem will araise.
    Material will be defined as per the product life cycle.The X-Plant status telling us where the item or material in the product life cycle.
    Based on the definition and design of the materail in the life cycle we can defined the items as described below:
    In general we have list of statuses and their meaning in the life cycle of the product
    X-Plant status - Meaning of that number
    01 - Obsolete
    03 - Hibernate/standby
    05 - Discontinue
    10 - Concept
    11 - Pending production
    15 - Engineering model
    20 - prototype
    30 - o-series
    40 - serial production
    45 - project production
    50 - specila production
    55 - phase out
    May be nubers will be changed as per their convinient and industry specific but the statuses of the items is same .
    Hope this will help to understand the concept of X-Plant status.
    Thanks
    Yugandhar

  • Plant specific statuses

    Hello Everyone,
    I would just like to ask for the purpose of the ff Plant Specific Material Statuses:
    LS- Last time buyStockPurKO
    LT- Last time buy
    NI- New product introduction
    Thanks in advance.
    Earl

    Earl,
    Those are customized statuses, and were created for your company.  The only standard Material Statuses delivered by SAP are '01' and '02'.
    You can review the details of your custom statuses in OMS4.  Description of Material Status functionality can be found in SAP Online help at http://help.sap.com/erp2005_ehp_06/helpdata/EN/ff/515dd249d811d182b80000e829fbfe/frameset.htm
    Configuration help at
    http://help.sap.com/saphelp_46c/helpdata/en/6b/1a39516e36d1118b3f0060b03ca329/content.htm
    Best regards,
    DB49

  • Plant specific status customization (MARC-MMSTA)

    Hi all,
    I want to be able to prevent creation of process order for a material (A) , whose BOM has a CO-blocked or Production-blocked material (B).
    I tried OMS4 transaction, from there i set it B, (error message) for CO-blockage and production-blockage , but then from COR1, when I create an order for A, it gives a warning and creates the order, without B in the BOM.
    Users should not be able to create orders of A in this case, where can I configure this?
    Thanks,

    Try User Exit -  EXIT_SAPMM06E_012 , Check below link for some more details,
    [Component in BOM in Blocked |User exit- Block  PO creation when component in BOM in Blocked status]

  • Blocking of Material at Plant level

    Hi Gurus,
    My requirement is to block the material at plant level i.e. to disallow any transaction for a material in a specific plant..
    Is is possible in SAP and if yes ,then what are the steps to achieve this.

    Hi,
    You can Block the Material for further processing.
    You can set the Indicator as Block(Initial ststus) in X-Plant Material Status in Basic Data & Purchasing View .
    Otherwise you can also flag the material for deletion,in MM06 .
    Best Way is
    You cannot delete the material from material master until archiving but you can block that material for any procurement
    Goto Basic data 1
    X-plant matl status -
    01 Blocked for procment/whse
                                           02 Blocked for task list/BOM
                                           10 Blocked for MRP
    Thanks,
    AMIT

  • PLM7.02: Status & Release Management/ Status and Action Management

    Hello,
                    I´d like to know if anybody worked with Status & Release Management. And has some example to how we can customize: SAM (Status and Action Management) in “Define Status Scheme” transaction.
                    How it´s works the relationship with: Status: Attributes, Status: Field values, Scheme Definition, Attributes: Definition.
                    I´ll appreciated if you could give me a simple example of this functionality.
                    Thanks in advance.
                    Best Regards from Brazil.
                    Rodrigo Arai

    Hi Rodrigo,
    in a nutshell:
    - you can define status network based on objects (w.g. material)
    - Define Attributes: you can define attributes like DELETION_ALLOWED or LOCKED_FOR_CHANGE and you can implement preconditions in custom classes when should it happen
    - Define Status Field: you can define some fields which are related to the status. e.g. in recipe management RCP_USAGE
    - Status: you can define the different statuses (e.g. in process, completed..) with attributes
    - Scheme Definition: you can define the logic between statuses. E.g. you would like to swith from status In Process to Completed and from New to In Process. Then switching from New to Completed is not possible for the user.
    - Subobject Type Scheme only applied if you have subobjects
    here you can find the customizing documentation, there are some examples as well:
    Define Status Scheme
    Use
    In this Customizing activity, you define statuses and status schemes for object types and corresponding attributes.
    For each status, you can define which attributes are allowed to be set for an object with this status assigned.
    The status scheme defines the initial status and the possible transitions from one status to another.
    Activities
    You define status schemes as follows:
    1. Select the required object type and enter the following:
    a) An identifier
    b) An object type class (Note: this class should implement the interface class)
    c) A subobject type search help
    The search help provides a list of all possible subobject types. This feature enhances the usability while  maintaining status schemes at subobject-type level.
    d) If the
    Status
    tab page shall be visible on the PLM Web UI, select the
    Status Tab
    checkbox
    Status and action management is a reusable object. It has been modeled as a dependent object. The prerequisites to enable status and action management for any new objects are:
    Add the Status and Action Management tab page on the UI.
    Enable the Status Tab checkbox in this Customizing activity.
    2. Select the required object type and define the following attributes for it:
    a) An object type
    b) An attribute identifier
    c) An attribute description
    d) An attribute type
    e) Select a precondition class (Note: This class should implement the '/PLMB/IF_SAM_PRECONDITION' interface)
    3. Define the technical status field name.
    When you change the object status, the system updates the technical status field names to the new values made in these settings.
    4. Select object type and define corresponding statuses.
    a) Select the status and define the corresponding object type, an identifier, description, and status icon.
    Note:
    You cannot define new statuses for materials and material BOMs. For these objects, all values should be transferred from the back-end system.
    You can import the status values from the back-end system as follows:
    b) Select the object type that represents a material or a MatBOM.
    c) Select
    Status
    in the dialog structure.
    d) Choose the
    New Entries
    pushbutton.
    e) Choose the
    Import Status
    pushbutton.
    Note
    The system imports the following status values into SAM:
    For material: the
    X-plant matl status
    (cross-plant material status)
    For MatBOM: the header status
    Although you cannot change the imported value for a material or a MatBOM, you can change its name and description to conform to SAM terminology.
    You can differentiate between the following cases for objects whose status values are imported from the back-end system:
    The object was not created on the PLM Web UI, but in the back-end system; no SAM status scheme or status was assigned, but a status value was set in the back-end system.
    If you assign a SAM status scheme to this object later on that contains the equivalent imported status values, the SAM status value is set accordingly, even if any precondition check results of the SAM status scheme may exist.
    The object was created in the back-end system or on the Web UI and a SAM status scheme is assigned to the object on the PLM Web UI.
    If the corresponding status value is changed in the back-end system, then existing SAM preconditions for this status transition and allowed status transitions are checked. If the preconditions are not fulfilled, a message is raised and the new status cannot be saved.
    5. Specify which attributes are allowed for each object type when the chosen status is set.
    a) Select a status and open the
    Attributes
    screen.
    b) Choose an object type.
    c) Choose an attribute.
    6. Define whether values from other technical fields are affected by setting this status.
    a) Select a status and open the
    Field Values
    screen.
    b) Select an object type.
    c) Select a technical field name.
    7. Specify the status scheme. The status scheme defines the initial status and status transition for the object type. For example, below is a list of standard status schemes defined for iPPE object types.
    Assembly Header - PLM_PPEAH
    Assembly Item - PLM_PPEAI
    Product Item Variant - PLM_PPEPIV
    Product Variant - PLM_PPEPV
    You can also create schemes for the object type as follows:
    a) Specify an identifier and description for the status scheme and set one of the statuses defined above as the initial status.
    b) Select the status scheme and open the
    Transitions
    screen. Enter all possible status transitions by specifying the source (
    Status From
    ) and target status (
    Status To
    c) Select the
    Long Text
    checkbox if you want the system to open the long text editor on the
    Status
    tab in the PLM Web UI. You can use the long text editor to create notes for this transition.
    8. Define the scheme at subobject-type level by entering following parameters:
    a) Object type
    b) Subobject type (You can choose from the list of subobject types you have specified when defining the search help in step 1)
    Alternatively, you can define a default status scheme that is automatically displayed on the
    Status
    tab.
    The following statuses are included in the standard delivery:
    10 -  In Work
    20 - For Approval
    LINKED_DIR
    LINKED_MAT
    LOCKED_FOR_CHANGE
    REPLACE_PH_ASSEMBLY (only in the PLM_PPEAI assembly item and the PLM_PPEPIV product item variant)
    30 - Released For Planning
    LOCKED_FOR_CHANGE
    40 - Released
    RELEASED
    SUB_ITEM_STATUS
    The following status transitions are possible:
    FROM
    TO
    Long Text checkbox (dialog box for notes)
    10
    20
    20
    30
    30
    40
    20
    40
    20
    10
    X
    30
    10
    X
    40
    10
    X
    More on SAP help:
    Status and Action Management on the Web UI - SAP Library
    Best regards
    Tamas

  • Mass creation of Material Master Records

    Hi all,
    I have to create 50.000 materials the first time and then, once a month, I have to manage the update of 50/100 materials.
    What do you suggest ?
    Direct input the first time and Idoc (Matmas) to manage the updating?
    Thanks in advance
    Bye

    Hi
    Use LSMW Direct Input Method/Manually code it to imitate LSMW Direct Input Method .
    or
    Use BAPI to Create Materials .
    if u are going for BAPI u can use the following code.
    REPORT Z_NEW_PROGRAM2 .
    *TO CREATE MATERIAL USING BAPI.
                   STRUCTURE  DECLARATIONS                             *
    TABLES: BAPIMATHEAD,  "Headerdata
            BAPI_MARA,    "Clientdata
            BAPI_MARAX,   "Clientdatax
            BAPI_MARC,    "Plantdata
            BAPI_MARCX,   "Plantdatax
            BAPI_MAKT,    "Material description
            BAPI_MBEW,    "VALUATION DATA
            BAPI_MBEWX,
            BAPI_MARM,
            BAPI_MARMX,
            bapi_mean,
            BAPIRET2.     "Return messages
    DATA:V_FILE TYPE STRING.   "input data file
    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
        bwkey(004) type c,
      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.
    *FOR gross wt
    data: begin of it_uom occurs 0.
          include structure BAPI_MARM.
    data:end of it_uom.
    DATA: BEGIN OF IT_UOMX OCCURS 0.
          INCLUDE STRUCTURE BAPI_MARMX.
    DATA:END OF IT_UOMX.
    data:begin of it_mean occurs 0.
         include structure bapi_mean.
    data:end of it_mean.
    DATA:BEGIN OF IT_MLTX OCCURS 0.
         INCLUDE STRUCTURE BAPI_MLTX.
    DATA:END OF IT_MLTX.
    *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.
    *ELSE.
    *DELETE IT_MATMASTER INDEX 1.
    ENDIF.
                   DATA POPULATIONS                                    *
    LOOP AT  IT_MATMASTER.
    *HEADER DATA
      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'.
    *CLIENTDATA
      BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
      BAPI_MARA-DIVISION = IT_MATMASTER-SPART.
      BAPI_MARA-DSN_OFFICE = IT_MATMASTER-LABOR.
      BAPI_MARA-PROD_HIER = IT_MATMASTER-PRDHA.
      BAPI_MARA-PUR_STATUS = IT_MATMASTER-MSTAE.
      BAPI_MARA-ITEM_CAT = IT_MATMASTER-MTPOS_MARA.
      BAPI_MARA-NET_WEIGHT = IT_MATMASTER-NTGEW.
    BAPI_MARA-PO_UNIT = 'KG'.
    BAPI_MARA-UNIT_OF_WT_ISO = 'KG'.
      BAPI_MARA-UNIT_OF_WT = 'KG'.
    BAPI_MARA-PACK_VO_UN = 'KG'.
    BAPI_MARA-BASE_UOM_ISO = 'KG'.
      bapi_mara-size_dim = it_matmaster-groes.
      BAPI_MARA-MAT_GRP_SM = IT_MATMASTER-MAGRV.
      BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
      BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
      BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
      BAPI_MARA-HAZMATPROF = IT_MATMASTER-PROFL.
      BAPI_MARA-ENVT_RLVT = IT_MATMASTER-KZUMW.
      BAPI_MARA-PO_UNIT = IT_MATMASTER-BSTME.
      BAPI_MARA-VAR_ORD_UN = IT_MATMASTER-VABME.
      BAPI_MARA-PUR_VALKEY = IT_MATMASTER-EKWSL.
      BAPI_MARA-MANU_MAT = IT_MATMASTER-MFRPN.
      BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
      BAPI_MARAX-MATL_GROUP = 'X'.
      BAPI_MARAX-DIVISION = 'X'.
      BAPI_MARAX-DSN_OFFICE = 'X'.
      BAPI_MARAX-PROD_HIER = 'X'.
      BAPI_MARAX-PUR_STATUS = 'X'.
      BAPI_MARAX-ITEM_CAT = 'X'.
      BAPI_MARAX-NET_WEIGHT = 'X'.
      BAPI_MARAX-UNIT_OF_WT = 'X'.
    BAPI_MARAX-UNIT_OF_WT_ISO = 'X'.
      bapi_maraX-size_dim = 'X'.
      BAPI_MARAX-MAT_GRP_SM = 'X'.
      BAPI_MARAX-OLD_MAT_NO = 'X'.
      BAPI_MARAX-BASE_UOM = 'X'.
      BAPI_MARAX-BASE_UOM_ISO = 'X'.
      BAPI_MARAX-BASIC_MATL = 'X'.
      BAPI_MARAX-MFR_NO = 'X'.
      BAPI_MARAX-HAZMATPROF = 'X'.
      BAPI_MARAX-ENVT_RLVT = 'X'.
      BAPI_MARAX-PO_UNIT = 'X'.
    BAPI_MARAX-PACK_VO_UN = 'X'.
      BAPI_MARAX-VAR_ORD_UN = 'X'.
      BAPI_MARAX-PUR_VALKEY = 'X'.
      BAPI_MARAX-MANU_MAT = 'X'.
      BAPI_MARAX-MFR_NO = 'X'.
    *PLANT DATA
      BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
      BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
      BAPI_MARC-BATCH_MGMT = IT_MATMASTER-XCHPF.
      BAPI_MARC-GR_PR_TIME = IT_MATMASTER-WEBAZ.
      BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
      BAPI_MARCX-PUR_GROUP = 'X'.
      BAPI_MARCX-BATCH_MGMT = 'X'.
      BAPI_MARCX-GR_PR_TIME = 'X'.
    *VALUATION DATA
      BAPI_MBEW-PRICE_CTRL = IT_MATMASTER-VPRSV.
      BAPI_MBEW-STD_PRICE = IT_MATMASTER-STPRS.
      BAPI_MBEW-COMMPRICE1 = IT_MATMASTER-BWPRH.
      BAPI_MBEW-VAL_AREA = IT_MATMASTER-BWKEY.
      BAPI_MBEW-VAL_CLASS = IT_MATMASTER-BKLAS.
      BAPI_MBEWX-PRICE_CTRL = 'X'.
      BAPI_MBEWX-STD_PRICE = 'X'.
      BAPI_MBEWX-COMMPRICE1 = 'X'.
      BAPI_MBEWX-VAL_AREA = IT_MATMASTER-BWKEY.
      BAPI_MBEWX-VAL_CLASS = 'X'.
      IT_MATERIALDESC-LANGU = 'EN'.
      IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
      append IT_materialdesc.
      IT_UOM-GROSS_WT = IT_MATMASTER-BRGEW.
      IT_UOM-ALT_UNIT = 'KG'.
      IT_UOM-ALT_UNIT_ISO = 'KG'.
        IT_UOM-UNIT_OF_WT = IT_MATMASTER-GEWEI.
        APPEND IT_UOM.
      IT_UOMX-GROSS_WT = 'X'.
      IT_UOMX-ALT_UNIT = 'KG'.
      IT_UOMX-ALT_UNIT_ISO = 'KG'.
      IT_UOMX-UNIT_OF_WT = 'X'.
      APPEND IT_UOMX.
      it_mean-unit = 'KD3'.
      append it_mean.
      it_mltx-langu = 'E'.
      it_mltx-text_name = it_matmaster-matnr.
      APPEND IT_MLTX.
      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              = BAPI_MBEW
         VALUATIONDATAX             = BAPI_MBEWX
        WAREHOUSENUMBERDATA        =
        WAREHOUSENUMBERDATAX       =
        SALESDATA                  =
        SALESDATAX                 =
        STORAGETYPEDATA            =
        STORAGETYPEDATAX           =
        FLAG_ONLINE                = ' '
        FLAG_CAD_CALL              = ' '
       IMPORTING
         RETURN                     = IT_RETURN
       TABLES
         MATERIALDESCRIPTION        = IT_MATERIALDESC
         UNITSOFMEASURE             = IT_UOM
         UNITSOFMEASUREX            = IT_UOMX
         INTERNATIONALARTNOS        = it_mean
        MATERIALLONGTEXT           = IT_MLTX
        TAXCLASSIFICATIONS         =
        RETURNMESSAGES             =
        PRTDATA                    =
        PRTDATAX                   =
        EXTENSIONIN                =
        EXTENSIONINX               =
    read table it_return with key TYPE = 'S'.
    if sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT          =
      IMPORTING
        RETURN        =
    *else.
    *CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
    IMPORTING
      RETURN        =
    endif.
    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.
    This will Create Mass .

  • Report for the material having any kind of block

    Dear All
    I would like to have a report for the material having any kind of block i.e.(X-plant matl status OR Plant-sp.matl status).
    Pl suggest any standard report or through table.
    Rregards
    Manoj

    Hi
    Trnx. SE16  Table MARA 
    fields
       MSTAE                           X-plant matl status
       MSTAV                           X-distr.chain status
    Vishal...

  • Report problem with BAPI_MATERIAL_SAVEDATA (help required)

    hi all,
    i am using this source code to create material using
    BAPI_MATERIAL_SAVEDATA.
    when i am executing the program,
    i am getting message the material no 512 transferred without leading 0.
    but when i am checking the mara table i am not getting the material 512 created.
    my program is as follows plz check where i am wrong ? why i am not able to create the material using this program.what changes i have to make in this program so that i will be successful in creating material.?
    *& Report  ZCREATE_MATERIAL
    *& Developer
    *& Date:   &DATE
                   STRUCTURE  DECLARATIONS                             *
    Report:zcreate_material.
    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               =
      Bapi to commit the changes
        IF sy-subrc <> 0.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        ENDIF.
    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.
    thanks
    sanjeev

    Actually your COMMIT call not at all executed.
    IF sy-subrc <> 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    ENDIF.
    The sy-subrc = 0 after the BAPI executed, the right way is after BAPI call check the bapi RETURN table has any error, if not commit the BAPI otherwise rollback.

  • BAPI_MATERIAL_SAVEDATA not updating the materials

    Hi Folks,
    I am trying using the BAPI_MATERIAL_SAVEDATA to change the MRP Type of the existing articles. Basically to mass update the articles.I am passing the Material only to the BAPIMATHEAD parameter and also populating the BAPI_MARC where the MRP type has to be changed and I also populate the corresponding BAPI_MARCX with 'X' that has to be changed to the Function Module. I could find when debugging the error message E 091 MH 'You must use retail functions to process the article' that is generated from another function module MATERIAL_MAINTAIN_DARK 'within BAPI_MATERIAL_SAVEDATA. I am using the FM as given below.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata                   = i_bapimathead
      CLIENTDATA                 = i_bapimara
      CLIENTDATAX                = i_bapimarax
        PLANTDATA                  = i_bapimarc
        PLANTDATAX                 = i_bapimarcx
    IMPORTING
       RETURN                     = i_bapireturn.
    TABLES
      MATERIALDESCRIPTION        =
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =  i_BAPIHM
      PRTDATAX                   =  i_BAPIHMX.
      EXTENSIONIN                =
      EXTENSIONINX               =
    Please help me understand if I have missed anything as why I am getting this error message. Many thanks.
    Regards,
    Tim

    REPORT Z_NEW_PROGRAM .
    *                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.
    are you using this bapi BAPI_TRANSACTION_COMMIT,
    after calling the BAPI_MATERIAL_SAVEDATA .
    if not use that and check it.
    thanks
    vijay

Maybe you are looking for

  • IPhoto 08 imported for one user but not another

    We have iPhoto '08 ver 7.1.5 and it worked fine with my login. I could import photos from our Canon PowerShot SD960 into my iPhoto library. But when my wife logged in and tried to import the same photos she got a message stating "Unreadable Files" an

  • Playing downloaded AVI files

    Currently living and travelling in Asia and so TV just isn't accessable. My buddy downloads stuff on his laptop and burns me dvds of shows etc. The issue I'm having is that they only seem to work on his PC comp. The disks on my macbook play the video

  • SUM OVER PARTITION BY condition?

    I have a piece of SQL similar to: SELECT person, amount, type, SUM(amount) OVER (PARTITION BY person) sum_amount_person FROM table_a What I would like to be able to do is use a conditional PARTITION BY clause, so rather than partition and summing for

  • Dsconf backup/restore in a replication environment

    Hi, using Sun JS Directory Server 6.3.1. Two servers in a multi-master topology. When making a backup of the directory (on both systems) using dsconf backup, my question is: how should the restore be done, given the fact that there's a replication ag

  • Cannot get Xbox Live to report NAT Open whatever i try.

    Hi, Ive read everything i can find on the internet about the latest Airport Extreme Base Station and Xbox Live and I cannot for the life of me manage to get the Xbox 360 to report "NAT - OPEN" during tests. Worst still it always comes back as NAT Str