BAPI for subcontract PO

Hi
I am using BAPI_PO_CREATE1 for creating subcontract PO but in my system there is no table like POCOMPONENTS. So i am unable to do this subcontract purchase order. I am using 4.7 version and patch level 28. Do we need to apply for any notes?
regards
sun

Hi,
POCOMPONENTS is like BAPIMEPOCOMPONENTX,
and the BAPIMEPOCOMPONENTX has the structure below.
So, create a structure or table whatever else which has components like below and try to use or put it instead of your structure.
PO_ITEM->EBELP
SCHED_LINE->ETENR
ITEM_NO->RSPOS
PO_ITEMX     ->BAPIUPDATE
SCHED_LINEX->BAPIUPDATE
ITEM_NOX     ->BAPIUPDATE
MATERIAL->BAPIUPDATE
ENTRY_QUANTITY->     BAPIUPDATE
ENTRY_UOM->BAPIUPDATE
ENTRY_UOM_ISO->BAPIUPDATE
FIXED_QUAN->BAPIUPDATE
PLANT->BAPIUPDATE
REQ_DATE->BAPIUPDATE
CHANGE_ID->BAPIUPDATE
MATERIAL_EXTERNAL->BAPIUPDATE
MATERIAL_GUID->BAPIUPDATE
MATERIAL_VERSION->BAPIUPDATE
For example, "PO_ITEM" is field name and "EBELP" is component type of this field. If you have trouble with the data elements, post it to me and i can give you another suitable data elemt for it, and try to solve your problem with this structure.
Regards,
Reward points if helpful.

