Alternative resources in production order - primary resource selected

Good evening,
I have a following problem, for which I have not found a solution:
we are using alternative modes in PPMs for reassigning orders to alternative resources and creating an order sequence for each resource in the Detailed Scheduling Planning Board (DSPB) in APO. However, when I convert a planned order to production order, this order is assigned to a primary resource again. Can I avoid this behaviour?
Thanks and best regards,
Jevgeni

Thanks Thukral,
I also thought about that. Unfortunately, the prod order gets assigned to primary resource anyway. I've heard, when planned order is converted to prod order and sent to R/3, it reads PP data in R/3 and there in a routing, it calls up a primary resource. In addition, prod order does not contain alternative sequences any more and cannot be rescheduled to another resource.
I wonder, if this system behaviour can be changed or just accepted. But how is it than possible to to execute the sequences of orders created in the DSPB? It seems, manufacturing cannot use this sequence for execution, as all prod orders will be allocated to primary resource.

Similar Messages

  • Alternative BOM in Production Order

    Hi PP Experts,
    I have a small issue which is like this:
    I have two Alternative BOM for Material "A".
    When I create production order it displays both Alt Bom for selection.
    When I select the second Alt BOM, in production order it still reads the First Alt BOM.
    Please advice.
    Regards
    Mohan

    Hi Mohan,
    I suggest if you have two alternate BOM for a material, you can use the production versions and assign the same for the material in Material Master MRP4 view.
    Create Production Versions 01 and 02 and assign the alt BOM 1 for the PV 01 and 02 alt bom for PV 02.
    Goto SPRO : Production -> Shop Floor Control -> Define Order type dependent paramters  ( Tcode : OPL8)  : Define the Production Version Slection either 1 for manual and 2 for automatic. (if you use automatic system will select the version based on the material master selection method )
    regards
    radhak mk

  • Change production order screen selection

    Dear All,
    I wonder, can production order have sreen selection control (suppress, mandatory, etc) like material master in MM module. Any idea?
    Thank you.
    Best regards,
    Freddy

    Dear SAP expert,
    I check the tcode you gave. can;t find field for production scheduler CAUFVD-FEVOR, will try screen variant SDH0.
    Will be posted soon.
    Thank you.
    best regards,
    freddy ha

  • PRODUCTION ORDER CONFIGURATION STEPS

    Dear Guru's
    Please give some standard steps to complete production order cycle in IDES 4.6
    Thanks a lot in advance
    shankar

    Hi,
    Define Order Type-
    IMG > Production Planning for Process Industries > Process Order > Master Data > Order > Define Order Type
    Define Order Type Dependent parameters u2013
    IMG > Production Planning for Process Industries > Process Order > Master Data > Order > Define Order Type Dependent parameters
    Define Production Scheduler u2013
    IMG > Production Planning for Process Industries > Process Order > Master Data > Bill of Material >  Define Production Scheduler
    Define Checking Control - Production Order
    Define Availability Check u2013 Define Checking Control u2013
    IMG > Production  > Production Order > Operations > Availabilty Check > Define Checking Control
    Define Checking Rule for backorder processing u2013
    IMG > Production  > Production Order > Operations > Availabilty Check > Define Checking rule for back order processing
    Specify Scheduling Parameters u2013
    IMG > Production > Production Order > Operations > Scheduling > Specify Scheduling Parameters
    Define Reduction Strategy u2013
    IMG > Production  > Production Order > Operations > Scheduling >  Define Reduction Strategy
    Define Order Confirmation u2013
    IMG > Production  > Production Order > Operations >
    Confirmation > Define Confirmation Parameters.
    Define alternative determination of Production u2013
    IMG > Production > Production Order > Operations > BOM selection > Define alternate determination of production
    Define no. ranges u2013
    IMG > Production > Production Order > Master data > Order > Number Ranges > Define number ranges for orders
    Hope it will work for you.
    Regards,
    R.Brahmankar
    Reward if useful

  • Open Production Order

    Hi have to create a report that has open sales order , open po , open pur req , open planned order and open Production order.
    I need the logic for OPEN PRODUCTION ORDERS.
    The status of the production orders are maintained in JEST Table .
      I need logic to elimate the completed production orders during my selcet . Since JEST Table has multiple entries and for some orders that are released the 'DELV'  status wil not be maintained at all at that time.
    I wil really appreciate your help , if you can tell me how to emliminate the completed production orders during my select query to get the open prod orders.
    Is there any fun moduel or bapi that wil give the Open prod orders ?? or any std report that gives open PO??
    Thanks

    for this you can use the Function STATUS_TEXT_EDIT , for this pass Objnr (get the objnr from AUFK table using the production order) it will give you the status in the LINE exporting parameters.
    Import parameters               Value
    CLIENT                          100
    FLG_USER_STAT
    OBJNR                           QM000200000010
    ONLY_ACTIVE                     X
    SPRAS                           EN
    BYPASS_BUFFER
    Export parameters               Value
    ANW_STAT_EXISTING
    E_STSMA
    LINE                            OSNO NOTE   "this is the status text
    USER_LINE
    STONR                           00
    if line CS 'DELV'
    "ignore the Order
    endif.

  • Production Order and Internal Order for each item of the sales order

    Hi
       I am developing Make To Order Report where I have to display the MTO Line Items and non MTO Line Items. For non MTO Line Items I have to display Internal order with Planned and Actual Costs and also Production Order with Planned and Actual Costs. Could anybody tell how to get the Internal order no and production order with Planned and Actual costs for each line item for a sales order.
    Thanks
    Naga

    Hi,
    You can get the Production orders, Planned orders, Internal orders generated for Sales order item from AFPO table (use fields KDAUF-Sales order number & KDPOS-Sales order item). Then to identify the order type use order category (AUTYP) from table AUFK.
    Once you have the Production/internal order, you can ge the cost from COSS and COSP table. Use the object number from AUFK to get the cost entries from COSS & COSP.
    You can use the following sample code as reference.
    Hope this is helps.. (Don't forget to mark it... )
    Form GET_COSTS                                                       *
    Get the material cost, labour hours and the labour cost for the      *
    sales order material.                                                *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_COSTS.
      DATA V_OBJNR LIKE AUFK-OBJNR.
    DATA v_menge LIKE vbap-kwmeng.
      SELECT SINGLE OBJNR
        INTO V_OBJNR
        FROM AUFK
       WHERE AUFNR EQ AFPO-AUFNR.
      SELECT * FROM COSS
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04'). " p_wrttp. "Labour Cost ( Plan, Actual)
        PERFORM GET_VALUES_FROM_COSS.
      ENDSELECT.
      SELECT * FROM COSP
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04')         " p_wrttp
         AND KSTAR NE '0000510033'. " EQ p_kstar2.      "Material Cost
        PERFORM GET_VALUE_FROM_COSP.
      ENDSELECT.
    Get the unit cost of the production order by dividing the production
    cost by the order quantity. The result will be multiplied by the
    GL posting qunatity (Delivery quantity) to get the production cost
    for the quantity being deluivered.
      IF NOT AFPO-PSMNG IS INITIAL.
        OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_ACT =
                          OUT_REC-ADDNL_LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_PLN =
                         OUT_REC-ADDNL_LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_ACT = OUT_REC-LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_ACT =
                         OUT_REC-ADDNL_LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_PLN = OUT_REC-LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_PLN =
                         OUT_REC-ADDNL_LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_ACT =
                         OUT_REC-ADDNL_MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_PLN =
                         OUT_REC-ADDNL_MATERIAL_COST_PLN / AFPO-PSMNG.
      ENDIF.
    Multiply the calculated Unit Production costs with the GL quantity to
    get the actual production cost of the quantity delivered.
    Calculation for Labour Hours
      OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_ACT = OUT_REC-ADDNL_LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_PLN = OUT_REC-ADDNL_LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
    Calculation for Material Cost
      OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_ACT =
          OUT_REC-ADDNL_MATERIAL_COST_ACT * OUT_REC-QUANTITY.
      OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_PLN =
          OUT_REC-ADDNL_MATERIAL_COST_PLN * OUT_REC-QUANTITY.
    Calculation for Labour cost
      OUT_REC-LABOUR_COST_ACT   = OUT_REC-LABOUR_COST_ACT *
                                   OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_ACT = OUT_REC-ADDNL_LABOUR_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-LABOUR_COST_PLN   = OUT_REC-LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_PLN = OUT_REC-ADDNL_LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
    Get the planned material cost from the total of the planned cost of
    the component materials in the production order confirmations.
      SELECT BWART MENGE MATNR SHKZG FROM AUFM
        INTO (AUFM-BWART, AUFM-MENGE, AUFM-MATNR, AUFM-SHKZG)
       WHERE AUFNR EQ AFPO-AUFNR.
        CHECK AUFM-BWART NE '101'.
        READ TABLE I_MBEW WITH KEY MATNR = AUFM-MATNR
                                   BWKEY = AFPO-DWERK.
        IF SY-SUBRC NE 0.
          SELECT MATNR BWKEY ZPLPR LPLPR PEINH
            FROM MBEW
            INTO I_MBEW
           WHERE MATNR EQ AUFM-MATNR
             AND BWKEY EQ AFPO-DWERK.
            APPEND I_MBEW.
          ENDSELECT.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IF I_MBEW-ZPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST +
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST -
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ELSEIF I_MBEW-LPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST +
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST -
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDSELECT.
    Get the Future material cost per Unit by deviding the calculated
    Future material cost above with the goods reciept quantity to, then
    multiply the unit cost with the GL quantity to get the Future material
    Cost for the Quantity delivered. (Quantity in the entery from GLPCA
    Table).
      IF NOT AFPO-WEMNG IS INITIAL.
        OUT_REC-PLANNED_MATERIAL_COST =
           OUT_REC-PLANNED_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
        OUT_REC-CURRENT_MATERIAL_COST =
           OUT_REC-CURRENT_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
      ENDIF.
    ENDFORM.                               " GET_COSTS
    Form GET_VALUE_FROM_COSP                                             *
    Get the Material cost from COSP table.                               *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUE_FROM_COSP.
      FIELD-SYMBOLS: <FS> TYPE ANY.
      DATA: V_COMPONENT TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT = 15.
      DO 16 TIMES.
        ADD 1 TO V_COMPONENT.
        ASSIGN COMPONENT V_COMPONENT OF STRUCTURE COSP TO <FS>.
        IF COSP-WRTTP EQ '04' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '04'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '01' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_PLN.
        ELSEIF COSP-WRTTP EQ '01'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUE_FROM_COSP
    Form GET_VALUES_FROM_COSS                                            *
    Get the Labour cost and Labour hours from the COSS table.            *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUES_FROM_COSS.
      FIELD-SYMBOLS: <FS1> TYPE ANY,
                     <FS2> TYPE ANY.
      DATA: V_COMPONENT1 TYPE I,
            V_COMPONENT2 TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT1 = 15.
      V_COMPONENT2 = 111.
      DO 16 TIMES.
        ADD 1 TO: V_COMPONENT1, V_COMPONENT2.
        ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
        ASSIGN COMPONENT V_COMPONENT2 OF STRUCTURE COSS TO <FS2>.
        IF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '04'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '01' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_PLN.
        ELSEIF COSS-WRTTP EQ '01'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUES_FROM_COSS

  • To restrict Issue for production than planned qty in production order

    Hi Experts,
    In my scenario, the production staff will prepare production order and right click in production order document and select "Issue Components" option to Issue raw materials for production floor. After issuing the raw materials to production floor closes the "Issue for Production" document and now we have "Production Order" document open in screen. When he again select "Issue Components" option and issues the raw materials once again. Materials are issued once again wrongly. This happens since the production order document is not getting refresh after "Issue for Production" document is done.
    Is there any way to restrict issue of raw materials than the planned qty.?
    I have tried lot of ways to restrict this through SP. Please revert me an solution to this issue.
    The procedure should trigger immediately when the "Issue Components" option is selected second time (If the raw materials are issued in full in first time itself). And it should allow only the qty which is to issued to production order qty (if they issue part issue to production order)
    Thanks in advance
    Raja.S

    Hi Neetu,
    Thanks for your quick response. I have tried this query. But it is not blocking the issue for production document even the raw materials are issued already for the production order.
    I'll explain my work flow again. The Production staff will prepare production order and then release the same and update the production order after changing  the status for "Release". Then he will right click the Mouse button and select "Issue Components" option and perform the Issue for Production process. He will issue the required raw material completely in one shot and add the Issue for Production document.
    After adding the Issue for Production document he will close that document and now we will be in Production order document. Now our production order document will not get refreshed. Now the Production staff go for "Issue components" option, then it should not allow him to issue the components once again. But it is allowing him to issue components any number of times. there is no control.
    If we browse the production order document to previous record and browse back to the same record then my Production order document get refreshed and now we can control the issue. But what should i do to control in the earlier case. Since they want to perfrom lot of production order, there is a chance to issue components for same production order more than one time before the production order document get refreshed.
    Please provide me the SP to control this scenario.
    Thanks in advance.
    Raja.S

  • Confirm Production on any open production order

    Hello Gurus.
    Our company receives material at the end of the production line and they need to report this production in the system. The problem is that at this point, they don't know what Production Order it relates to.
    Is there a transaction in SAP that allows you to report production and then apply this to any open production order that currently exists? For instance, apply it to the first open production order in the system.
    Somewhere where all the user would need to type is the material and quantity. The production order would be selected automatically.
    Thanks!

    Thanks for your replies.
    Regarding REM, I know how to set it up; however, we need to have Production Orders in place in order to drive the requirements of components.
    With REM, how would you know which components you need to purchase? Would you need to then use Re-order point planning or fixed forecasts in order to purchase them in time?
    It would be great if it was possible to use REM to receive the assemblies on stock, but instead of getting the results in a Product Cost collector, you would reduce open production orders. Though I understand this may not be standard functionality.

  • Production order q's

    Hi all ,
    1) What should be the selection criteria in COOIS  for open production order list for the one month frame ?
    2) How can we know that for a production order Overhead , Varience, Settlement has been carried out if the production
    if the order is not having the status CLSD ?
    thanks in advance
    Regards

    Hi Venky,
    specify production order status excluding DLV, CNF  and period to get open production order in COOIS.
    specify corresponding Production order statuses in selection screen of COOIS.
    Regards,
    Krishna Mohan

  • How to get all production orders for a workcenter

    Hello ...
    I have a requirement to create a report of all production orders for a given workcenter.  The user enters the workcenter (CRHD-ARBPL), plant (CRHD-WERKS) and a date range, and wants to see a list of orders (AUFNR) that fall within that date range along with some other data from AFKO and AFPO. 
    I can't figure out a good, consistent way to get from workcenter to production orders.
    Any ideas?
    Thanks!
    Sharon

    Hi there check this program for relation between SO PO and Production order
    REPORT z_so_info.
    TABLES: vbak, vbap, afko, afpo.
    *Field catalog
    TYPE-POOLS: slis.
    DATA: lv_repid TYPE sy-repid VALUE sy-repid,
    xfield TYPE slis_t_fieldcat_alv,
    afield TYPE slis_fieldcat_alv.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(25) text-002.
    SELECT-OPTIONS: so_so FOR vbak-vbeln OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
    PARAMETERS:
    p_kunnr LIKE vbak-kunnr, " sold-to
    p_kunwe LIKE vbak-kunnr. " ship-to
    SELECTION-SCREEN END OF BLOCK b2.
    *Constants
    CONSTANTS: c_zor TYPE vbak-auart VALUE 'ZOR',
    c_we TYPE vbpa-parvw VALUE 'WE',
    c_ag TYPE vbpa-parvw VALUE 'AG'.
    * c_space TYPE space.
    *Ranges
    RANGES: ra_parvw FOR vbpa-parvw,
    ra_kunnr FOR vbpa-kunnr.
    *Tables
    DATA: BEGIN OF gt_output OCCURS 0,
    vbeln LIKE vbak-vbeln, " sales order number
    posnr LIKE vbap-posnr, " SO item number
    matnr LIKE vbap-matnr, " material number
    sh LIKE vbpa-kunnr, " Ship-to
    sp LIKE vbpa-kunnr, " Sold-to
    lifnr LIKE ekko-lifnr, " Vendor
    bstnk LIKE vbak-bstnk, " PO number
    banfn LIKE vbep-banfn, " Purchase requi
    po_st TYPE char30, " PO status text
    pstyv TYPE vbap-pstyv, " Item catagory
    aufnr LIKE afpo-aufnr, " Production Order
    prd_stat TYPE string, " Prd order status
    END OF gt_output.
    DATA: wa_output LIKE gt_output.
    FIELD-SYMBOLS: <fs_output> LIKE gt_output.
    *Table for sales order and PO
    TYPES : BEGIN OF gs_data,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    pstyv TYPE vbap-pstyv,
    matnr TYPE vbap-matnr,
    END OF gs_data.
    DATA: gt_data TYPE STANDARD TABLE OF gs_data,
    wa_data TYPE gs_data.
    *Table for Production Orders
    TYPES: BEGIN OF gs_prd,
    aufnr TYPE afpo-aufnr,
    posnr TYPE afpo-posnr,
    kdauf TYPE afpo-kdauf,
    kdpos TYPE afpo-kdpos,
    wepos TYPE afpo-wepos, "Goods Receipt Indicator
    elikz TYPE afpo-elikz, "Delivery Completed Indicator
    objnr TYPE aufk-objnr, "Object number
    * getri TYPE afko-getri, "Confirmed Order Finish Date
    * gltri TYPE afko-gltri, "Actual finish date
    END OF gs_prd.
    DATA: gt_prd TYPE STANDARD TABLE OF gs_prd,
    wa_prd TYPE gs_prd.
    *Table for partner data
    TYPES: BEGIN OF gs_partner,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    parvw TYPE vbpa-parvw,
    kunnr TYPE vbpa-kunnr,
    END OF gs_partner.
    DATA: gt_partner TYPE STANDARD TABLE OF gs_partner,
    wa_partner TYPE gs_partner.
    TYPES: BEGIN OF gs_po,
    ebeln TYPE ekkn-ebeln,
    ebelp TYPE ekkn-ebelp,
    vbeln TYPE ekkn-vbeln,
    vbelp TYPE ekkn-vbelp,
    END OF gs_po.
    DATA: gt_po TYPE STANDARD TABLE OF gs_po,
    wa_po TYPE gs_po.
    TYPES: BEGIN OF gs_preq,
    vbeln TYPE vbep-vbeln,
    posnr TYPE vbep-posnr,
    banfn TYPE vbep-banfn,
    END OF gs_preq.
    DATA: gt_preq TYPE STANDARD TABLE OF gs_preq,
    wa_preq TYPE gs_preq.
    TYPES: BEGIN OF gs_po_stat,
    ebeln TYPE ekko-ebeln,
    procstat TYPE ekko-procstat,
    lifnr TYPE ekko-lifnr,
    END OF gs_po_stat.
    DATA: gt_po_stat TYPE STANDARD TABLE OF gs_po_stat,
    wa_po_stat TYPE gs_po_stat.
    *Field symbols
    FIELD-SYMBOLS: <fs> TYPE tj02t-txt04,
    <fs_temp> TYPE tj02t-txt04,
    <fs_stat> TYPE char30.
    START-OF-SELECTION.
    PERFORM fr_build_range.
    PERFORM fr_get_data.
    PERFORM fr_build_fc.
    PERFORM fr_output.
    *& Form fr_get_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_get_data.
    *Get SO
    SELECT a~vbeln a~posnr a~pstyv a~matnr
    FROM vbap AS a
    JOIN vbak AS b
    ON a~vbeln = b~vbeln
    JOIN vbpa AS c
    ON b~vbeln = c~vbeln
    INTO TABLE gt_data
    WHERE b~vbeln IN so_so
    AND b~auart EQ c_zor "Only Sales Orders
    AND c~kunnr IN ra_kunnr. "from selection screen
    DELETE ADJACENT DUPLICATES FROM gt_data COMPARING vbeln posnr.
    *get data of the production order
    IF NOT gt_data[] IS INITIAL.
    SELECT a~aufnr a~posnr a~kdauf a~kdpos a~wepos a~elikz
    b~objnr
    FROM afpo AS a
    JOIN aufk AS b
    ON a~aufnr = b~aufnr
    INTO TABLE gt_prd
    FOR ALL ENTRIES IN gt_data
    WHERE a~kdauf EQ gt_data-vbeln
    AND a~kdpos EQ gt_data-posnr.
    ENDIF.
    *Get partner data
    IF NOT gt_data[] IS INITIAL.
    SELECT vbeln posnr parvw kunnr
    FROM vbpa
    INTO TABLE gt_partner
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln.
    ENDIF.
    *Get Purchase Order
    IF NOT gt_data[] IS INITIAL.
    SELECT ebeln ebelp vbeln vbelp
    FROM ekkn
    INTO TABLE gt_po
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND vbelp EQ gt_data-posnr.
    SELECT vbeln posnr banfn
    FROM vbep
    INTO TABLE gt_preq
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND posnr EQ gt_data-posnr.
    ENDIF.
    IF NOT gt_po[] IS INITIAL.
    SELECT a~ebeln a~procstat a~lifnr
    FROM ekko AS a
    JOIN ekpo AS b
    ON a~ebeln = b~ebeln
    INTO TABLE gt_po_stat
    FOR ALL ENTRIES IN gt_po
    WHERE b~ebeln EQ gt_po-ebeln
    AND b~ebelp EQ gt_po-ebelp.
    ENDIF.
    *Move data to output table
    LOOP AT gt_data INTO wa_data.
    wa_output-vbeln = wa_data-vbeln.
    wa_output-posnr = wa_data-posnr.
    wa_output-pstyv = wa_data-pstyv.
    wa_output-matnr = wa_data-matnr.
    READ TABLE gt_po INTO wa_po WITH KEY vbeln = wa_data-vbeln
    vbelp = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-bstnk = wa_po-ebeln.
    READ TABLE gt_po_stat INTO wa_po_stat WITH KEY ebeln = wa_po-ebeln.
    IF sy-subrc EQ 0.
    wa_output-lifnr = wa_po_stat-lifnr.
    CASE wa_po_stat-procstat.
    WHEN '01'.
    wa_output-po_st = 'Version in process'.
    WHEN '02'.
    wa_output-po_st = 'Active'.
    WHEN '03'.
    wa_output-po_st = 'In release'.
    WHEN '04'.
    wa_output-po_st = 'Partially released'.
    WHEN '05'.
    wa_output-po_st = 'Released Completely'.
    WHEN '08'.
    wa_output-po_st = 'Rejected'.
    ENDCASE.
    ENDIF. "inner read subrc
    ENDIF. "outer read subrc
    READ TABLE gt_preq INTO wa_preq WITH KEY vbeln = wa_data-vbeln
    posnr = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-banfn = wa_preq-banfn.
    ENDIF.
    READ TABLE gt_prd INTO wa_prd WITH KEY kdauf = wa_data-vbeln
    kdpos = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-aufnr = wa_prd-aufnr.
    *get the purchase requisition for production order as well
    SELECT SINGLE banfn
    FROM ebkn
    INTO wa_output-banfn
    WHERE aufnr EQ wa_prd-aufnr.
    *Get the status of the production order
    PERFORM fr_get_prd_stat USING wa_prd-objnr
    CHANGING wa_output-prd_stat.
    ENDIF. " sy-subrc
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_we.
    IF sy-subrc EQ 0.
    wa_output-sh = wa_partner-kunnr.
    ENDIF.
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_ag.
    IF sy-subrc EQ 0.
    wa_output-sp = wa_partner-kunnr.
    ENDIF.
    APPEND wa_output TO gt_output.
    CLEAR: wa_data, wa_prd,wa_partner,wa_output.
    ENDLOOP.
    ENDFORM. " fr_get_data
    *& Form fr_build_range
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_build_range .
    *Range for partner function
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SH' TO ra_parvw-low. " we
    APPEND ra_parvw.
    CLEAR ra_parvw.
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SP' TO ra_parvw-low. " ag
    APPEND ra_parvw.
    CLEAR ra_parvw.
    *Range for ship-to and sold-to
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunnr TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunwe TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    ENDFORM. " fr_build_range
    *& Form fr_build_fc
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_build_fc .
    * sales order number
    afield-fieldname = 'VBELN'.
    afield-seltext_s = 'Sales #'.
    afield-ref_tabname = 'VBAK'.
    APPEND afield TO xfield. CLEAR afield.
    * sales ITEM number
    afield-fieldname = 'POSNR'.
    afield-seltext_s = 'Item #'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    * Material Number
    afield-fieldname = 'MATNR'.
    afield-seltext_s = 'Material #'.
    afield-ref_tabname = 'VBAP'.
    afield-outputlen = 10.
    APPEND afield TO xfield. CLEAR afield.
    *Vendor Number
    afield-fieldname = 'LIFNR'.
    afield-seltext_s = 'Vendor Num.'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    * ship-to-party
    afield-fieldname = 'SH'.
    afield-seltext_s = 'Ship-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    * sold-to-party
    afield-fieldname = 'SP'.
    afield-seltext_s = 'Sold-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    *PO number
    afield-fieldname = 'BSTNK'.
    afield-seltext_s = 'PO NUM'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PO status
    * afield-fieldname = 'PO_STAT'.
    * afield-seltext_s = 'Step'.
    * afield-ref_tabname = 'zbacklog_v2'.
    * APPEND afield TO xfield. CLEAR afield.
    *PO step status
    afield-fieldname = 'PO_ST'.
    afield-seltext_s = 'PO.Status'.
    afield-ref_tabname = 'zbacklog_v2'.
    APPEND afield TO xfield. CLEAR afield.
    *Purchase requisition
    afield-fieldname = 'BANFN'.
    afield-seltext_s = 'Pur. Req.'.
    afield-ref_tabname = 'VBEP'.
    APPEND afield TO xfield. CLEAR afield.
    *Item catagory
    afield-fieldname = 'PSTYV'.
    afield-seltext_s = 'Itm. Catg'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    *Prodcution Order number
    afield-fieldname = 'AUFNR'.
    afield-seltext_m = 'Prod.Order'.
    afield-ref_tabname = 'AFKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PRODCUTION status
    afield-fieldname = 'PRD_STAT'.
    afield-seltext_s = 'Prd. Step'.
    afield-ref_tabname = 'zbacklog_v2'.
    afield-outputlen = 20.
    APPEND afield TO xfield. CLEAR afield.
    *PRODUCTION step status
    * afield-fieldname = 'PRD_ST'.
    * afield-seltext_s = 'Prd. Status'.
    * afield-ref_tabname = 'zbacklog_v2'.
    * APPEND afield TO xfield. CLEAR afield.
    ENDFORM. " fr_build_fc
    *& Form fr_output
    * text
    * --> p1 text
    * <-- p2 text
    FORM fr_output .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    * I_CALLBACK_PF_STATUS_SET = ' '
    * I_CALLBACK_USER_COMMAND = ' '
    * I_STRUCTURE_NAME =
    * IS_LAYOUT =
    it_fieldcat = xfield[]
    i_default = 'X'
    i_save = 'A'
    TABLES
    t_outtab = gt_output
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDFORM. " fr_output
    *& Form fr_get_prd_stat
    * text
    * -->P_WA_PRD_OBJNR text
    FORM fr_get_prd_stat USING p_objnr CHANGING p_prd_stat.
    DATA: lt_status TYPE STANDARD TABLE OF jstat,
    wa_status TYPE jstat,
    lv_status TYPE tj02t-txt04,
    lv_temp2 TYPE char5,
    lv_buff TYPE string.
    CALL FUNCTION 'STATUS_READ'
    EXPORTING
    client = sy-mandt
    objnr = p_objnr
    only_active = 'X'
    TABLES
    status = lt_status
    EXCEPTIONS
    object_not_found = 1
    OTHERS = 2.
    LOOP AT lt_status INTO wa_status.
    IF wa_status-stat(1) EQ 'I'.
    SELECT txt04 FROM tj02t
    INTO lv_status
    WHERE istat EQ wa_status-stat
    AND spras EQ 'E'.
    ENDSELECT.
    lv_temp2 = lv_status.
    CONCATENATE lv_temp2 p_prd_stat INTO p_prd_stat
    SEPARATED BY ','.
    ENDIF.
    CLEAR: wa_status, lv_status, lv_temp2.
    ENDLOOP.
    lv_buff = p_prd_stat.
    *Status of Production Order
    IF lv_buff CS 'CRTD'.
    p_prd_stat = 'Not Active'.
    ENDIF.
    IF lv_buff CS 'REL'.
    IF lv_buff CS 'GMPS'.
    p_prd_stat = 'Printed In Prod'.
    ELSE.
    p_prd_stat = 'Printed'.
    ENDIF.
    ENDIF.
    IF lv_buff CS 'TECO'.
    p_prd_stat = 'Technically Compt.'.
    ENDIF.
    ENDFORM. " fr_get_prd_stat

  • Grouping of Production orders

    In Assessment or distribution cycle, we have production orders as the receivers. Since the list of production orders can be huge for month, creating the group through menu Extras/ Create group is not practical. I also tried to make set for the prodcution orders. But then this is set is not taking in the Assessmement cycle or distribution cycle.
    I am getting the error message like:
    Set PRD1 may not be used
    Message no. GS076
    Diagnosis
    In this transaction, only certain set classes are permitted: Order Groups. PRD1, however, belongs to set class Set.
    System Response
    The entry is rejected.
    Procedure
    Use a set from set class Order Groups.
    Or do we have any other method of assigning the groups.
    How to solve this.
    Please help.
    Regards
    Kami

    Hi Kamijha,
    I think you will find that the follwing should work for your purpose:
    Go to Transaction OKOV. Choose a name for your variant and hit "create".
    Now you can define the orders you want to select in your cycle not only by numbers or number ranges, but dynamically by characteristics such as order type, release date, anything you want. I suggest selecting by order type and additionally any characteristic that you find allows you to determine if the production order was "active" in the current period. If you only select by order type, the cycle will take much longer. Restricing to "active" orders in the variant may make it necessary to adjust the variant once per month before running the cycle though.
    The selection variant you create here can be used as order group in your cycle.
    There is just one more  little thing you need to know: When you created the selection variant in OKOV and you chose the name "NAME" there, in your cycle, you will have to input ".NAME" for the group.
    The same is true when you want to use the selection variant created in OKOV for the selection for a report in the internal order info system: you always need to put a "." in front of the name you gave the selection variant when you created it.
    I just ran a test run with a cycle like yours in our system and the production orders were successfully selected.
    Regards
    Nikolas

  • Report on Cumulating Consumptions of Production Orders

    Dear Experts
    We have around 300 products and all products are having BOM. BOM main components are more or less similar in all production orders / BOM and only difference is quantities. we normally make each product production orders on daily basis based on capacity planning
    Now at the end month i want to know for a particular product (say i made production orders 20 in a month with different quantities GI) how much quantity of BOM quantity consumed.
    Is there anyway i can get this report
    Thanks in advance
    Vedsaidut

    Dear
    The most user friendly report for your requirement will be COOIS/COHV
    COOIS --Select Documents Goods Movement-Select Standrad Profile  -Provide Order Type  and Plant Code -Excute -it will pop up  with all the material list consumed against the Production Order .If you select the PO and hit decending button on the top , it will give you  date wise order list with their consumption .You can play around  with other fields as required from Change Lay out options on the top header ( coulrful cheker box)  and drag the field to dddisplay column .
    Beside that you have other reqports like
    MCP5 - Material
    MCRE - Material Consumption
    CO20 - Orders by Numbers
    CO21 - Orders by Material
    Hope this helps
    regards
    JH

  • Drawing document in Production Order

    Hi,
    My scenario is as follows -
    There is a drawing  number for each material produced in-house.
    So when we are making a production order (manually or thru MRP) for each in-house produced material,
    I want the drawing document to automatically appear in the production order. The drawing document
    should also appear in the print out of the production order.
    This is needed so that the shop floor people can refer to the correct drawing while executing the production order.
    I am using document type - DRW
    In the schedulling  profile i have checked - Document links to BOM and also Material
    Kindly advise, how to go about this problem.
    Regards,

    Dear,
    For linking a document to production order, The prerequisite is do some customizing in SPRO.
    SPRO-->cross-application components>Document management>control data--> document types  in the document type you have to establish a object link to the document type and production orders.
    So select a document type and Define object link ---define a object --PORDER with screen 251 and save.
    Then goto production---Shop floor control --- master data --production schedul.profile
    and enable - document links material or Bom on release or creation.
    Then create a document using CVo1n.
    Provide the document type and name then enter
    In the next screen give the document description and below the originals sub header click on the OPEN Originals.
    Here you select your document and attach then save the document.
    Now got to Co02 and select the Document overview icon(Next to component overview icon) and provide the details of the operation to which the document to be attached and save.
    Document is attached to the Production order.
    Else Pressgo to CO02 and press SHIFT + F7..... then you can attach a document to a production order there manually also.
    Regards,
    R.Brahmankar

  • Attaching a document to production order.

    Hi.
    how can i attach a documet to the production order.
    generally we can attach a .txt to our production order. but i want  to attach a document  to the production order.
    how do i do that.
    need reps fast.

    Hi,
    For linking a document to production order, The prerequisite is do some customizing in SPRO.
    SPRO-->cross-application components>Document management>control data--> document types
    in the document type you have to establish a object link to the document type and production orders.
    So select a document type and Define object link ---define a object --PORDER with screen 251 and save.
    Then goto production---Shop floor control --- master data --production schedul.profile
    and enable - document links material or Bom on release or creation.
    Then create a document using CVo1n.
    Provide the document type and name then enter
    In the next screen give the document description and below the originals sub header click on the OPEN Originals.
    Here you select your document and attach then save the document.
    Now got to Co02 and select the Document overview icon(Next to component overview icon) and provide the details of the operation to which the document to be attached and save.
    then the Document is attached to the Production order.
    Hope this helps,
    Regards
    CSM Reddy

  • PRT availaibility check in production order.

    Hi
    I have created PRT of type M and attached to operation and when i try do availaibility check in production order then iam getting message "PRT availability could not be checked"
    What are pre-requisite for getting PRT availability check?
    Is it possible to check PRT availability  for all types of PRTs?

    Dear ,
    You are facing this error due to PRT avialability check not activated in order type level while creation of production order .
    To avoid this issue you need to goto -OPJK-Order Cotol -Select the order type , availability chek (1,2)  .Here you need to keep
    PRT Availablty Check tab -Checking Rule -01 and PRT Release -01 or 02 based on your requirement .
    As prequisit : You need to create the PRT material master with availabilty check 01 and keep this in BOM.In CO02 -Operation Overview -Select the Operation -Hit on PRT button-It will apear with a screen Production Order Changes -PRT -Select the PRT material  with Qty , Control Key .
    Hope this will give u an idea .
    Regards
    JH

