on 02-14-2017 8:25 PM
I am making a query about the status of a certain document and all its related target document (PR - PO - GRPO - AP Invoice - Outgoing Payment)
This is my query:
How can I insert the creator name of each of the document in my query?
My SAP version is 9.2 PL 3
Thanks
Hi
try this query:
select a.docdate as 'PO Date', a.DocDueDate as 'GRPO Date', a.DocNum as 'PO Number', a.CardCode as 'Supplier Code', a.CardName as 'Supplier Name', b.Dscription as 'Product', b.Quantity, a.docstatus as 'PO Status', d.DocNum as 'GRPO Number', d.DocStatus as 'GRPO Status', f.DocNum as 'AP Invoice Number', f.DocStatus as ' AP Invoice Status', g.u_name as 'User' from OPOR a left join POR1 b on a.docentry = b.docentry left join PDN1 c on c.baseref = b.TrgetEntry and c.ItemCode = b.ItemCode left join OPDN d on c.docentry = d.docentry left join PCH1 e on e.BaseRef = c.TrgetEntry and e.ItemCode = c.ItemCode left join OPCH f on e.docentry = f.DocEntry
inner join OUSR g on g.userid = a.usersign where a.U_NT is null and a.DocDate between [%0] and [%1]
Kind regards
Agustín
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this for PO and follow for other documents:-
SELECT T1.[U_NAME] FROM OPOR T0 INNER JOIN OUSR T1 ON T0.[UserSign] = T1.[USERID]
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nagarajan,
Sorry but the query you suggested does not work.
This is my query to see the PO status and all its' related target documents:
select a.docdate as 'PO Date', a.DocDueDate as 'GRPO Date', a.DocNum as 'PO Number', a.CardCode as 'Supplier Code', a.CardName as 'Supplier Name', b.Dscription as 'Product', b.Quantity, a.docstatus as 'PO Status', d.DocNum as 'GRPO Number', d.DocStatus as 'GRPO Status', f.DocNum as 'AP Invoice Number', f.DocStatus as ' AP Invoice Status' from OPOR a left join POR1 b on a.docentry = b.docentry left join PDN1 c on c.baseref = b.TrgetEntry and c.ItemCode = b.ItemCode left join OPDN d on c.docentry = d.docentry left join PCH1 e on e.BaseRef = c.TrgetEntry and e.ItemCode = c.ItemCode left join OPCH f on e.docentry = f.DocEntry where a.U_NT is null and a.DocDate between [%0] and [%1]
Now, I need to see who created the PO, the GRPO, AP Invoice and Outgoing Payment
Thanks
User | Count |
---|---|
98 | |
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.