Change components and Routing of production order

Hi, experts, I have such requirement that change quantity of a component or add a component, add a operation into current routing.
I have look up answer, but can not find the right one.
BAPI_PRODORD_CHANGE only can change header data.
BAPI_ALM_ORDER_MAINTAIN seems can not change production orders, it is for service orders.
CO_XT_ORDER_CHANGE will assign a new  routing number and a new bom number.
Could somebody give me some FM and BAPI for reference? Thanks in advance.

Hi Rick,
Follow the below sample steps for changing component quantity:
DATA:
    l_methods TYPE bapi_alm_order_method,
    it_boperations TYPE STANDARD TABLE OF  bapi_alm_order_operation_e WITH HEADER LINE,
    it_components TYPE STANDARD TABLE OF bapi_alm_order_component_e WITH HEADER LINE,
    it_components1 TYPE STANDARD TABLE OF bapi_alm_order_component WITH HEADER LINE.
1. Call BAPI :BAPI_ALM_ORDER_GET_DETAIL , it will give existing order component details.
CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'
    EXPORTING
      number        = <production order number>
    TABLES
      et_operations = it_boperations
      et_components = it_components
      return        = it_bapiret2.
2. Move it_components to components table compatibel to BAPI "BAPI_ALM_ORDER_MAINTAIN".
LOOP AT it_components.
MOVE-CORRESPONDING it_components TO it_components1.
_*"Note here while moving change the component quantity"*_
APPEND it_components1.
CLEAR it_components1.
ENDLOOP.
3. Build the methods table for change production order :
it_methods-refnumber = v_refnumber.
            it_methods-objecttype = 'COMPONENT'.
            it_methods-method = 'CHANGE'.
            it_methods-objectkey = v_objectkey.
            APPEND it_methods.
"Note v_refnumber has 1 to 1 relation ship with the components table, if you want to change First component in it_components1 then you have to enter value '1' here for v_refnumber.
it_methods-method = 'SAVE'.
        APPEND it_methods.
