cancel
Showing results for 
Search instead for 
Did you mean: 

Query Based Approval Procedure for Sales order .

former_member206437
Active Contributor
0 Kudos

Hi

I have created query for SO which results above 5000 d 50,000 .

By using this each query i created two seperate Approval Procedures which So is >5000 d >50000.

If So>5000 Approval Procedure wants to activate same thing for >50,000., Bur approval Procedure is not working wat will be the cause. i have linked this query In Terms as when the following applies.

If SO >5000 approved by user A.

If SO>50,000approved by User A & B.

Regards

Giridharan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Giri

Your query for the first should be as follows:

SELECT DISTINCT TRUE

WHERE $[$29.0.NUMBER] > 5000 AND $[$29.0.NUMBER] < 50000

For the second query:

SELECT DISTINCT TRUE

WHERE $[$29.0.NUMBER] > 50000

The query you were trying to use is looking at the table which will only apply to documents already posted, and as that query is not being filtered specifically it is bringing back all the records and getting confused. You must reference to the runtime value of the document being posted.

Kind regards

Peter Juby

former_member206437
Active Contributor
0 Kudos

Hi Peter

Thanks For ur Reply. Sorry to Say its Not working. I think that i am doing mistake some where r not i dont know?.

Pls help me out on this.

Regards

Giridharan

former_member583013
Active Contributor
0 Kudos

Giridharan,

I would like inform you that out of the Box SAP has an Approval template called Order Approval which is based on document total. If this Approval template does not exists you could create a new one and in the Terms Tab use

Total Document Approval term

You really do not need a query.

Suda

former_member206437
Active Contributor
0 Kudos

Hi Sudha

Thanks for ur Reply. Now Approval Procedure is working.

Regards

Giridharan

Answers (4)

Answers (4)

former_member187989
Active Contributor
0 Kudos

giridharan,

Need to modify the query in order to trigger approval procedure.

Jeyakanthan

former_member187989
Active Contributor
0 Kudos

giridharan,

Check whether you applied any standard contains

like discount/gross profit%/total document if any remove it.

Check tick marked required approval template.

Check tick marked Activate approval procedure in

BP tab of general settings.

Jeyakanthan

former_member206437
Active Contributor
0 Kudos

HI Jeyakanthan

Check whether you applied any standard contains

like discount/gross profit%/total document if any remove it.

Ans) No, But Undefined Type is Ticked , whether we have to give any thing here.Here i ticked d given Greater than 5000 value also.Not working

once i cheked with untick also not working.

Check tick marked required approval template.

Ans) yes

Check tick marked Activate approval procedure in

BP tab of general settings.

Ans) yes

former_member187989
Active Contributor
0 Kudos

Giridharan,

SELECT TRUE FROM ORDR T0

WHERE T0.DocTotal >5000.

create two approval stages & also two approval templates

for one approver(doctotal>5000) and two approvers (doctotal>50000)

Jeyakanthan

former_member206437
Active Contributor
0 Kudos

HI Jeyakanthan

Thanks for ur Reply. But still its not working the so is posting without approval.

former_member187989
Active Contributor
0 Kudos

Giridharan,

Can you post the query here ?

Jeyakanthan

former_member206437
Active Contributor
0 Kudos

Hi

This is My query:

SELECT T0.CardName, T0.CardCode, T0.DocNum, T0.DocDate, T0.DocDueDate, T0.DocTotal FROM ORDR T0 WHERE T0.DocTotal >5000

Regards

Giridharan