Production order form.

can a production order form be a smart form. if yes.
what kind of functional  configuration  should be done.
Edited by: deepu p on Nov 3, 2008 8:45 PM

Deepu,
According to my knowledge in older versions of SAP the production order form is a SAP Script. But the developer can do some trick and launch a smart form through the SAP script. We are running 4.6c at client location and we do have a SMARTFORM for the process order.
Your developer should be able to do the research and do the needful.
-Swapnil

Similar Messages

  • Update Production Order Form if Sales Order Form has been updated

    Hi Experts, how can you update the "Due Date" in the Production Order form if the "Delivery Date" in the Sales Order form has been updated?  I am having problem catching the actual event if the Date was modified.  I'm not sure if I'm coding this correctly, but this is what I have so far:
                If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) And (pVal.Before_Action = True)) Then
                    strSQL = "SELECT DueDate FROM OWOR WHERE DueDate = '" & strDueDate & "'"
                    orecordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                    orecordset.DoQuery(strSQL)
                End If
    Please share your examples.

    All, thank you for your help.  I understand why it is not working now.  I was able to accomplish what I was lookin for with the following code (for anyone who was having the same problem as me:
                If pVal.FormTypeEx = "139" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE Then                     
                    If pVal.ItemUID = "12" And pVal.BeforeAction = False And pVal.ActionSuccess = True Then  
                        oEditText = oForm.Items.Item("12").Specific
                        myNewDate = ConvertDateString(oEditText.Value, "test")                              
                        SODocEntry = oForm.Items.Item("8").Specific.Value                                     
                        oPdo = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders)          '
                        oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                        oRecordSet.DoQuery("SELECT DocEntry from OWOR where OriginABS = '" & SODocEntry & "'")
                        If Not oRecordSet.EoF Then
                            oPdo.GetByKey(oRecordSet.Fields.Item(0).Value)
                            oPdo.DueDate = myNewDate
                            intResult = oPdo.Update                                    
                            If intResult <> 0 Then                                                                               
    oCompany.GetLastError(errInt, errString)
                                oApplication.MessageBox("oApplication_ItemEvent: " & errString)
                            End If
                            oRecordSet.MoveNext()                                                                               
    End If
                    End If
                End If

  • Why user can not open Production Order form with readonly privilege?

    hi guys,
    today I got a problem when I assign the minimize privilege for a new user.
    the user only want to query status about Production Order, so I assigned the privilege with readonly on Production Order, and disabled all others.
    But when user logged on, and click on the 'Menu -> Production -> Production Order', there pops up an error message said 'To generate the document, first define the numbering series in the Administration module'.
    Do I have to find some other privileges to assign for the user account?
    thanks for your help.

    Thanks.
    But there were 10 groups look like from 'Series - Group No. 1' to 'Series - Group No. 2', How did I know which one was assigned to Production Order?

  • Automatic creation of production order form demand

    Dear Gurus,
    In my cycle,
    I want to copy monthly plan from EXCEL sheet through BDC to SAP System.please tell me on which screen it will upload(in md61 or some other).
    After uploading is there any option according to date wise production order should create automatically for each date separate wise.
    Thanks
    Alok

    It will come day wise only if you [split the demand|Re: Automatic splitting of MRP requirements for components] or give the demand in days. Or else while creating the Z program for upload write program in such a way that it will
    1. take the monthly requirement divide the value with no. of working days.
    2. The value got after dividing will be enter evenly for all working days.
    Regards
    Abhijit Gautam

  • Product order form issue

    I'm putting together an online order form for shirts & sweatshirts.  As the layout has it now, I do not have the room to put various size options (11 total) with the option to enter a quantity for each size available in a text box.  Is there a way to do this or can it be imported from excel?

    It is the Form Action Comment forms that only offer black text, not Wufoo's form.
    Happy Holidays

  • Standard form for printing production order

    hi experts,
                 i need the standard script for printing production order.

    Hi
    Check out this Forms
    PSFC_DOC_LINKS   Print production order
    PSFC_PRINT_LAY    Production order printing
    WE_FERT_VERS2    GR slip for production order
    Reward Points if it is Useful.
    Thanks,
    Manjunath MS

  • SAPScript Form for Production order Pick List

    Hi gurus
    We need to make a small change on printout of production pick list and I can see the form name in transaction OPK8, which is the same one as printout of production order paper. But when I read the form with SE71, I cannot see section to do with "pick list". All I can see are about production order paper. I make a search with a few words currently printed on pick list however nothing can be found in that form.Can someone please help with a little input? Thanks a lot.
    yu

    Hi,
    In OPK8 you can find different lists. Each list is assigned to one form and one program. Check with the program.
    Regards,
    V. Suresh

  • How to use smart form for production orders

    Hello Experts,
    I have a couple of questions about printing out production orders from SAP, from OPK8.
    My ABAPer has developed a smart form and I am trying to use the same for the list LG01, i.e. the object list.
    Since, there was no place to assign a smart form directly, so the ABAPer has copied the existing print program , defined for my ref. order type and LG01 and assigned the new smart form inside the program. This new program has now been assigned against my ref. ord type, LG01 and all the plants, as seen in screenshot below.
    Now, what is happening is that when I give print for my order, a pop-up screen asks for the printer. I give LOCL , check 'print now' and then click on the print preview.
    I can see the new form that has been developed and it is alright.
    Then, when I click on the back arrow, once again the print pop-up screen appears. Now, when I enter LOCL, print now and click  the print preview, then I see another form open up before me. I am assuming that this is some form which was pre-configured in the system, under the section 'Forms', for the same object list LG01.
    Do I have to assign the new smart form under the section "Forms' also, for the ref order type and LG01? or the change in the section 'print programs' is enough for the new form to kick in? Please guide me. I tried to but it gave the error that the form is not created in English. Also , my form is a smart form, not a SAPScript or PDF form, so I wonder if that will help at all.
    Requirement :-      I need to suppress this second form somehow but do not know how to do it. I want that only one form, i.e. my smart form should be printed out when someone gives print from the order.
    Let me know if something is not clear.
    Regards
    P.R

    Hi P,
    Go a few steps down and remove flags on the documents you don't want to print:
    this are just suggestions, they can be changed in your production order, in CO02, menu Order->Settings->List Control.
    regards,
    Edgar

  • Form for production order

    hi experts,
    i need the standard print progarm  for printing production order.

    Hi Vijay
    the printers first need to be configured by the BASIS consutant who will assign printers to Users based on their Roles and authorizations and i think this is a Config activity and needs to be transported
    also from the menu go to user profile, under own data and under defaults Tab, you need to assign the printer here and save it and first log off and then i think it should help
    also check in the Control key setting in OPL8 which you have used for routings operations whether they allow printing shop floor papers and confirmations and time tickets based on your requirements
    this should probably help
    if useful plese reward points
    regards

  • 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

  • Production order report on Daily

    Hi gurus,
    I tried to create a report for production orders. it contain four selection parameters. Here i am using four tables 1) crhd 2)  caufv 3) aufk 4) afru 5) zbreak ( this is a ztable created by me ) .  i need the fields like date,work centre, porder,startdate,enddate,order quantity,processed quantity,yield,scrap, (down time ,from time ,reason these all from ztable). i want to make one report on this.
       i did it in two  ways. I used a join statement but it is taking more time to execute. i know this is a performance issue. please give me a good idea how to finish this report.
    << Please repect the 2,500 character limit on posts. Post only the relevant portion of your code. And please use code tags.>>
    form get_data.
    select
         a~arbpl
         b~plnbez
         c~aufnr
         d~rueck
         d~isdd
         d~iedd
         b~gamng
         d~lmnga
         d~xmnga
         d~rmnga
         e~from_time
         e~to_time
         e~total_time
         e~workcentre
         e~reason
         into table itab
    *     (itab-arbpl, itab-plnbez, itab-aufnr,
    *     itab-rueckb itab-isdd itab-iedd,
    *     itab-gamng, itab-lmnga,  itab-xmnga,
    *     itab-rmnga ,itab-from_time, itab-to_time,
    *     itab-total_time, itab-workcenter, itab-reason)
         from ( ( crhd as a
          inner join caufv as b
         on a~werks = b~werks
         inner join  aufk as c
         on c~werks = b~werks
          inner join afru as d
         on d~werks = c~WERKS )
         inner join ZBREAK_DOWN_TIME as e
         on e~werks = d~werks )
         WHERE PLNBEZ IN S_MATNR.
         append itab.
    endform.
    Thank you.
    Edited by: Rob Burbank on Jan 3, 2010 2:09 PM

    Hi MadhuRao,
    My observations in your current SELECT statement are as follows:
    1. In your query you are selecting AUFNR from the table AUFK which is already there in the view CAUFV which you have already included. So this is un-necessary.
    2. There is no index for WERKS in table CRHD (Work Center Header) table. You should read the work centers separately in a hash table and read to fill your main internal table.
    3. You should join Order table (view CAUFV) and Order confirmations (AFRU) based on order number (AUFNR). Currently you are joining based on plant (WERKS) which is also another serious performance issue.
    My suggestions are:
    1. SELECT all the Work-Centers from CRHD into an internal table.
    2. SELECT from CAUFV first for the given list of material numbers (which is the only WHERE clause field in your query). This must be your main internal table itab.
    3. Consolidate all the unique Order Numbers (AUFNR) and if possible the counter (APLZL) into a separate internal table.
    4. SELECT from the confirmation table (AFRU) for the list of above orders only.
    5. Loop through your main internal table itab and update the fields from the Work-Center and Confirmation internal tables.
    This would greatly improve the performance, however your code will be huger.
    Cheers
    Suresh

  • Confirmation of the production order qty equal to sales order qty

    Hi Experts,
    I need to control the confirmation of the production order should be equal to sales order qty.
    I'm having the scenario as follows
    If sale order qty for X material = 3
    while running the MRP, system will plan the order qty as 8 because of we maintained rounding profile in the Material master and enhancement we used for this.
    Rounding Profile Qty=5
    Total Production Order Qty=8.
    But, finally they will do the GRN for sales order qty only, remaining will be used for testing purpose.
    So, the confirmation also has to happen for only sales order qty. There, we need to control the qty based on the sales order.
    Is there any exit or Enhancement is available for this.
    Please help me.
    Naren

    Hi,
    Exit for confirmation check is CONFPP04.
    However, opening orders for quantities higher than demand and leaving pieces undelivered and unconfirmed in production orders does not make sense. I could not get the requirement of incresing production quantity by adding rounding value? Moreover, if rounding is to be used for test purposes, why not do you receive them into stock? Why don't you receive 8 pieces into stock, deliver 3 pieces to sales order and transfer 5 pieces to related department?
    If it is because of MRP and you really do not want to produce extra 5 piece immediately, you may use material reservation or any other form of demand for 5 pieces, use EX for lot size calculation and have MRP create two planned orders for sales order and testing requirement, then you can convert planned order for sales order requirement into production order and continue processing.
    Regards.

  • How to add additional lines to the Order Form template?

    I purchased and installed Acrobat Pro 9 because of its ability to create forms and found the Order Form template is just perfect for what I need, why reinvent the wheel, right?   Except I found I can't figure out how to add additional object that duplicate what is already there.  I highlighted an entire row and tried to just copy and paste but the past function put the copied objects at the bottom of the form in what looks like a group, all out of order.  I tried looking in the online help for a possible key combination that would inset an additional row of objects but couldn't find any.
    Also the form doesn't move down and create a new page keeping all the other elements in line, it moves to the bottom of the current page and stops.   Thought the template was based on a table so I was going to insert additional rows thinking once it reached the bottom of the current page it would automatically break to a new page and continue, but it's not a table.  So my question is, how can I add duplicate object that match the Order Form templates Item, Description, etc. objects?  I've come to realize learning to use this product is not going to be as simple a proposition as I was lead to believe.  O well, live and learn!
    If someone can point me in the right direction, any help is greatly appreciated.
    Tony Rodriguez

    Thanks, Barney! It's even easier than the solution I came to: copying and pasting into the field. 

  • 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

  • Using a conditional pop-up menu for creating an order form...

    I am trying to create an order form on Numbers (version 2.0.1) using my iPad. My idea is to create a pop-up menu that would contain a number of products (about 50 or so). I'd copy this pop-up menu on all the cells in the column under "Description". That part is no problem. BUT ... ideally when a product is selected from the pop-up menu, I would like for its price to automatically populate the corresponding cell under "Unit Price". Obviously the various products will have various prices. For example, I might have three products listed as "Assorted Miniatures" which cost $5 each; "Animal Pot" which costs $10; and "Geometric Pot" which costs $15. Can this be done???
    If and when that is accomplished, then I presume I can easily apply the basic formulas to get total amounts. All of this means that once completed the only thing I really need to do is select products and then all the pricing and total amounts are automatically listed and calculated. Can someone assist? I have a show coming up this weekend and I hope to fill out lots of order forms!!! :-)  Thank you!!!

    MicMac22,
    Here is my take. Lookup table as Wayne suggests.
    Popup menu is a great idea.
    description
    quant
    unit price
    total Amt
    Item 2
    $2.00
    Item 1
    $1.00
    My entry table would look like yours.
    item
    price
    item 1
    $1.00
    item 2
    $2.00
    item 3
    $3.00
    Table 2 is your lookup table.
    The formula in your entry table unit price is pasted into row 2 and copied down.
    IFERROR(OFFSET(Table 2::$A$1,MATCH(A2,item,0)−1,1,,),"")
    This says find the match of entry in A2 in item column in table 2 return the value in the column 1 over. If error return nothing ("").
    Will this work for you?
    Q

Maybe you are looking for

  • Messages can't be deleted from visual voice mail

    Hello, When I delete a message on the visual voice mail (in my combox from Sunrise Switzerland) this message don't disappear, or it's deleted and come back in seconds and sometimes with the blue point marking it as non read!!! Some times the phone "f

  • How can I see my kids texts without them seeing mine?

    I would like to know how I can see my childrens texts and they not see mine? I have an iPhone 5 and they have 4th generation iPod touches.

  • The solution for Midi Timeout is easy...

    After getting the Midi Timeout problem and spending hours to fix this, I came acrros a comment on the web that fixes it. Believe it or not, but it's an automation problem. All I did was selecting all the tracks inthe arrange window, and from the Trac

  • HT4009 In-app purchase message

    What does "You've already purchased this in-app purchase but it hasn't been downloaded" mean and how do you fix it?

  • Interesting bug.................

    Just a heads up, I was using ADDT to build some update and insert forms, I changed the standard submit buttons to images and found that the triggers will not work in IE 6 and 7, worked fine in Firefox, Safari and Opera, but in both versions of IE it