Basic steps of report generation by query with example and scenario
Basic steps of report generation by query with example and scenario:
QM Report to get the Vendor name, and DC number for inspection lots by Query:
Current QM reports in SAP will provide information with vendor code for inspection lots in QA32 / QA33 transaction. But the fields available in these transactions will not suffice as the missing fields of vendor name and DC number. And many times we need to develop these reports in QM based on different requirements, and most of them can be achieved by this method.
Agenda of sharing this is to, help functional consultant to create Query and transaction on his own and avoid dependency on ABAP. This is an attempt to help people who are not aware of this or needs clarity in the steps. If you feel this is helpful you can rate the document. Thank you.
Scenario is as said below.
For the bought out parts and parts coming from vendor are inwarded with purchase documents along with DC number. And at the same time the information card is printed for these parts and the sheet is attached to the respective storage bin.
QC check can takes place based on the priority and can take minimum 3 to 4 days to visit the particular lot. And at this point of time, QC wants to identify and correlate the parts with inspection lot. And for this QC needs a report which includes Quality inspection lot number, lot quantity, material document, vendor code, vendor name, and DC number.
Such kind of report not available in standard SAP and this can be easily achieved with SAP ABAP Query and a transaction code can be created to serve the purpose by the functional consultant.
Need report of displaying inspection lot details along with vendor details and DC number.
Inspection lot number range
Inspection lot origin
Stepwise method to achieve this through query
Step1: Create user group in SQ03
Add QM package and save the user group with transport number.
Step 2: Create Info set in SQ02
Add all the required tables with key fields as shown below
Generate the info set as shown below
Save with transport number and below message is received.
Step3: Assign the info set to the user group in SQ02
Step 4: Create Query in SQ01 transaction
Since there is one info set assigned, you can select the same in the pop up message.
Select the field groups
Select the fields
Select the input selection fields with numbering, lower number will be arranged from the top in display
Click on Basic list to select the output fields
Select the output fields as shown below
Click on test to check
Save the query
Step 4: Generate the program for the query
Identify the program name in the query
Step 5: Create the transaction in SE93 for the query
Save the transaction.
This completes the requirement.
It is not recommended to create T code on the generated program name E.g.: AQZZQM_VEN_RPT==ZQMVEND========). This is because if the Info set Query undergoes any changes, then at least once the Info set query should be executed through SQ01 transaction in production (Generate Query), otherwise the transaction code will still point to the old generated program.
Solution: To avoid above problem for changing info set, we can adopt below method.
Transaction code will be automatically created by system through Area Menu (SE43). This system generated transaction code points to Info set query (standard area / global area) and not the generated program.
Hope this document helps.