IDoc creation on save and change of production order

I am looking for a way to create, and send if possible (if not I'll send with a batch job), on the save (creation and change) of production orders.  This will be a modified LOIPRO iDoc.  Currently we have a customer exit on the save of the production order but because it is before the save we must predict the number of the prod order.  This has worked but now we are creating one production order per line item in a sales order (automatically) so this is causing us to predict the same production order number twice.  We need a way to automatically create and send an iDoc for all production orders for given plants.  Right now the solution we are looking at is creating an output type and running through those output types a few times a day, sending them down to the Shop Floor system (proprietary system). 
Is there anything setup in SAP that we can utilize?
Regards,
Davis

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

  • 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

  • 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.

  • Find the user exit while creation and change of sales order

    Hi Team
    Below mentioned requirement , in which user exit i have to put below logic while creaion and change of sales order?
    u2022     The logic for the user exit to explode should consider the following assumptions and validations
    o     Customer master to have the entry at KNVV-KVGR1
    o     Material master to have the entry at MVKE
    o     UoM in the Sales order item (VBAP- VRKME) should be = Pallets PAL or tonnes (TES)
    o     Should have more than one line item or number of line items with UoM PAL or tonnes TES should be > 1
    for example :-->
    Product A with Scales mentioned below
    Product A     Quantity / Scale     UoM     Price(£)
         0-10     PAL/TES     20
         11- 20     PAL/TES     10
         21- 30     PAL/TES     5
         31-40     PAL/TES     2.5
         >41     PAL/TES     
    Product B with Scales mentioned below
    Product B     Quantity / Scale     UoM     Price(£)
         0-15     PAL/TES     25
         16-20     PAL/TES     20
         21- 30     PAL/TES     15
         31-40     PAL/TES     10
         > 41     PAL/TES     5
    u2022     Product A (qty 10PAL) + Product B (qty 15 pal) ordered in a single order with 2 line items.
    u2022     The expected results should be
    o     Product A qty 10 + B qty 15 added = 25Pal
    o     The system user exit should add the total number of pallets on the order line items and point towards the respective scales, so in this example prices against each line item should be the respective price against 25 Pal = 5£ for product A per pal and £15 for product B.
    Thanks in Advance.
    Puneet.

    Hi Team
    Below mentioned requirement , in which user exit i have to put below logic while creaion and change of sales order?
    u2022 The logic for the user exit to explode should consider the following assumptions and validations
    o Customer master to have the entry at KNVV-KVGR1
    o Material master to have the entry at MVKE
    o UoM in the Sales order item (VBAP- VRKME) should be = Pallets PAL or tonnes (TES)
    o Should have more than one line item or number of line items with UoM PAL or tonnes TES should be > 1
    for example :-->
    Product A with Scales mentioned below
    Product A Quantity / Scale UoM Price(£)
    0-10 PAL/TES 20
    11- 20 PAL/TES 10
    21- 30 PAL/TES 5
    31-40 PAL/TES 2.5
    >41 PAL/TES
    Product B with Scales mentioned below
    Product B Quantity / Scale UoM Price(£)
    0-15 PAL/TES 25
    16-20 PAL/TES 20
    21- 30 PAL/TES 15
    31-40 PAL/TES 10
    41 PAL/TES 5
    u2022 Product A (qty 10PAL) + Product B (qty 15 pal) ordered in a single order with 2 line items.
    u2022 The expected results should be
    o Product A qty 10 + B qty 15 added = 25Pal
    o The system user exit should add the total number of pallets on the order line items and point towards the respective scales, so in this example prices against each line item should be the respective price against 25 Pal = 5£ for product A per pal and £15 for product B.
    Thanks in Advance.
    Puneet.

  • Is there a method in labviewto dynamically save and change the monitor resolution under program control?

    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?

    vaidehi_joshi wrote:
    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?
    Have you already done this manually?  I've seen Labview scale front panels very strangely when changing resolutions...
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • BAPI for operation change in production order?

    Hi there,
    I want to change operation data in a production order and I can only find this BAPI:
    BAPI_ALM_ORDER_MAINTAIN
    Can this BAPI also be used for changing an production order? Because in the documentation of the BAPI this function isn't really mentioned...
    Can you give me some hints or the name of another BAPI doing this task?
    Kind regards
    Max

    yep it can be used for that, the documentation for this bapi is ( very unusual for bapis I know ) available
    call the bapi in se37. goto -> documentation
    I don't have an example for changing orders and operations but I use it to copy serviceorders (only difference between serviceorder and production order is that you can enter a customer at serviceorders)
    which are quite extensive with lot of operations and components and functional locations
    here my example for creation. for change I believe you also have to fill the UP structures accordingly to what you want to update
    kind regards
    arthur
    gs_meth-refnumber  = 1.
      gs_meth-objecttype = 'HEADER'.
      gs_meth-method     = 'CREATE'.
      gs_meth-objectkey  = c_init_ordid .
      append gs_meth to gt_meth.
      move-corresponding gs_meth to gs_ext.
      gs_meth-refnumber  = 1 .
      gs_meth-objecttype = 'PARTNER'.
      gs_meth-method     = 'CREATE'.
      gs_meth-objectkey  = c_init_ordid.
      append gs_meth to gt_meth.
      h_refnumber = 1.
      loop at gt_operations_i into gs_operations_i.
        concatenate c_init_ordid gs_operations_i-activity into gv_so_operation.
        gs_meth-refnumber  = h_refnumber.
        gs_meth-objecttype = 'OPERATION'.
        gs_meth-method     = 'CREATE'.
        gs_meth-objectkey  = gv_so_operation.
        append gs_meth to gt_meth.
        add 1 to h_refnumber.
      endloop.
      clear h_refnumber.
      loop at gt_components_i into gs_components_i.
        add 1 to h_refnumber.
        gs_meth-refnumber  = h_refnumber.
        gs_meth-objecttype = 'COMPONENT'.
        gs_meth-method     = 'CREATE'.
        concatenate c_init_ordid
                    gs_components_i-activity
                    gs_components_i-item_number
        into gs_meth-objectkey.
        append gs_meth to gt_meth.
      endloop.
      clear h_refnumber.
      loop at gt_texts into gs_texts.
        add 1 to h_refnumber.
        concatenate c_init_ordid gs_texts-activity into gv_so_operation.
        gs_meth-refnumber  = h_refnumber.
        gs_meth-objecttype = 'TEXT'.
        gs_meth-method     = 'CREATE'.
        gs_meth-objectkey  = gv_so_operation.
        append gs_meth to gt_meth.
      endloop.
    * gebruikte objecten cq functieplaatsen
      clear h_refnumber.
      loop at gt_objectlist_i into gs_objectlist_i.
        add 1 to h_refnumber.
        gs_meth-refnumber  = h_refnumber.
        gs_meth-objecttype = 'OBJECTLIST'.
        gs_meth-method     = 'CREATE'.
        gs_meth-objectkey  = c_init_ordid.
        append gs_meth to gt_meth.
      endloop.
      clear h_refnumber.
    if p_objrel = 'X' and gt_relation_i is not initial.
    * koppeling functieplaats met operatie
    * kunnen geen meervoudige koppelingen gemaakt worden in BAPI
    * dus hier 1 koppeling maken en na BAPI de rest aanleggen
      read table gt_relation_i into gs_relation_i index 1.
      add 1 to h_refnumber.
      gs_meth-refnumber  = h_refnumber.
      gs_meth-objecttype = 'OLISTRELATION'.
      gs_meth-method     = 'CREATE'.
      gs_meth-objectkey  = c_init_ordid.
      append gs_meth to gt_meth.
    endif.
      gs_meth-refnumber  = c_init_ordid.
      gs_meth-objecttype = space.
      gs_meth-method     = 'SAVE'.
      gs_meth-objectkey  = c_init_ordid.
      append gs_meth to gt_meth.
    * BAPI-call
      refresh: gt_ret, gt_numbers.
      clear:   gt_ret, gt_numbers.
      call function 'BAPI_ALM_ORDER_MAINTAIN'
        destination 'NONE'                       " --> Zie note 770626 !
        tables
          it_methods             = gt_meth
          it_header              = gt_header_i
    *       IT_HEADER_UP           =
    *       IT_HEADER_SRV          =
    *       IT_HEADER_SRV_UP       =
    *       IT_USERSTATUS          =
          it_partner             = gt_partner_i
    *       IT_PARTNER_UP          =
          it_operation           = gt_operations_i
    *       IT_OPERATION_UP        =
    *       IT_RELATION            =
    *       IT_RELATION_UP         =
          it_component           = gt_components_i
    *       IT_COMPONENT_UP        =
          it_objectlist           = gt_objectlist_i
          it_olist_relation       = gt_relation_i
          it_text                = gt_texts
          it_text_lines          = gt_text_lines
          extension_in           = gt_ext
          return                 = gt_ret
          et_numbers             = gt_numbers.
      call function 'BAPI_TRANSACTION_COMMIT'
        destination 'NONE'
        exporting
          wait          = 'X'
    *         IMPORTING
    *           RETURN        =
    *   Zie note 770626 ...
      call function 'RFC_CONNECTION_CLOSE'
        exporting
          destination                = 'NONE'
    *       TASKNAME                   =
        exceptions
          destination_not_open       = 1
          others                     = 2
    Edited by: A. de Smidt on Feb 26, 2009 5:20 PM

  • How track changes in production order which is already Read PP master data

    Hi Gurus,
    Due to some unavoidable reason my client has to do Read PP master data time and again, now my client having a requirement that want to see what has been changes in Production Order.
    We already created 1 report for that which tracks whatever has been changed in Production Order but having a constraint in it.  That It could not be able to distinguish to which order READ PP MASTER DATA done.
    So my query is how to map that in report. As sytem Status directly changed to CRTD phase.
    Any table which can track the changes once the order been through with READ PP MASTER DATA?
    As there are huge number of Production Order so we can go and open each order to see the Status changes in each and every order.
    Hope to get a reply soon.
    Regards,
    Sap User

    Hi,
    A suggestion:
    Change the specification as, log changes at each save instead of Read PP Master Data, as the changes would become effective only upon save. So if this is acceptable then 2 options, 1. Go with OCM feature or 2. Refer note - 390635
    Revert if you face any issues.
    Regards,
    Vivek

  • Mass change on production order (assembly type) to put deletion flag status

    Dear all,
    I've make a mass change on production orders to settle the status DLFL through the Tcode CO78.
    Some of the production orders  are "assembly order" type. Those could not be up-dated with the DLFL because there are linked to customer order. The customers orders are closed.
    What can I do to change the status for this kind of production orders. It is necessary for me to be able to put the DLFL status in order to improve the process of production closure done each month.

    Hi kiran 
    Thanks for the response. As I cannot put deletion indicator on the Assembly order directly, Do we have to put deletion indicator on the sales order item?. If so, Can we put a deletion indicator after the sales order was delivered and invoiced. What exactly have you guys done to put deletion flag on the production order.

  • Changing a production order with CLOI_CHANGES_UPL_31

    Hello All,
    I try to change a production order with the function CLOI_CHANGES_UPL_31 with RFC in .Net.
    The header data is working fine, and i can change the date with this function. But if i try to change the position data i got no message back, but the date is not changed. Is there any customizing to do? And what about the Field "METHOD"?
    Best Regards,
    George

    check the SUCC_CODE - suceess code field, is it configured properly?

  • Changes in Production Orders

    Hi gurus,
    I want to track changes made by end users in the production orders in a report format. Which will tell what was old value and what is new value.
    What needs to be done for this?

    Dear
    Changes in Production Order can be  traced through following ways :
    1.Order Change Management :
    Frist a Overall profile should be configured in SPRO > PRoduction>Shop Floor Control > Operations>Change Management for Production Orders-->Define Overall Change Profile.
    Create a Change Number CC01 with Release Key
    In Object Types select/tick "Actv", "object", "MgtRec",
    You get the Change Number by Saving .
    Use this Change Number to Change BOM or Routings
    Then Release the Change Number useing Release Key till then you don't find the Change of BOM in Production Order.
    Then go to Oder Change Process T Code :- COCM
    Tick Change Number and Select the Change Number & Execute
    Select the Production Order, click on Procurement element icon you get another screen select and execute again.
    You get an Pop-Up screen. "Determine changes, Check changes, Change Original Order.
    you see the changes in BOM for Production Order i.e. after COCM.
    Then Confirm the Changes in Production Order then New changes will be Active in production Order.
    Use COCM1 to find out the details or CO03--Extra --change
    Please check link  : http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPSFC/PPSFC.pdf
    2.To  get the changes in Production Order apply SAP Note 390635.
    3 .You can use T.code AUT10 to check the changes made to production orders in specified period.
    Regards
    JH
    Edited by: Jiaul Haque on Nov 28, 2010 2:11 PM

  • 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

  • Changes in production order/Process order

    Hi Experts,
    Very much hopeful that I will get solutuion of below:
    How or where to see changes done in production / process order.
    e.g Suppose I have created one production order. Then release it in CO02. Then I changed order quantity from 100 to 200 ( Earlier it was 100 ). Then I delete one BOM component from order. Then I changed finish date of order.
    Pls tell me how to track these changes. What configuration need to track these changes. Please tell me step by step procedure.
    I have read related thread in sdn itself but not satisfied.
    Please help.
    Regards,
    Vipul

    Hi,
    For tracking in changes of Production / Process Order, you need to activate Order Change Management (OCM). After activating the same, you can view changes of Production  order in CO02 / CO03.
    for more details of OCM go through following link :
    [Order Change Management (OCM)|http://help.sap.com/saphelp_erp60_sp/helpdata/en/a5/63198843a211d189410000e829fbbd/frameset.htm]
    Hope this helps.
    Regards,
    Tejas

  • 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

  • No entry in CDHDR & CDPOS for change in Production Order

    Hi,
    I am unable to get entries in Tables CDHDR & CDPOS for any change in Production Order. Actually I need the Number of times a Production Order has been changed. Please help on this.
    Cheers
    Abhishek

    You can trace the below navigation so that you will get good idea :
    goto CO03 -> enter production order # -> enter ->goto -> change management
    Thanks
    Seshu

  • Component number change in production order

    hi experts,
              i want to know tat any standard bapi is available for change in production order
    regards ,
    vinodh.M

    hi gaurav,
              thanks for ur response,i want to know how to use this bapi,any sample coding is there

Maybe you are looking for

  • Strange noise from my new mac pro

    Bit of a silly question: my Macbook Pro keeps making these short 'whooshing' sounds, but I just can't figure where they're coming from, or why they're happening. I notice these when I have just my browser and/or iTunes running. It's from some softwar

  • How to export an archive query?

    Hi, I created an archive and I did a bunch of account mapping in my DEV, I was wondering if there's a way to run this same archive (import/export) query in my other system so i don't have to do all that mapping again there?, is this possible? (the co

  • Can't get networkAffiliations in flex Facebook app

    I followed the tutorial here: http://www.adobe.com/devnet/facebook/articles/build_your_first_facebook_app_04.html and didn't have any problems and it lists most of the user data, however, I could not get the user's networkAffiliations info. It comes

  • Logic Pro 9.1.8 keeps crashing

    Hi everyone, my copy of Logic Pro keeps crashing. It loads for a few seconds and then crashes with an error message. Sometimes this: Crashed Thread:  7  com.apple.audio.IOThread.client and other times this: Crashed Thread:  20  com.apple.appkit-heart

  • Suppress Information message during submit a standard program

    Hi experts, I am calling standard program RCATSCO from a report using following code: SUBMIT rcatstco WITH p_pernr  IN s_pernr                   WITH p_date   IN lt_r_date                   WITH p_belnr  IN s_belnr                   WITH s_rkdauf IN