Documente Academic
Documente Profesional
Documente Cultură
SAP Queries
The application SAP Query is used to create lists not already contained in the SAP standard. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists
| 31-Dec-13
Creating Queries
User Groups Define Data InfoSet What data is needed? How to get the data Design the Query Selection Fields Report Fields Type of Query Layout of Report Sort Order Totals option Output Length for each field Formatting Color, Label etc. Page Header and Footer
Field Groups What fields can be used? How can they be grouped?
Query Area Group the above objects logically and for access purpose
3 | 31-Dec-13
Components of Query
Data Source For Query Field Groups User Groups Query Areas Authorizations
| 31-Dec-13
| 31-Dec-13
Field Groups
An Infoset contains all the fields which can be accessed for building a query.
A field group combines related fields together from an infoset into a meaningful unit. It provides you with a preselection, so that you do not have to search through all fields of a data source just to produce a simple list. This means that the end-user only has access to precisely those fields assigned to a field group. Fields must be assigned to a field group before they can be used in queries. The field group can thus also be used as a filter for restricting access to sensitive data.
| 31-Dec-13
| 31-Dec-13
| 31-Dec-13
| 31-Dec-13
Query Areas
A query area contains a set of query objects (queries, InfoSets, and user groups) that are discrete and consistent. You can differentiate between two different query areas, the standard area and the global area Standard Area The standard query area is primarily designed for ad-hoc queries, that is for queries that are created to fulfill a one-time demand and never used again. Standard area queries are client-specific. They are not connected to the Workbench Organizer. Global Area In the global query area, queries are developed that are used throughout the entire system (that is, they are cross-client). These queries are also intended for transport into other systems. Query objects created in the global area are registered in the Workbench Organizer. They can be created and transported using the normal correction and transport procedure.
10
| 31-Dec-13
Query Area
11
| 31-Dec-13
InfoSet Query contains the Object Selection function with which you should work in order to evaluate HR data.
InfoSet Query is designed in such a way that it can be called directly from roles with a relevant InfoSet and be used directly by the end-user for reporting within his/her roles. This also means that the end-user does not have to carry out any SAP Query administration functions, for example assigning him/herself to a user group. InfoSet Query uses the SAP List Viewer (ALV) as its standard output medium. Transaction code for Infoset Query SQ02
13
| 31-Dec-13
14
| 31-Dec-13
15
| 31-Dec-13
16
| 31-Dec-13
17
| 31-Dec-13
18
| 31-Dec-13
Infosets in HR
19
| 31-Dec-13
20
| 31-Dec-13
21
| 31-Dec-13
22
| 31-Dec-13
23
| 31-Dec-13
Datasource - PNPCE
24
| 31-Dec-13
25
| 31-Dec-13
26
| 31-Dec-13
Designing a Query
1. Which data source corresponds to the requirements? 2. Which fields do you need to include in the InfoSet? 3. Do you need additional information which is not available in the data source? (This calls for the linking of additional tables and the definition of additional fields). 4. Do you need parameters and selection criteria? (parameters and selection criteria appear appear on the selection screen of queries which are created using the InfoSet). 5. Do you have to take any special measures such as access protection? 6. Do you have to change the long texts and headers of the selected fields?
27
| 31-Dec-13
28
| 31-Dec-13
29
| 31-Dec-13
30
| 31-Dec-13
31
| 31-Dec-13
32
| 31-Dec-13
Transporting Queries
Standard Area Query objects are stored in the client-specific table AQLDB. They are not connected to the Change and Transport Organizer. Global Area Query objects are stored in the cross-client table AQGDB. They are connected to the Change and Transport Organizer.
33
| 31-Dec-13
34
| 31-Dec-13
You can transport objects either from one client (the source client) to another client (the target client) within the same SAP System or from one client (the source client) in one R/3 System (the source system) to another client (the target client) in another R/3 System (the target system).
Option 1:
35
| 31-Dec-13
Option 1:
You must first export the objects for transport from the table AQLDB to the transport table AQTDB. This creates a transport request for the transport system that includes all entries created by the export from table AQTDB (transport dataset). The request covers all the entries from table AQTDB (transport dataset) generated by the export and has a name which corresponds to transport system conventions (sysKnnnnnn). The name of the transport request is given in the export log. In the table AQTDB, the transport dataset is stored under a key which matches the name of the transport request. Then you can move or import the transport request.
36
| 31-Dec-13
Option 2:
You must first download the source client objects for transport from the table AQLDB to a file. When doing this, you specify the file name and exactly where it is stored in the file system. A file can only contain one transport dataset, meaning that any existing file is overwritten. Downloading a transport dataset to a file effectively means that it cannot be read back into the table AQLDB. Then, you can upload the transport dataset stored in the file. Here, the transport dataset is read and inserted in the table AQLDB. As with an import, the system performs numerous checks which ensure that no inconsistencies occur in the table AQLDB.
37
| 31-Dec-13
38
| 31-Dec-13
Transporting Queries
39
| 31-Dec-13
40
| 31-Dec-13