Similar Messages

  • Bapi for subcontracting purchase order

    Hi,
    is there a BAPI allowing to create a subcontracting purchase order?
    Best regards.

    Hello,
    BAPI_PO_CREATE and BO: BUS2012.
    BAPIEKPOC = ITEM_CAT (3 - Subcontracting)
    Regds, Murugesh AS

  • BAPI for creation of subcontract PO

    Hi all,
       Currently iam doing a BAPI for creation of subcontract Purchase Order using the BAPI_PO_CREATE1. But in this BAPI iam unable to find the table for entering Components.
    Regards,
    Sun.

    Hi,
    I wil give you how to fill the components of PO items, it is a sample code;
    *zPoHeader
      if kna1-kunnr eq 'BOR020'.
        zpoheader-comp_code   = '0040'.
      endif.
      if  kna1-kunnr eq 'BOR040'.
        zpoheader-comp_code   = '0048'.
      endif.
      zpoheader-doc_type    = 'ZSA'.
      zpoheader-doc_date    = mkpf-budat.
      zpoheader-vendor      = 'BOR050'. "şimdilik
      zpoheader-pmnttrms    = 'Z030'.
      zpoheader-purch_org   = '1100'.
      zpoheader-pur_group   = '101'. "malzeme ÜZERINDEKI marc-ekgrp
      zpoheader-currency    = zsaleshead-waers.
      zpoheader-item_intvl  = 10.
      zpoheaderx-comp_code  = 'X'.
      zpoheaderx-doc_type   = 'X'.
      zpoheaderx-vendor     = 'X'.
      zpoheaderx-purch_org  = 'X'.
      zpoheaderx-pur_group  = 'X'.
      zpoheaderx-currency   = 'X'.
      zpoheaderx-doc_date   = 'X'.
      zpoheaderx-pmnttrms   = 'X'.
      zpoheaderx-item_intvl = 'X'.
    *zPoitem
      loop at i_posnr.
        lv_ebelp = lv_ebelp + 10.
        zpoitem-po_item    =  lv_ebelp.
        zpoitem-material   = i_posnr-matnr.
        if kna1-kunnr eq 'BOR020'.
          zpoitem-plant      = '0040'.
          zpoitem-stge_loc   = '4001'.
        endif.
        if kna1-kunnr eq 'BOR040'.
          zpoitem-plant      = '0048'.
          zpoitem-stge_loc   = '4801'.
        endif.
        zpoitem-quantity   = i_posnr-menge.
        zpoitem-po_unit    = i_posnr-meins.
        zpoitem-net_price  = i_posnr-bfiyat.
        zpoitem-price_unit = 1.
        zpoitem-tax_code   = 'V0'.
        zpoitemx-po_item    = lv_ebelp.
        zpoitemx-po_itemx   = 'X'.
        zpoitemx-material   = 'X'.
        zpoitemx-plant      = 'X'.
        zpoitemx-stge_loc   = 'X'.
        zpoitemx-quantity   = 'X'.
        zpoitemx-po_unit    = 'X'.
        zpoitemx-net_price  = 'X'.
        zpoitemx-price_unit = 'X'.
        zpoitemx-tax_code   = 'X'.
        append: zpoitem, zpoitemx.
        clear : zpoitem, zpoitemx.
      endloop.
      call function 'BAPI_PO_CREATE1'
        exporting
        poheader                     = zpoheader
        poheaderx                    = zpoheaderx
    tables
       return                       = zreturn3
       poitem                       = zpoitem
       poitemx                      = zpoitemx.
    Send me your results,
    Kenan.

  • BAPI for GR against subcontracting Purchase order

    Hi Friends,
    I need to make the GR against the Subcontracting Purchase order, for that I need the BAPI. can I use BAPI_GOODSMVT_CREATE.
    The problem is how to find out the BOM Materials. Can anybody provide me the source code for the reference of GR for Subcontracting Purchase Order.
    Thanks in advance.
    Krishan

    Hi krishan,
      Refer to the link below for sample code of
    BAPI_GOODSMVT_CREATE:
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
      also refer to the link below for BAPi's:
    http://www.sapbapi.com/bapi-list/
    With luck,
    Pritam.

  • GR For Subcontracting PO using BAPI

    Dear Experts,
    I m using BAPI_GOODSMVT_CREATE this BAPI to create GR for Subcontracting PO , Here i want to give my own values
    in BOM component with 543 mov.type but its not working.
    And GR for normal PO is working fine.But for Subcontracting its not working.
    Can anyone suggest me the solution.
    Regards,
    Sanket.

    .

  • BAPI for goods receipt for subcontracting PO

    Dears,
    I Just want to confirm that whether BAPI "BAPI_GOODSMVT_CREATE " will do the goods receipt for the subcontracting PO. SInce  I will be passing only 101 mvy type in BAPi, will the system automatically call 543 mvt type and post the consumption.
    Require suggestions
    Regards
    Kamesh

    Hi,
    Yes, BAPI_GOODSMVT_CREATE will work for subcontracting GR as well.
    It all depends on the parameters you pass to the BAPI.
    Example give below:
    *Item Parameters to be passed:     
    Ordered (Subcontracting) Material:
    Parameter     Field     Description     Value
    GOODSMVT_ITEM     MATERIAL     Material Number     100-200
         PLANT     Plant     1000
         ENTRY_QNT     Quantity in Unit of Entry     0.000
         MOVE_TYPE     Movement Type     121
         PO_NUMBER     Purchase Order Number     4500000007
         PO_ITEM     Item Number of Purchasing Document     00010
         MVT_IND     Movement Indicator     O
         LINE_ID     Unique identification of document line     000001
         PARENT_ID     Identifier of immediately superior line     000000
    Note: Quantity of ordered material must be zero.
    Component Material 1:
    Parameter     Field     Description     Value
    GOODSMVT_ITEM     MATERIAL     Material Number     100-100
         PLANT     Plant     1000
         ENTRY_QNT     Quantity in Unit of Entry     2.000
         LINE_ID     Unique identification of document line     000002
         PARENT_ID     Identifier of immediately superior line     000001
    Note: LINE_ID should be incremented for each component and the PARENT_ID remains same for all the components of an ordered material. Component negative quantity can be given in case of Under Consumption.
    Component Material 2:
    Parameter     Field     Description     Value
    GOODSMVT_ITEM     MATERIAL     Material Number     100-100
         PLANT     Plant     1000
         ENTRY_QNT     Quantity in Unit of Entry     3.000
         LINE_ID     Unique identification of document line     000003
         PARENT_ID     Identifier of immediately superior line     000001

  • BAPI FOR Deleting a Schedule Line Item from EKES and EKET tables

    Dear All,
    I would like to for deleting one of the line item from EKES (Po Confirmation ) and the respective line item from the EKET(PO Schedule Line Item Table).
    Assume that am allowing the user to select the lineitem from zprogram screen and collecting the PO and Its LIne Item details in an internal table.
    Can i Use
    <b>BAPI_PO_Change</b> , if so , can anybody tell me the steps to follow to use this bapi for deleting the PO lineItems, since i m going to try BAPI for First time.
    pls help me out
    Message was edited by: Raja K.P

    Hi raja ,
    loop at iekko1.
        w_index = sy-tabix.
        item-po_item   = itemx-po_item   = iekko1-ebelp.
        item-quantity  = iekko1-mng01.
        itemx-quantity = iekko1-mng01.
        if iekko1-wamng = iekko1-wemng.
        itemx-no_more_gr = item-no_more_gr = 'X'.
        else.
        itemx-no_more_gr = item-no_more_gr = ''.
        endif.
        append item.
        append itemx.
          clear return[].
          call function 'BAPI_PO_CHANGE'
               exporting
                    purchaseorder = iekko1-ebeln
               tables
                    return        = return
                    poitem        = item
                    poitemx       = itemx.
          if return[] is initial.
          commit work and wait.
          call function 'DEQUEUE_ALL'.
    search for deletion fields which u have to mark 'X'.
    before calling  this BAPi u have to lock the PO by using ENQUEUE.
    <b>
    FU BAPI_PO_CHANGE
    Text
    Change purchase order
    Functionality
    Function module BAPI_PO_CHANGE enables you to change purchase orders. The Change method uses the technology behind the online transaction ME22N.
    Alternatively, the IDoc type PORDCH1 is available. The data from this IDoc populates the interface parameters of the function module BAPI_PO_CHANGE.
    Functionality in Detail
    Authorization
    When you create (activity 02) an Enjoy purchase order, the following authorization objects are checked:
    M_BEST_BSA (document type in PO)
    M_BEST_EKG (purchasing group in PO)
    M_BEST_EKO (purchasing organization in PO)
    M_BEST_WRK (plant in PO)
    Controlling adoption of field values via X bar
    For most tables, you can use your own parameters in the associated X bar (e.g. PoItemX) to determine whether fields are to be set initial, values inserted via the interface, or default values adopted from Customizing or master records, etc. (for example, it is not mandatory to adopt the material group from an underlying requisition - you can change it with the BAPI).
    Transfer
    Purchase order number
    The PurchaseOrder field uniquely identifies a purchase order. This field must be populated in order to carry out the Change method.
    Header data
    The header data of the Enjoy purchase order is transferred in table PoHeader.
    Item data
    The item data of the Enjoy purchase order is stored in the tables PoItem (general item data). Changes regarding quantity and delivery date are to be made in the table PoSchedule.
    Use the table PoAccount to change the account assignment information.
    Services and limits
    Changes to existing items cannot be carried out with the Change method. It is only possible to create new items.
    Conditions
    Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. A new price determination process can be initiated via the parameter CALCTYPE in the table PoItem.
    Vendor and delivery address
    The vendor address in the table PoAddrVendor and the delivery address in the table PoAddrDelivery can only be replaced by another address number that already exists in the system (table ADRC). Changes to address details can only be made using the method BAPI_ADDRESSORG_CHANGE.
    Partner roles
    You can change all partners except the partner role "vendor" via the table PoPartner.
    Export/import data
    Export/import data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items. Changes to the export/import data of existing items are not possible.
    Texts
    Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText. Texts can only be replaced completely.
    Version Management
    You can make use of the Version Management facility via the table AllVersions.
    Return
    If the PO was changed successfully, the header and item tables are populated with the information from the PO.
    Return messages
    Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
    Restrictions
    With this function module, it is not possible to:
    Create subcontracting components (you can only use existing ones)
    Create configurations (you can only use existing ones)
    Change message records (table NAST) and additional message data (this data can only be determined via the message determination facility (Customizing))
    Attach documents to the purchase order
    Change foreign trade data
    Change service data
    Change or reexplode BOMs
    A firewall prevents the manipulation of data that is not changeable in Purchasing according to the business logic of the purchase order (e.g. PO number, vendor, etc.).
    PO items with an invoicing plan cannot be created or changed using the BAPIs
    In this connection, please refer to current information in Note 197958.
    To change addresses with numbers from Business Address Services (cantral address management), please use the function module BAPI_ADDRESSORG_CHANGE.
    To change variant configurations, please use the function module BAPI_UI_CHANGE. More information is available in the BAPI Explorer under the Logistics General node.
    In the case of changes that are to be made via the BAPI_PO_CHANGE, a firewall first checks whether the relevant fields are changeable. This approach follows that of the online transaction. Here it is not possible to change the vendor or the document type, for example.
    Example
    Example of changes made to a purchase order with:
    1. Change in header data
    2. Change in item
    3. Change in delivery schedule
    4. Change in account assignment
    5. Change in conditions
    6. Change in partners
    Parameter: PURCHASEORDER 4500049596
    Parameter: POHEADER
    PMNTTRMS = 0002
    PUR_GROUP = 002
    Parameter: POHEADERX
    PMNTTRMS = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    CONF_CTRL = 0001
    Parameter: POITEMX
    PO_ITEM = 00001
    PO_ITEMX = X
    CONF_CTRL =  X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    QUANTITY = 10.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELETE_IND =  X
    Parameter: POSCHEDULEX
    PO_ITEM =  00001
    SCHED_LINE =  0001
    PO_ITEMX =  X
    SCHED_LINEX =  X
    QUANTITY =  X
    PO_ITEM =  00001
    SCHED_LINE =  0003
    PO_ITEMX =  X
    SCHED_LINEX =  X
    DELETE_IND = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    GL_ACCOUNT = 0000400020
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    PO_ITEMX = X
    SERIAL_NOX = X
    GL_ACCOUNT = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_TYPE = RA02
    COND_VALUE = 2.110000000
    CURRENCY = %
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    ITM_NUMBERX = X
    COND_ST_NOX = X
    COND_TYPE = X
    COND_VALUE = X
    CURRENCY = X
    CHANGE_ID = X
    Parameter: POPARTNER
    PARTNERDESC =  GS
    LANGU =  EN
    BUSPARTNO = 0000001000
    Help in the Case of Problems
    1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
    2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
    3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
    Customer Enhancements
    The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
    EXIT_SAPL2012_001 (at start of BAPI)
    EXIT_SAPL2012_003 (at end of BAPI)
    The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
    EXIT_SAPL2012_002 (at start of BAPI)
    EXIT_SAPL2012_004 (at end of BAPI)
    These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
    There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
    Further Information
    1. Note 197958 contains up-to-date information on the purchase order BAPIs.
    2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
    3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
    4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
    5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
    Parameters
    PURCHASEORDER
    POHEADER
    POHEADERX
    POADDRVENDOR
    TESTRUN
    MEMORY_UNCOMPLETE
    MEMORY_COMPLETE
    POEXPIMPHEADER
    POEXPIMPHEADERX
    VERSIONS
    NO_MESSAGING
    NO_MESSAGE_REQ
    NO_AUTHORITY
    NO_PRICE_FROM_PO
    EXPHEADER
    EXPPOEXPIMPHEADER
    RETURN
    POITEM
    POITEMX
    POADDRDELIVERY
    POSCHEDULE
    POSCHEDULEX
    POACCOUNT
    POACCOUNTPROFITSEGMENT
    POACCOUNTX
    POCONDHEADER
    POCONDHEADERX
    POCOND
    POCONDX
    POLIMITS
    POCONTRACTLIMITS
    POSERVICES
    POSRVACCESSVALUES
    POSERVICESTEXT
    EXTENSIONIN
    EXTENSIONOUT
    POEXPIMPITEM
    POEXPIMPITEMX
    POTEXTHEADER
    POTEXTITEM
    ALLVERSIONS
    POPARTNER
    Exceptions
    Function Group
    2012
    </b>
    regards
    prabhu
    Message was edited by: Prabhu Peram

  • Problem for Goods Receipt for Subcontracting Purchase Order

    Dear all,
    Presently, we are using SAP version 4.6C and we need to introduce GR for
    Subcontracting Purchase Order. We have developed a ABAP program to handle
    subcon Goods Receipt by uploading flat-files from our subcontractor. The
    scenario is as follows :
    Goods Receipt for Subcontracting Purchase Order
    1. In the ABAP program, function BAPI_GOODSMVT_CREATE will be used for goods
    movement.
    2. Data provided to the function are as follows :
    - Posting date
    - Document date
    - Material number
    - Plant
    - Storage location
    - Batch
    - Movement type (101)
    - Quantity
    - Purchase order number
    - Purchase order item
    - Movement indicator (B - Goods receipt for purchase order)
    3. The function will do data verification and automatically determine GI
    item for subcon stock:
    - Movement type (543)
    - Special stock (O - parts prov. vendor)
    - Material
    - Quantity
    - Plant
    Our problem is that :
    Only the GR item in the interface is to be transferred and the GI item is
    determined by the system. So, the quantity for subcon stock cannot be
    changed using this BAPI. Then the system will continue processing the goods
    receipt and create material document.
    Manually, by using transaction code MIGO, the user can display the subcon
    stock data and then change the quantity.
    By using transaction code MB01, after the user fills in all the GR fields,
    the system comes to line item 002 (subcon stock data) and then quantity can
    be changed.
    As per user requirement, quantity for GI item must be same with the quantity
    that has been transferred to subcon vendor in Delivery for Subcon
    (transaction code VL02N).
    We cannot achieve this requirement by using the BAPI mentioned above. Would
    appreciate any valuable help from anyone who is able to help us on this
    matter. Are there any other BAPI's that can help us to achieve the same
    result ?
    Thank you in advance and best regards.

    As far as i understood the problem I suggest u to create the
    BDC according to user actions that are performed in he manual
    operation.
    I can't say that the BAPI performs the exac solution what you want.
    I have done some BDC work using MB01 and suggest you to be careful
    and try to keep the complete in the logic as some chages in rows in BDC will
    change the complete scenario.And throw correct quantity val in correct
    material
    row.
    This methodology will help u even in mass uploads.
    Or in case of automation u can perform the call transaction BDC in
    background mode.
    so As per my understanding bdc program is the solution. pls try and let me
    know.

  • Goods receipt for subcontracting order! BAPI_GOODSMVT_CREATE

    I wanna use BAPI "BAPI_GOODSMVT_CREATE"  to create goods receipt for subcontracting order.
    But it says that this combination is not possible.  Combination of my movement type and this BAPI.
    What can i do to solve it?
    thanks in advance.

    >
    Julia Nikiforva wrote:
    > I wanna use BAPI "BAPI_GOODSMVT_CREATE"  to create goods receipt for subcontracting order.
    > But it says that this combination is not possible.  Combination of my movement type and this BAPI.
    >
    > What can i do to solve it?
    >
    > thanks in advance.
    Might work
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
    'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
    'c:\sapdata\gdsmvterror.txt'.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
    include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
    include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
    include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
    include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
    include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
    errflag.
    data: begin of pcitab occurs 100,
    ext_doc(10), "External Document Number
    mvt_type(3), "Movement Type
    doc_date(8), "Document Date
    post_date(8), "Posting Date
    plant(4), "Plant
    material(18), "Material Number
    qty(13), "Quantity
    recv_loc(4), "Receiving Location
    issue_loc(4), "Issuing Location
    pur_doc(10), "Purchase Document No
    po_item(3), "Purchase Document Item No
    del_no(10), "Delivery Purchase Order Number
    del_item(3), "Delivery Item
    prod_doc(10), "Production Document No
    scrap_reason(10), "Scrap Reason
    upd_sta(1), "Update Status
    end of pcitab.
    call function 'WS_UPLOAD'
    exporting
    filename = p-file
    filetype = 'DAT'
    IMPORTING
    FILELENGTH =
    tables
    data_tab = pcitab
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    OTHERS = 6
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    exit.
    endif.
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
    loop at pcitab.
    itab-move_type = pcitab-mvt_type.
    itab-mvt_ind = 'B'.
    itab-plant = pcitab-plant.
    itab-material = pcitab-material.
    itab-entry_qnt = pcitab-qty.
    itab-move_stloc = pcitab-recv_loc.
    itab-stge_loc = pcitab-issue_loc.
    itab-po_number = pcitab-pur_doc.
    itab-po_item = pcitab-po_item.
    concatenate pcitab-del_no pcitab-del_item into itab-item_text.
    itab-move_reas = pcitab-scrap_reason.
    append itab.
    endloop.
    loop at itab.
    write:/ itab-material, itab-plant, itab-stge_loc,
    itab-move_type, itab-entry_qnt, itab-entry_uom,
    itab-entry_uom_iso, itab-po_number, itab-po_item,
    pcitab-ext_doc.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
    exporting
    goodsmvt_header = gmhead
    goodsmvt_code = gmcode
    TESTRUN = ' '
    IMPORTING
    goodsmvt_headret = mthead
    MATERIALDOCUMENT =
    MATDOCUMENTYEAR =
    tables
    goodsmvt_item = itab
    GOODSMVT_SERIALNUMBER =
    return = errmsg
    clear errflag.
    loop at errmsg.
    if errmsg-type eq 'E'.
    write:/'Error in function', errmsg-message.
    errflag = 'X'.
    else.
    write:/ errmsg-message.
    endif.
    endloop.
    if errflag is initial.
    commit work and wait.
    if sy-subrc ne 0.
    write:/ 'Error in updating'.
    exit.
    else.
    write:/ mthead-mat_doc, mthead-doc_year.
    perform upd_sta.
    endif.
    endif.
    FORM UPD_STA *
    form upd_sta.
    loop at pcitab.
    pcitab-upd_sta = 'X'.
    modify pcitab.
    endloop.
    call function 'WS_DOWNLOAD'
    exporting
    filename = p-file
    filetype = 'DAT'
    IMPORTING
    FILELENGTH =
    tables
    data_tab = pcitab
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    OTHERS = 6
    endform.

  • BAPI for uploading SUBCON open purchase Order

    Hi,
    Can any one tell me a BAPI for creating SUBCON Purchase order....

    Hello,
    BAPI_PO_CREATE and BO: BUS2012.
    BAPIEKPOC = ITEM_CAT (3 - Subcontracting)
    <b>Rewrad points</b>
    Regards

  • MIGO: Default quantity for subcontracting component

    According to OSS Note 329928, There is no component quantity adjustment in Transaction MIGO, except if you changed the quantity of the material produced for subcontracting before the first time it was opened.
    The quantities that you saw are no longer changed automatically.
    That causes a problem for us, because the people who updates materials just type in the quantity and don't verify if it goes correctly, so that is causing problems in the subcontracting process.
    We checked and there is no BAdI or exit to do that, so we understand that the only solution is to disable the option to expand the subcontracting components. Now the question is: How to do this? Is there any customizing option? Or we'll have to treat it in the BAdI? Or would be better in a screen exit?
    Thanks in advance!
    Rafael Schaffer

    Hi Rafael,
    Did you find any solution?
    We are having the same dificulty, but we need to control components quantity not only at MIGO but also at bapi BAPI_GOODSMVT_CREATE.
    Please share your solution!
    Thanks in advance,
    Carlos

  • GR for Subcontracting Orders

    Hello ,
    We need to do a GR for subcontracting orders , when i read the documentation for the fm MB_CREATE_GOODS_MOVEMENT , it says that subcontracting orders are not supported .
    Searching the forum i found that we can use the fm BAPI_GOODSMVT_CREATE , but i am not sure how to use the fm , what about the components will the BAPI find it or do we need to pass the components .
    So please suggest it there is some way we can use the FM MB_CREATE_GOODS_MOVEMENT to create GR for subcontracting orders as in i think the BAPI calls the same FM and how to handle the components.
    Regards,
    Arun

    Hi,
    Internally, within BAPI_GOODSMVT_CREATE, again it calls the function module MB_CREATE_GOODS_MOVEMENT.
    for the TABLES field IMSEG, we need to pass only the parent material and its quantity.
    Internally using the function module MD_KOMPONENTENVORSCHLAG_WE, it will calculate the components from the table RESB if we are creating with respect to any purchase or else take the reference from STKO/StPO i.e. CS03 transaction ration for the bom component.

  • Bapi_goodsmvt_create for subcontracting challan

    Dear Gurus,
    we are using  "bapi_goodsmvt_create" BAPI for creating MIGO transcation, here good receipt agianst Purchase order so GM = 01, here we required to capture sub contracting callan & year.
    but in "bapi_goodsmvt_create" it's not possible.
    so kindly help in the same.
    Regards

    Hi,
    For capturing or reconciliation of subcontracting challan, you develop a z program & capture sub Con challan against GR, hence you need not have to enter sub con challan at the time of GR
    Regards,
    Vikas

  • Standard Cost Estimate for Subcontracting

    Dear Sir / Madam,
    We are in the process of migrating from our normal R/3 operations for Production Planning to Execution inclusive of Costing of materials by using iPPE functionality for repetitive scenario. We have our BOMs for painted body currently in R/3. The painted body falls under subcontracting scenario.
    In this scenario the body in white produced from our bodyshop is sent out to the subcontractor along with certain paint items and is received as painted body and consumption of the body in white and the paint items sent needs to be shown during the goods receipt of painted body.
    For this we have maintained the BOM for the painted body in iPPE. Also in the costing variant "ZD01" in order to arrive at Standard cost (CK11N) for the painted body we have maintained the following settings for Valuation variant for subcontracting :
    Priority     Strategy Sequence     
    1          Net Quotation Price
    2          Effective Price from Purchase Order
    While running CK11N for the material (painted body) we are receiving the following message
    Message no. 28501 : Error in dependency processing: condition 0000062388 is empty
    We wanted to verify whether the message raised is normal or would it have any adverse impact.
    Your assistance would be highly appreciated.
    Regards,
    Bhavika
    Edited by: Bhavika Goyal on Feb 7, 2009 12:20 PM

    Dear All,
    Control Key is important for inhouse producrtion and Sub Contract.  Check it once and when ever u have given the Product (semi fisished) to Sub Contractor, along with Paint. 
    Here one thing is important what is your process? how much portionis involced in Sub contracting.  why because
    Paint issue to the sub con is captured by the way for migo or miro
    Payment to sub contract is capture all the cost of the Sub Con., then is there any cost is missed for this process.  Let me know the remain things?
    thanqu
    raj

  • BAPI for Open production orders

    Hi All,
    Any BAPI for open production orders?.... Using BAPI i want to upload open production orders informatiomations.... Please help
    Thanks & Regards
    Santhosh

    Hi,
       Please check the following BAPI,
    Goto BAPI tcode, select hierarchical tab
      Production orders,ProductionOrder ,ProdOrdConfirmation , RCVPRORDCF and check the BAPIs

