cancel
Showing results for 
Search instead for 
Did you mean: 

hr report

Former Member
0 Kudos

hi all,

did any one knows about AD HOC reports in hr abap .

if u had any sufficient materials could u pls send me asap.

urs,

suman

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

good

sikindar_a
Active Contributor
0 Kudos

Former Member
0 Kudos

Hi

Please find the follwing have step by step creattion of Ad hoc Qurey

http://saptechnical.com/Tutorials/SAPQuery/Part2/Page1.htm

Best Regards

Edited by: Sreenu (Adi) on Oct 15, 2008 8:59 AM

Former Member
0 Kudos
Former Member
0 Kudos

Hi suman,

if your looking for SAP Query

in a quick span of time, we take the help of ABAP Queries. Sometimes, we require data to test our program. In such cases, we have to get records from different tables that satisfy our requirement, say, requirement which needs invoices whose value is greater than 1000 and order reason free of charge sample (105). The whole process comprises of three steps. 1) Creation of user group 2) Creation of infoset 3) Creation of queries The transaction codes associated with ABAP Query are 􀀹 SQ01 - ABAP Query 􀀹 SQ02 - Infoset 􀀹 SQ03 - User group Now, let us talk about mentioned steps, each in detail Creation of Usergroup Transaction associated with creation of usergroup is SQ03 Click Create button, give the description of this Usergroup and Save it. Creation of Infoset Transaction associated with creation of infoset is SQ02

By clicking on Create button, a popup opens. Give a description at the name field and specify the basis table to join as VBRK and press Ok. In next screen, a new table can also be inserted by clicking on Insert table button on application toolbar. Give VBRP as input in the Add table popup. By default, join conditions are displayed or else they can be determined by clicking on Join conditions button.

For maintaining the infoset, click on Infoset button. A popup opens asking what fields should be there in field groups. Select radiobutton Create empty field groups and press Ok. Two empty field groups got created. In the left pane, we find the list of fields in both the tables VBRK and VBRP. Drag and drop the fields from the left pane on to the field groups. As of now, we make use of only one field group (say Billing document u2013 Header data). Delete the second field group by clicking on the Delete FieldGroup button as it is not containing any fields in it. Click on Generate button to generate the infoset. Go back to the main screen of SQ02 by clicking Back Button on standard tool bar. Click on Role/UserGroup Assignment to assign the infoset to a specific usergroup. Check the checkbox beside the user groups and Save to assign infoset to them. Here, ZSDN_ISET is assigned to ZSDN_UGRP.

Creation of ABAP Query Transaction associated with creation of query is SQ01. By default, the queries of user group which is opened recently in SQ03 are displayed. Give ZSDN_QUERY as Query Name and Click on Create button. A hit list opens with all the list of infosets assigned to the user group (ZSDN_UGRP). Select ZSDN_ISET and click Ok. This moves to the first screen of creation of query. Title displayed in this screen is nothing but the report title. Number of lines per page can be specified. ABAP List is selected as Output format. These are the attributes of the report that is going to be developed.

Click on Next Screen to select the field groups that are to be used in our query. Check the checkbox Billing document: Header Data and move to next screen. Click on Next screen to select the list of fields required in the query.

Click on Next screen to determine which of these fields are to be select-options and parameters. Check the checkbox before the fields and press Enter to make SV and 1Z input enabled. Check checkbox SV u2013 No intervals for select-option Check checkbox 1Z u2013 No extensions for select-option No. determines the order in which the fields are displayed on selection-screen. Settings->Hide Help texts hides the help provided on every screen.

Click on the Basic list button on application tool bar. Select the checkbox columns separated by | to have a delimiter for the fields on the report output. Line determines the line on which the fields are displayed. Fields can be split into two lines as per the requirement. Sequence gives the order in which the fields are displayed on the report output. Sort helps to sort the records based on the specified field. Total gives the sum total. Give the input as specified in the below screenshot. Click on Next Sscreen to check the sequence specifications.

Click on Next screen to specify field output options. Length, position & color formats of the fields on output screen can be changed. Units can be displayed before the value(first radiobutton) or after the value(third radiobutton) or the unit need not be displayed at all (middle radiobutton). Click on Next screen to specify report header and footer

Give some text Sample Report For ABAP Query as header and &%DATE gives the current date in the footer. Click on Next Screen to determine the graphics. Do not change of the options and click Test button. A popup gets displayed giving the option to set the number of database records to be read. Click Ok to get the selection-screen displayed. Give input to it as per our requirement (say Order reason u2013 105 & Net value is greater than or equal to 1000).

Output of the report gives the list of records which belong to order reason 105 and amount is greater than or equal to 1000. Clicking on ALV button on application toolbar, output of the report changes to ALV Grid format without any extra effort.

Click on Back Button thrice to move the graphics settings screen to SAVE the ABAP Query. How to generate the program code from the Query? Goto SQ01 and select the query ZSDN_QUERY. From the menu options choose Query -> More functions -> Generate program How to get the name of the program generated? Click on Display report name to get he name of the report generated.

There is a specific naming convention to this program. It starts with AQZZ, continued by user group name, from seventeenth character Query Name starts and rest of the spaces are filled with u2018=u2019 (equals).