Problem solve Get help with specific problems with your technologies, process and projects.

How to create a query for purchase document releases

Need to create a query and generate a list of purchase document releases? Learn how in this user-submitted developer tip.

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.

This was last published in December 2005

Dig Deeper on SAP ABAP

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchHRSoftware

Close