Using SAP Query step by step.
Using SAP query step by step to make simple report quickly.
1. Create Infoset
Go to transaction code: SQ02 >> Choose Tab Environment >> Choose Query Areas >> Choose Standard Client ( Client Specific ) – If you want test on current client and then transport to others client.
Fill infoset field name: ZPP_R001 >> Click Create
Fill Title of Infoset, authorization group (if it’s necessary)
- Choose Direct read of table (if data of report need only from single table)
- or choose Table join using basis table (if data of report need join from multiple tables)
Choose Include all table fields (Recommend)
2. Editor Infoset
Select necessary field for report by double – click on field. >> Editor information of field. Example: Long text, Header text, … etc … Remove unnecessary field by hold on Ctrl and Left-Click then Right-Click to choose Delete Field (s) from Field Group
Or Additional ABAP code into infoset by Click on Extras >> Choose Tab Code
In this screen is position of ABAP code in program generate. (Ignore if you don’t want insert ABAP code)
Click on Check Code and Save Code (Ensure system message ‘No syntax errors found’) >> Click on button Save and click Generate infoset.
3. Role/User Group Assignment
Assign this infoset with user group exists or maintain new user group.
In screen, click on Role/User Group Assigment. Example, assign for ZPP – PP user group ( Can assign for multiple user group ) >> Click Save
Go to transaction code: SQ02 >> Choose Tab Environment >> Choose Query Areas >> Choose Standard Client ( Client Specific ) >> Choose again Tab Environment >> Choose User Groups
Click Create >> Fill description of User Group and Click Save.
4. Create SAP Query for recently Infoset.
Go to transaction code: SQ01 >> Click Others User Group
Choose user Group ZPP
Fill name of query >> Click Create
Fill Title Notes of Query, List format, Standard Variant, Output format …etc…
5. Design Layout for Report
Check to Choose Parameter Field ( Field will appearing on the selection-screen )
Check to Choose Fields displayed in list ( Fields will appearing on the result report )
List Field Color by Click on field in Layout then Choose color of list field. >> Apply>> Save >> Back to Screen Create Query >> Click Test to test Report.
6. SAP Query Transaction Code Assignment
There are two methods to assign SAP query with Transaction Code.
Method 1 (Recommend)
Go to transaction code: SE93
Fill name of Transaction Code. Example: ZPP_R001 >> Click Create >> Choose Program and selection screen (report transaction) >> Enter
Fill Transaction Text, Program: START_REPORT, Selection Screen: 1000, Check GUI support for HTML, Java, Windows.
Save on request and package and insert default values
In screen Query, Choose tab Query >> More functions >> Display Report Name
Go to transaction code: SE93
Fill transaction text, Paste program generated from query. Selection screen: 1000, …
Save on request and package to finish