4 . Call
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
          TABLES
            it_methods   = it_methods
            it_component = it_components1
            return       = it_bapiret2.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Similar Messages

  • Change input quantity of a production order in SAP - PP

    Hello,
    I am working in a custom code where one of the steps is to create production orders basically based on a product, workcentre and quantity for what I use 'COXT_BAPI_ORDER_CREATE' function module.
    Now I have a new requirement which is to be able to change the input component quantity to a different value than the output (similar to what you can do in transaction CO01, and like what the on-line help claims you can do).
    This new value should be on top of the ratio that is possible to specify in the BOM (i.e substract 5000 KG to what ever is in the input node after creation of the order).
    The GUI allows for this so I assume there is a way to do it in custom code as well, but has not find the way to do it or function to call.
    Can you advise on how to change the input quantity value without affecting other info of the order?
    Thanks
    Regards,
    Update: found this other thread Change components and Routing of production order
    Edited by: Mauricio Pego on May 3, 2011 6:00 PM

    Hi,
    The requirement can be met via BADi - MD_DISPLAY_ELEMENT (method - CHANGE_MDEZX_EXTRA).
    Give the specification your technical person & the same can be done.
    Regards,
    Vivek

  • All default routing value has to be changed, while changed the work center in production order

    Dear friends,
    our client they want to change the work center in production order.according to production version work center also they are changed.so while change the WC,all the default value has be changed as per routing what we maintained in routing.At present we have to enter the manually change the W.C as well as set up time and operation time enter manually.Any other option to do the automatically capture value from routing while change in Work center in production order.pl help me on this.
    Thanks&Regards
    Sabhapathy R

    Hi Rahul,
    Thanks for reply. I am maintained in diff value  maintained routing , Ex :First routing i have  work center 'X' value maintained as a setup time in 15 Min's and operation time 10 Min's
    second work center 'Y' I have maintained as set up time 10 Min's and operation time 30 Min's,
    Now I want to change the work center in production order as a 'Y' so whatever value maintained in routing , it has to be changed automatically (10 min's and 30 Min's), but system will not change only old value only picked (15Min's AND 10 Min's).
    Now I think you get to know what the client requirement, kindly do the need full.
    Regards,
    Sabhapathy R

  • How to change the status of a production order

    Dear All,
    May i know how to change the status of a production order.I want to de-active the status like OPGN (Operation generated).This status is updated as there was no routing assigned to that particular production order during its creation
    Thanks and Regards,
    Varun Siddharth

    Dear,
    When you create a production order, an operation created by the system is generated automatically if no routing is used for the creation. As a result the order header receives the status HOGAN; the operation created automatically also has this status.
    If you delete the operation created automatically and then do not have the status HOGAN.
    To avoid this maintain the Routing for the material or delete the setting of default operation from OPJG.
    Regards,
    R.Brahmankar

  • How to select the correct routing for production order?

    In table PLPO i have 4 different group numbers for a particular routing. I'm wondering how a production order, created in CO01, selects which one to use. Our base quantity is dz/hr. When I create an order for a particular material, it shows up as 290 as the base quantity. The group 1 is 400dz/hr, not 200. Why does the order choose this group number and not the group number 1.
       Here is a screen from PLPO table.
       Here is a screen showing the material master.
       This is an image of the order details within the created order.

    PLPO contains operations
    The planselection would be based on PLKO entries.
    Please check online help to first get a better understanding on how routings are selected.
    Routing Selection - Production Orders (PP-SFC) - SAP Library   
    Automatically Selecting a Routing - Production Orders (PP-SFC) - SAP Library
    Definition of Base Quantity for Operation:
    "Quantity of the material to be produced to which the standard values of the
    operation refer"

  • Confirmation and GI in production order

    Hi all,
    I need help in regards Confirmation and GI(261 mvmt) for production order.
    My requirement is....
    I want to do one development in which i will be giving production order as a input in selection screen.
    Once I give production order as input, confirmation for operarion 0010 and GI for components assigned to 0010 operation
    should happend in background.
    So is there any function module which I can call to do confirmation and GI for that production order..??
    Kindly help.

    Hi,
    I dont think there's any function Module for your requirement. You can take help from the ABAPer to write a code / BDC.
    In the code, call the transaction CO11N and pass the value that you are entering in the selection screen (Order number). You can hard code the Operation Number (0010) depending upon your requirement.
    Then call MB1A and pass data based on components view of the production order. Fetch data from RESB table.
    ABAPer would help you out on this. Try and revert.
    Hope that helps.
    Regards,
    Rohit.

  • Different GL accunts during GR for PO and GR for production order

    Hi
    For posting GR for PO and GR for Production order we use movement 101 only then how we can define or e different GL accounts for both the transactions ?

    Hi,
    As per my undestanding
    If you want to hit different GL for same material type for e.g. GR for PO and GR for Production order.
    you can define split valuation, Suppose material A has two Split valuation External Procurement or Inhouse Production.
    Now For valuation type External Procurement assign valuation class 1000 and for Inhouse Production 2000.
    Now in GBB for valuation modifier BSX assign two separate GL
    Like
    GBB     BSX     1000           120000(External Procurement)
    GBB     BSX      2000           130000(Inhouse Production)
    Solution 2 :-
    Define other movement type for Production create and create a new event key and assign GL to that one.
    Hope HElp U !
    Regards,
    Pardeep Malik

  • System status for IDOC creation and processing for production orders

    All
    I am creating IDOCs for production orders to send requirements to an external WM system for kitting execution.
    I need to know whether there are any system statuses to notify me when an IDOC has been created,failed and processed. If not, how do I go about creating user defined statuses for these statuses.
    Second question, which idocs should I use to confirm, teco and cancel the production orders from an external system?
    Thanks
    Evan

    HI Evan
    u can use the standard program - RBDMOIND scheduled in back ground to update the Idoc staus ,
    this helps to update the IDoc Status from
    '03     Data passed to port OK  '  to
    '12     Dispatch OK'
    status 03 indicates the IDoc is successfully transmitted to Communication Layer and the Status 12 helps to confirm the data dispatch to the receiving port.

  • Mass change final issue indicator in production order

    Hi
    Is there any report can show final issue indicator for all production order? How can I mass change the indicator?

    Hi,
      In reports such as COOIS and COHV you can select in the initial screen "List: Components" and check your "Change layouts" to view the report with the "Final Issue" indicator.
    But you cannot do a mass change in this option. One way is : You can just select the particular order -> goto Component Overview of the order to be changed and do the necessary changes and save to get the required result.
    -Thaila Shree

  • Alt bom components with ATP check - production order resets usage prob.

    Hello,
    I have searched many threads for this answer.  Here is my scenario
    BOM for finished good X  has the following components
    Component   |    Usage Prob   |    Strategy    |  Alt Item Group   |   Priority
    A          |             55%         |         2         |         1             |              1
    B          |              45%        |         2         |          1            |               2
    When I create the production order for 100 units, components A and B are proposed respectively (per usage probability, as expected)   - like so
    Production Order 
    Component A = 55 units
    Component B = 45 units
    Here is the requirement - Component B at any given time is restricted by federal law to not be used for material X for more than 45% of its make up. Therefore my client cannot build X with more than 45% of component B.  However, we always want to use at most 45%.  IF component B is not available, transfer all or partial confirmation to Component A.
    Issue:
    ATP and usage probabilities will not work.  Whenever I run ATP check for production order, the component with the highest priority get all the reqirements (if inventory permits).  The production order master data is 'reset' by the ATP check (the usage probability on the component will change from 45% to 100%)
    Any help is greatly appreciated!
    ~S
    Edited by: futsol on Jun 29, 2009 10:41 PM

    futsol ,
    Maintainance is not required, it say manual maintainance is possible if required.
    if you set it 1 system will check the proportion and do the reservation accordingly , if even in production order if you check availabity it will not change the quantity proportion, if its 2 , its meant for alloting the 100 % available component.if A is not 100% available it will replace it with B , if B is availabe to cover total quantity and vice versa.
    by giving 1 it gives you option to change proportion as per your wish , if the any of the alternative is not available to fullfill rerquirement., for example in your case component B , if its available you want to use it 45% all the time , but if its not availabe the you can change the proportion or quantity for A in that specific production order only.
    I dont know if there is any other way.
    Check again with strategy 1 .
    Hope it helps you .
    Regards
    Ritesh

  • Mass change of work center in production order

    Dear All,
    Is it possible to mass change work center in production order, i.e. i have around 100 production order of which i have to change the work ceter assigned in particular operation .
    Thanks and regards
    Manish

    Hi Manish,
    If you have not posted any activity or goods to the production order, then in header click on Functions -> Read PP Master Data.
    The order will now read the routing with the new work centers, provided the same has been changed.
    If you have posted some activities or goods movement done, then its a manual process.
    Hope the above answers your query.
    Regards,
    Vivek
    Added
    If in case you have posted some goods or confirmed some activity, check if you can reverse the same, re-read the routing & then post back the goods.
    Edited by: Vivek on Feb 24, 2009 12:22 PM

  • Alternative selection of routing in production orders

    in routing there are 4 operations
    operation   descriptions                                      work centre
    0010        ONE SIDE CENTER GRINDING            A
    0020        ROUGH MAJOR DIA.GRINDING            B
    0030         FINISH MAJOR DIA. GRINDING            C
    0040         ROUGH/FINISH THREAD GRINDING     D
    operation 0020 & 0030 having alternate routing for for different work centre sayE & F resp.
    now, i want solution/setting  for automatic selection in the production order of alternate routing of E for B & similarly alternative of F for C resp.
    if anser is not possible then please give other alternative
    regards,
    mangesh

    H Mangesh,
    In R/3 capacity of resources will not be checked while creating both planned order and production order. Thats why you have option of APO-PPDS for more accurate planning across plants with complete capacity check.
    You should design your routing with approperaite work centers to carry out manufacturing tasks and with this lot size criteria only autmatic selection of work centers are possible.
    Otherwise you have to do changes manually in production orders. For this create alternate routings and order dependent parameters checked the indicator "alternate routings are allowed".
    Regards
    TAJUDDIN

  • Automatic goods issue of components upon creation of Production Order

    Hello gurus.
    The business would like to have the components in a Production Order automatically issued (with Movement Type 261) upon the creation of a Production Order.
    I was investigating this possibility under the Production Scheduling Profile option in IMG, but there is no automatic action for this.
    Do you know of another way this could be achieved? I'd like to do this preferably without having to implement User Exits or Batch Jobs.

    Fernando,
    Automatic goods issue is not possible.
    But you can certainly think of backflushing the components while confirming the order with CO15 or CO11N.
    Make the required settings in material master, work center or routing. It will get copied to the order.
    The same can be maintained in the order too.
    There is one more option available in 'Define confirmation parameters' T code OPK4.
    Execute the above T code.
    In 'Generally valid settings', mark 'All components' under 'Goods moveemnt'.
    Also in 'General individual entry'  under 'Error handlings/ logs' mark ''Goods movement'  & if required mark 'Termination for incorrect goods movement' so that if any problem arises with the GI/ GR, the termination would be terminated.
    Hope this helps you.
    SmanS

  • Change Mrp Element Data of Production Order in MD04

    Dear guru ,
    In the mrp element data of the stock/requirement list for the production order I see the
    Production order number , the order type , and the system add /RE if production order is released or
    /PD if production  order is partial delivered. No other information about others production order status.
    How can I change mrp element data using Customizing or ABAP in order to recognize in MD04 if production order is confirmed or partial confirmed ?
    Thanks.

    Dear Cris ,
    I am not sure if CNF/PCNF will show up in the MRP Element data in MD04.I have checked PO which are also CNF/PCNF and i looked the same order in md04.It is not showing .U may need some ABAP help .
    But if you really intersted to see the list PO status together , then go to COOIS and give plant , order type .It will give you all the order under that plant irrespective of material and also Status.U ave lot of option to filter the PO status under Status Profile or System status ok.
    Hope this will fullfill your requirement
    Reward point if useful
    Regars
    Jia

  • Change Alternative Item Quantity in Production  Order BOM

    Hi Gurus,
    I woould like to ask how can I make the Alternative item quantity to become editable. As of now, the system will calculate the percentage in the BOM and default it in the Production order.
    Now I have a requirement that in the Production order Change, the user can change the quantity of the Alternative Item based on the situation with out changing the BOM. Just change in the production order. What settings do i need to change?
    Thanks,
    Raymond

    Hi,
    Can you let us know why you want the user to make the changes manually ?
    Not in front of the system at the moment, but just do an Av. Check to see if you're able to get the switch if the stock situation has changed for the alternative items.
    Based on what i know, the field will not be editable & there is no specific setting to make it editable.
    Regards,
    Vivek

