Query for Alert on production order to be released

Dear all users and experts,
I need a query for getting an alert on production orders to be released (from planned status to release status) by whether reading the release date of production orders created from 'order recommendation window' or by reading the due date of production order and substract the lead time(days) of the item from its due date or by any means you know best.
Thanks and best regards,
Farhan Sufi

Hi Gordon and Joseph,
Thanks to both of you for giving me queries.
Gordon, I made 3 production orders for testing from MRP order recommendation window from which 2 production orders has release date of today 9th July, 2010 (due date 12th July monday) and the 3rd one has release date of after weekend i.e. 12th July 2010 (due date is 13th July). release dates are calculated by MRP acording to the items' lead time and due date.
Gordon, when I applied your query It gave me msg 'no data was found as a result of this selection criteria' Can you explain what your query will give me in result?
where as Joseph, when I applied your query on alert, it gave me all 3 production orders as an alert to be released. I was expecting it will give me alert for 2 production order for today as their release date in MRP is today(9th July, 2010) and the alert for 3rd production order should come on 12th July and not today.
what I understood your query is displaying all production orders which have status 'planned' regardless of their release date.is it?
Joseph can you edit this query in such a way that It should consider the release date (calculated from due date and lead time in MRP order recommendation window) and display only those production orders which should be released today and exclude those which have release date in future. so that I can get alert for only those production orders which should be released today.
I hope good response from both of you
Thanks and best regards,
Farhan