Maybe you are looking for

  • Importing to iPhoto via desktop

    I had to follow the following advice from another thread to import into iPhoto: "....if you placed these files from your windows computer into the iPhoto Library folder in the finder you will get that error. If that is what you did, then drag those i

  • Date format in Oracle 8i

    Is the 'TZD' option available for entering and displaying dates in Oracle 8.1.7.4? For example, I'm using sqlldr to load in a date in this format in my controlfile: Mon Jun 27 00:15:00 EDT 2005 DATETM          DATE 'DY MON DD HH24:MI:SS TZD YYYY', It

  • Trip Expenses

    Dear Friends, How to configure the following issues in Travel Mangement :- 1. Boarding & Lodging Expenses :- If the employee goes on Business Trip he will be reimbursed according to his eligibility (Grade Wise) and location wise (India A class city ,

  • IPod as primary car audio source

    I am fairly new here, and am curious- how many people are using iPod as their primary source for their car audio library? What gear do you have (head unit, amps, etc)? How is it working? Any pitfalls or negatives to this? And finally, are you getting

  • Apple TV does not "learn" the IR commands from a Bang & Olufsen (Beo4) remote

    Under Settings-General-Remotes is possible that the Apple TV "learn" the IR commands from any other (non Apple) remote. However I have tried this with a Beo4 remote (Bang & Olufsen), but the Apple TV does not recognise the Beo4 remote IR commands. Is