Applying user exit PPCO0007  Exit when saving production order

Hi,
I need the Production Order no. generated when above exit is called. Please suggest.

Hi,
Try with the Method: IN_UPDATE
This is the documentation:
IO IF_EX_WORKORDER_UPDATE        IN_UPDATE
Short Text
Save Order Time: Update
Functionality
This method is executed during the update after the order is saved.
Parameters
All tables relevant to orders of all the orders processed within this
transaction (also cross order type) are transferred. A table containing all
changed records is transferred for each order object and a table *_old that
contains the original state of the changed records when the transaction was
started.
To differentiate between different order categories, evaluate the "AUTYP"
field in the order headers.
To determine which actions were carried out on the individual objects of an
order, you can evaluate the update indicator in the individual tables. In the
different tables, the update indicator is called "VBKZ" (exceptions:
IT_PMPARTNER-UPDKZ, IT_PRT_ALLOCATION-MODKZ, IT_MILESTONE-VBKZ_MLST or
IT_MILESTONE-VBKZ_MLTX) and can contain the following entries:
"I": Insert
The data record is written to the database again. No *_old
entry exists
"U": Update
The data record already exists in the database and has been
changed in the transaction. An *_old entry exists.
"D": Delete
The data record already exists in the database and is to be
deleted. An *_old entry exists
The data record exists in the database. No changes have been made in
the transaction. An *_old entry exists.
Notes
Note that the method is carried out in the update process. In particular, no
dialog is possible, no messages may be sent and no database commit may be
executed because otherwise an orderly rollback is no longer possible.
Kind Regards,
Mariano