Maybe you are looking for

  • SAMLAssertionID error while invoking webservice through webservice proxy

    I have created a web service proxy client using service WSDL deployed to weblogic standalone server as per the Fusion Dev guide [http://fmwdocs.us.oracle.com/doclibs/fmw/E10285_01/appslib7/web.1111/b31974/web_services.htm#CJADCDBG]. When i try to inv

  • Missing Songs in iTunes Library

    My iPhone 4 has 662 songs in it, this being a mix of purchases and songs I have imported from CD's.  Somehow a problem has occurred with my laptop and my iTunes library has only 189 songs in it - all of these also being on my iPhone 4.  I last backed

  • Start Oracle Internet Directory failing... server context is null

    I'm trying to install Oracle Internet Directory on a RHEL5 64 bit for the first time. The database (11.2.0.3), Weblogic (10.3.6), and OID (11.1.1.6) have all installed okay, and I'm running the config.sh script. I specify 'Creating the schema' and en

  • Problem with scrollable result set

    hi can u please tell me how i can get no of rows from a result set.. i am using thin drivers and connecting to remote database,every thing is working fine if i use fwd only type ,but if u use sensitive type it is giving error code: stmt=con.createSta

  • BSP (ABAP, SQL & ITABS)

    Hi SCN Community, Today I have a question for the more experienced ABAP developers. I have a BSP Application which is based on HTML files.  The purpose of this BSP Application is to provide the front end user, with an interface where they can supply