on 10-27-2010 11:48 PM
Hello dear experts,
I have an issue with the approval procedures and the validations I have to do using the Transaction Notificacion Stored procedure.
this is the scenario and conditions to consider:
1.A purchase order (Doctotal) that are between 0 and 25,000 USD needs an approval.
2. A purchase order needs to have all the project column filled in before the approval procedure. this column is in the detail of a document, so all the rows have to be filled in with the right project code otherwise when your request have been submmited and your receive the approval you are not allowed to do any changes in the Detail Document.
I realized that the approval procedure is launched before the Transaction Notification SP.
So I decided to add a query for the approval procedure considering the validations in the project column:
SELECT distinct 'true'
FROM OPOR
WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99 ---This part works perfeclty!!!
AND LEN(isnull($[POR1.Project.0],''))>0 and $[POR1.U_SubJob.0]>0 ) --This part does not work
As you see in the query, I am trying to validate that all the rows have the project code (Project) and a UDF (U_SubJob) filled in.
Have anybody been done this before? How can I access to the detail values of the document? It is easy to acces values on the header.
I appreciate any help on this. Thank you very much
Regards,
Mary
Mary,
Here is what I would do.
1) Create a new UDF in the Documents Header level. Call it "PO Approval"
2) Make sure that the Valid Values for this UDF are 'No' and 'Yes'
3) Default value for this UDF are 'No'
4) Move LEN(isnull($http://POR1.Project.0,''))>0 and $http://POR1.U_SubJob.0 Logic into the SP_Transaction Procedure.
5) Also in the Transaction Notification, say that you can add be added only if OPOR.U_Approval = 'Yes'.
6) So basically what this means is that you user will have to manually change the UDF from 'No' to 'Yes'
7) Then modify your Approval query as
SELECT distinct 'true'
FROM OPOR
WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99 and $[OPOR.U_Approval] = 'Yes'
😎 So what this would do is, the Stored Procedure will not allow the PO to be added until , the User manually changes the UDF from 'No' and 'Yes'.
9) Once the user changes UDF to 'Yes' and DocTotal is between 0 and 25000, your SAP Approval Procedure will be triggered.
Hope this helps
Krishnan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You must use both in approval procedure or use both in SBO store procedure transaction notification.
To request approval for a project, you this following approval query:
if (SELECT $[$38.31.0]) > ' '
select 'true'
the other query is for doctotal approval as follows:
if ($[opor.doctotalsys.number]) between 0 and 24999.99
SELECT 'true'
or
select distinct 'true' FROM OPOR
WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99
Both are able to use and work simultanously.
JimM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mary,
Transaction Notification SP can not be used for Approval Procedure You can check the related note for detail.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.