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

Similar Messages

  • 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

  • Closing the Production Order with status PCNF

    Hi Experts,
    May I kindly ask if I can close an order with status Partially confirmed? If not, how can I cancel the confirmation if I had already reversed the goods movement in the confirmation thereby flagging an error of a deficit in the material quantity during cancellation of the confirmation?
    I really need your help since I need to close the production orders with this case.
    Hoping so much for your replies.
    Many thanks in advance.
    Sincerely,
    Ria

    Ria,
    I am not so clear about the exact situation.
    When you say you have reversed the goods movement with MIGO, is it reversal of the documents posted with confirmation or the individual documents?
    You can only cancle the document with MIGO which are independent of the confirmation.
    The  documents which are with the confirmation can not be reversed in any case with MIGO.
    I suggets you go this way,
    1. Check why system is giving you error as 'Deficit......'. The one thing I suspect that you must have performed auto GR & moved out the stock of FG from that location.
    If it's so then bring back the stock to it's original location & cancel the confirmation.
    While cancelling the confirmation where you might have executed goods issue with backflush this error won't arise as the stock will be bring back to storage location form the order.
    Don't reverse the cancellation of the of the documents youhave performed with MIGO for independent material posting on the order. Keep it as it is.
    This way the cancellation of confirmation & material movement will be done & now cost on the order will be zero.
    You can assign the status CLSD as well as DLFL to the order.
    2. In case you find the above activities can not be carried out for some reason then give status TECO to the order.
    Sttle the order so that the cost on the order will be zero, then give status CLSD.
    As far as possible stick to solution no. 1 only.
    Go for solution no. 2 when you don't have any other option.
    Hope this helps you.
    SmanS

  • Error  -10  while closing a Production Order with DI API

    Hi,
    I've been trying to close some production orders using this code:
    Dim oProdOrder As SAPbobsCOM.ProductionOrders
            Try
                oProdOrder = Me.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders)
                If oProdOrder.GetByKey(intDocEntry) Then
                    oProdOrder.ProductionOrderStatus = SAPbobsCOM.BoProductionOrderStatusEnum.boposClosed
                    If oProdOrder.Update <> 0 Then
                        Me.Company.GetLastError(intError, sErrMsg)
                        If (0 <> intError) Then
                            sErrorMsg = sErrorMsg & "Production Order Close Error: " & CStr(intError) & "," & sErrMsg & _
                                ". DocEntry: " & oProdOrder.ProductionOrderOriginEntry & vbCrLf
                        End If
                    End If
                End If
    ...But I keep getting the same error every time I try: -10,Date out of reference date range, '_SYS00000005340'
    The error doesn't show when I close the Order with BO's Form. And I've checked the exchange rate for the posting and due date of the document (and also for my current date) and there seems to be no problem with it.
    I'm currently working with SAP BO 2004A PL 45.
    Anybody has a suggestion? a workaround?
    I'll appreciate any help you can give me.
    Thanks in advance...
    Alfredo

    Alfredo,
    just in case,
    what is the previous state of the production order (planned, released,...)?
    before you try to close the order, update the status to released:
    If oProdOrder.GetByKey(newID) Then
    'Cambio di stato dell'ordine da 'Planned' a 'Released'
                    oProdOrder.ProductionOrderStatus = boposReleased
    oProdOrder.Update
    I found this code in a DI API application written for 2004A. It was commented out so I suspect it didn't work.
    'Chiusura dell 'ordine
            'SelProductionOrder.ProductionOrderStatus = boposClosed
            'ret = SelProductionOrder.Update
            'If ret <> 0 Then
            '    sboCompany.GetLastError nErr, errMsg
            '    MsgBox "Errore " & nErr & " - " & errMsg
            'End If
    Hope this helps

  • 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

  • Performance Issue, Unable to pull all production Orders in given statuses

    HI All,
    I have a requirement to pull all production orders that are in the created or released status and then action some different things in the program such as adjusting dates, etc. The issue I'm having is that as the volume of production orders grows the select statement stops being able to complete and pull these production orders. I've tweaked this before and it was able to work for a few weeks but has now reached it's limit again. I tried using the trace and SE30 to analyze the program as I've read suggested here, however it's been difficult to try adjustments as the program runs in about 3 second in the development environment. Our quality environment, which has roughly half the volume of the production system ran in about 15 seconds. So I am unable to duplicate the issue until the program is moved to production.
    Here is the select statement:
      SELECT k~aufnr
        FROM aufk as k INNER JOIN afko as f ON f~aufnr = k~aufnr
          INNER JOIN jest as j ON k~objnr = j~objnr
        INTO CORRESPONDING FIELDS OF TABLE it_aufk
        WHERE k~aufnr IN s_aufnr     "Order Number select option
          AND k~werks IN s_werks             "Plant select option
          AND k~auart EQ u2018PP01u2019              "PP01 std orders only
          AND k~kokrs EQ u20181000u2019              "Seneca Controlling Area
          AND k~autyp EQ u201810u2019                "PP Production Order
          AND k~loekz EQ space                 "Deletion indicator
          AND ( j~stat EQ u2018I001u2019             "CTRD, created status
            OR  j~stat EQ u2018I002u2019 )           "REL, released status
          AND j~inact EQ space.              "status not inactive
    There are a couple thoughts I have to try, but I don't know of any good way to verify if helping given the volume differences until in production so am looking for feedback. Here's the ideas:
    1. Use the field IDAT2 in AUFK to determine if an order is not TECO'd , rather than using the JEST table. Testing this in Dev had increased run time versus how I have it written now, but may be helpful with larger volume and/or if an index is put on this field. Thoughts?
    2. Separate the select statements to read AUFK and JEST separately and instead use the FOR ALL ENTRIES command. Seems to be a lot of conflicting thoughts on which works better, thoughts on this particular case?
    Also, there is another program that pulls only production orders in Created status, and it doesn't have this same issue.
    Thanks in advance for any help,
    Kyndal
    Edited by: Kyndal Copley on Oct 1, 2009 6:46 PM

    I have three recommendations for your join.
    1) Assuming that fields AUART and KOKRS are always known (constants) I recommend that you move them up in the where clause (like illustrated) to ensure that the system uses index C.
    2) AUTYP EQ '10' seems superflous. In addition it seems to increase the search time. Check with your functional consultant if there could be a production order with AUART EQ 'PP01' and AUTYP NE '10'. If you will never encounter this situation it makes more sense to drop the clause AUTYP EQ '10'.
    3) INTO CORRESPONDING FIELDS OF TABLE usually takes longer than INTO TABLE. Define the table with AUFK with just field AUFNR so that you can use the clause INTO TABLE.
    SELECT k~aufnr
      FROM       aufk AS k
      INNER JOIN afko AS f
      ON f~aufnr EQ k~aufnr
      INNER JOIN jest AS j
      ON k~objnr EQ j~objnr
      INTO TABLE it_aufk
      WHERE k~auart EQ 'PP01'
      AND   k~kokrs EQ '1000'
      AND   k~aufnr IN s_aufnr
      AND   k~werks IN s_werks
      AND   k~loekz EQ space
      AND ( j~stat  EQ 'I001' OR j~stat EQ 'I002' )
      AND   j~inact EQ space.

  • Need a function module to create production order with reference

    Hi
    I need a function module to create a production order with reference to an existing order. There is no BAPI available for SAP 4.7 release. I found that the function module CO_ZF_PRODUCTIONORDER_CREATE does not create with reference to an existing order.
    Any help will be rewarded.
    Pavan

    Dear Pavan,
    Unfortunately there is no FM for this..
    Cheers
    Nitesh

  • 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

  • Change production order with deletion indicator

    Hello
    We have some production order with deletion indicator, status 'DLT'. We want to reative them and do GR. How can we do, can we remove the status 'DLT'
    Thanks
    Hailiang

    Hailiang,
    Its not possible to revoke the deletion flag.
    so you need to create new orders, and thats why its being suggested that think twice before setting deletion flag.
    if you are not sure with the orders you can set TECO , and it can ve easily revokeas and when required.
    Regards
    Ritesh

  • Production order with components consumed from vendor consignment stock

    Hi expert,
    I have a production order with components and some of the components should be consumed from vendor consignment stock.
    When the order is created/released : is there  a possibility to have those components created with "special stock indicator" = 3 (consignement stock) by default?
    Thanks,
    P.

    Dear Pete,
    In my understanding it's not possible to populate this value as 3 - consignment stock in the component overview.This has to be
    done manually.
    Check in this way,by indicating a value in any of the material master field(for eg ABC indicator in MRP1 view) and if there's some
    value,then while saving the system populates for all those materials with this value as 3 by using some user exit or BADI.
    I'm not sure,it's only an idea,check and revert
    Regards
    Mangalraj.S

  • 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

  • Report for Production orders with name of Customers

    Dear Expert,
    Kindly suggest to view the production orders with customer numbers for which the sales orders is created.
    I tried in MB51 with layout settings but the customer number comes out be blank despite the sales order number is populated for an production order.
    Kindly suggst a way or any report in the system  to get the corresponding information of production order number and corresponding customer name mentioned in the sales order .
    Thanks in advance for your help and inputs..
    Best regards,
    Nitish jain

    Nitish,
    MB51 is a Material Document list.  Many production orders exist that have no entries in this report, so it would be an unlikely candidate to be a solution for your requirement..
    The standard production order reporting tool is COOIS.  The output for MTO orders can be configured to display Sales order and Item and Soldto.
    Obviously, displaying even the customer order number in COOIS is impossible in a MTS scenario.
    In addition, a user experienced in using SAP Query  (SQVI or SQ01/SQ02/SQ03) could also create a production order report without having to know ABAP, by properly linking tables AFKO, AUFK, AFPO (production order data) with VBAK (sales order header data) to get customer number, and KNA1 to get customer name..
    If you are not expert in SAP Query, I suggest you discuss this requirement with a local ABAPer.
    If you are feeling like educating yourself in the wonders of SAP query, try this doc.  Although old, SAP query hasn't changed very much since this document was written.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    Rgds,
    DB49
    Edited by: Dogboy49 on Apr 20, 2010 10:47 PM

  • Error message while creating production order with KMAT material strategy25

    Hi PP Gurus I am running variant configuration cycle...Strategy 25, Custermer Req KEK (KMAT Matrl)
    Sales order & MRP Picked the components correctly as per the dependencies
    written. So Planned order generated against sale order.
    When I tried to convert planned order to Production order...I am getting the
    below error message..
    Error Message:
    You cannot make an assignment to make-to-order stock Message no. CO684
    Diagnosis The component cannot be allocated to an individual stock because
    make-to-order production and engineer-to-order production cannot be executed
    with this order.
    A possible cause is that you are trying to create an order with reference to a
    sales-order/project, where an account assignment to a sales order/project is not
    allowed in the settlement profile that is assigned to the chosen order type.
    This is inconsistant.
    System response The following responses are possible:
    Order processing is cancelled.
    The system resets the special stock indicator back to the original value.
    Procedure Choose another order type.
    I used order type with SD1 as settelement profile.
    OVZG: default 046, settlement profile = SD1
    OPJH: Settlement profile = SD1
    Plz through some light on this if u have worked on Variant Configuration/MTO
    settlements.
    Question:
    1) Is creation of production order with KMAT material supported by SAP?
    2) If yes, why the above error occurs?
    Waiting for Ur reply
    With Best Regards

    Dear R.Brahmankar,
    I have check on the note, but it is not relevant to ecc6. The current system default setting is :
    Standrad setting for reqt class 046
    Special Stock E
    Acct Assgt Cat. M
    Valuation M
    Settlmt Profile SD1
    However if I change the Acct Assgt Cat. from M to E. It resolve the problem. I would like to know is this the right solution?
    Config in Acct Assgt M
    Consumption Posting = E
    Config in Acct Assgt E
    Consumption Posting = '  '
    In F1 key of Consumption Posting field it shown following:
    To flag the sales order item as cost- and revenue-carrying, enter an "E" (settlement via sales order).
    If you do not wish to flag the sales order item as cost- and revenue-carrying, do not enter anything.
    Dependencies
    If you are working with nonvaluated sales order stock, always flag the sales order item as cost- and revenue-carrying.
    If you are working with valuated sales order stock:
      In the case of complex make-to-order production, flag the sales order item as cost- and revenue-carrying
      In the case of sales-order-related mass production, do not flag the sales order item as cost- and revenue-carrying
    Should we change to E?
    Regards,
    Ong

  • Creation of production order with reference to sales order

    dear all guru's,
                       i m having a requirement of creating production order with ref to sales order but without changing my old strategy of make to stock.
    regards
    ujwal

    Hi,
    For the purpose of creation of production order with reference to sales order while maintaing MTS strategy you need to maintain Make to stock strategy 40 in strategy group in MRP-3 View of Material Master.
    This is the only Make-to-Stock Strategy which enables you create Production Order against both Sales order as well as Demand / PIR.
    So if your strategy group is already 40 then you need not change it.
    However if you are using any other Make-to - Stock strategy like 10, 11 etc. then it is not possible to create Production Order against Sales Order since they dont consider Sales Order in planning.So you need to change them and set strategy group as 40.
    Hope this helps.
    Revert if you have any doubt.
    Regards,
    Tejas
    Edited by: Tejas  Pujara on Sep 27, 2008 8:50 AM

  • BAPI for creation of Production Order with Ref to sales order

    Hi all,
    we are using BAPI_PRODORD_CREATE  for creating Production Order with ref to sales order.
    As per the Business Scenario, we are not creating any masters like BOM and Routing, instead
    we are creating Routing directly into the Production Order under operation overview screen.
    during creation of routing system is generating a default operation.
    the following is the error results after running the Bapi.
    "No routing selected"
    Best Regards.
    GTNRNR.

    Hi GTNRNR,
    with out creation of BOM you created routing and in routing for the operations which components did you allocated so that can be used to manufacture the final product. Can you be please specific?
    Regards,
    Madhu.G

Maybe you are looking for

  • How can I retrieve the same figure twice in report?

    Hi guys, If we have the same selection twice in the same report, it only retrieves the figure once (see example below, were the same period has been chosen twice). Is there any setting I can adjust, so it will retrieve the figures for double-selected

  • Firefox and Thunderbird do not connect to the net, and they also hang.. What is the Fix?

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/1020334 /questions/1020334]'' In the blink of an eye, both Thunderbird and Firefox have BOTH STOPPED connecting to the Net. let me share with you what

  • I just installed Itunes on a new computer, and it erased all my songs when

    iT DELETED ALL my songs from my Ipod, cuz it said it was updating it Is there any way I can redo this, I am going to die if I loose all my movies and songs What can I do to redo this updating I hate this feature of Ipod, I dont have my songs on this

  • Opening document in Scrollpanel

    Hi Everyone I need some help. I need to call up an already exsistant document in my application and then let the user view it inside a ScrollPanel, because 9/10 the document will be to large for the GUI in which it will be presented. Please note that

  • Seq of possible taxes for country IN is limited up to 9

    Hi, We have configured the FI Tax procedure and the same condition types are using for the SD Pricing procedure. But thing is, based on our client requirements, we have created 15 condition types to arrive the accounting requirements. So, to create c