Similar Messages

  • Query for Exploding all production orders needed to fulfil a sales order

    I am trying to write a query that explodes all the multiple levels BOMS and brings back a list of production orders that would need to be raised to fulfil a particular sales order.
    SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T2.[TreeType] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.[DocNum] = [%0] AND T2.[TreeType] = (N'P')
    This is what i have at the moment, this only goes down one level, i cant think how i might drill down to lower levels. Any ideas?
    Thanks

    It will be a tough query to build.
    Check this for just adding one level:
    SELECT T0.DocNum, T0.CardCode, T0.CardName, T1.ItemCode, T1.Dscription, T1.Quantity
    FROM ORDR T0
    INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE T0.DocNum = [%0\] AND T1.ItemCode IN (SELECT Code From OITT)
    UNION ALL
    SELECT T0.DocNum, T0.CardCode, T0.CardName, T3.Code, T4.ItemName, T1.Quantity*T3.Quantity
    FROM ORDR T0
    INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITT T2 ON T1.ItemCode = T2.Code
    INNER JOIN ITT1 T3 ON T2.Code = T3.Father AND T3.Code IN (SELECT CODE FROM OITT)
    INNER JOIN OITM T4 ON T3.Code = T4.ItemCode
    WHERE T0.DocNum = [%0\]
    Thanks,
    Gordon

  • Query for getting Outtanding Production Order items

    Dear Experts,
    With a query, please advice how I can get a list of outstanding Production Order items?
    Much Thanks in Advance for your advice.
    Warmest Regards,
    Chinho

    Production Reports --->Open Item List --.> Production Orders

  • FM for creation of production order creation

    Hi All,
    Can anyone tell me the BAPI for the production order creation.
    BAPI for creation of production order through CO01 transaction code.
    Thanks in advance
    Ramesh.

    Hi,
    Please check this FM CO_ZF_PRODUCTIONORDER_CREATE.
    Regards,
    Ferry Lianto

  • BAPI/FM for Confirmation of Production order at operation level

    Hi ABAPers,
    I am using the 'BAPI_PRODORDCONF_CREATE_ACT'for Confirmation of Production order at operation level.
    I am able to pass the Production order number and Active Operation get the confirmation done.
    But the Confirmed Qty is not being updating in AFKO table.
    The 'BAPI_PRODORDCONF_CREATE_HDR' cannot be used for Confirmation of Production order at operation level as there is no Operation/Activity(Vornr) field in the input table. Hence using this bapi confirmation of Prod order can be only at Order level.
    Can someone know any FM/BAPI which can be used for the Confirmation of Production order at operation level(not order level).
    Thanks in Advance
    Ramesh Babu Cikka

    Hi Ramesh,
    Please use FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'.
    This will work as like as T/Code "CO11".
    I hope this will help you.
    Example :
      CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
        EXPORTING
          POST_WRONG_ENTRIES = '0'
          TESTRUN            = ' '
        IMPORTING
          RETURN             = ZRETURN
        TABLES
          TIMETICKETS        = ZBAPI_PP_TIMETICKET
          DETAIL_RETURN      = ZBAPI_CORU_RETURN.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'W'.
    Lanka

  • Committed Date For Components in Production Order

    Dear All,
    I m facing this,  Committed Date For Components in Production Order,
    the date appeared as 31.12.9999,
    How can i make this correct.
    please tell me..
    Thanks
    Raghu

    Hi, Thnkx,
    You Are correct, I got this while doing Availability Check, 2 dates.
    Requirement Date, and Committed Date.
    I tried your solution,
    I change the Quantity of one of my BOM , I tried to change the Quantity by Change Number,
    So in CS 03 I can see the Validity of that component up to 01-09-2010,
    I run MRP agian, new planned Order, tried to convert, the question is same.
    I still get the date as 31-12-9999.
    Thanks
    Regards
    Raghu

  • Worklfow for GR of Production order.

    HI .... is there any standard worflow template for GR of production order using MB31.
    Thanks in advance.

    Hi ,
    Please check this SAP provide WF: WS20000387.
    You can copy and make changes as per your requirement.
    Thanks and Regards,
    Swaminathan

  • SP for Validating BOM & Production Order item wise

    Dear Experts,
                        Here I am validating the Production order  items  with BOM for the same items, any addition or deletion in production order should not be allowed. Hence the production order should consist of same items what it has in BOM. But below the my query is allowing this scenario. Kindly help me to achieve the same..
    Query Follows :
    @object_type = '202' and @transaction_type in ('A','U')
    if exists (SELECT distinct 'error'
    FROM OITT A INNER JOIN ITT1 B ON A.Code = B.Father
    LEFT JOIN OWOR C ON C.ItemCode = A.Code
    LEFT JOIN WOR1 D ON D.DocEntry = C.DocEntry
    LEFT JOIN OITM E ON E.ItemCode = B.Code AND D.ItemCode = B.Code
    Where c.DocEntry = @list_of_cols_val_tab_del and d.ItemCode not in (select b.Code from ITT1 b))
    Begin
    Select @error = N'13002'
    select @error_message = N'BOM Mismatch'
    END
    Thanks,
    Bhoopathi.K

    Hi,
    Try this:
    IF @transaction_type IN ('A', 'U')AND @object_type in ('202')
    BEGIN
    If exists (SELECT T0.DocEntry FROM owor T0
    inner join itt1 t2 on t2.father = T0.Itemcode
    where t0.DocEntry =@list_of_cols_val_tab_del AND t2.code not in (SELECT T1.itemcode FROM wor1 t1 where t0.docentry = t1.docentry))
    Begin
    SET @error = '202'
    SET @error_message = N'order can not be added if not match with BOM.'
    End
    END
    Thanks & Regards,
    Nagarajan

  • Query for Alert

    Hi,
    Wondering if someone could please help me out with query required for Alert.
    Alert to notify user of any Sales Order entry added for items belonging to Item group code "171".
    The resulted Alert needs to give the alerted user the ability to drill down into listed orders.
    I appreaciate any help given.
    thks
    Kelly

    Hi,Guys
    Generally, you can use the SP named by SBO_SP_TransactionNotification,
    for example
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_NULLS ON
    GO
    ALTER  proc SBO_SP_TransactionNotification
    @object_type nvarchar(25),                     -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    --     ADD     YOUR     CODE     HERE
    declare @bbb nvarchar(200)
    declare @aaa int
    if  @object_type='17'--sale order
    begin
        if ((@transaction_type='A') or   ( @transaction_type='U'))
        begin
         select @aaa=count(itemcode) from rdr1 where docentry =@list_of_cols_val_tab_del and itemcode not  in (select itemcode from oitm where itmsgrpcod = '171')
          if @aaa>0
          begin
          set @error=1
          set @error_message='Item group should belong in  171'
          end
        end
    end
    select @error, @error_message
    end
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO
    also you can use some approval procedures.
    Please try it
    Best regards
    Eric Wang

  • Query items consumed on production order

    suggestions on creating a query to show items (itemcode, description, quantity, date) consumed on a production order?
    i would like it to prompt for date range and itemcode.  audit report is similiar but i want something custom and simple to run.

    Hi
    Query will depend - what consume means to you ?
    You can start with this
    SELECT T0.[DocNum], T0.[CreateDate], T1.[ItemCode],T2.[ItemName],  T1.[PlannedQty], T0.[CmpltQty], T0.[Status] FROM OWOR T0  INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T1.[ItemCode] =[%0] and (T0.[PostDate] >=[%1] and  T0.[PostDate] <=[%2]) ORDER BY T0.[CreateDate]
    Does itemcode mean product code ... Please explain your requirement more in detail ...
    Hope this helps
    Bishal

  • IDOC for Creation of Production order and also adding components

    Hi ,
    I have a requirement like I get the data from a 3rd party system and using that i have to create production orders and also should be able to add more materials in COMPONENTS part of that Production order. I was looking for a BAPI which can handle this process.
    And also can any one help me by letting me know is there any Message type available for handling this process of Production order creation and Adding extyra components to it.
    I have a  message type LOIPRO (for Production Order) and associated function modle CLOI_MASTERIDOC_CREATE_LOIPRO for creation of master IDoc, but not sure can i handle the Components part in this.
    Please do send replies ASAP, its very urgent.
    Or else atleast suggest me the other ways of doing this .
    Also send me any BDC program if anyone has already developed for this.
    Thanks
    Kumar
    Edited by: Phani Kumar Peddagopu on Mar 19, 2008 6:56 PM

    Resolved .

  • Query for details of  Sale order , Invoice and COGS

    I Need the report cointing following based on month & Business partner
    Sale order, Sale Amount, Due date, Invoice Amount, Last Invoice date, COGS amount

    Hi Anantha,
    Please check below link and modify according to your requirement.
    Sales Order Query for  in SAP B1
    Query - Sales Orders linked to Deliveries
    My Top SQL Queries for SAP Business One
    Hope this helps
    Regards::::
    Atul Chakraborty

  • 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

  • User exit for confirmation of production order for mandatory fields

    While confirming the production order ( CO11 & order type -PP01) , production order should not be saved/confirmed without entering the mandatory field (No. of employees), which is the mandatory field set in the config of "define field selection for confirmation"
    It is allowing if user does't click on the tab (personal/additional data).
    Without entering the mandatory fields in any tab system should not allow user to confirm the order
    How to apply this lock ?
    Also while doing the production confirmation (Co11N) ,user should not have the rights to changes ,adds or delete the component and its quantity OR if user make the changes , suystem should not allow to post the confirmation?How to make this in SAP?
    regards,
    Ramesh Bandi

    Hi,
    You can check the user exit CONFPP05 (Customer Specific Input Checks when Saving) and its function exit  EXIT_SAPLCORF_105 in the transaction code SMOD.
    With this enhancement you can update your own data after saving the confirmation. You cannot change the confirmation itself.
    In this enhancement it is strictly FORBIDDEN to send error messages or other dialogs, otherwise data inconsistencies could occur, for which SAP accepts no liability.
    You can check with your ABAPer's.
    please check & revert back to me.
    Regards,
    Mohan.R

  • Function Module / BAPI for reprinting a production order

    Does anyone know a Function Module to do a production order re-print?   Not an original, just a copy.
    Thanks,
    --Amy Smith
    --Haworth

    Thanks Kevin,
    Been there.  Couldn't find anything.  Doing a BDC for testing. 
    Looks like you have to do a Production Order change.    So maybe is a BAPI for that.
    I'll post what we find in this thread...
    --Amy Smith
    --Haworth

Maybe you are looking for

  • How to open a pop up in a newly opened window

    Hi, I have a requirement where, upon a button click in Main.jsff page I am opening a PDF file in a new window in the same browser. As soon as the PDF file is opened in the new window I need to display a popup which has to come on top of the PDF windo

  • Two computers with iTunes and one external drive

    Hope someone has an idea.....I have internet at work, but not at home. I do have iTunes8 on both, but can not download or store my music library on the work computer. I have created a large music library on the home computer already and now need to g

  • Brush size acting up

    Hello guys this is a question I want to ask to you all. when I changed the brush size and paint it looks bigger/smaller but the cursor itself stays the same width other times as the brush got bigger the circle got bigger now its not so its hard to se

  • Premiere to Flash workflow ?  (Maybe AEFX to Flash)

    Hopefully someone has some experience with Premiere to Flash workflows and can help me here. (Apart from encoding some flvs...I have none!) I am shooting a number of people separately on a chroma bg so that in the end result they will appear composit

  • My macbook basically doesn't turn on!?

    ok, so i hit the power button and the little white light on the right side turns on and i hear the fan and everything, but the screen just doesn't display anything! im not sure if maybe there's something wrong w/ the computer itself or maybe its just