Skip to Content
avatar image
Former Member

Add Document Creator Name in a Query

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 15, 2017 at 12:11 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14, 2017 at 10:47 PM

    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

    Add comment
    10|10000 characters needed characters exceeded