Skip to Content

Adhoc Query

By Rajesh Kumar Burra

The InfoSet Query is a useful tool for maintaining queries within the SAP Query and is suitable for developing queries and for ad-hoc reporting.

InfoSet Query is suitable for reporting in all areas of the SAP R/3 system. When InfoSet Query is used in HR for ad-hoc reporting, the name Ad-Hoc Query is used instead of InfoSet Query.

Ad-Hoc query provides three different kinds of reports:


  • Basic List        – Simple reports

  · Statistics  – reports with statistical functions such as Averages, percentages etc

  • Ranked List     – for analytical reports

The first step in the process of creating an Ad-Hoc query is to create a Functional Area. Function area provides special views of logical databases. They determine which fields of a logical database can be evaluated in queries.  

Go to tcode SQ03. 

/wp-content/uploads/2013/09/clip_image002_272664.jpg

Select Query areas

Menu->Environment->Query areas

Select the radio button ‘Global area’.

/wp-content/uploads/2013/09/clip_image003_272665.jpg

Click on ‘Choose’

Create user group

Here you specify the users who should be authorized to run the query. A user group is always associated with a Functional Area.
– Go to the menu path Environment => User Group or SQ03 à Give a user group name in the screen. Specify the sap logins of the users whom you want to authorize for using the functional area and click on the Create button.

Select User group as ‘zdemo_user’ (Create Z user group).

/wp-content/uploads/2013/09/clip_image004_272690.jpg

Create


/wp-content/uploads/2013/09/clip_image005_272691.jpg

Go to Environment menu select INFOSET or go for tcode (SQ02)

/wp-content/uploads/2013/09/clip_image006_272692.jpg

/wp-content/uploads/2013/09/clip_image007_272693.jpg

Select infotype which u need (like above screen short)

/wp-content/uploads/2013/09/clip_image008_272695.jpg

Click on save and Click on generate button (red button).

Go back to main screen

Click on ‘Role/User group assignment’ tab

clip_image010.JPG

clip_image012.JPG

Select assigned table check box with User group which u already created.(zdem_user)

Save it and back…

Go to tcode for SQ01.

Query ‘zdemo_01’ (Create zname)

Click on ‘create’ button

clip_image012.JPG

Select assigned table check box with User group which u already created.(zdem_user)

Save it and back…

Go to tcode for SQ01.

Query ‘zdemo_01’ (Create zname)

Click on ‘create’ button


/wp-content/uploads/2013/09/clip_image014_272708.jpg


/wp-content/uploads/2013/09/clip_image015_272709.jpg

Pass title as Shortdesc..(demo for pa infotype)

  1. Save……
  2. Back….

Click on Infoset Query

/wp-content/uploads/2013/09/clip_image016_272710.jpg

/wp-content/uploads/2013/09/clip_image017_272711.jpg

Query is saved.

Click on continue….

  1. Back…

Click on Execute button (F8). In above screen we have selected selection screen as personnel number

/wp-content/uploads/2013/09/clip_image018_272712.jpg


Below you can see personnel numbers are displayed as Text Value with Name. It should display Personnel Number.

/wp-content/uploads/2013/09/clip_image019_272713.jpg

Go to SQ01

/wp-content/uploads/2013/09/clip_image020_272714.jpg

Select “only value” and save.

/wp-content/uploads/2013/09/clip_image021_272715.jpg

Save. Go back and execute.

/wp-content/uploads/2013/09/clip_image022_272717.jpg

Go to se93 to create Z Transaction Code.

/wp-content/uploads/2013/09/clip_image023_272718.jpg

/wp-content/uploads/2013/09/clip_image024_272719.jpg

/wp-content/uploads/2013/09/clip_image025_272720.jpg


/wp-content/uploads/2013/09/clip_image026_272721.jpg

/wp-content/uploads/2013/09/clip_image030_272722.jpg

/wp-content/uploads/2013/09/clip_image031_272723.jpg

Execute

/wp-content/uploads/2013/09/clip_image032_272724.jpg

43 Comments
You must be Logged on to comment or reply to a post.