Sales order number based on Production order number.

Hi,
Can anyone provide me the relationship between the sales order and production order .
I need to get the customer material description(ie from vbap for related sales document no) when i give the input  as a production order number ,now my question is how the data is  retriewed  i mean how the production order gets related to sales order and form it how the material no is picked up and its material description..
Please provide me with the tables and what key fields  are related (clear view how tables are related and how could i fetch the data)

Swetha,
There is no exact relationship between a Production order and a Sales order in an MakeToStock environment.  I will therefore assume that you are speaking of MakeToOrder,  where there is an exact relationship between the Production order and the Sales Order/Item.
Functionally, CO03 > enter the production order number.  On the display screen will be displayed the associated Sales order and item.  Double click on this and it will bring you to VA03.  Select the item of interest, and then Goto > Item > Purchase order data.  The customer material is displayed.  If you have entered a customer material description in your Customer Material Info Record (CMIR) (VD51), and if the Material in the sales order was determined by the customer material info record, then the description will be displayed instead.
So, at table level:
Look in AFPO to find production order number.  Contained in AFPO is AFPO-KDAUF and AFPO-KDPOS.
Use these fields to look in VBAP to locate your sales order/item.  Find VBAP-KDMAT. This is customer material.
The description of the 'standard' customer materials can always be found in KNMT.  To look this up, you need to know sales org, dist channel, customer, and material.  Lookup using a program is dicey, since it is possible, within a sales order, to determine the material from Customer material, or it is possible to just enter any customer material in the sales order.  When the material is determined, it depends upon your determination logic (sold to? Hierarchy?), which can differ from system to system, and from customer to customer.  To sum it up, it is possible to get the CustMat description from data found in VBAP and VBAK, but you first need to know how your CMIRs are structured.
For a simple lookup, I suggest you just get to the customer material in VBAP, and stop there.
For more info about how data is stored in the Sales documents, you might want to ask your question in one of the SD forums.
Best Regards,
DB49

