Alert on Sales Order

Hi All,
I like to create one alert on Sales Order which will be based on query. There is one UDF for C Form Status.
When I log Sales Order, and select a customer then alert execute and check through query i.e. is there any c form pending from this customer or not. if yes then it will show list.
Is it possible or not...?
Can anybody help me in this regards...!!!
Thnx ..!!
Best Regards,
Chintesh Soni
Edited by: Philip Eller on May 21, 2008 8:59 AM
Edited by: Philip Eller on Jun 4, 2008 8:33 AM*
Edited by: Philip Eller on Jun 18, 2008 9:11 AM**

Hi use this query,
select * from ordr where u_cformstatus = 'N' and cardcode = (SELECT T0.CardCode FROM ORDR T0 where datediff(mi,
case
when len(cast(T0.DocTime as nvarchar)) = 3 then
dateadd(mi,
(cast(substring(cast(T0.DocTime as nvarchar), 1, 1) as int) * 60
+ cast(substring(cast(T0.DocTime as nvarchar), 2, 2) as int)),
T0.createdate)
else
dateadd(mi,
(cast(substring(cast(T0.DocTime as nvarchar), 1, 2) as int) * 60
+ cast(substring(cast(T0.DocTime as nvarchar), 3, 2) as int)),
T0.createdate)
end,getdate()) < 5
Regards,
/Siddiq

Similar Messages

  • Alerts for Sales Order

    Dear All,
    I want to generate alert when ever a sales order is added in the system by sales team (user) and send this alert to purchase team ( user).
    how to perform this.
    swap

    You have posted duplicate threads for the same question. Please refer to the other thread and close this one:
    Alerts for Sales Order
    Thanks,
    Gordon

  • Alert on Sales Order Creation

    Hi All,
    My client is working on SAP Business One 2007B with PL 00.
    Client's requirement is that they want alerts to be sent to the warehouse people on Sales Order creation to process the respective order,and there are 4different locations.means for every location users are different and the query need to be made that filters according to the location/Warehouse.
    Can anyone help me out to solve this issue.
    Thanx in advance.
    Regards,
    Ashish

    Hi Ashish,
    1. Save the following query (you could modify it with extra columns or conditions) 4 times, everytime with a different warehouse.
    SELECT ORDR.DocNum, ORDR.CardCode, ORDR.CardName, ORDR.DocTotal
    FROM ORDR INNER JOIN RDR1 ON ORDR.DocEntry = RDR1.DocEntry
    WHERE  CONVERT(VARCHAR(10), CreateDate, 105) = CONVERT(VARCHAR(10), GETDATE(), 105) And RDR1.WhsCode = [Fill in 1 of the 4 warehouses]
    2. Make 4 new alert and insert the queries above in the alerts.
    3. Set the frequency to popup.
    4. Add the right people to the right query.
    That is the most easy way to do it. The warehouse people will see all the orders that have been created at the present day.
    Kind regards,
    Hendri Wessels

  • Prevent Intercompany Sales by Sales Order Type

    We have a scenario where the company wishes to prevent Intercompany Sales by order type. 
    In Standard SAP, scenarios exist such as this.....
    Sales Org A111 is aligned to Company Code C100
    Order type ZZ is placed against Sales Org A111 with the item shipping from a plant aligned to company code D100
    Result would be a trade invoice to the customer from Sales Organization A111 and an intercompany invoice (std SAP type IV) between the selling and delivery organizations. 
    In our case, they still want to allow this scenario for the sales organizations and plants involved, but NOT for certain Sales Order Types.  Is there a way to prevent this and have the user alerts at Sales Order document creation that this is not allowed? 
    I tried removing the Intercompany Billing document type assigned to the sales order type.  This does NOT alert the user in any way and only prevents an intercompany billing document from being created at billing time.  We need to prevent the sales order up front during Sales Order processing. 
    I have searched through OSS and Google (for various forums) with no success.  Most give excellent instructions with the steps to set up Intercompany Billing, but not to prevent it.

    Karol
    If you have already tried 'Define Order Types For Intercompany Billing' and it did not work, then the best bet for you is to work with user exits during Sales document processing:
    Program MV45AFZB- USEREXIT_CHECK_VBAP, or
    Program MV45AFZZ- USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE
    You may use the logic to  establish that it is an inter-company scenario ( check if the item plant is not assigned to the company code for the sales org from the sales area), then issue a information or error pop up message.
    Hope this helps.

  • Sales Order  VS Delivery Alert

    Dear Experts ..
    My client need a following Alert .....
    EXP:--
    If My Sales Order No 1  quantity is 100 and i delivered 110 base on sales Order No 1 at that time required to send  a alert  as per assign user...
    please Provide me the query for the same..
    Thanks and Regards
    Manegsh Pagdhare.

    Hi
    The following alert lets you view the amount that is exceeded in delivery of sales order
    declare @cant as int
    declare @cant2 as int
    declare @ultentg as int
    set @ultentg = (select max(t0.docnum) from odln t0)
    set @cant = (select sum(t1.quantity) from odln t0 inner join dln1 t1 on t0.docentry = t1.docentry where t0.docnum = @ultentg)
    set @cant2 = (select sum(t1.quantity) from ordr t0 inner join rdr1 t1 on t0.docentry = t1.docentry where t1.targettype = '15' and t1.trgetentry = @ultentg)
    if @cant > @cant2
    begin
    select t1.itemcode as 'ItemCode', t1.dscription as 'Product', t4.quantity as 'Quantity Sales Order', t1.quantity as 'Quantity Delivery' from odln t0 inner join
    dln1 t1 on t0.docentry = t1.docentry inner join ordr t3 on t1.baseentry = t3.docnum inner join rdr1 t4 on t3.docentry = t4.docentry
    where t0.docnum = @ultentg and t1.itemcode = t4.itemcode and t1.quantity <> t4.quantity
    end
    Greetings

  • Want to send the Sales Order No  in Alert message

    Hi,
         my scenario is  IDoc to File.  suppose due to sme validations my message got failed in any where. immediatley I'm  sending an Alert to End User . But as per the prsent devolopment End user is not understaning  that which Sale order got failed. End user is not capable to open the Hyperlinks of the message monitoring . So, user is asking to send the Sales order no inside the Alert message (Mail) .
    is it possible to send the message content also inside the Alert Message (Mail)
    Regards
    Jain

    is it possible to send the message content also inside the Alert Message (Mail)
    Since the salesorder number comes from the payload....you need to introduce a BPM here....there is no other option than this to get a value from payload into alert message..
    There is a blog by Michal explaining the same....please check...if i get it will update the same:)
    this is the blog i am talking about....check if it helps you..
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    Regards,
    Abhishek.
    Edited by: abhishek salvi on May 7, 2009 8:09 PM

  • Notification or Alert when selecting Item with charge on Sales Order???

    Hello,
    Is it possible to make an notification / alert on a salesorder when entering a item with batch/charge???
    Now everytime the customer must enter CTRL-TAB on amount field to select a batch but don't get a reminder for the batch.
    They don't want to select the batch/charge on Delivery.
    THX
    Mark

    Below is code that will prevent deletion of a line from Sales Order.
    DECLARE @NoOfRows int
    DECLARE @MaxLineNum int
    DECLARE @UserId int
    IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '17'
    BEGIN
    select @NoOfRows = COUNT(*) from RDR1 where DocEntry = @list_of_cols_val_tab_del
    select @MaxLineNum = MAX(LineNum) from RDR1 where DocEntry = @list_of_cols_val_tab_del
    select @UserId = UserSign2 from ORDR where DocEntry = @list_of_cols_val_tab_del
    IF(@NoOfRows <> (@MaxLineNum + 1) AND @UserId IN (10,11))
    BEGIN
    select @error = 1234
    select @error_message = 'One or more lines have been deleted from the Sales Order'
    END
    END
    You can say which users cannot modify Sales Orders like by modifying the @UserId IN (10,11) below. You need to get the User ID from the OUSR table.
    IF(@NoOfRows <> (@MaxLineNum + 1) AND @UserId IN (10,11))
    Hope this helps
    Krishnan

  • Query Alert for a change in value of the Quantity field of the sales order

    Hi Experts,
    A query alert has been set up to alert the warehouse employee when a new sales order is created by a sales employee. Our client wants the warehouse employee alerted when the sales employee edits the quantity field of an already added sales order.
    Kindly assist in designing a query to notify of this change in the Quantity field of the sales order.
    David

    Try this one:
    SELECT T0.DocNum, T0.CardCode, T1.ItemCode, T3.Quantity 'Old Qty', T0.Quantity 'New Qty', MAX(T2.LogInstanc) 'Times Changed'
    FROM dbo.ORDR T0
    INNER JOIN dbo.RDR1 T1 ON T1.DocEntry = T0.DocEntry
    INNER JOIN dbo.ADOC T2 ON T2.DocNum = T0.DocNum AND T2.ObjType = '17'
    INNER JOIN dbo.ADO1 T3 ON T3.DocEntry = T2.DocEntry AND T3.ItemCode = T1.ItemCode
    WHERE T0.DocStatus = 'O' and T0.DocType = 'I' AND T1.Quantity != T3.Quantity
    GROUP BY T0.DocNum, T0.CardCode, T1.ItemCode, T1.Quantity, T3.quantity

  • Need an alert for Customer Ref. No on Sales order.

    Dear All,
    I have a question concerning Customer Ref. No. tab in the Sales Order.  We use this tab to enter the customers PO number.  if I create and save a Sales Order with a PO number, is there a way to ALERT me when I try to make a new Sales Order using the identical PO number as previously saved. 
    e.g. I have a SO#1 Customer Ref. No is #10. Then I have a SO#5 Customer Ref. No. is #10 too. When I type in #10, is there anyway to pop-up me an ALERT to let me know I have #10 for SO#1 already?
    Thanks.
    Yuka

    Hi Yuka,
    Check below code in SP_Tran
    If @object_type = '22'
         begin
              Declare @refcli as nvarchar(2)
              Select @refcli =
              (SELECT top 1 T0.NumAtCard
              FROM OPOR T0
              where T0.docentry = @list_of_cols_val_tab_del
              order by NumAtCard
              from OPOR where docentry = @list_of_cols_val_tab_del
              if @refcli='' or @refcli is null Or @refcli=@refcli
              begin
              set @error = 1
              set @error_message = 'No vendor References !!! Or vendor References is Already exists!!!'
         end
    end
    Hope this will helps you.
    Thanks,
    Sachin

  • Alert for change in due date on sales order

    Hi,
    I would like the system to create an alert when ever a user changes the due date on an existing sales order. The alert should only be triggered once when the change takes place.
    Please help
    Kind Regards
    Grant

    Grant,
    You could use the Query below 
    SELECT DISTINCT T1.DocNum AS 'Document Number', T1.CardCode, T1.CardName, T0.DocDueDate [Old Due Date], T1.DocDueDate [New Due Date] FROM  [dbo].[ADOC] T0  INNER JOIN  [dbo].[ORDR] T1 ON T0.DOCNUM = T1.DOCNUM WHERE T0.ObjType = N'17'   AND  T0.DocNum = 400000
    AND T1.DOCDUEDATE <> T0.DOCDUEDATE
    NOTE: The number of times the Alert appear cannot be controlled through a Query, it is a setting in the Alerts windows. 
    Suda

  • Possible to Setup Sales Order Alert???

    Hi,
    I am trying to determine if it is possible in SAP B1 to setup an automatic alert message to be sent out to a distribution list whenever a sales order is entered into the system.
    Basically when are service techs need a part for a service call they are entering a sales order from the service call screen. 
    What we need is for an SAP alert to be sent out whenever a new sales order is entered.
      Is this possible in SAP B1?? 
    If it is how would you go about setting this up??
    Thanks,
    Joe

    Gordon, there are basically two scenarios that wil work for me.
    1.  I would like an alert sent out to various individuals anytime there is a new open order entered in the system.  It is my understanding that since you have to set time intervals that it will keep sending the alert until the order is closed?   Is this correct or can it be setup to only send out the alert one time when order is entered?
    2.  If my first scenario cannot be setup then I would need an alert to go out in specified intervals that will show all open sales orders that have not be processed.

  • Event Alert firing Two times when updated Sales order

    Hi ,
    I have created one event alert. It is working fine while creating a new sales order i am getting email once. But once any sales order has updated means I am getting multiple Emails for same. Please find below mentioned i am using in Alert . In the query term_id 1045 & 1046 are 'Prepayment' values.
    Any one help on this issue. This issue applicable only in PROD instance.
    select ooh.order_number sales_Order_Number,
    ooh.ORDERED_DATE,
    ooh.FLOW_STATUS_CODE,
    rt.NAME ,
    hca.ACCOUNT_NUMBER customer_account_number
    INTO &SALES_ORDER_NUMBER,
    &ORDERED_DATE,
    &FLOW_STATUS_CODE,
    &NAME
    &CUSTOMER_ACCOUNT_NUMBER
    from oe_order_headers_all ooh,
    ra_terms rt,
    hz_cust_accounts hca
    where 1=1
    and ooh.payment_term_id=rt.term_id
    and ooh.SOLD_TO_ORG_ID=hca.CUST_ACCOUNT_ID
    and ooh.flow_status_code = 'ENTERED'
    and rt.term_id in ('1045','1046')
    and ooh.rowid = :ROWID
    Thanks,
    Amarnath

    955221 wrote:
    Hi ,
    I have created one event alert. It is working fine while creating a new sales order i am getting email once. But once any sales order has updated means I am getting multiple Emails for same. Please find below mentioned i am using in Alert . In the query term_id 1045 & 1046 are 'Prepayment' values.Please see old threads for simialr discussion -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Event+AND+Alert+AND+Multiple&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Any one help on this issue. This issue applicable only in PROD instance.What is the difference between PROD and other instances?
    Thanks,
    Hussein

  • Sales Order Schedule Line Alerts by Material Code

    Hello,
    We have a need that I am not sure how to handle within SAP.  We record a number of important notes on each of our materials in the Internal Comment section within Material Master.  When a person is selling an item, hence puts it on a schedule line of a SO, they are suppose to review this comment.  As you can imagine due to the effort that is involved with this process it is often not done and errors occur.  I was wondering if anyone knew of a process that would show a pop-up with the contents of the Internal Comments or a way to define a pop-up that we can specify information by material.  This pop-up would appear after the material code is put on a line - either before or after ATP is performed.
    Thanks,
    Kent

    Dear Praveen
    Dont maintain the storage location 0003 in MMSC.  Also, in material master, you dont maintain the "Delivering Plant" so that you will have to input manually in sale order.  If Plant is not flowing automatically in sale order, your storage location will also not flow.
    thanks
    G. Lakshmipathi

  • Self Updating Report of Open Sales Orders (Maybe Crystal )

    I want a self updating report of Open Sales Order. I want it to refresh constantly. I know that it could be an alarm but it would be executed every # minutes and dont want to. Any ideas ? I dont know Crystal Reports enough but is it posible ?

    Hi ,
    If I were you , I will not be crazy looking at my sales order in every 1 minutes ..I would train my users to check at least 15 minutes.
    I understand what u are trying to do;you  want that customer will see the latest open SO created ..but 15 minutes is good enough time .
    I think you have to check if database size grows up big time ..so far no report has come to me from my clients for this set up .
    make sure you  are not saving an alert into database
    If you are using multiple alerts , I will atleast monitor my database for a while to see i encounter performance issue ..
    So far for one alert at every 15 minutes ..i think u should be fine ..
    Hope this helps
    Bishal

  • Query For Sales Order Amendments

    Hi,
    Does anyone have a query that lists the amendments to a Sales Order?
    I basically want to create an alert that runs this query once a day and shows me the sales orders that have been amended that particular day.
    Any help on this would be gratefully received.
    Regards
    David

    Hi..
    Try These Query in Alert you will get your req. fulfill
    SELECT T0.[DocNum], T0.[DocStatus], T0.[DocDate], T0.[DocDueDate], T0.[CardCode], T0.[CardName] FROM ADOC T0 WHERE T0.[ObjType] = 17 AND  T0.[UpdateDate] = GETDATE()
    Regards,
    Bhavank
    Edited by: Bhavank on Sep 28, 2010 5:50 PM

Maybe you are looking for