Raw Stock For Subcontracting

Hi All,
We are using MTO scenario for our mould plant. For finish mould we run MRP with respect to sales order(MD50). After mrp run requirement create for raw and sfg. We are doing Subcontracting for SFG material for external processing.
Now my question is that , when am procured raw materail it gets autometically consume from stock . And when we go for subcontracting we explode the BOM in P.O at this time system ask stock of RAW Materail.
Pls give me correct solution,
Thanks,
Vishal

i m using accountassignment F  here i mean Purch. Requisition is create autometic by mrp with account assignment catagory F & L for subcontracting.
Edited by: vishal Patil on Jun 12, 2008 2:25 PM
Edited by: vishal Patil on Jun 12, 2008 2:28 PM

Similar Messages

  • Sales order Stock for Subcontracting operation

    Hi
    I have MTO Scenario.
    I have created Production order with external operation and component will be sent to vendor.
    This component is sales order specific (Indiviidual).
    But after MRP system generate normal PR with no account assignment for component.
    Please explain why it is not creating sales order specific PR for that material.?
    Is any config is missing?

    Hi Vivek
    Special stock indicator is available in production order for that component. Then also system is creating PR without sales order account asignment.
    Opeeration to which this component is attached is sub-contracting operation and material will be sent to vendor.
    Iam getting MRP element with SUBREQ

  • Issuing consignment stock for sub contracting against outbound delivery wm

    HI
    I have a outbound delivery created against subcontracting PO for issuing the components, i have stock determination turned ON so during picking against the outbound delivery i am able to pick K stock and own stock too(based on availability) but when i do PGI i get an error message You have not entered a value in field "Owner of stock" although an entry in this field is mandatory. message M7018, please share your thoughts whether is it possible to issue K stock for subcontracting PO if so how it can be achieved
    Thanks
    Terry

    Consignment Stock is not valuated stock of the system. Issuing a Material from K stock to Subcon means, you need to pay to vendor for the material through MRKO settlement.
    This message is because of the reason for MRKO. System should be updated with " whose stock are you using"
    Please enter the vendor number on that field, depend on which MRKO is done.
    Raghavan

  • Stock for SC

    Hi experts,
    Senerio like this... If i am entering vendor no and posting dates 20.11.2008 to 1.12.2008 so i need all the
    material in between this period and their respective closing balance. so plz check the query given below.
    if any FM to get previous period Special stock for Subcontracting so plz tell me.
    DATA : L_BUDAT TYPE BUDAT,
    H_BUDAT TYPE BUDAT,
    OPBAL TYPE MENGE_D,
    TEMP TYPE MENGE_D.
    DATA : IT_MSEG1 TYPE STANDARD TABLE OF MSEG,
    WA_MSEG1 TYPE MSEG.
    REFRESH IT_MSEG[].
    REFRESH IT_MKPF[].
    SELECT MBLNR
    BWART
    ZEILE
    MATNR
    LIFNR
    WERKS
    LGORT
    SHKZG
    SOBKZ
    MENGE FROM MSEG
    INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
    FOR ALL ENTRIES IN IT_FINAL
    WHERE MATNR = IT_FINAL-MATNR AND
    LIFNR = IT_FINAL-LIFNR AND
    ( BWART = '541' OR
    BWART = '542' OR
    BWART = '543' OR
    BWART = '544' OR
    BWART = '548' OR
    BWART = '549' ) .
    *L_BUDAT = PODATE-LOW - 1.
    *H_BUDAT = PODATE-HIGH - 1 .
    SORT IT_MSEG BY BWART MATNR.
    IF NOT IT_MSEG[] IS INITIAL.
    SELECT MBLNR
    BUDAT FROM MKPF
    INTO CORRESPONDING FIELDS OF TABLE IT_MKPF
    FOR ALL ENTRIES IN IT_MSEG
    WHERE ( BUDAT < PODATE-LOW ) ****check here********
    AND MBLNR = IT_MSEG-MBLNR.
    ENDIF.
    IT_MSEG1] = IT_MSEG[.
    REFRESH IT_MSEG[].
    IF NOT IT_MKPF[] IS INITIAL.
    SELECT MBLNR
    BWART
    ZEILE
    MATNR
    LIFNR
    WERKS
    LGORT
    SHKZG
    SOBKZ
    MENGE FROM MSEG
    INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
    FOR ALL ENTRIES IN IT_MKPF
    WHERE MBLNR = IT_MKPF-MBLNR AND
    ( BWART = '541' OR
    BWART = '542' OR
    BWART = '543' OR
    BWART = '544' OR
    BWART = '548' OR
    BWART = '549' ) .
    ENDIF.

    Hi Vishal,
    If you need all the material documents between the dates entered on the selection screen, then you should be using the 'IN' operator and not the '<' operator.
    Thanks
    Nidhi

  • Calculation for subcontracting item of type N (non stock) as it for type L(Stock)

    Hi Gurus,
    I have a Requirement for calculating the cost for Subcontracting  Non stock items N as it is getting calculated in standard functionality for subcontracting items of Type L.
    This will be done in CK11n ( used to calculate the standard cost estimate of the product) for header as well as component materials.
    please suggest the user exit or Badi where i can change.
    Please refer the below logic-
    BOM for the material 2000500 as Header and 1LPL0835298AB as a component and this component has an assembly with 7008508 as a component and this component is an Sub contracted item and this has an assembly with component 1LBA182151-3.
    Price calculation for the material 7008508 (Item Category as N). Since this is sub contracted item the price will picked from field EINE-NETPR.
    In EINA, pass the material (MATNR=7008508) to fetch the list of info records (INFNR) created for that material.
    Then it has to input those info records to EINE table along with Purchasing organization (EINE-EKORG=PT02).
    From the output of EINE table, it should compare the price (EINE-NETPR) of the PIR and should take the least price from those PIR`s.
    If the currency is other than PLN, then it should be converted to PLN based on conversion charges.
    For Material (MATNR=1LBA182151-3), it should pass the material number to table MBEW along with valuation area (BWKEY = WERKS).
    From the output, it should check the Price control (VPRSV) ‘V’ or ‘S’
    If ‘V’ the price will be picked from the field “VERPR”
    If ‘S’ the price will be picked from the field “STPRS”
    Also from the output, it should check the Price unit (PEINH) ‘1’ or other than ‘1’. If it is other than ‘1’ it should divide the VERPR or STPRS by PEINH. Then this is the price of the Material “1LBA182151-3”.
    The material (MATNR=1LBA182151-3) should be passed to table “MARA” and will take the Base unit of measure from that table “MEINS”.
    Br,
    Surya

    Hi Surya,
    Please put breakpoints in any of the below BADI's and check if any of them will trigger for your
    requirement:
    VALUATION_CK                            BAdI for Valuation in Product Costing
    CK_KALAMATCON2_CI                       BAdI for CI Fields for Table KALAMATCON2
    COSTINGRUN_CK                           Edit Costing Run
    COST_APPORTION_CK                       Maint Apportionment Structure Joint Production: Dist Rules
    CO_PROD_COSTING_CK                      Cost Management for Joint Products (Costing, Target Costs)
    DATA_EXTENSION_CK                       For Data Enrichment in Product Costing
    DYNPRO_EXTENSION_CK                     BAdI for Interface Enhancement in Costing
    ORDER_COSTING_CK                        Enables Header Data Changes in Preliminary Order Costing
    QUANTITY_STRUCT_CK                      Enables Quantity/Structure Changes in Costing
    SUR_STOCK_TRANSF_CK                     Overhead on Materials with Stock Transfer Between Plants
    Thanks
    Sri

  • Clearing of Change in Stock Account at the time of GR for Subcontracting

    Dear,
    We have created a PO with Item Category "L" for subcontracting.
    At the time or GR system has posted below accounting entries:
    GR/IR clearing account 500 -
    External service account 500 +
    Stock account: end product 950 +
    Change involving stocks 950 -
    Stock account: comp. 450 - (components cost)
    Consumption account 450 +
    I want to know how to clear Change in Stock Account.
    Please advise.
    Regards,
    Vivek

    Hi:
            As per my understanding this happens when MIGO is done in case of a subcontracting PO
    Stock-CS/RM                                     Dr
    GR/IR Clear RM/PM/CS                             Cr
    Inventory Change Sub-Cont RM     Dr
    Ext Serv Sub-Cont                             Dr
    Stock-CS/RM                                             Cr
    Sub-Cont Cons RM                             Dr
    Upon MIRO
    Ext Serv Sub-Cont                             Cr
    GR/IR Clear RM/PM/CS             Dr
    Inv Change Sub-Cont RM     Dr
    Vendor                                            Cr
    Duties                                      Dr
    Stock-CS/RM                                   Cr
    Hence Inventory change account is cleared as soon as MIRO is done. Hope it will clear your understadning
    Regards

  • Component Qty in PO for Subcontracting is greater than available in stock

    Dear Gurus,
    i have an issue regarding Subcontracting. When i create a Purchase Order, i use Item Category L. In the Compoenent i specify the material and the Requirement Quantity. Req Qty which i specify in PO is greater than the Qty available in Stock.
    How do i restrict the user to enter only the Quantity that is available in Stock for the Component provided to the Vendor.
    Thanks,
    Johi.

    the next MRP run will create a requisition or planned order  to get more quantity for the component., if you are short of material.
    do you just plan to produce as much as you have components for, or do you plan to satisfy a customers need?

  • Project stock material for subcontracting

    Hi,
    I want to send project stock material (special stock with 'Q') for subcontracting vendor. Pl elaborate the procedure.
    Subcontracting PO is with account assignment category 'Q'.
    Pl revert.

    Hello Sachin
    We had similar requirement but in a different way. i.e sending material for subcontracting work for materials returned by customers getting it reworked bringing the reworked material back to plant stock and then sending to customer.
    We had used alltogether different transactions ADSUBCON is the transaction code. Prerequsite is you will have to implement BADI BADI_ADSUB_MVT_TYPES of enhancement specefe ES_BADI_ADSUB_MVT_TYPES.
    Regards

  • Calculation of cost for subcontracting item of type N (non stock) as it calculating for type L(Stock)

    Hi Gurus,
    I have a Requirement for calculating the cost for Subcontracting  Non stock items N as it is getting calculated in standard functionality for subcontracting items of Type L.
    This will be done in CK11n ( used to calculate the standard cost estimate of the product) for header as well as component materials.
    please suggest the user exit or Badi where i can change.
    Please refer the below logic-
    BOM for the material 2000500 as Header and 1LPL0835298AB as a component and this component has an assembly with 7008508 as a component and this component is an Sub contracted item and this has an assembly with component 1LBA182151-3.
    Price calculation for the material 7008508 (Item Category as N). Since this is sub contracted item the price will picked from field EINE-NETPR.
    In EINA, pass the material (MATNR=7008508) to fetch the list of info records (INFNR) created for that material.
    Then it has to input those info records to EINE table along with Purchasing organization (EINE-EKORG=PT02).
    From the output of EINE table, it should compare the price (EINE-NETPR) of the PIR and should take the least price from those PIR`s.
    If the currency is other than PLN, then it should be converted to PLN based on conversion charges.
    For Material (MATNR=1LBA182151-3), it should pass the material number to table MBEW along with valuation area (BWKEY = WERKS).
    From the output, it should check the Price control (VPRSV) ‘V’ or ‘S’
    If ‘V’ the price will be picked from the field “VERPR”
    If ‘S’ the price will be picked from the field “STPRS”
    Also from the output, it should check the Price unit (PEINH) ‘1’ or other than ‘1’. If it is other than ‘1’ it should divide the VERPR or STPRS by PEINH. Then this is the price of the Material “1LBA182151-3”.
    The material (MATNR=1LBA182151-3) should be passed to table “MARA” and will take the Base unit of measure from that table “MEINS”.
    Br,
    Surya

    Hi Surya,
    Please put breakpoints in any of the below BADI's and check if any of them will trigger for your
    requirement:
    VALUATION_CK                            BAdI for Valuation in Product Costing
    CK_KALAMATCON2_CI                       BAdI for CI Fields for Table KALAMATCON2
    COSTINGRUN_CK                           Edit Costing Run
    COST_APPORTION_CK                       Maint Apportionment Structure Joint Production: Dist Rules
    CO_PROD_COSTING_CK                      Cost Management for Joint Products (Costing, Target Costs)
    DATA_EXTENSION_CK                       For Data Enrichment in Product Costing
    DYNPRO_EXTENSION_CK                     BAdI for Interface Enhancement in Costing
    ORDER_COSTING_CK                        Enables Header Data Changes in Preliminary Order Costing
    QUANTITY_STRUCT_CK                      Enables Quantity/Structure Changes in Costing
    SUR_STOCK_TRANSF_CK                     Overhead on Materials with Stock Transfer Between Plants
    Thanks
    Sri

  • Goods receipt for subcontracting material

    Hello friends,
    i  am doing operation subcontractiing. My first operation is subcontracted. So, I have assigned PP02 control key to first operation (external processing and no auto goods receipt indicator)  and maintained external processing data for opration in routing. When i saved the order, for that operation PR gets generated.
    Now, I converted PR into PO and assigned raw material that has to be send to vendor. By 541 mvt. type material is issued to vendor. When i do goods receipt in MIGO, system is not showing storage location field. I dont find material in stock anywhere.
    But i can see quantity received in external processing tab of first operation in routing overveiw in order.
    Then how can i issue the material from storage for second operation if it is not in stock?
    How can i get stock of subcontracted material by MIGO?
    Please help me.
    Thanks in advance!

    Kiran,
    Since your scenario is Subcontract of operations, you will not find a material referance in your PR/PO, so there is no GR of Material happening, in this Scenario GR means delivery of the operation.
    If you really want to track, then you need to create an additional material number and assign that material number with Special Procurement key "30", here in this case you can recieve the product after subcontract as this is product sub contract process. In this case Production order is not relevant.
    Regards,
    Prasobh

  • Part I entries for subcontract

    Dear All,
    Can anybody pleaes give me information that how part I entries are updated in subcontracting process.
    for example material A001 of 100 qty is to be sent out for processing outside and completely comsumed while 543
    please explain as below.
    541 - stock to subcontract - IWD - part 1 updated with issue in part I register (reduce 100 qty in part I)
    542 - ??
    543 - ??
    545 - ??
    Regards,
    Vimlesh

    Hi,
    This is breifly about Sub contracting process. A) Following is the cycle of sub-contracting without payment of excise duty in SAP -
    1) You maintain BOM of the material which you are ordering on the sub-contractor. The materials which you will be supplying to the vendor will be maintained in the BOM. This BOM will be for production use & will have to be released before ordering.
    2) If the material you are supplying to the sub-contractor for processing is excisable, then you will have to maintain the details in J1ID with tick at Sub-Contracting. Similarly, if the material you receive from the subcontractor is also excisable then you have to maintain the details in J1ID table. If vendor is excisable then his details are also to be maintained.
    3) In the material master of the ordered material, you maintain procurement as F (external procurement) & special procurement as 30 (Sub-Contracting) in MRP views.
    4) You raise sub-contracting PO on the sub-contractor with item category as L (Sub-Contracting).
    5) You do transfer posting of the child material in transaction MB1B with movement type 541 with reference to the PO you have raised on the sub-contractor.
    6) If the material transferred to the subcontractor is excisable, then create subcontracting challan in transaction J1IF01 with reference to the transfer posting document, against which you have transferred the material to the sub-contractor. At this time there is no entry in the excise registers, because the cycle is Sub-contracting without payment of excise duty.
    7) The sub-contractor processes the material & sends the processed material back to you.
    8) You post the GRN with reference to the sub-contracting PO for the processed material & in the excise tab select option 'Refer the Sub-contracting Challan'. Then at 'More data' button, you refer the sub-contracting excise challan against which the material was transferred to the sub-contractor. During the GRN Posting, system books the consumption of the child componenets you supplied to the subcontractor. The accounting entries at the time of GRN posting are as below - Debit Inventory of Semifinished goods = XY Debit processing charges = Y Credit GR/IR Clearing = Y Credit semifinished inventory at sub-contractor = XY Debit raw material inventory at sub-contractor = X Credit raw material inventory at your plant = X
    9) You then reconcile the material document with the sub-contracting challan at J1IFQ, by giving the material document number. This is because, you already have referred the challan at the time of posting GRN. If this reference was not done at GRN, then enter the challan number also at J1IFQ.
    10) After reconcilation, you complete the challan at J1IF13. The process of posting challan to completing the same is to be done within 180 days because this is legal requirement. Otherwise you have to pay the excise duty on the raw material you supplied to the vendor, if the processed material is not received within 180 days.
    11) You then post the invoice of the sub-contractor, which is nothing but for the processing charges for processing the child components.
    B) Following is the cycle of Sub-Contracting with payment of excise duty -
    1) You maintain master data of BOM & J1ID as mentioned above.
    2) You raise sub-contracting PO as mentioned above.
    3) You make transfer posting of child components to the sub-contractor as mentioned above.
    4) You create Outgoing Excise invoice in transaction J1IS for the child components you suplied to the subcontractor. This actually makes entries in your excise register by reducing the available modvat credit by the amount of excise duty on the child components.
    5) The subcontractor processes the material & sends you the processed material alongwith the excise invoice for the processed material.
    6) You capture & post the excise invoice in transactionJ1IEX.
    7) You post the GRN of the processed material by referring the subcontracting PO. The consumption of the child components is booked at the time of GRN. The accounting entries are same as mentioned above. You refer the exicse invoice at Excise tab be entering the Excise Invoice Number & date (of Sub-Contractor) in the respective fields.
    8) You post invoice of the subcontractor, which now includes the processing charges & the excise duty on the processed material.
    Regards
    KK

  • Cofiguration step for  SubContracting Order Cycle  (SCO)

    Pls,provide me the the configuration steps of SCO(Suncontracting Order Cycle)

    Sub Contracting Cycle
    (1) You have a material that can be procured externally, and you have maintained BOM with components. Any waste generated and received during subcontracting process can be maintained as component with negative quantity. (special procurement type should be 30 in material MRP2 view for the mateiral you are getting back from subcontractor)
    (2) You create a subcontracting PO (PO with Item Category L). You can also maintain Purchase Info Record for Subcontract category for material and subcontractor.
    (3) You make a transfer posting to issue components for SC PO. Material is sent to subcontractor. As material remains under your ownership, system does not make any value entry. But quantity is shown as "Material Provided to Vendor"
    (4) You receive finished material against SC-PO. You also specify components consumed in manufacturing of finished goods. Additionally, if you have negative components in BOM, now you'll also receive subcontracting by-products. There are three events, so three accounting entries are generated:
    DR FG Stock/ SC By-Product Stock
    CR Change in Stock (FG/ SC By-Product )
    (for finished goods received)
    DR Subcontracting Charges
    CR GR/IR Clg
    (for moneys payable to Subcontractor)
    DR Consumption (Components)
    CR Change in Stock (FG/ SC By-Product ) 0
    (material provided to Vendor is now charged to expense)
    (5) You do the IV for SC Invoice, and the process is complete.
    Process of Subcontract in MM
    Sub-contract business process:
    You want to buy material from the supplier (processed material/ assembled item) , but for some reason (quality of certain item / price ) you will give some component to vendor .
    Vendor shall process the item / use the item provided & supply the final item.
    SAP process:
    1.Create the finished goods material code.
    2.Maintain the BOM for the material.
    3.Create PO with item category as "L" .
    4.Issue material to vendor with movement type 541
    5.Receive the material against the PO with movement type 101.
    6.MIRO to account for vendor's invoice for the service charge& material used by him.
    Note:: At the Time of GR 543 Mvt is up dated for Raw Material.
    Can anybody tell me how a process has to be given to subcontracting?
    Suppose, I have 3 operations 1)weaving 2)dyeing 3)cutting & packing
    if no 2 process (i.e Dyeing) has to be given to subcontracting, what process should i follow ?
    The following process to be followed for subcontracting.
    1. Item code(material master) to be created at the stage of before dyeing.
    2. Item code(material master) to be created after Dyeing as subcontracted item.(F30)
    3. Bill of material to be created for the material(2) calling for material(1)
    4. Info record and source list to be created for material(2) with the corresponding vendor
    5. PO to be released for material (2)
    6.Along with PO the material(1) to be issued to vendor
    7.On receipt of material when GR is made the stock with vendor will get updated.
    How to Create a Subcontract Order?
    To create a subcontract order, proceed as follows:
    Enter the material you want to order and the item category for subcontracting (L) in the order item.
    Press ENTER to display the screen for component processing.
    Enter the components that the vendor requires to manufacture the product.
    Please note:
    u2013 You do not need to enter the date required for the components. This date is proposed by the system when you press ENTER.
    It is calculated as follows:
    Delivery date of the item - Planned delivery time
    u2013 If you do not want the quantity of the components to be changed if the order quantity of the end product is altered, set the indicator Fixed quantity (column F).
    u2013 You can determine whether the components are available on the date required by selecting Edit -> Availability check.
    If you entered a bill of material as the material in the subcontract order, the components are created automatically.
    If you want to determine the components in the bill of material at a later date (for example, if the bill of material is subsequently changed), choose Item -> Component -> New BOM explosion. The existing components are deleted and redetermined in the bill of material.
    Save the purchase order.

  • Return ROH component for Subcontracting

    Hi All,
    Can anyone please guide me for the process of return Raw Material Components for Subcontracting, after the Goods Receipt of Finished Goods using MIGO.
    I have searched other threads which are using transactions J1IF01, J1IFQ and J1IF13.  Does anybody knows what the use for these transactions.
    Below is the current flow which I am using
    Create Subcontract Purchase Requisition - ME51N (item Category L)
    Create Subcontract Purchase Order - ME21N (Item Category L)
    Create Transfer Posting - ME2O
    Create Goods Receipt Document - MIGO
    Create Logistic Invoice Verification - MIRO.
    Thanks.

    Hi
    Actually use for subcontract adjustment we have to use t-Code MB04 enter the Delivery note number and PO number through which PO you are going to issue or receiving. Then select the component which component you are going to issue or receive .
    If you are going to receive the material from vendor means just enter the quantity for example 10 then post it it will reduce the stock of subcontractor
    If you are going to Issue  the material to  vendor means just enter the quantity for example  -10 with negative   then post it it will increase  the stock of subcontractor .
    Hope it will help you
    Regards
    Murugan

  • REPORT FOR SUBCONTRACTING

    DEAR FRIENDS,
    I am making a program for tracking the materials given (mb1b 541 movt.) for subcontracting and taken by me (101 for actual good receipt, 543 for the given material- stock type inward, 545 for the scrap returns). but while i made the program i am unable to pick up the materials BOM from the PO which is essential to take the difference between these and the supplied quantities taken-in by GR.
    following is the program.
    Please suggest the changes.   Thanks,
    Deepak
    *& Report  ZMM_SUBCONTRACTING_PO_REPORT
    *& Author:
    *& Date  :
    *& Reason: Sub Contracting PO Report.
    *&         Find Discreprancy in PO and BOM. according to 543 and 545
    REPORT  ZMM_SUBCONTRACTING_PO_REPORT NO STANDARD PAGE HEADING
                                         LINE-SIZE 157.
    *& TABLES DECLARATION
    TABLES: EKKO,
            EKPO,
            EKBE,
            ENT5303.
    *& SELECTION-SCREEN.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_MATNR FOR EKPO-MATNR,
                    S_WERKS FOR EKBE-WERKS OBLIGATORY.
    PARAMETERS:     P_BUKRS LIKE EKKO-BUKRS OBLIGATORY.
    SELECT-OPTIONS: S_BUDAT FOR EKBE-BUDAT OBLIGATORY,
                    S_EBELN FOR EKKO-EBELN,
                    S_BELNR FOR EKBE-BELNR,
                    S_GJAHR FOR EKBE-GJAHR.
    SELECTION-SCREEN: END OF BLOCK B1.
    *& INTERNAL TABLES DECLARATION.
    DATA: BEGIN OF IT_EKKO OCCURS 0,
          EBELN LIKE EKKO-EBELN,
          END OF IT_EKKO.
    DATA: BEGIN OF IT_EKBE OCCURS 0,
          EBELN LIKE EKBE-EBELN,
          EBELP LIKE EKBE-EBELP,
          GJAHR LIKE EKBE-GJAHR,
          BELNR LIKE EKBE-BELNR,
          BUZEI LIKE EKBE-BUZEI,
          BEWTP LIKE EKBE-BEWTP,
          BWART LIKE EKBE-BWART,
          BUDAT LIKE EKBE-BUDAT,
          MENGE LIKE EKBE-MENGE,
          DMBTR LIKE EKBE-DMBTR,
          LFBNR LIKE EKBE-LFBNR,
          MATNR LIKE EKBE-MATNR,
          WERKS LIKE EKBE-WERKS,
          BUKRS LIKE WB2_V_EKKO_EKPO2-BUKRS,
          MENGE_I LIKE WB2_V_EKKO_EKPO2-MENGE_I,
          LIFNR LIKE WB2_V_EKKO_EKPO2-LIFNR,
          COUNT TYPE P DECIMALS 4,
          BMENGE LIKE EKBE-MENGE,
          MENGE101 LIKE EKBE-MENGE,
          MENGE543 LIKE EKBE-MENGE,
          MENGE545 LIKE EKBE-MENGE,
          DIFFER   LIKE EKBE-MENGE,
          TMENGE   LIKE EKBE-MENGE,
          RATE     LIKE EKBE-DMBTR,
          NAME1 LIKE LFA1-NAME1,
          LINE_COLOR(4),
          END OF IT_EKBE.
    DATA: WA LIKE IT_EKBE.
    DATA: BEGIN OF IT_FINAL OCCURS 0.
          INCLUDE STRUCTURE IT_EKBE.
    DATA: END OF IT_FINAL.
    DATA: BEGIN OF IT_FINAL_TEMP OCCURS 0.
          INCLUDE STRUCTURE IT_EKBE.
    DATA: END OF IT_FINAL_TEMP.
    DATA: BEGIN OF IT_BOM OCCURS 0.
          INCLUDE STRUCTURE CAPP_ITM.
    DATA: END OF IT_BOM.
    DATA: BEGIN OF IT_BOM_HEAD OCCURS 0.
          INCLUDE STRUCTURE CAPP_BOM.
    DATA: END OF IT_BOM_HEAD.
    *& DATA DECLARATION.
    DATA: COUNT TYPE P DECIMALS 4,
          V_CNT TYPE P DECIMALS 4 VALUE '0.0001' ,
          V_MENGE LIKE EKBE-MENGE,
          V_DELETE.
    TYPE-POOLS: slis.
    DATA:  l_date(12) TYPE c,
           l_date1(12) TYPE c,
           l_time(10) TYPE c,
           l_list(60) TYPE c.
    DATA:  CATALOG TYPE SLIS_FIELDCAT_ALV, "FIELDCAT
           TCATALOG TYPE SLIS_T_FIELDCAT_ALV, "IT FIELDCAT
           EVENT TYPE SLIS_ALV_EVENT, "EVENT
           TEVENT TYPE SLIS_T_EVENT,  "IT EVENT
           LAYOUT TYPE SLIS_LAYOUT_ALV, "LAYOUT
           PG_TOP TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
           PG_HEAD TYPE SLIS_T_LISTHEADER,
           EXIT1  TYPE SLIS_EXIT_BY_USER,
           VAR1 LIKE DISVARIANT,
           VAR2 LIKE DISVARIANT.
    *& START-OF-SELECTION.
    START-OF-SELECTION.
    PERFORM PROCESS_SELECTION.
    PERFORM DELETE_CANCELLED_DOCUMENTS.
    PERFORM EXPLODE_BOM_FOR_101.
    SORT IT_FINAL BY COUNT.
    PERFORM DISPLAY_OUTPUT.
    FREE IT_FINAL_TEMP.
    *& ALV FORMATTING
    *&                  ALV DISPLAY
      PERFORM GENERATE_ALV_FIELDCAT.
    PERFORM EVENTS USING TEVENT.
    PERFORM TEXT USING PG_HEAD.
      PERFORM ALV_SHOW.
    *& FORM PROCESS_SELECTION.
    FORM PROCESS_SELECTION.
    SELECT
      A~EBELN
      A~EBELP
      A~GJAHR
      A~BELNR
      A~BUZEI
      A~BEWTP
      A~BWART
      A~BUDAT
      A~MENGE
      A~DMBTR
      A~LFBNR
      A~MATNR
      A~WERKS
      B~BUKRS
      B~MENGE_I
      B~LIFNR
    FROM
      EKBE AS A
    JOIN
      WB2_V_EKKO_EKPO2 AS B
    ON
      AEBELN = BEBELN AND
      AEBELP = BEBELP_I
    INTO
      CORRESPONDING FIELDS OF TABLE IT_EKBE
    WHERE
    A~MATNR IN S_MATNR AND
      A~WERKS IN S_WERKS AND
      A~BUDAT IN S_BUDAT AND
      A~EBELN IN S_EBELN AND
      A~BELNR IN S_BELNR AND
      A~GJAHR IN S_GJAHR AND
      A~VGABE IN ('1', '7') AND
      A~BEWTP IN ('E', 'O') AND
      ( A~BWART IN ('101', '545', '543') OR
      ( ABWART = '102' AND ABEWTP = 'E' ) ) AND
      B~BUKRS = P_BUKRS AND
      B~BSTYP = 'F' AND
      B~BSART = 'SUBC'."AND
    B~LOEKZ <> 'X'.
    SORT IT_EKBE BY EBELN EBELP GJAHR BELNR BUZEI.
    ENDFORM.
    *& FORM DELETE_CANCELLED_DOCUMENTS.
    FORM DELETE_CANCELLED_DOCUMENTS.
    DELETE IT_EKBE WHERE BWART = '102' AND BEWTP <> 'E'.
    LOOP AT IT_EKBE WHERE BWART = '102'.
      READ TABLE IT_EKBE INTO WA WITH KEY BELNR = IT_EKBE-LFBNR.
      IF SY-SUBRC = 0.
        DELETE IT_EKBE WHERE BELNR = WA-BELNR.
      ENDIF.
    ENDLOOP.
    CLEAR WA.
    DELETE IT_EKBE WHERE BWART = '102'.
    ENDFORM.
    *& FORM EXPLODE_BOM_FOR_101.
    FORM EXPLODE_BOM_FOR_101.
    CLEAR COUNT.
    LOOP AT IT_EKBE WHERE BWART = '101' OR
                          BWART = '543'.
    IF NOT IT_EKBE-MATNR IN S_MATNR.
      V_DELETE = 'X'.
    ELSE.
      CLEAR V_DELETE.
    ENDIF.
    IF V_DELETE <> 'X'.
    COUNT = COUNT + 1.
    IT_EKBE-COUNT = COUNT.
    V_MENGE = IT_EKBE-MENGE.
    MODIFY IT_EKBE.
    IT_FINAL = IT_EKBE.
    APPEND IT_FINAL.
    ENDIF.
      call function 'CABM_READ_BOM'
        exporting
          I_MATNR               = IT_EKBE-MATNR
          I_WERKS               = IT_EKBE-WERKS
          I_STLAL               = '01'
          I_STLAN               = '3'
          I_DATUV               = IT_EKBE-BUDAT
        TABLES
          EXP_BOM_DATA          = IT_BOM_HEAD
          EXP_ITM_DATA          = IT_BOM
       EXCEPTIONS
         NO_RECORD_FOUND       = 1
         OTHERS                = 2
      if SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
    *START RK 18.06.2007
      DELETE IT_BOM WHERE DATUV > IT_EKBE-BUDAT.
    END : 18.06.2007
        IF V_DELETE = 'X'.
          LOOP AT IT_BOM.
            DELETE IT_EKBE WHERE MATNR = IT_BOM-IDNRK.
          ENDLOOP.
          REFRESH IT_BOM.
        ELSE.
          PERFORM CHECK_BOM_GR.
        ENDIF.
      endif.
    ENDLOOP.
    FREE IT_EKBE.
    ENDFORM.
    *& FORM CHECK_BOM_GR.
    FORM CHECK_BOM_GR.
    DATA: WACNT TYPE P DECIMALS 4.
    WACNT = COUNT.
    LOOP AT IT_BOM.
      READ TABLE IT_EKBE INTO WA WITH KEY EBELN = IT_EKBE-EBELN
                                          MATNR = IT_BOM-IDNRK.
      IF SY-SUBRC = 0.
        WACNT = WACNT + V_CNT.
        WA-COUNT = WACNT.
        WA-BMENGE = IT_BOM-MENGE.
        WA-TMENGE = V_MENGE.
        APPEND WA TO IT_FINAL.
        DELETE IT_EKBE WHERE EBELN = WA-EBELN AND
                             EBELP = WA-EBELP AND
                             MATNR = WA-MATNR AND
                             BELNR = WA-BELNR AND
                             BUZEI = WA-BUZEI.
    **START : ADDED BY .... KUMAR ON 14.06.2007
      ELSE.
        WACNT = WACNT + V_CNT.
        WA-COUNT = WACNT.
        WA-BMENGE = IT_BOM-MENGE.
        WA-MATNR  = IT_BOM-IDNRK.
        WA-TMENGE = V_MENGE.
        APPEND WA TO IT_FINAL.
    **END ADDED BY .... KUMAR ON 14.06.2007
      ENDIF.
    CLEAR WA.
    ENDLOOP.
    REFRESH IT_BOM.
    ENDFORM.
    *& FORM DISPLAY_OUTPUT.
    FORM DISPLAY_OUTPUT.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
    IT_FINAL_TEMP[] = IT_FINAL[].
    LOOP AT IT_FINAL.
    CLEAR IT_FINAL-DMBTR.
    ********added by .... .... on 17.02.2007
       if it_final-bmenge  < 0.
    IT_FINAL-DIFFER = IT_FINAL-TMENGE * IT_FINAL-BMENGE * -1.
       else.
    *********end by .... .... on 17.02.2007
    IT_FINAL-DIFFER = IT_FINAL-TMENGE * IT_FINAL-BMENGE.
    ********added by .... .... on 17.02.2007
    endif.
    *********end by .... .... on 17.02.2007
      IF IT_FINAL-BWART = '101'.
        IT_FINAL-LINE_COLOR = 'C210'.
        IT_FINAL-MENGE101 = IT_FINAL-MENGE.
        IT_FINAL-DIFFER = 0.
        LOOP AT IT_FINAL_TEMP WHERE BELNR = IT_FINAL-BELNR AND
                                    EBELN = IT_FINAL-EBELN AND
                                    EBELP = IT_FINAL-EBELP.
          IF IT_FINAL_TEMP-BWART <> '545'.
            IT_FINAL-DMBTR = IT_FINAL-DMBTR + IT_FINAL_TEMP-DMBTR.
          ELSE.
            IT_FINAL-DMBTR = IT_FINAL-DMBTR - IT_FINAL_TEMP-DMBTR.
          ENDIF.
        ENDLOOP.
        IT_FINAL-RATE = IT_FINAL-DMBTR / IT_FINAL-MENGE101.
        SELECT SINGLE
          NAME1
        INTO
          IT_FINAL-NAME1
        FROM
          LFA1
        WHERE
          LIFNR = IT_FINAL-LIFNR.
        IF SY-SUBRC <> 0.
          CLEAR IT_FINAL-NAME1.
        ENDIF.
      ELSEIF IT_FINAL-BWART = '543'.
        IT_FINAL-MENGE543 = IT_FINAL-MENGE.
        IT_FINAL-LINE_COLOR = 'C200'.
        IT_FINAL-DIFFER = IT_FINAL-DIFFER - IT_FINAL-MENGE543.
        CLEAR: IT_FINAL-LIFNR,
              IT_FINAL-EBELN,
              IT_FINAL-BELNR,
              IT_FINAL-MENGE_I,
              IT_FINAL-BUDAT.
      ELSEIF IT_FINAL-BWART = '545'.
    ******added by .... on 17.02.2007
       IT_FINAL-MENGE = IT_FINAL-MENGE * -1.
        IT_FINAL-MENGE = IT_FINAL-MENGE.
    *******end by .... on 17.02.2007
        IT_FINAL-MENGE545 = IT_FINAL-MENGE.
        IT_FINAL-LINE_COLOR = 'C200'.
        IT_FINAL-DIFFER = IT_FINAL-DIFFER - IT_FINAL-MENGE545.
        CLEAR: IT_FINAL-LIFNR,
              IT_FINAL-EBELN,
              IT_FINAL-BELNR,
              IT_FINAL-MENGE_I,
              IT_FINAL-BUDAT.
      ELSE.
        IT_FINAL-LINE_COLOR = 'C200'.
        CLEAR: IT_FINAL-LIFNR,
              IT_FINAL-EBELN,
              IT_FINAL-BELNR,
              IT_FINAL-MENGE_I,
              IT_FINAL-BUDAT.
      ENDIF.
    MODIFY IT_FINAL.
    ENDLOOP.
    ENDFORM.
    *&      Form  GENERATE_ALV_FIELDCAT
          text
    FORM GENERATE_ALV_FIELDCAT.
    DATA: POS TYPE I.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'COUNT'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'S. No.'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'MATNR'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Mat. No.'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'BMENGE'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'BOM Qty'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'EBELN'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'PO No.'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'MENGE_I'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'PO Qty'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'BELNR'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Gr. No.'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      CATALOG-HOTSPOT = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'BUDAT'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'GR Date'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'MENGE101'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = '101 Gr Qty'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'MENGE543'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = '543 Gr Qty'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'MENGE545'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = '545 Gr Qty'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'DIFFER'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Difference'.
      CATALOG-NO_ZERO = ' '.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'LIFNR'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Vendor'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'NAME1'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Vendor Name'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'RATE'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Rate'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
      POS = POS + 1.
      CLEAR: CATALOG.
      CATALOG-COL_POS = POS.
      CATALOG-FIELDNAME = 'DMBTR'.
      CATALOG-TABNAME = 'IT_FINAL'.
      CATALOG-SELTEXT_L = 'Value'.
      CATALOG-NO_ZERO = 'X'.
      CATALOG-FIX_COLUMN = 'X'.
      APPEND CATALOG TO TCATALOG.
    ENDFORM.
    *&      Form  ALV_SHOW
          text
    FORM ALV_SHOW.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      LAYOUT-BOX_TABNAME = 'IT_FINAL'.
      LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
      LAYOUT-ZEBRA = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
          IS_LAYOUT               = LAYOUT
          IT_FIELDCAT             = TCATALOG
          IS_VARIANT              = VAR1
          I_SAVE                  = 'A'
          IT_EVENTS               = TEVENT[]
        TABLES
          T_OUTTAB                = IT_FINAL.
    ENDFORM .                    "ALV_SHOW
    *& FORM USER_COMMAND.
    FORM USER_COMMAND USING
              R_UCOMM LIKE SY-UCOMM
              SELFIELD TYPE SLIS_SELFIELD.
    DATA: TABIX LIKE SY-TABIX,
          WA LIKE IT_FINAL.
    TABIX = SELFIELD-TABINDEX.
    READ TABLE IT_FINAL INTO WA INDEX TABIX.
    IF NOT WA-BELNR IS INITIAL.
    set parameter id : 'MBN' FIELD WA-BELNR.
    CALL TRANSACTION 'MB03' AND SKIP FIRST SCREEN .
    ENDIF.
    ENDFORM.

    Hi,
    U can try this standard report for subcontracting:
    J1IFR (Transaction name),
    Not sure how much this will be useful to u.
    regards,
    Viji

  • PO number and material issued against this PO for subcontracting

    How to know the link in between the PO number and material issued against this PO for subcontracting.
    I have checked that PO history is not getting updated.
    Thanks,

    Hi,
    We have 2 different scenarios where you can post a goods issue to Subcontract Venodrs.
    Scenarios 1: You can post the goods issue against a subcontrac vendor with out referencing the Subcon PO from ME2O, at this stage we will be knowing what is the stock at subcontract vendor but we will not be knowing the issues against which and how much Quantities are posted.
    So when we are post goods receipt, then we will come to know the consuption quantities.
    Scenario: 2, If we use the delivery concept then we can track the goods issues against the subcon POs.
    If you really keen to track the material issued to Subcon vendor against a PO so better use with delivery.
    Thansk,
    Satya.

Maybe you are looking for

  • Help in Applescript Mail option

    Hi Forum, I'm using tis applescript, to check the folder for files and sent mail via applescript. It works quiet good. The problem is if the document does not contain any files, also the mail is sent to the receipient. I'm requesting forum , to corre

  • HT4970 Getting Reminders from Microsoft Outlook -  how can i get these on my iphone 5 ?

    When I make a Reminder in Outlook on my pc,  would like to see that on my Iphone.   How can I do this ?

  • WebI Publication without charts

    Hello, I created a WebI publication, that sends a report as PDF containing charts to several users. Unfortunately the report is created without charts, instead just a white space is shown. I know that it has to do with the Vizualisation Service and t

  • Export RED DPX Sequence

    I have some RED 4K material. When I try to export out a DPX sequence and import that into AE it is not maintainng the modified RED RAW image charateristics of how it was shot or how I altered it. It looks as if it's showing me the RED RAW Flat gamma

  • School project

    I am having some trouble with this program. The goal of the program is to make a checkerboard. It keeps saying draw(java.awt.Shape) in java.awt.Graphics2D cannot be applied to (CheckerBoard) pen.draw(bask); and is also giving me an instantiationexcep