cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business One Alerts & Notifications

shak9828
Participant
0 Kudos

I'm learning SAP Business One and I need help with one thing:

Let's imagine I create a Purchase Order, and then I need to receive a A/P Downpayment Receipt from the vendor within 5 days. If I do not receive it within 5 days, I need to receive a notification/alert in SAP B1 to notify me about it and then I will request for it again by calling.

Question: How can I automate the notification/alert? Maybe with a query?

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi,

That is correct, you would need to write a query to use with the alert system.

Regards,

Johan

shak9828
Participant
0 Kudos

Hello Johan,

Thank you for your reply. Can you help me out with this query?

I tried this:

SELECT T0."DocNum" AS "Document Number", T0."CardCode" AS "Customer/Vendor Code", T0."DocDate" AS "Posting Date", T0."DocStatus" AS "Document Status" FROM "SBODEMORU"."OPOR" T0 WHERE T0."DocStatus" = ('O' ) AND T0."DocDate" = (ADD_DAYS(CURRENT_DATE, -5))

What else should I add?

Also, when I add this query to Alerts Management, I don't get a notification:
Frequency is 1 minute and in General Setting -> Services -> Update Messages = 0 min

What's the problem?

Johan_H
Active Contributor
0 Kudos

Hi,

My system version does not have A/P Down Payment Request, so I cannot give you a precise answer.

Please have a look in the B1 client at a purchase order that has an A/P Down Payment Request linked to it. Check the A/P Down Payment Request to see what the table is. The link is probably in that table.

Regards,

Johan

shak9828
Participant
0 Kudos

Thank you.

What about the second part of the question?

Also, when I add this query to Alerts Management, I don't get a notification:
Frequency is 1 minute and in General Setting -> Services -> Update Messages = 0 min

What's the problem?

Johan_H
Active Contributor
0 Kudos

I am not sure, but you could test setting Update Messages to 1 min.

shak9828
Participant
0 Kudos

Johan,

Maybe something's wrong with the query.

Question: User creates a PO, he needs to receive a notification if GRPO is not created within 5 days.
How to do this?

screenshot-1.png

Johan_H
Active Contributor
0 Kudos

Hi Shak,

This appears to be HANA syntax, and unfortunately I am not familiar with its functions. Does CURRENT_DATE return a date and time like GETDATE() ? If so, the parameter T0."DocDate" = (ADD_DAYS(CURRENT_DATE, -5)) can only ever be true at 00:00:00 o'clock. You can catch this by using >=

Otherwise I do not really see anything wrong with your query. You can also try to not use field aliases. It is not impossible that the alert system somehow needs the original field names. I would also recommend using DocDueDate instead of DocDate.

So could you please test this:

SELECT T0."DocNum"
     , T0."CardCode"
     , T0."DocDate"
     , T0."DocStatus"
FROM "SBODEMORU"."OPOR" T0 
WHERE T0."DocStatus" = ('O' )
  AND T0."DocDueDate" >= (ADD_DAYS(CURRENT_DATE, -5))

Regards,

Johan

shak9828
Participant
0 Kudos

Thank you very much Johan,

What about the previous question about PO and GRPO?

Johan_H
Active Contributor

Hi Shak,

The DocStatus of a purchase order that is linked to a Goods Receipt PO, will be 'C', and thus will will no longer be returned by your query.

Regards,

Johan

Answers (1)

Answers (1)

Abdul
Active Contributor
0 Kudos

Please mark helpful answer and close this thread