Need to generate an IDOC when production order is released.

Hello all,
I have a requirement is to extend the IDOC(LOIPRO01), i've extended the IDOC, it needs to be created while releasing the production order in transaction co02, and i am unable to generate it, pls guide me how/where to generate idoc in
Thnak you,
Krishna

Hello Alok,
Thank you for your prompt response...
I made user of PPCO0021, in this enhancement i have used function module CLOI_MASTERIDOC_CREATE_LOIPRO to generate IDOC, and i have released production order through transaction CO02, and it gave me short dump.
Dump summary is that, commit work is called before save.( commit statmetns should not be used in exits).
I have analysed, and noticed the commit work statement is there inside the fm CLOI_MASTERIDOC_CREATE_LOIPRO , and PPCo0021 triggers when i hit on the save icon.
Please guide is there any way to avoid this dump and to make use of exit. Is there any other procedure to generate IDOC ?
Thankyou,
Krishna K

Similar Messages

  • Generate DELVRY  Idoc when Post goods issue is done in SAP

    I need to generate an Idoc when post goods issue is done in SAP (outbound to SAP) .I understood that I can do this using the message control .The message type DESADV with the process code DELV will support this.
    But I didn’t understand how to trigger the Idoc.In the current scenario our Company is doing the post goods issue in SAP for the in three different ways.
    1.Manually doing the post goods issue through the transaction VL02N
    2. an Inbound Interface (using Idoc)  which will do Post goods Issue in SAP
    3.Another Interface using BAPI, which will, do post goods issue in SAP
    I have to run my outbound interface when the post goods issue is done by all the above three ways.  Can any one help me out in this?

    You have to configure the output first .
    You can use output type LAVA ( avaialble in Std SAP ) .
    ( Tcode is NACE , Select Application V2 -> Outputtypes ).
    ( Create condition records suitable to generate an output)
    Next is ALE.
    Setup a distribution Model ( for DESADV ) and all other setup for ALE i.e. Distribute Dist. Model / Generate Partner Profile .
    In the Partner profile in WE20 select your partner system. Double CLick on Outbound Message DESADV ( this wd be there after you generate partner profile , if not add it here in outbound ) . On this screen goto tab MESSAGE CONTROL .
    Application - V2
    Message Type - LAVA
    Process Code - DELV.
    Now you are ready to go. The moment a PGI is done in any form an output LAVA would be proposed and processed using process code DELV.
    Cheers.

  • Need to Trigger a Idoc when save IE01 T-Code

    Hi all,
    I need to generate a Idoc when i saved IE01 transaction code.
    Pls let me know the procedure.
    And also relevent IDOC .
    Regards,
    Ramesh.

    Hi,
    - You need to use basic Idoc type EQUIPMENT_CREATE01 for creating Idoc at equipment creation.
    - Use change document concept for extraction based on Change docs created..For this you need to activate change doc creation for equipment category in questions. Use of JCDS and like tables to be used for picking up change docs during extraction.A logic to be build to pick up change docs since last interface run,this will ensure only new equipments via change docs will be included in new idocs.
    - A batch job to be scheduled whic will run at desired frequency to push newly created equipments to external system. You can make use of immediate data transfer or collecting Idocs and then sending at required time.Take help of technical person on this
    regards,
    atul

  • Need to generate 2 idoc"mapping issue"

    Hi Experts,
    When the Purchase_order_type is coming like HIGH,REGULAR,NEW,BOUNCED. In this case i need to generate 2 idoc, based on HIGH is one and Other than HIGH is one, even though if it's REGULAR,NEW,BOUNCED.
    I can't generate. pl suggest
    rgds
    selvam

    Hi,
    Please make sure you will sort the data in your select query.
    Now, you need to have two idocs in mapping. Click on Duplicate Subtree to have second IDOC. Now lets assume, your first IDOC represents mapping when ORDER TYPE is HIGH and your second IDOC represents mapping when your ORDER TYPE is not equal to HIGH that is NEW, BOUNCED, REGULAR etc.
    I have defined Source and Target data type as follows.
    Source Data Type:
    SDN
       <Row>
          <CQ_NO/>
          <ORDER_TYPE/>
          <LINE_NO/>
       </Row>
    Target Data Type:
    SDNTarget
       <IDOC>
          <Node>
             <CQ_NO/>
             <ORDER_TYPE/>
             <ItemNode>
                <LINENO/>
             </ItemNode>
          </Node>
       </IDOC>
    Mapping for IDOC 1:
    IDOC:
    Order Type -->Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed) -->collapse context
    Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
    Output of Point 5 --> create if --> IDOC
    Node:
    Map with constant
    CQ_NO:
    Order Type --> Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed)
    User Format By example. Pass CQ_NO (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
    Pass Output of format by example that is point no 5, to collapse context --> Split by value (Each Value) --> CQ_NO
    ORDER_TYPE
    Order Type --> Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed)
    User Format By example. Pass ORDER_TYPE (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
    Item Node:
    Order Type --> Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed)
    Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
    Output of Point 5 --> create if --> IDOC

  • IDOC FOR PRODUCTION ORDER

    Hi All,
    Iam very new in using idocs, my requirement is to create a outbound idoc for production order (create/change) ,I got the Message type  LOIPRO and idoc type LOIPRO01 there is no process code so i created a Z process code with FM (CLOI_MASTERIDOC_CREATE_LOIPRO) . Please explain how to proceed further in NACE etc
    Thanks in advance,
    Pria.

    I have message type LOIPRO.
    I am using that to trigger Production Order IDOCS.
    I'm using the following fields below.  My question:  What Object/Table/Field combination do I use to track when STATUS has changed?
    ORDER     AFKO     AUFNR
    ORDER     AFKO     GAMNG
    ORDER     AFKO     GLTRI
    ORDER     AFKO     GLTRS
    ORDER     AFKO     GSTRI
    ORDER     AFKO     GSTRS
    ORDER     AFKO     KEY
    ORDER     AFKO     PLNBEZ
    ORDER     AFVC     LTXA1
    ORDER     AFVV     BMSCH

  • 101 movement not happening when production order got backflushed.

    HI SAP Gurus,
    For SKU 101 movement not happening when production order got backflushed, but 261 movement successfully happened. Please let us know any settings need to check?
    Thanks and Regards,
    SHARAN.

    Hi Sharan,
    A 101 movement for the production order takes place when
    - You receive the production order via MB31
    or
    - Confirm the last operation which has PP03 control key
    A backflush is done only for the components called by the production order & not for the header material.
    Hope the above answers your query.
    Regards,
    Vivek

  • Planned orders are created when Production order is open

    Hi Everyone
    We have Make order and Make to stock scenarios in the system for various products. When Production order is still open ( Fully confirmed with C015 and partially delivered), system assuming that order is completed and created a new planned order for the undelivered quantity against Sales order.
    As per my knowledge MRP shouldn't create new planned orders when old production order is still incomplete. The old production order has status REL, PDLV and CNF.
    Any help is appreciate and it is our production issue
    Regards
    Prasad

    Hi,
    is the order marked as completely delivered on the Warehouse view? Have you reached the under delivery tolerance for this order with your partial delivery from production? If yes, this would be the reason why the system thinks that a new order is required
    Regards
    Thomas

  • Generating an IDOC for each Order present in the file (File to IDOC)

    Hi ,
    I have a requirement where in i have to generate an idoc for each orders present in a file . Initially i had implemented 1:N mapping by changing the occurence of idoc to 1..unbounded & using it as external definition i was able to generate multiple idocs.
    But now the requirement is that even if one record contains invalid data , then XI shoul process remaining records(which has  valid data) & then raise an alert for the invalid record . I have implemented this approach by using BPM (splitting the message) & the sending out each record as a single message to (1:1 mapping between file & IDOC).
    But now they dont want me to use an BPM . They want me to come up with an approach using 1:N mapping only where in i can make sure that the mappig doesnt fail even if there is one invalid record ,they want me to process remaining records & raise an alert for the invalid one .
    As far as i know this cant be done without BPM . Please let me know any valuable suggestions or inputs if there is any
    Regards
    Vinay P.

    Hi Vinay,
    Had a similar requirement few days back..
    What we did was to do a multimapping of 1:N where N = N1 and N2, N1 is the Idocs which you are doing today, N2 is the set of invalid records...
    Now we have written this as a file and then created another interface which will pick the file and based on the name of file we decided the To address. We have used mail package and this interface (file to mail ) was made as a generic one so that it can be used across many interfaces...
    filename and To address relationship was maintained as a value mapping in ID... You can have a thought of this approach and try to send the invalid records as a mail rather than alert.
    Regards
    Suraj

  • Changing material number when Process Order is released

    Hello,
    We have a scenario in which the material number of a process order may need to be changed after the process order is released.  We will have both in process and post production inspection types assigned to this order, and both inspection lots are created at process order release.  We also will have a batch number created at process order release. 
    When recording test results in the inspection lot before a process order has been confirmed, the users may identify that the material number should be different.  We would like a way to be able to either change the material number in the process order (and inspection lots).  We know this involves a lot of updates (master data changes to the existing process order and inspection lots).  Currently, there is no way to transfer information to a new material number without receiving product in and performing a usage decision in the post production inspection lot to transfer to a new material number. 
    The client has implemented all modules, except PP (which we are in the process of now).  We know that Variant Configuration would have been the right solution for this, but this is not an option since MM is already implemented. 
    If you have any suggestions, please reply. 
    Thanks in advance.

    Hi Prasobh,
    The exact scenario is as follows:
    1. A semi finished good will be used as a component to produce the finished good.
    2. This semi finished good will have treatments added to it, and quality inspection will be performed as treatments are added. 
    3. Inspections will occur several times as treatments are added.  If during one of these inspections, material is out of spec, and the blend should be transferred to another material number, we need to be able to change to another material number.  To have a customization where material number is changed in all of the relevant PP and QM tables seems risky. 
    This is why we can't really use material classification.  We also do not have the option to use VC bc the MM module is already implemented. 
    Thanks.

  • Production order creation , release and confirmation cycle

    Hi All SAP Gurus,
    I am trying to set Production order creation , release and confirmation cycle integrated  to  xMII.
    I am sure there must be many among you who worked on this before.
    So can you please share your experience.
    Thanks in advance
    Regards
    Ritesh

    Hi Ritesh,
    I'll give you what I have been using:
    - Transferring orders to MII
      You can trigger the orders by tcode POIT or an equivalent BAPI (BAPI CLOI_DOWNLOAD_TRIGGER_TRANS) or have the iDOC being sent automatically whenever someone creates a new production order in R/3 (using change pointers). In both cases you will receive an iDOC in XML format from SAP with the production order information on it. After receiving this file a BLS transaction will be required to read the XML file and store it in your local DB.
    - Releasing orders from MII
      You can release the orders from MII using the BAPI BAPI_PRODORD_RELEASE (it will update the order status in R/3 to REL). After that you might want to update the production order status in MII local DB as well. Usually I have the bapi BAPI_PRODORD_GET_DETAIL in place in order to read the production order details whenver I need.
    - Doing confirmations from MII
      After the PO was released, you can do confirmations against each operation using the BAPI BAPI_PRODORDCONF_CREATE_TT. You can send up to SAP good quantity, scrap quantity, labor/machine time, etc. It's a pretty intuitive BAPI.
    If your system is not ready to do goods movement automatically you will need to use BAPI_GOODSMVT_CREATE.
    This is basically what I use in this kind of project. If you have any questions please let me know.
    Regards
    Ricardo

  • Set Production Order to Release status

    Hi,
    I’m trying to add a new production order through the DI API.  I’m using SAP 2005A SP01 PL 07.  I’m creating it from a sales order.  But if I try to set the status of the Production Order to Release I get a -5002 error.  If I set the status as Planned it works fine.  I’ve also tried creating it, and setting to released after the Production order has been added, which doesn’t work either.  Is there a rule for changing a Production order to Release that I’m missing?  Here is my code:
    ProdOrder.ItemNo = ItemCode
    ProdOrder.CustomerCode = oSaleOrder.CardCode
    ProdOrder.DueDate = oSaleOrder.DocDueDate
    ProdOrder.PlannedQuantity = ItemQuantity
    ProdOrder.ProductionOrderOriginEntry = oSaleOrder.DocEntry
    ProdOrder.ProductionOrderOrigin = BoProductionOrderOriginEnum.bopooSalesOrder
    ProdOrder.ProductionOrderStatus = BoProductionOrderStatusEnum.boposReleased
    ProdOrder.ProductionOrderType = BoProductionOrderTypeEnum.bopotStandard
    ProdOrder.PostingDate = Date.Now

    Tested and working code:
    ProdOrder.ItemNo = "A00009";
                ProdOrder.CustomerCode = "C0001";
                ProdOrder.DueDate = DateTime.Now.AddDays(1);
                ProdOrder.PlannedQuantity = 1;
                ProdOrder.ProductionOrderOrigin = BoProductionOrderOriginEnum.bopooSalesOrder;
                ProdOrder.ProductionOrderStatus = BoProductionOrderStatusEnum.boposPlanned;
                ProdOrder.ProductionOrderType = BoProductionOrderTypeEnum.bopotStandard;
                ProdOrder.PostingDate = DateTime.Now;
                int result = ProdOrder.Add();
                if (result != 0)
                    //Error
                    string error = SBO.DI.Connection.SboCompany.GetLastErrorDescription();
                else {
                    string lastKey = SBO.DI.Connection.SboCompany.GetNewObjectKey();
                    ProdOrder.GetByKey(Convert.ToInt32(lastKey));
                    ProdOrder.ProductionOrderStatus = BoProductionOrderStatusEnum.boposReleased;
                    int result2 = ProdOrder.Update();
                    if (result2 != 0)
                        //Error
                        string error = SBO.DI.Connection.SboCompany.GetLastErrorDescription();
                    else {
                        //OK
    The reason you attempt did not work could be if you did not do the GetByKey. This is needed since an Add just add the data to the database, but does not ready the just added object for continued work (does not provide the docEntry and other autofilled data)
    Message was edited by: Rasmus Jensen

  • Automatic Locking of Production Order on release

    Dear Experts,
    When the production order is released, the order should be "Locked" automatically. When changes are required, the production order is unlocked manually and changes are done. This is our requirement.
    Is it possible to lock the order on release.
    If yes what are the settings?
    Regards,
    Jejesh

    Hi,
    Go to T.code BS02.
    - Create new Status Profile , if required do it by copy any standard one.
    - Then go to Detail screen.
    - Assign order status.For your reference I have used 2 order status.
    - CRTD - Created.Set this one as Initial one.
    - LOCK - Release and Locked.
    - Now assign Object type to this status Profile.You have to select PP/PM Order Header.
    - Now double click on Status CRTD and press New Entry tab to find and set allowed Transection.Here you have to select and restrict transaction types this status.
    - Now go to Status LOCK and double click.Then press New Entry tab.You will find the list of transactions.
    First select Transaction Release and make it as allowed and also activate radio button for Set.It will activate the status LOCK automatically after release of order.
    - Now make forbidden of all other transactions like change of order,Confirmations etc. as per your suitability.
    - You can assign any other user status also for further transaction control.
    - Then save your status profile.
    - Now assign this Status Profile to Order type using T.code OPJH.
    Regards,
    Dhaval

  • Which field gives whether production order is released or not ?

    Hi ,
                 i want to know how can we get whether a production order is released or not for co01 .
    In which table and what field needs tobe checked for aufnr  ?

    Hi Ujjwal,
    Go to CAUFV Table pass this AUFNR and get the OBJNR value.
    now call the FM STATUS_TEXT_EDIT
    call function 'STATUS_TEXT_EDIT'
            exporting
              flg_user_stat    = 'I'
              objnr            = caufv-objnr " Pass OBJNR here
              only_active      = 'X'
              spras            = 'E'
            importing
              line             = s_status " if this contains REL then it is released,
    "it can contain LCKD(Locked) TECO(Technically Completed
    DEL (Deleted ) etc
    or PCNF(Partially Confirmed for other list contact your PP Consultant )
            exceptions
              object_not_found = 1
              others           = 2.
    Cheerz
    Ram

  • Import Production orders with released status

    We are using DTW to import production orders. It allows to import as "planned" status only and not as as "released status". We have hundreds of production orders per day and its a pain to update each production order to "released" status so that it can be available for reciepts from production and thereafter after recieving the items, changing each and every production order to "closed". Please advice

    Hi Mohamed,
    please use the following for the production order status in the template.                                                                               
    (1)Planned   :-> boposPlanned                                              
    (2)Released  :-> boposReleased                                             
    (3)Closed    :-> boposClosed                                               
    (4)Cancelled :-> boposCancelled                                                                               
    Please refer to the SDK DI help file for the details information.          
    hope it helps,
    Regards,
    Ladislav
    SAP Business One Forum Team

  • Restricting a production order from releasing

    Hi,
    How can i restrict a production order from releasing if material is not available?
    Regards,
    samir
    Edited by: wadajkar on Jun 2, 2010 2:51 PM
    Edited by: wadajkar on Jun 2, 2010 2:51 PM

    Hi,
    In t code OPJK at material avialibility check section maintain '3' i.e. do not release if components are not avialable.
    Regards,
    Vishal

Maybe you are looking for

  • Flash SWF not appearing in RH

    I am using TCS 4 with FM 12 and RH 11. I have an animation built in Flash and published to a SWF file. The animation is added to a FM doc. Publishing to PDF shows the animation as expected. I link an RH project to the FM book and the animation is mis

  • Get Schema for a specific object.

    I need to get the schema name for a "table" so that I can get its underlying meta data info. A user passes me the "table" name, but the "table" could be in my schema, or could a synonym pointing to another schema. I need to be able to execute the fol

  • BPM : too many alerts in a process step - how to remove older alerts ?

    Hello One question about Business Process Monitoring : We have too much alerts in a process step, so it takes 20 minutes to display them. How can we reduce the number of alerts in this process step ? Thanks in advance. Regards Fred

  • PSE 06 Slide show problem

    When I burn a slideshow (jpeg pics)in Photoshop Elements 06, the CD does not load the slideshow. Instead, it just lists the files on the CD. My DVD player does not like the CD, either.

  • Users based on Portal Group

    Hi all, Is there any table or RFC which contains the Users based on Portal Group in ECC.I need to writa a programme which extracts the users based on poratal group. Thanks and Regards, Venkat