cancel
Showing results for 
Search instead for 
Did you mean: 

Query for MRP run

former_member209762
Participant
0 Kudos

Hi Gurus !

Can anyone give me a query for an approval procedure which triggers only when a PO is created during the MRP run?

Thanks for your help

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

Hi

Try This query

SELECT 'TRUE' where $[OPQT.COMMENTS]='Origin: MRP'

Terms Based On User Queries

In addition to the 6 terms embedded in SAP Business One, it is possible to attach user defined queries as terms for launching an approval procedure.

You first need to define a user defined query using a specific structure;

This specific SQL sentence has to start with SELECT 'TRUE' or SELECT DISTINCT 'TRUE'.

This SQL query structure indicates SAP Business One whether the term you define to trigger the approval procedure is fulfilled or not i.e. true or false.

Use the structure SELECT 'TRUE' in order to launch the approval procedure only in case the query returns a single true result (rather than multiple true results).

Use the structure SELECT DISTINCT 'TRUE' in order to launch the approval procedure whenever the query returns one or more true results.

In order to run the query on data you are currently processing in a certain document rather than on data recorded in the company database, use the query structure $[Table.Field] (as described below). Note that you can use this structure only on header tables (e.g. OINV, ORDR) and not on row tables (e.g. INV1, RDR1).

Hope helpful

Regards

Kennedy

former_member209762
Participant
0 Kudos

Hi Kennedy,

Thanks for your help.

Here's the query that works for me.

SELECT 'TRUE'

WHERE $[OPOR.COMMENTS]='Origin:MRP'

KennedyT21
Active Contributor
0 Kudos

Small Mistake should be the purchase order table .. cool close the thread ..

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check http://scn.sap.com/thread/3251380 thread.

Thanks & Regards,

Nagarajan