Professional Documents
Culture Documents
Abap Query - An Example: Applies To
Abap Query - An Example: Applies To
Applies To :
ECC 5.0
Created On :
18.12.2007
Author :
Sylvia Chandra
Company :
Telco Company
Summary :
This article will introduce you about ABAP Query and explain how to
create an ABAP Query based on a case scenario.
Table Of Contents
A Case Scenario
For example :
We would like to display all PO which was created on a certain date.
With information about who should release the PO or who is the latest
releaser (for PO that has been full release) and the message type of
the PO (has been print, mail, fax).
Release T16FV,
Strategy T16FS
PO
Output NAST
EKKO Status
Go To SQ02 to create Infoset
Give the title of the Infoset.
On Table join using basis table enter the basic table that u want
to join (for this case example we want to join several table with
basic table is T16FV, because the selection based on release
code and T16FV is a Release Prerequisites table).
Join The Table
Give a relation between the tables that you are going to join.
Choose The Field For Display
Choose field (from tables you have joined before) that you would
like to display.
Create Additional Fields
Create additional fields if you need them.
Create Coding
You can add some coding in some section. Click the button
inside the red circle.
• DATA
TABLES : T16FS, NAST.
DATA : condition(5) TYPE c,
ld_frgc1 LIKE t16fs-frgc1,
ld_kschl LIKE nast-kschl.
* ctrneu TYPE i,
* ctrneu2 TYPE i,
* ctrneu3 TYPE i.
• Record Processing
CLEAR : NEU, NEU1, NEU2.
IF ld_frgc1 IS INITIAL.
CASE EKKO-frgzu.
WHEN 'X'.
condition = 'frgc1'.
WHEN 'XX'.
condition = 'frgc2'.
WHEN 'XXX'.
condition = 'frgc3'.
WHEN 'XXXX'.
condition = 'frgc4'.
WHEN 'XXXXX'.
condition = 'frgc5'.
WHEN 'XXXXXX'.
condition = 'frgc6'.
WHEN 'XXXXXXX'.
condition = 'frgc7'.
WHEN 'XXXXXXXX'.
condition = 'frgc8'.
ENDCASE.
Create Queries
Selection Screen
Report Layout
Tips And Tricks
Complex Report
Every Query actually make a program. Find the program name then
copy it to new program then modify it as you wish.
Now, all step has been describe. It’s time for you to try.
Good Luck.