SAP Query Using ABAP: Submitted by Kiran Subramaniam S
SAP Query Using ABAP: Submitted by Kiran Subramaniam S
Using ABAP
Submitted By
Kiran Subramaniam S
III Year BE/CSE
AC07UCS033
SAP Query using ABAP
nd
Here in this document, we’ll demonstrate building SAP query using 2 method (Direct
read of table).
1. Create InfoSet by using t-code SQ02:
2
SAP Query using ABAP
Press enter.
Press enter.
3. Press ‘Code’.
3
SAP Query using ABAP
4
SAP Query using ABAP
5
SAP Query using ABAP
And write the following code in START-OF-SELECTION section to display a few field
data in ALV grid display report format.
6
SAP Query using ABAP
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
EXIT.
8. Now assign the user group ZUGRP_BEJ to the InfoSet ZINFOSET_BEJ. I’ve assigned
two users in my user group.
7
SAP Query using ABAP
Save it.
9. Now create the query.
8
SAP Query using ABAP
The following selection screen will appear where we need to put the flight
date.
Enter the flight date as 11.06.2008 and execute the query; we’ll get the
following ALV grid display report.
9
SAP Query using ABAP
10