Similar Messages

  • Restrict Automatic serial number calculation for Production order release

    Hi,
    I need the solution for following requirement.
    Release production order(CO02) . Then go to Menu header-> Serial Numbers.
    Here I am getting serial numbers automatically as the material used in production order is set for automatic serial number calculation.
    But I want to restrict automatic serial number assignment based on production order type.
    If order type is 'XYZ', I dont want to calculate serial numbers automatically.
    Can anyone tell me how to do it?
    Regards,
    Manan Desai.

    When you press Release Order button the BADI 'WORKORDER_UPDATE->AT_RELEASE' will be called.
    At this point the internal tables for Serial numbers are filled by the program automatically.
    So call function module 'SERIAL_INTTAB_REFRESH' which will refresh the internal tables for serial numbers generated before teh serial number window pops up.
    Also at the BADI 'WORKORDER_UPDATE->AT_SAVE' call the same function module because before this BADI call when you press 'SAVE' the program again checks if automatic serial number is set for that material and if yes then check if no serial numbers are generated then it generates the serial numbers again and fills the internal tables. So clear the internal tables again based on the conditions.
    In these BADI's we have access of header information which can be used to check condition.
    I hope this will give you better idea.
    Thanks for your efforts.
    Manan Desai.

  • Limit the number of open production order

    Dear PP experts,
    I am working on discrete scenario where client want to limit the number of open production order per work center. The more elaboration is like, for one work center the only specific number of production should remain open (e.g. 5 production order in assembly shop) when user is trying to open 6th production order system should restrict that.
    Does any standard functionality available in system or needs development?
    Regards,
    Shekhar

    Dear,
    You can do it with avilability check for materail and capacity.
    In OPJK do the for your production order type as no release if materail and capacity i missing.
    Hope clear to you.
    Regards,
    R.Brahmankar

  • Userexit for updating sales order user status based on Production Order

    Hi.
    My clients requirent is
    Sales order user status should get updated based on production order creation,GR for PO creation etc.
    Basically depending on PO & GR For PO,various user stauts in sales order should get updated.
    Can you please suggest me some userexits in PP for this requirement?
    I am a SD Consultant and not having much idaes about PP
    Thanks
    Nisha

    hi,
    if you are not going to update it in the SO..
    then you need different exits as those are different transactions.

  • Block Operation Number Change in Production order

    hello,
    How can i block the operation number change in production order if the operation status is CNF...?
    ie either disable the operation number cell or disable the entire row in the production order.
    rgrds
    Krishna.

    hi prashob
    i can't disable the column, as user need to insert operations in between
    AP, 
    I will check for this...
    regards
    Krishna

  • Plantwise separate number range for Production order

    Hello SAP Expert,
      I my project our client require plantwise number range for Production order,order Confirmation for indentifiction purpose .
       Please give way to do this.
    Thanks in advance.
    Regards,
    Yogesh.

    Hi,
    As per standard SAP not possible because Order types are maintain at Client level and not at Plant Level, but as Sukender said use Different Order Types for different Plants.But I guess user will face one problem often during Manual Production / Process Order Creation , and that is if they select wrong order type then face a problem like no Order type dependent Parameter set for required Plant.
    Regards,
    Dhaval

  • Batch Determination - Number of the production order

    Hi All,
    First of all i must say that my knowledge in this module is low. I am a FI, CO consultant but my administration ask me to check the following situation.
    In Production Orders we want to attrib to the batch number the number of the production order.
    Can we do that?
    Can you give some details about that?
                     Best Regards
                          João Fernandes

    Hi João Fernandes,
    If I understood clearly, you want the batch number for the production order to be same as the production order number.
    This is not possible in standard but can be achieved using the user exit (try SAPLV01Z).
    Tell your abaper to write a code in that to pick up the batch number same as the production order number.
    Regards,
    Narendra Bora

  • Number range for Production order

    Dear All SAP PP Gurus,
    I am new to SAP PP and want to learn about number ranges for production order.
    Can anyone tell me step by step procedure for creating & Assigning
    number range.
    Thanks in advance.
    Regards.

    Hi MIHIR,
    I just chkd the blog spot of MR Siva.
    It is very much self expalnatory.
    Siva ,pls update more documents in ur blog,it is very much helpful
    THNX all

  • Number Range for production order / Planned order

    Number Range for production order / Planned order depends upon what?
    Plant, order type, mrp controller??

    Dear,
    Number Range for production order :- Client Specific assign to the order type You can check in CO82 and OPJH.
    Planned order  :- Plant specific OPPQ or OMI2.  Number ranges for Manual creation - OMI3
    Hope clear to you.
    Regards,
    R.Brahmankar

  • BOM Explosion based on Production Order Creation

    Hi PP Guru,
    My client wants the BOM Explosion date to be based on Production Order creation date. Could you help to advise how to set-up this requirement?
    I have showed them these possible System Configuration in BOM explosion, but none of these options are applicable to their current business practice.
    <OPPQ> BOM Explosion:
         BOM explosion number/order start date
    1     Order start date
    2     Order finish date
    3     BOM explosion number/order start date
    4     BOM explosion number/order finish date
    Looking forward to you reply.
    thanks,
    John

    Hi Sundaresan,
    Thanks for your reply.  So do you think there's any other way to fulfill the client's requirement?  I was thinking to do the "PP Master Data" instead, in order to choose the date of explosion.
    Actually the scenario is this:
    Initially the Material XXXXXX has a valid BOM on 03.01.2011 to 12.31.9999, but then, some changes has been made, maybe the user has changed the component or added new component using 04.01.2011 to 12.31.9999 as validity date.
    For example, the user created the Production Order (manually in CO01 or from Planned Order conversion) on 03.20.2011 and the Order Star date is 04.01.2011, so the system will copy the updated BOM which is valid on 04.01.2011 to 12.31.9999 (based on Order Start date).
    However, the client wants to explode the previous BOM instead (03.01.2011 to 12.31.9999).
    Please advise.
    Thanks,
    John

  • Valuated Sales order stock with CO Production Order

    Dear All,
    Our clinet is manifatcuring cables and having  2 plants, for one plant we have configured PP module so we are arriving valuated sales order stock, for another plant we didnt configured PP module so we planned CO production order, but where as we are not meeting our ultimate goal i.e; valuated sales order stock.
    So please guide me how to arrive valuated sales order stock  with CO Production Order.
    Thanks & Regards
    Narasimham T

    Valuated sales order stock is not dependent on PP, so you should be able to still to use it.  The requirements class associated with the sales order item determines whether the item is valuated sales order stock and it also determines the valuation method.  If you do not have Boms and routings in this plant you can still value the line item based on the material valuation in the material master. You can also value it based on a unit cost estimate that can be created seperately for the sales order item.  Justt make the desired settings in the requirement class.
    thanks,

  • Assembly to order: change in sales order with change in Production order

    I want to activate change in the sales order data when a production order(which is created w.r.t the sales order) data is changed (Strategy 82 used); I have de-activated "No Update" for the corresponding requirement class 201; also the material for which SO created ,is not a part of any Delivery group.
    But when I am changing the production order (date/qty.), SO isn't getting updated accoringly.
    Please tell me the reason why it isn't happening!!

    Hi
    The sales order requirement can be made as the production order receipt once you save the order in the system.
    so it is possible to change the receipt according to the sales order reqmt if any changes made in the sales order,
    in every entry or changes in the sales order ( if you use the stategy 82) . in back end system explode the BOM and the create the production order as per the order reqmt,
    even while you do the changes mad in the sales and save that time sytem re explode the BOM once again and change the production order qty.
    but if you change the production order , system not re run or explode the BOM , Routing . such setting is not made in the system . so obviously updation will not happen for the sales order .
    Edited by: raj on Jun 9, 2009 11:22 AM

  • Costing affect with MRP at planned order level and after production order

    Dear all,
    How the costing affect with MRP at planned order level and after production order completion?
    Edited by: Maulik on Jun 24, 2009 1:59 PM

    Dear Maulik,
    check Mr. Vinod's inputs abt costing
    1. Maintain following master data:
    MM01 Material Master with Costing and accounting view. Make sure all the cost Std, Moving avg etc is maintained along with valuation class in Accounting view 1. In costing tab pls make sure "with qty structure" and "Material Origin" are ticked.
    CS01 BOM with components marked with costing relevance in Status/Long Text Tab. Also check all the qty are correct.
    CR01 Work Center in Basic data tab maintain standard value key sau SAP1 and in costing tab maintain the workcenter, activity type and formulas (Usually standard formulas like for Machine Hours SAP006, Labour SAP007, Setup Activity SAP005 is used).
    KL01 Cretae activity types, in basic data tab maintain ATyp Category AS "1" and cost element (as provided by your FI Guy).
    KP26 Activity pricing, here with the combination of Activity type and the cost center you assign price to the activity.
    2. SPRO Activity
    Maintain Costing sheet IMGControllingProd cost controllingProd Cost PlanningBasic settingoverheadsdefine costing sheet.
    OKKN Define costing variant, you define costing type (In the costing type, you define the purpose of a material cost estimate by specifying, for example, which field in the material master record the costing results can be transferred to like std price, moving avg etc), Valuation Variant (defines how the prices are prioratized), date control and transfer structure.
    3. Costing Process Flow:
    1. CK11N CREATE COSTING RUN
    2. CK24 CREATE PRICE UPDATE (You Mark and release the prce to be updated)
    4. COSTING VARIANT WRT PP
    1. OPL1 DEFINE COSTING VARIANT WRT PP
    2. OKK4 or OPN2 DEFINE VALUATION VARIANT
    3. OKK1 or OPM1 DEFINE COSTING TYPE
    4. OPL8 ORDERTYPE DEPENDENT PARAMETER (assign the above creted costing type for both planned and actual)
    Hope this will throw some light on product costing.
    Regards
    kumar

  • I would like to cancel my order, order no: AD001440537EU. Products ordered: Adobe Export PDF, Annual.

    I would like to cancel my order, order no: AD00144537EU. Products ordered: Adobe Export PDF, Annual. What do I have to do?
    Regards,
    Lányi Péter Pálné (Mrs)

    You are at the wrong forum; this is the Reader one. In any case, this may be helpful: Cancel your membership or subscription | Acrobat.com online services

  • Class for Purchase order item components and Production order components

    I'm looking for a some classes.   I'm very new to objects, so I could be searching for them incorrectly.
    The first class I'm looking for is a purchase order class that contains the item components.  I've looked at CL_PO_ITEM_HANDLE_MM and CL_PO_HEADER_HANDLE_MM.  I couldn't find components as a part of either of the classes.
    The second one I'm looking for is not as critical.  It is for the components for a production order.   I have a function module: BAPI_PRODORD_GET_DETAIL that gets the components for the order.  However, to take advantage of objects - I read somewhere - that if possible I should avoid calling a function module.
    Any help that you could give would be greatly appreciated.
    Thank you!
    Michelle

    Hello Michelle
    I do not think there are already classes available on ERP 6.0 for reading production order (yet I might be wrong...). However, regarding purchase order you are already on the right track.
    *& Report  ZUS_SDN_OO_READ_PO
    *& Thread: Class for Purchase order item components and Production order components
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1206523"></a>
    "& NOTE: Coding adapted from BAPI_PO_GETDETAIL1
    REPORT  zus_sdn_oo_read_po.
    TYPE-POOLS: abap, mmpur.
    PARAMETER:
      p_ebeln   TYPE ebeln  DEFAULT '3000000045'.
    DATA: gs_document    TYPE mepo_document,
          go_po          TYPE REF TO cl_po_header_handle_mm,
          gs_header      TYPE mepoheader,
          gd_tcode       TYPE sy-tcode,
          gd_result      TYPE mmpur_bool.
    data: gt_items       type PURCHASE_ORDER_ITEMS,
          gs_itm         type PURCHASE_ORDER_ITEM,
          gs_item        type mepoitem.
    START-OF-SELECTION.
    *  prepare creation of PO instance
      gs_document-doc_type    = 'F'.
      gs_document-process     = mmpur_po_process.
      gs_document-trtyp       = 'A'.  " anz.  => display
      gs_document-doc_key(10) = p_ebeln.
    *  object creation and initialization
    **  l_ebeln = purchaseorder.
      CREATE OBJECT go_po.
      CALL METHOD go_po->po_initialize( im_document = gs_document ).
      CALL METHOD go_po->set_po_number( im_po_number = p_ebeln ).
      CALL METHOD go_po->set_state( cl_po_header_handle_mm=>c_available ).
    *  read purchase order from database
      gd_tcode = 'ME23N'.
      CALL METHOD go_po->po_read
        EXPORTING
          im_tcode     = gd_tcode
          im_trtyp     = gs_document-trtyp
          im_aktyp     = gs_document-trtyp
          im_po_number = p_ebeln
          im_document  = gs_document
        IMPORTING
          ex_result    = gd_result.
    *  there was a problem in reading the PO
      IF ( gd_result EQ mmpur_no ).
    **    l_messages = l_handler->get_list_for_bapi( ).
    **    PERFORM return TABLES l_messages return
    **                          poitem poschedule poaccount.
    **    CALL METHOD l_po->po_close( ).
      ELSE.
        gs_header = go_po->if_purchase_order_mm~get_data( ).
        WRITE: / gs_header-ebeln,
                 gs_header-bukrs,
                 gs_header-bsart,
                 gs_header-lifnr.
      ENDIF.
      gt_items = go_po->if_purchase_order_mm~get_items( ).
      LOOP AT gt_items INTO gs_itm.
        gs_item = gs_itm-item->get_data( ).
        write: / gs_item-ebelp,
                 gs_item-matnr,
                 gs_item-menge.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe

