cancel
Showing results for 
Search instead for 
Did you mean: 

Approval procedure vs Transaction Notification

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

You may check this:

former_member186095
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Mary,

Transaction Notification SP can not be used for Approval Procedure You can check the related note for detail.

Thanks,

Gordon

frperez
Explorer
0 Kudos

Hello Gordon.

Sorry for the inconvenience, but will you have the document or related note where you mention that you cannot have both methods working?

Kind regards.

Francisco