Professional Documents
Culture Documents
The
Document Key (DocEntry) of a sales order becomes the base key (BaseEntry) of
SELECT
distinct 'N'
FROM
POR1 T0 /* Sales Order lines table where the base key is
stored*/
WHERE
$[$ 38.45.Number] is null or /* The index for the base
Entry has to be used as it is referring to the open form*/
$[$ 38.45.Number] = ''
For more information on how to set a formatted search please refer to the
document: How to Define and Use FMS in Release 2005 A.
The approval can therefore be based on the condition that if the UDF value is
equal to a defined value, here 'N', the approval procedure should be triggered.
The condition can be set using a query such as:
SELECT
distinct'True'
FROM
OPOR T0
WHERE
$[OPOR.U_BaseREF] = 'N'/* The UDF name has to match
the one created in your database.*/
For how to create UDF refer to note 1171966.
The approval process can thus be customised to include only purchase orders not
created from a sales order.
Once a standalone document is created, the FMS pulls the value 'N' into the UDF.
When attempting to add the document, the defined approval will check the value
of the UDF and trigger the approval procedure.
If a purchase order is created based on a sales order, it adds directly to the table
and bypasses the purchase order form. Hence the FMS will not activate and will
not populate the UDF. Consequently the approval procedure will not trigger. In
this example the FMS will only activate for documents where there is no base
key.