Create Material- Using authority by material type

Hi Experts
I want to  set authority for user to create material by using  material type. User will create only those  material in which they are assigned in specific material type.
Please help me to solve this problem.

Hi,
You can proceed in the following way regarding this issue
1] In OMS2, maintain the Authorization Group for a particular Material Type
2] Maintain this Authorization Group in the activities of MM01 T-code with the help of Basis
3] This will ensure that authorized user only can create material master for that material type
Regards,
Amol

Similar Messages

  • I can create material using inbound Idoc of type MATMAS01, but not MATMAS05

    I can create material using inbound Idoc of type MATMAS01 in WE19, but MATMAS05 failed. In fact I used same data ( different material number), and same inbound function, but got different result.
    What is different between MATMAS01 and MATMAS05? Is there some configuation need for MATMAS05?
    My system is ECC5.0. Thanks.

    Hi, nagaraj
    this is inbound IDoc, not outbound IDoc, so we can't assign Basic type in WE20, only can assign Message type.
    In WE82, there are 5 records about Messagetype MATMAS:
         Message type   Basic type     Release
          MATMAS         MATMAS01        30A
          MATMAS         MATMAS02        30D
          MATMAS         MATMAS03        40A
          MATMAS         MATMAS04        46C
          MATMAS         MATMAS05        470
       I think it should be ok.
    In WE57, there 2 records are exist:
       FM_name                 BasicType       MessageType
      IDOC_INPUT_MATMAS01       MATMAS01         MATMAS
      IDOC_INPUT_MATMAS01       MATMAS05         MATMAS
    so I think all configurations should be ok.
    Message was edited by:
            liu bin

  • Stock transfer between plants - Material used is Asset material

    Hi All,
    We are using TAXINJ.
    We are doing stock transfer of an asset material from Plant A to Plant B.
    Proceedure followed as below:
    Supplying Plant -
    STO PO - ME21N
    Outbound Delivery -  VL10B
    PGI - VL02N
    Billing - VF01
    Invoice DOc - J1IIN
    Receiving Plant-
    Goods reciept - MIGO
    Capture excise thru - J1IEX
    When capturing excise ETT is GRPO and the subtransaction type used is 01
    We are getting the below message:
    "No Cenvat amount to be posted"
    "No Cenvat Amount to be reversed"
    We are not getting any message when we are not using subtransaction type 01, and we are able to post part2 entries.
    Pls suggest.
    Thanks in advance
    Pavan.

    Hi Deivakaniraja,
    Thank you for your suggestion.
    Still have a querry....
    The subtransaction type that is defined is not conventional.
    We define various subtransaction type like 01, 02, 03, 04, but there is no standard that 01 to be used only for subcontracting.
    I understand that IP is defined only for Import postings.
    Can you pls brief me.
    Thank You in advance.
    Regards
    Pavan

  • Create material using reference material

    Hi All,
    I need to create a material using a reference material. I am using the BAPI_MATERIAL_SAVEREPLICA and passing the reference material in the PL_REF_MAT field. But this is not working fine. I have searcged the forums as well but couldn't find any solution.
    Another solution that I am thinking to implement is to use BAPI_MATERIAL_GETALL and get the details of the reference material and then pass those details to the BAPI_MATERIAL_SAVEREPLICA. But as the structures for the two BAPI's are different I need to mapo each field one by one which is quite cumbersome as each view of the material has almost 100 or more fields.
    Please suggest.
    Thanks,
    Manish

    Hi Goutam,
    You can use the BAPI BAPI_MATERIAL_SAVEDATA, which will create/update the material. You can pass the reference material in the filed BAPI_MARA-PL_REF_MAT. And you can pass reference material for all view like this.

  • How to use the direct material indicator in Plan Driven Procurement?

    Dear Experts,
    How the system determine the procurement as direct material procurement in Plan driven scenario? In case of manual shopping cart, the system determines the direct material /indirect material procurement based on the check box 'Order as direct material'
    indicator.
    Now in case of plan driven procurement, where the requisition comes from ECC system, there is no way to indicate in the MM system for direct material?
    Could you please enlighten me here?
    Thanks and regards,
    Ranjan

    Hi Ranjan,
    In case of manual shopping cart, system at that point does not know whether the material procured has inventory management maintained or material valuation. Hence we need to specify option of 'Order as direct material'.
    But when requisition is created in ECC system, SAP system already is aware of direct procurement since material used will have material master / Inventory management / Material valuation / Storage location etc maintained. And the info or some indicator will be sent to front end SRM system accordingly. 
    Moreover it does not really matter for front-end SRM system to check whether it's a direct or indirect procurement since all procurement processes followed in SRM will be exactly same.
    Hope this provides some kind of understanding for your questions.
    -Ravi

  • Error while creating a material using Bapi_material_savedata

    Hi,
    there is an error encountered while creating a material using BAPI_MATERIAL_SAVEDATA..
    The Error description is " Material description is not transfered " even after supplying the Material description and other mandatory field information like industrial sector, material type ,basic view indicator,Base UOM,Base UOM ISO code.
    Please let me know the solution, if you know.

    Hi,
    Please search the SCN for the answers
    https://www.sdn.sap.com/irj/scn/advancedsearch?query=errorinBAPI_MATERIAL_SAVEDATA+&cat=sdn_all

  • When am creating the material using the transaction MM01 getting the error

    Hi all,
      Could you please help me to solve this issue, When I am creating the material using the transaction MM01, am receiving the error message "Express document "Update was terminated" received from author "XXXXXXXX", I checked the in SM13 found error message showing in Z_LGPLA_BIN_POSTING.
    Regards,
    Muralikrsihna.

    ST22 Error is : SAPSQL_ARRAY_INSERT_DUPREC, below is full error message
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
    neither
    caught nor passed along using a RAISING clause, in the procedure
    "Z_LGPLA_BIN_POSTING" "(FUNCTION)"
    Since the caller of the procedure could not have expected this exception
    to occur, the running program was terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    Regards,
    Muralikrishna

  • Create material using bapi ' bapi_material_savedata'

    Hi Experts,
    i was tring to create material using bapi ' bapi_material_savedata' but the material is not updating in the table.
    please find the code and suggest me if any modification
    data: la_headdata type BAPIMATHEAD,
    la_clientdata type BAPI_MARA,
    la_CLIENTDATAX type BAPI_MARAX,
    la_return type BAPIRET2.
    data: i_materialdescription type table of BAPI_MAKT,
    wa_materialdescription like line of i_materialdescription.
    *la_headdata-MATERIAL = int_matnum-MATERIAL.
    *LOOP AT int_matnum.
    la_headdata-MATERIAL = int_matnum-MATERIAL.
    write : int_matnum-material.
    *ENDLOOP.
    la_headdata-MATERIAL = '100000518'."int_matnum-MATERIAL.
    la_headdata-IND_SECTOR = p_indsr.
    la_headdata-MATL_TYPE = p_matype.
    la_clientdata-BASE_UOM = 'FT3'.
    la_clientdata-pur_valkey = ' '.
    la_CLIENTDATAX-BASE_UOM = 'X'.
    la_clientdata-MATL_GROUP = '01'.
    la_CLIENTDATAX-MATL_GROUP = 'X'.
    wa_materialdescription = 'TEST'.
    append wa_materialdescription to i_materialdescription.
    clear: wa_materialdescription.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
    headdata = la_headdata
    CLIENTDATA = la_clientdata
    CLIENTDATAX = la_CLIENTDATAX
    PLANTDATA =
    PLANTDATAX =
    FORECASTPARAMETERS =
    FORECASTPARAMETERSX =
    PLANNINGDATA =
    PLANNINGDATAX =
    STORAGELOCATIONDATA =
    STORAGELOCATIONDATAX =
    VALUATIONDATA =
    VALUATIONDATAX =
    WAREHOUSENUMBERDATA =
    WAREHOUSENUMBERDATAX =
    SALESDATA =
    SALESDATAX =
    STORAGETYPEDATA =
    STORAGETYPEDATAX =
    FLAG_ONLINE = ' '
    FLAG_CAD_CALL = ' '
    IMPORTING
    RETURN = la_return
    TABLES
    MATERIALDESCRIPTION = i_materialdescription
    UNITSOFMEASURE =
    UNITSOFMEASUREX =
    INTERNATIONALARTNOS =
    MATERIALLONGTEXT =
    TAXCLASSIFICATIONS =
    RETURNMESSAGES =
    PRTDATA =
    PRTDATAX =
    EXTENSIONIN =
    EXTENSIONINX =
    Please Help me
    Regards,
    Naresh

    Hi all,
    Now it is asking me for the other fields,
    E ,
    The field MARA-XCHPF/BAPI_MARA-BATCH_MGMT is defined as a required field; it does not contain an entry
    i have passed this val as
    la_clientdata-batch_mgmt = 'X'.
    even though i am getting the same error.
    can you help me to solve the issue.
    Tthanks
    Naresh
    Edited by: naresh.k.dasari on Jan 4, 2011 10:36 AM

  • Create material using bapi_material_savedata

    Hi.
    I'm having prob with creation of material using bapi_material_savedata. When creating new material we use internal numbering so I use first bapi_material_getintnumber'. the number from that bapi is what i used in bapi_material_savedata. However, I getting an error that says 'matnr <from bapi>does not exists', why is this so? do i need to put the commit after the bapi_material_getintnumber and before calling the bapi_material_savedata?
    Please help.
    thnx.

    hi
    good
    go through this example and use accordingly
    REPORT ZBAPIMM01 LINE-SIZE 255 NO STANDARD PAGE HEADING
                     LINE-COUNT 065(001).
    TABLES: T001L, "Storage Locations
            MARA,  "General Material Data
            MAKT,  "Material Descriptions
            MBEW,  "Material Valuation
            MARC.  "Plant Data for Material
    DATA: BAPI_HEAD   LIKE BAPIMATHEAD,
          BAPI_MAKT   LIKE BAPI_MAKT,    "Material Description
          BAPI_MARA1  LIKE BAPI_MARA,    "Client Data
          BAPI_MARAX  LIKE BAPI_MARAX,
          BAPI_MARC1  LIKE BAPI_MARC,    "Plant View
          BAPI_MARCX  LIKE BAPI_MARCX,
          BAPI_MBEW1  LIKE BAPI_MBEW,    "Accounting View
          BAPI_MBEWX  LIKE BAPI_MBEWX,
          BAPI_RETURN LIKE BAPIRET2.
    DATA: BEGIN OF INT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF INT_MAKT.
    DATA: BEGIN OF INT_MAT OCCURS 100,
             WERKS(4),     "Plant
             MTART(4),     "Material type
             MATNR(18),    "Material number
             MATKL(9) ,    "Material group
             MBRSH(1),     "Industry sector
             MEINS(3),     "Base unit of measure
             GEWEI(3),     "Weight Unit
             SPART(2),     "Division
             EKGRP(3),     "Purchasing group
             VPRSV(1),     "Price control indicator
             STPRS(12),    "Standard price
             PEINH(3),     "Price unit
             SPRAS(2),     "Language key
             MAKTX(40),     "Material description
           END OF INT_MAT.
    SELECT-OPTIONS:
                PLANT    FOR  MARC-WERKS OBLIGATORY MEMORY ID PLT,
                MATERIAL FOR  MARA-MATNR MEMORY ID MAT,
                MATLTYPE FOR  MARA-MTART MEMORY ID MTY,
                DIVISION FOR  MARA-SPART MEMORY ID DIV.
    PARAMETERS:  F_FILE LIKE RLGRAP-FILENAME
                 DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
                 GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
                 UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
    IF GETDATA = 'X'.
       PERFORM DOWNLOAD_DATA.
       PERFORM DOWNLOAD_FILE.
    ENDIF.
    IF UPDDATA = 'X'.
       PERFORM UPLOAD_FILE.
       PERFORM UPDATE_MM.
    ENDIF.
    FORM DOWNLOAD_DATA.
    SELECT * FROM MARC  WHERE LVORM EQ ' '
                          AND WERKS IN PLANT
                          AND MATNR IN MATERIAL.
        CLEAR MARA.
        SELECT SINGLE * FROM MARA WHERE MATNR =  MARC-MATNR.
        CHECK MATLTYPE.
        CHECK DIVISION.
        CLEAR MBEW.
        SELECT SINGLE * FROM MBEW WHERE MATNR =  MARC-MATNR
                                    AND BWKEY =  MARC-WERKS.
        CLEAR MAKT.
        SELECT SINGLE * FROM MAKT WHERE SPRAS =  'EN'
                                    AND MATNR =  MARC-MATNR.
        WRITE:/ MARC-WERKS,    "Plant
                MARA-MTART,    "Material type
                MARA-MATNR,    "Material number
                MARA-MATKL,    "Material group
                MARA-MBRSH,    "Industry sector
                MARA-MEINS,    "Base unit of measure
                MARA-GEWEI,    "Weight Unit
                MARA-SPART,    "Division
                MARC-EKGRP,    "Purchasing group
                MBEW-VPRSV,    "Price control indicator
                MBEW-STPRS,    "Standard price
                MBEW-PEINH,    "Price unit
                MAKT-SPRAS,    "Language key
                MAKT-MAKTX.    "Material description
                INT_MAT-WERKS = MARC-WERKS.    "Plant
                INT_MAT-MTART = MARA-MTART.    "Material type
                INT_MAT-MATNR = MARA-MATNR.    "Material number
                INT_MAT-MATKL = MARA-MATKL.    "Material group
                INT_MAT-MBRSH = MARA-MBRSH.    "Industry sector
                INT_MAT-MEINS = MARA-MEINS.    "Base unit of measure
                INT_MAT-GEWEI = MARA-GEWEI.    "Weight Unit
                INT_MAT-SPART = MARA-SPART.    "Division
                INT_MAT-EKGRP = MARC-EKGRP.    "Purchasing group
                INT_MAT-VPRSV = MBEW-VPRSV.    "Price control indicator
                INT_MAT-STPRS = MBEW-STPRS.    "Standard price
                INT_MAT-PEINH = MBEW-PEINH.    "Price unit
                INT_MAT-SPRAS = MAKT-SPRAS.    "Language key
                INT_MAT-MAKTX = MAKT-MAKTX.    "Material description
                APPEND INT_MAT.
                CLEAR  INT_MAT.
    ENDSELECT.
    ENDFORM.
    FORM DOWNLOAD_FILE.
    call function 'WS_DOWNLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Download Successfully to your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPLOAD_FILE.
    call function 'WS_UPLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Upload Successfully from your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPDATE_MM.
    LOOP AT INT_MAT.
    Header
        BAPI_HEAD-MATERIAL        = INT_MAT-MATNR.
        BAPI_HEAD-IND_SECTOR      = INT_MAT-MBRSH.
        BAPI_HEAD-MATL_TYPE       = INT_MAT-MTART.
        BAPI_HEAD-BASIC_VIEW      = 'X'.
        BAPI_HEAD-PURCHASE_VIEW   = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW    = 'X'.
    Material Description
        REFRESH INT_MAKT.
        INT_MAKT-LANGU           = INT_MAT-SPRAS.
        INT_MAKT-MATL_DESC       = INT_MAT-MAKTX.
        APPEND INT_MAKT.
    Client Data - Basic
        BAPI_MARA1-MATL_GROUP     = INT_MAT-MATKL.
        BAPI_MARA1-BASE_UOM       = INT_MAT-MEINS.
        BAPI_MARA1-UNIT_OF_WT     = INT_MAT-GEWEI.
        BAPI_MARA1-DIVISION       = INT_MAT-SPART.
        BAPI_MARAX-MATL_GROUP = 'X'.
        BAPI_MARAX-BASE_UOM   = 'X'.
        BAPI_MARAX-UNIT_OF_WT = 'X'.
        BAPI_MARAX-DIVISION   = 'X'.
    Plant - Purchasing
        BAPI_MARC1-PLANT      = INT_MAT-WERKS.
        BAPI_MARC1-PUR_GROUP  = INT_MAT-EKGRP.
        BAPI_MARCX-PLANT      = INT_MAT-WERKS.
        BAPI_MARCX-PUR_GROUP  = 'X'.
    Accounting
        BAPI_MBEW1-VAL_AREA   = INT_MAT-WERKS.
        BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.
        BAPI_MBEW1-STD_PRICE  = INT_MAT-STPRS.
        BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.
        BAPI_MBEWX-VAL_AREA   = INT_MAT-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE  = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
        WRITE:/ BAPI_HEAD, BAPI_MARC1.
        call function 'BAPI_MATERIAL_SAVEDATA'
          exporting
            HEADDATA                   = BAPI_HEAD
            CLIENTDATA                 = BAPI_MARA1
            CLIENTDATAX                = BAPI_MARAX
            PLANTDATA                  = BAPI_MARC1
            PLANTDATAX                 = BAPI_MARCX
          FORECASTPARAMETERS         =
          FORECASTPARAMETERSX        =
          PLANNINGDATA               =
          PLANNINGDATAX              =
          STORAGELOCATIONDATA        =
          STORAGELOCATIONDATAX       =
            VALUATIONDATA              = BAPI_MBEW1
            VALUATIONDATAX             = BAPI_MBEWX
          WAREHOUSENUMBERDATA        =
          WAREHOUSENUMBERDATAX       =
          SALESDATA                  = BAPI_MVKE1
          SALESDATAX                 = BAPI_MVKEX
          STORAGETYPEDATA            =
          STORAGETYPEDATAX           =
          IMPORTING
            RETURN                     = BAPI_RETURN
          TABLES
            MATERIALDESCRIPTION        = INT_MAKT
          UNITSOFMEASURE             =
          UNITSOFMEASUREX            =
          INTERNATIONALARTNOS        =
          MATERIALLONGTEXT           =
          TAXCLASSIFICATIONS         =
          RETURNMESSAGES             =
          PRTDATA                    =
          PRTDATAX                   =
          EXTENSIONIN                =
          EXTENSIONINX               =
    IF BAPI_RETURN-TYPE = 'E'.
       WRITE:/ 'Error Message ', BAPI_RETURN.
    ENDIF.
    ENDLOOP.
    ENDFORM.
    *---End of Program
    thanks
    mrutyun^

  • Create non-valuated material using MMU1 and MM01

    Hi MM expertise,
    To create non-valuated material, we need to use standard SAP transaction MMU1.
    Earlier on, I created the non-valuated material using MM01. Want to know any impact and different between MM01 and MMU1.
    Regards,
    sim

    mm01 is for creating the material code for all types of materials.
    mmu1 is only for non valuated material.
    if u want u can check in mmu1 u dont finf the material type selction option, where as u find it in mm01.

  • Creating Material Using BAPI

    Hi Friends,
    I want to create a material using BAPI, can anyone give me some sample program or can any one give me links which earlier posted this problem.
    Points for sure for sample program.
    thanks and regards
    Vijaya

    hi
    good
    go through this REPORT z_bapi_salesorder_create.
    Parameters
    Sales document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    thanks
    mrutyun^

  • Creating Job material using public API from WIP

    Take the entered component part number and search in the WIP job material requirements. This should use a WIP API. If the material is found, increment the quantity. If material is not found, create the job material using public API. (Provide WIP API details)
    The java object, oracle.apps.csd.schema.server .CsdHvWipJobPvtEO is a wrapper to call WIP API. This should be used to create material requirements is this the procedure to create job material Req.
    from OAF how we have to create Job material transaction

    Hi Pat,
    What is your SBO version? I've seen several cases in which the login/connection procedure (both in the client and via DI API) has become much slower after upgrading to SBO 2005.
    Do you experience the same slowness when connecting via DI API in a non-WebService setting?
    I would not recommend using DI API in a web service context in the first place. DI Server would give you a much more robust, stable and scalable infrastructure to build upon.
    Henry

  • [urgent ]runtime error  occured while creating the material using mm01

    hai
    am configure the ale program now . the problem is occured during the creating the material using mm01.
    am using client 000 (sending system). and i want to send the material to the client 400(receiving system)
    while am  save the created material using t-code mm01 in client 000 . it depicts the error as
    syntax error in program SAPLC140. 
    plz resolve this problem.
    regards
    surender

    Hi,
        In MM01 transaction code u have a problem..normally u will go to mm01 screen to create the material..i thought the same error will occur...so call basis to rectify this problem..
    Thank u,
    Manjula Devi.D

  • Create Material using MATMAS05 IDOC

    Hi Gurus,
    Please tell me what are the mandatory fields and tables for those fields to create a Material using MATMAS05 standard IDOC.

    Hi,
    Fields are  never mandatory while sending the idocs. Its the segment which is mandatory.
    If you see the definition of MATMAS05 idoc in transaction WE30 you will find E1MARAM  and E1MAKTM,  as a mandatory segment. It means that you can't send an Idoc without this segment. If you go in segment details than even if you populate a single field in the segment E1MARAM and E1MAKTM then you can send the idocs.
    KR Jaideep,

  • How to create a new material using a BAPI?

    Dear friends,
    How to create a new material using a BAPI? I mean without knowing the material no., how to just create a new one using function modules(BAPI)?
    Thanks a lot!

    Dear,
    New material can be created by using a BAPI_MATERIAL_SAVEDATA.
    More over their are lots of threads available on SDN on the question you raised so kindly search the SDN before posting any thread .
    Cheers
    fareed

Maybe you are looking for