How to create a query for purchase document releases

It is possible to generate a complete list of purchase document releases with the purchase document number (requisitions and orders), releaser, release date and release time.

* First, create an Infoset using transaction SQ02 directly reading from table CDPOS and create an additional table: CDHDR. If you are releasing purchase requsitions at the item level, it is convenient to create an additional field (PURPS LIKE EBAN-BNFPO) to capture the item number. Once the field is defined add the following code to it:

PURPS = CDPOS-TABKEY+14(5).

Once created, make sure to assign your Infoset to the user groups.

* Second, create an SAP Query (SQ00) or QuickViewer (SQVI) based on the Infoset you created previously. Set CDPOS-OBJECTID, PURPS (additional field), CDHDR-USERNAME, CDHDR-UDATE & CDHDR-UTIME, CDPOS-TCODE, CDPOS-VALUE_NEW, and CDPOS-VALUE_OLD as list fields (display screen).

Set CDPOS-OBJECTCLAS, CDPOS-OBJECTID, CDPOS-TABNAME, CDPOS-FNAME, CDPOS-CHANGIND, CDHDR-USERNAME, CDHDR-UDATE & CDHDR-UTIME as the selection fields (selection screen).

* Finally, execute your query. For filtering purchase requisition releases set:

Object class='BANF'
Table Name='EBAN'
Field Name='FRGKZ'
Change type='U'

For filtering purchase order releases set:

Object class='EINKBELEG'
Table Name='EKKO'
Field Name='FRGKE'
Change type='U'

Make sure to specify username, dates or purchase document number (object value) in order to reduce run times.

    Requires Free Membership to View


This was first published in December 2005

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.

    Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.