Similar Messages

  • User Exit or BADI  when saving Internal Orders

    Hello, I need a user exit or BADI when saving a Internal Orders to shoot a workflow
    REGARDS
    Dayana

    Hi
    Why do you need a user exit or BADI.
    Create a Custom Business Object(SWO1) and Create a New Event(SW01) and link it to the B.O. Or you could also create a CO Validation and use it for triggering a Validation and as a last resort you go for User Exit or Abap code.
    Check if you have some workflow expertise in your tech team and you should be fine.
    Thanks,
    Praveen

  • User exit not active when saving sales orders

    while creating a sales order (VA01)   i need  to update  the  storage location  based on  division . for this the badis  and user exits  are not triggering   while creating a sales order for the above requirement
    any solution........
    <removed by moderator>
    thanks in advance..
    <Subject edited. Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]>
    Edited by: Mike Pokraka on Aug 7, 2008 8:38 AM

    JVP,
    MV45AFZZ this is the include which is trigger while creating SO.
    use  FORM USEREXIT_FIELD_MODIFICATION   to write code.
    your code look like if sy-tcode = 'VA01'.
    update field.
    endif.
    Amit.

  • Which user exit can be use before production order creating?

    which user exit can be use before production order creating?
    i want to check AFPO data,then show error message before production order creating.
    1.i try to use PPCO0001( enhancement when saving the order) to check AFPO data, then show some error message,sap system will generate a abap down error.
    2.i try to use PPCO0007(Exit when saving production order),
    i can show error message,but i can't check AFPO's data.

    Hi,
    You can access AFPOD structure using field symbols.
    Try below mentioned code in routing:
    constants: c_afpod TYPE char30 VALUE '(SAPLCOKO1)AFPOD' .
    FIELD-SYMBOLS: <fs_afpod> TYPE ANY .
    data: wa_afpod TYPE afpod.
    ASSIGN (c_afpod) TO <fs_afpod>.
    wa_afpod = <fs_afpod>.
    Then later you can use wa_afpod in exit PPCO0007. Hope this will work for you.
    Sumit

  • In VA02 transaction which exit is triggering when saving the data

    hi all sap gurus,
    In VA02 transaction which exit is triggering when saving the data

    Hi Reddy,
    The <b>user exit</b> and badi tried for this transactions are
    V60F0001                SD Billing plan (customer enhancement) diff. to billing plan
    V46H0001     SD Customer functions for resource-related billing
    V45W0001     SD Service Management: Forward Contract Data to Item
    V45S0004     Effectivity type in sales order
    V45S0003     MRP-relevance for incomplete configuration
    V45S0001     Update sales document from configuration
    V45P0001     SD customer function for cross-company code sales
    V45L0001     SD component supplier processing (customer enhancements)
    V45E0002     Data transfer in procurement elements (PRreq., assembly)
    V45E0001     Update the purchase order from the sales order
    V45A0004     Copy packing proposal
    V45A0003     Collector for customer function modulpool MV45A
    V45A0002     Predefine sold-to party in sales document
    V45A0001     Determine alternative materials for product selection
    SDTRM001     Reschedule schedule lines without a new ATP check
    <b>Business Add-in</b>     
    BADI_SD_SCH_GETWAGFZ     Scheduling Agreement: Read WAGFZ from S073
    BADI_SD_V46H0001     SD Customer functions for resource-related billing
    <b>Reward pts if found usefull :)</b>
    Regards
    Sathish

  • Direct production order when saving sales order.

    Hi,
    How to create a production order from sales order.ie. When a sales order is saved production order automatically created.
    Thaks and regards
    Harish

    Hi
    For the product that you need to have the production order once the sales order is saved
    Maintain the planning strategy     82     Assembly processing w. production orders  in material master / mrp 3 view
    So once the sales order is created, system automatically do the bom explotion and availability check, routing in background and create the Prodcution order.
    so in Md04, you can see the production order for you sales order qty.

  • Auto Material & Capacity Availability check when releasing Production Order

    Dear Experts,
    Is there any configuration in Production Planning that will automatically check material availability and capacity availability automatically when a Production Order is released?
    Meaning to say, users will not need to manually click on the Check Material Availability and Check Capacity Availability button.
    Please advise.
    Thanks in advance.

    Hi,
    I've solved the problem. Just maintain the config in transaction OPJK.
    Thanks

  • Base unit of measurement while saving production order

    Hi
    While saving production order I am getting following problems:
    "Material has no base unit of measure"
    Whereas UOM is there, I also can see that as soon as I  enter qty while creating the order. System automatically prompts the UOM.
    I also donot find any problem in MRP run, planned order creation etc
    So what can be the problem?
    Edited by: BNR on Nov 24, 2008 5:22 AM

    Dear,
    It may be data base problem as you are getting this problem fequently so please check with Basis person.
    Have you defined the any production unit in both material master WS view & in routing or any other alternative unit of measurement please check?
    Regards,
    R.Brahmankar

  • Error when creating Production Orders: -5002 Invalid Code  [OWOR.Status]

    When creating Production Orders, I receive the error: -5002 Invalid Code  [OWOR.Status] on certain of the entries. Typically 200 orders are created at once.
    What could be causing the error?

    You may check this thread to have a reference:
    Setting the repByIns to Null
    Thanks,
    Gordon

  • Error KO115 when closing production order

    Hi all,
    when I close the production order, I get the error message:
    Balance of ORD 3331403 is not zero
    Message no. KO115
    The cost balance for this order is 3000 USD.
    We are doing a monthly settlement.
    When the production order has status NOT TECO and NOT DEL, the KKAX shows 500 USD and the KKS2 shows 0 USD.
    When the production order has status DLV, KKAX and KKS2 both show 0 USD.
    COFC and COGI are empty.
    How can we close the order?
    Thanks
    Anne

    Dear Anne,
    check in KKBC_ORD, whether order is carrying any cost or not
    if it is showing balance then you cannot close
    first calculate, overheads, WIP, Variance, then settlement of order
    Then check the result
    Regards
    Madhu

  • I need a Badi that is triggered when saving Sales order in both Va01 and Va

    Hi
    I need a Badi that is triggered when saving Sales order in both Va01 and Va02
    I tried with the following BADI's
    BADI : BADI_SD_SALES
    Implementation : /BEV1/SR_SALES_ORD_1
    Method SAVE_DOCUMENT
    Now when i want to put my peice of code in this (SAVE_DOCUMENT) method.
    It is asking for Access key. Which i do not have.
    Should i create a implementation and then create a method and then put my code there?
    Anybody plz help.

    You will probably not find a BADI to suit your needs.  However if you look at include program MV45AFZZ you should find two subroutines:  USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT.  You can put the code you need directly into these subroutines.  If these have not been changed yet on your system, you will need an access key to make these changes.
    Please read the documentation in the header of the subroutines for furtner information on when they are called.
    Best Regards,
    Chris H.

  • FOR MTO & MTS scenario when the Production order shows the Sysy status DLV?

    Hi ALL,
    In the MTO & MTS  scenario when the Production order system status become DLV ?
    Regards
    Satish

    Hi Satish,
    For both the planning strategies (MTO/MTS)..
    The status of the production order becomes DLV ,
    when you do GR for the order with 101 movement type.
    (OR) 
    At the time of final confirmation if automatic goods receipt is activated.
    Regards,
    Anil

  • User exit when save production order

    Hello,
    I have to fill the OVERHEAD KEY field value in production order header at runtime based on some calculation. So I need a user exit which can be used to save the value of overhead key.
    I already tried the exits PPCO0001, PPCO0007, PPCO0006, PPCO0012, and PPCO0018 but these all are not working for me as I am trying to insert or change the value of Overhead key(ZSCHL) but at the last value is not changing at all .
    Please suggest me if you have any solution.
    Thank you in advance!!!
    Rock,

    My question was:
    I need a user exit, using which I can change the value of overhead key at runtime.
    suppose I am creating a production order with a sales order (CO08), and overhead key value is NULL currently.....but at the time when I save that production order based on sales order type I have to enter the value of overhead key.....for that I need a user exit where I can change the value of overhead key
    at runtime.
    I already tried the exits PPCO0001, PPCO0007, PPCO0006, PPCO0012, and PPCO0018 but these all are not working for me as I am trying to insert or change the value of Overhead key(ZSCHL) but at the last value is not changing at all .
    Please suggest me if you have any solution.
    Thank you in advance!!!
    Rock,

  • User Exit/Dynamic Actions when saving Business Event

    Hi,
    In Training & Event Management, is there such a thing as a user exit/dynamic actions that will be invoked when saving a Business Event?
    Thank you.
    Regards,

    Hi
    Please check out the following Business Add in
    RHPV0001
    HRTEM00MASTERDATA 
    HRTEM00NET_ACTIVITY
    HRTEM_HANDLE_BOOKING
    Reward points, if helpful.
    regards
    waz

  • User exit or BADI while saving purchase order

    Hello,
    I want to use an user exit or BADI while saving of purchase order. The objective is to check the material group of the line item while saving. We don´t want to allow to save purchase orders for one material group.
    Can you please guide me.
    Thanks
    Srinivasan

    Hi
    The Business Add-In (BAdI) ME_PROCESS_PO_CUST enables you to extend the business logic of the Enjoy purchase order on an individual basis.
    You can thus influence the dialog transactions ME21N, ME22N, ME23N, and ME29N, and the BAPIs BAPI_PO_CREATE1 and BAPI_PO_CHANGE.
    Typical applications for this BAdI include:
    Processing of own objects
    Processing of additional data on standard objects
    Implementation of additional checks and derivationsChange of data in standard fields
    Change in field selection
    you can use this BADI for checking the material group
    Thanks & Regards
    Kishore

Maybe you are looking for