Maybe you are looking for

  • Connection closed by remote host issue

    Hi , currently we are working on SuccessFactors PI integration. On the first test we got following error message on receiver Axis (soap) adapter. The certificates was imported to the trusted CA's. Any help will be helpful. Thank you, PM

  • Aperture 2.1.4 crashing

    To make a long story short, this is a brief of my ordeal, with conclusions at the end. a) Aperture 2.1.3 (+40.000 images library) + OS 10.5.8 Initial configuration a couple months ago. Running smoothly. Until I decided to upgrade the OS... b) Apertur

  • Not updating but iTunes sais different

    Hello, Im heading on a big trip tomorrow so I wanted to update my iPod. So when I go to do so everything looks normal, when I try to delete some video's and add others iTunes claims it has. However, when I disconnect my iPod nothing has changed. It's

  • LOV inline query

    Hello, I'm using version 2.0 and I've to create a LOV query like the following: select kev_name d, kev_nr r from TAB1 where kev_nr in (select event from CRMUP where crm_user = v('USER')) This query fails with the error message "LOV query is invalid,

  • Update quantity in preciding documents

    hi friends i am trying to create different orders whith refer to the preciding documents here i have one doubt if i create sales order for 100 quantity with refer to the contract (which is having 500 quantity )after creating sales order with refer to