cancel
Showing results for 
Search instead for 
Did you mean: 

Approval Query For Purchase Request

former_member296295
Participant
0 Kudos

Hello,

I need a query that whenever a purchase request is made for Item type 'F' i.e. Fixed assets item then an Approval should be generated. Am using SAP 9.2 PL 04

Thanks

Kalli

Accepted Solutions (1)

Accepted Solutions (1)

former_member312729
Active Contributor
0 Kudos

Hi Kali,

Try this

SELECT distinct 'true' from OPRQ T0 inner join PRQ1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode]
WHERE T2.[ItemType] ='F'

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this approval query:-

SELECT Distinct 'True' FROM OPRQ T0 INNER JOIN PRQ1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE $[$38.1.0] IN (select T2.itemcode from OITM T2 where T2.[ItemType] = 'F')

Please note approval procedure will work only for header level not at row level. But approval procedure will work, if you document have only one row.

Regards,

Nagarajan

former_member296295
Participant
0 Kudos

Thanks Nagarajan for the efforts, but the purchase request still added without going into the approval stage. tried with One Item row level only

Regards

Kalli

former_member296295
Participant
0 Kudos

Thanks Balaji, but the Purchase Request adds directly without going into Approval Stages. I tried this query earlier with Purchase Order with OPOR table but it did not work for Approval in Purchase Order also.

Regards

Kalli

former_member312729
Active Contributor
0 Kudos

Hi kalicharan,

Had you set the approval template

former_member296295
Participant
0 Kudos

Yes balaji, I had

former_member312729
Active Contributor
0 Kudos

Hi,

I had tested with same query its working. Check under general settings whether the option Activate Approval procedure is enabled or not