Maybe you are looking for

  • TS4006 my ipad is stuck with back up to icloud message, it wont do anything, any ideas ?

    Hi Can anyone help me, my ipad is stuck with an onscreen message,,,,, icloud backup, your machine has not been backed up in three weeks etc etc can anyone help me to lose the screen, I am plugged in, wifi working and the screen is not doing anything

  • Planning function in process chains.

    Hi there Can we include a planning function in a process chain directly or it needs to be via Planning sequence. Thanks Sarah

  • Command Line echo problem

    Hi there, So i have a little problem. I have a short code that i want to log, but the logfile must have redirection characters like these : < and > wmic qfe list brief /format:texttablewsys > "c:\wmic.txt" So i added this: echo ^<log^> >>c:\wmic.txt

  • JMS Bridge from 10MP1 to 92MP3

    My bridge is on a local server 10MP1, the bridge destination source is a queue on the same server and the target is on the 92MP3 one and also on the localhost. I get the following issue: << eis/jms/WLSConnectionFactoryJNDINoTX > ResourceAllocationExc

  • During Foreach read another foreach - PLZ HELP!

    Hi all powershell gurus out there. I have a foreach which opens a URL from URLListl.txt and doing a Measure-command on them. The result from Measure-command writes to event-log.  In another text file i have country list, like: USA Canada Brazil and s