SlideShare a Scribd company logo
ABAP QUERY – AN EXAMPLE

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

What Is ABAP Query ? …………………………………………………………………………. 1
A Case Scenario ………...………………………………………………………………………… 2
Creating ABAP Query ...………………………………………………………………………… 3
Result OF ABAP Query ..………………………………………………………………………. 4
Tips And Tricks …………………………………………………………………………………….. 5
What Is ABAP Query

  A tool to generate report without ABAP coding.
  All you need is to join the table and drag and drop field that you
  wish to occur in the report.
  Type of reports provided by ABAP Query :
  1. Basic List
      Simple Report.
  2. Statistics
      Report containing statistical functions like Average & Percentage.
  3. Ranked List
      Report written for analytical purpose.


A Case Scenario

There is a request to generate a report display who should release a
PO and message status of the PO.
The selections are based on :
  Date on which the record was created
  Purchasing Organization
  Purchasing Group
  Release Code
  Vendor’s Account Number
  Purchasing Document Type

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).

Creating ABAP Query

Now, we come to step in creating ABAP Query. There are 3 steps :
  1. Create User Group (SQ03)
     Specify the users who should be authorized to run the query.
  2. Create Infoset (SQ02)
     Indicates from which part of the SAP database the data is going
     to be retrieved and how the data is to be retrieved by the query.
  3. Create Queries (SQ01)
     Create the query and arrange the layout.
Here are the detail explanation of each step :
  Create User Group (SQ03)

      Go to SQ03 to create User Group




      Clik Assign users and Infosets
      Assign user to this user group.
Create Infoset
This report need information about PO, PO releaser and PO Message
Status. So that the table relation could be describe as below :


                               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.




On this case I add coding at code section:

•     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.

     SELECT kschl INTO ld_kschl FROM nast
     WHERE kappl = 'EF' AND objky = ekko-ebeln
     AND ( kschl = 'NEU' OR kschl = 'NEU1' OR kschl = 'NEU2' )
     AND spras = 'E' AND vstat = '1'.
      IF sy-subrc = 0.
        IF ld_kschl = 'NEU'.
         NEU = 'X'.
ELSEIF ld_kschl = 'NEU1'.
       NEU1 = 'X'.
      ELSEIF ld_kschl = 'NEU2'.
       NEU2 = 'X'.
      ENDIF.
     ENDIF.
    ENDSELECT.

*    ctrneu = ctrneu2 = ctrneu3 = 0.
*    CLEAR : NEU, NEU2, NEU3.

    IF T16FV-frggr IS NOT INITIAL AND T16FV-frgsx IS NOT INITIAL.
     CASE EKKO-frgzu.
       WHEN ' '.
        condition = 'frgc1'.
       WHEN 'X'.
        condition = 'frgc2'.
       WHEN 'XX'.
        condition = 'frgc3'.
       WHEN 'XXX'.
        condition = 'frgc4'.
       WHEN 'XXXX'.
        condition = 'frgc5'.
       WHEN 'XXXXX'.
        condition = 'frgc6'.
       WHEN 'XXXXXX'.
        condition = 'frgc7'.
       WHEN 'XXXXXXX'.
        condition = 'frgc8'.
       WHEN 'XXXXXXXX'.
        condition = 'frgc8'.
     ENDCASE.

     SELECT SINGLE (condition) INTO ld_frgc1
     FROM t16fs
     WHERE frggr = T16FV-frggr AND frgsx = T16FV-frgsx.

     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.

        SELECT SINGLE (condition) INTO ld_frgc1
        FROM t16fs
        WHERE frggr = T16FV-frggr AND frgsx = T16FV-frgsx.
       ENDIF.

       IF T16FV-frgco <> ld_frgc1.
  *       CLEAR : EKKO, T16FV.
        DELETE : EKKO, T16FV.
       ELSE.
        MODIFY EKKO.
       ENDIF.
      ENDIF.

Create Queries

  Go to SQ01 to create Queries
  Firstly, choose the Infoset that you are going to use for this
  query.




  Then give a title to this Query.
Select Field that would be display by this Query.
Started by choosing the Field Group.
Thus select The field.
Field For Selection
Select field that will be used for the selection screen.
Furthermore, you can define the sequence of these fields.
Basic List Display
Arrange how you wish you report to be displayed.
Result Of ABAP Query

  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.




  Infoset cannot be found
  If you find difficulty in finding an Infoset for a query :
  Just go to SQ03, enter the user group for the query then click
  Assign Users And Infoset Buttons.
Click Assign Infosets Button.
At Infoset you would like to use in SQ01, untick and tick again the
Infoset. Then click save button.




Now, all step has been describe. It’s time for you to try.
Good Luck.

More Related Content

Viewers also liked

ITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP FoundationsITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP Foundations
Charles Aragão
 
ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013
SbgMartin
 
Web dynpro for abap
Web dynpro for abapWeb dynpro for abap
Web dynpro for abap
Gabriel Magalhães
 
Abap 7 02 new features - new string functions
Abap 7 02   new features - new string functionsAbap 7 02   new features - new string functions
Abap 7 02 new features - new string functions
Cadaxo GmbH
 
View - Tutorial ABAP
View - Tutorial ABAPView - Tutorial ABAP
View - Tutorial ABAP
Ricardo Ishida
 
Comandos e funções em abap
Comandos e funções em abapComandos e funções em abap
Comandos e funções em abap
alienscorporation
 
Icones - ABAP
Icones - ABAPIcones - ABAP
Icones - ABAP
Ricardo Ishida
 
Sap abap Q&A
Sap abap Q&A Sap abap Q&A
Sap abap Q&A
Kaustav Pyne
 
Funções - Tutorial ABAP
Funções - Tutorial ABAPFunções - Tutorial ABAP
Funções - Tutorial ABAP
Ricardo Ishida
 
Abap coding standards
Abap coding standardsAbap coding standards
Abap coding standards
surendra1579
 
Basic abap oo
Basic abap ooBasic abap oo
Basic abap oo
Gabriel Magalhães
 
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.docManikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
manikanta sai kumar karri
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
Milind Patil
 
Abap course chapter 5 dynamic programs
Abap course   chapter 5 dynamic programsAbap course   chapter 5 dynamic programs
Abap course chapter 5 dynamic programsMilind Patil
 
SAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entornoSAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entorno
Oreka IT
 
Abap course chapter 6 specialities for erp software
Abap course   chapter 6 specialities for erp softwareAbap course   chapter 6 specialities for erp software
Abap course chapter 6 specialities for erp software
Milind Patil
 
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP InstallationenABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
Virtual Forge
 
Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011
Mauricio Cruz
 

Viewers also liked (18)

ITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP FoundationsITSS Trainning | Curso de SAP ABAP Foundations
ITSS Trainning | Curso de SAP ABAP Foundations
 
ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013ABAP Test & Troubleshooting @SITMuc 2013
ABAP Test & Troubleshooting @SITMuc 2013
 
Web dynpro for abap
Web dynpro for abapWeb dynpro for abap
Web dynpro for abap
 
Abap 7 02 new features - new string functions
Abap 7 02   new features - new string functionsAbap 7 02   new features - new string functions
Abap 7 02 new features - new string functions
 
View - Tutorial ABAP
View - Tutorial ABAPView - Tutorial ABAP
View - Tutorial ABAP
 
Comandos e funções em abap
Comandos e funções em abapComandos e funções em abap
Comandos e funções em abap
 
Icones - ABAP
Icones - ABAPIcones - ABAP
Icones - ABAP
 
Sap abap Q&A
Sap abap Q&A Sap abap Q&A
Sap abap Q&A
 
Funções - Tutorial ABAP
Funções - Tutorial ABAPFunções - Tutorial ABAP
Funções - Tutorial ABAP
 
Abap coding standards
Abap coding standardsAbap coding standards
Abap coding standards
 
Basic abap oo
Basic abap ooBasic abap oo
Basic abap oo
 
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.docManikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
Manikanta Sai Kumar Karri SAP ABAP and OO ABAP 3 Years.doc
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
 
Abap course chapter 5 dynamic programs
Abap course   chapter 5 dynamic programsAbap course   chapter 5 dynamic programs
Abap course chapter 5 dynamic programs
 
SAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entornoSAP ABAP Proxy Objects: Configuración del entorno
SAP ABAP Proxy Objects: Configuración del entorno
 
Abap course chapter 6 specialities for erp software
Abap course   chapter 6 specialities for erp softwareAbap course   chapter 6 specialities for erp software
Abap course chapter 6 specialities for erp software
 
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP InstallationenABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
ABAP Qualitäts-Benchmark: Eine Analyse von über 200 SAP Installationen
 
Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011Usability in ABAP Programs - SITSP2011
Usability in ABAP Programs - SITSP2011
 

Similar to Abap query

100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS
Nirmal Pati
 
ContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docxContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docx
dickonsondorris
 
CS253: Divide & Conquer Sort (2019)
CS253: Divide & Conquer Sort (2019)CS253: Divide & Conquer Sort (2019)
CS253: Divide & Conquer Sort (2019)
Jinho Choi
 
7 qc toools LEARN and KNOW how to BUILD IN EXCEL
7 qc toools LEARN and KNOW how to BUILD IN EXCEL7 qc toools LEARN and KNOW how to BUILD IN EXCEL
7 qc toools LEARN and KNOW how to BUILD IN EXCEL
rajesh1655
 
6 sigma
6 sigma 6 sigma
6 sigma
rajesh1655
 
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Sylvain Hallé
 
Lab 3 Set Working Directory, Scatterplots and Introduction to.docx
Lab 3 Set Working Directory, Scatterplots and Introduction to.docxLab 3 Set Working Directory, Scatterplots and Introduction to.docx
Lab 3 Set Working Directory, Scatterplots and Introduction to.docx
DIPESH30
 
Sap query for task list data extraction
Sap query for task list data extractionSap query for task list data extraction
Sap query for task list data extraction
Srinivasa Rao Mullapudi
 
Basics in algorithms and data structure
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
Eman magdy
 
Pl sql using_xml
Pl sql using_xmlPl sql using_xml
Pl sql using_xml
Nayana Arewar
 
Data Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docxData Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docx
simonithomas47935
 
RSX™ Best Practices
RSX™ Best PracticesRSX™ Best Practices
RSX™ Best Practices
Slide_N
 
igorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsigorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reports
Igor Freire
 
Exceljet excel shortcuts_160623
Exceljet excel shortcuts_160623Exceljet excel shortcuts_160623
Exceljet excel shortcuts_160623
Rishav Singh
 
Cis 115 Education Organization / snaptutorial.com
Cis 115 Education Organization / snaptutorial.comCis 115 Education Organization / snaptutorial.com
Cis 115 Education Organization / snaptutorial.com
Baileya126
 
fyp....fyp.....fyp.....
fyp....fyp.....fyp.....fyp....fyp.....fyp.....
fyp....fyp.....fyp.....
VisualBee.com
 
Workbench tutorial airfoil
Workbench tutorial airfoilWorkbench tutorial airfoil
Workbench tutorial airfoil
Apriansyah Azis
 
Cis 115 Effective Communication / snaptutorial.com
Cis 115  Effective Communication / snaptutorial.comCis 115  Effective Communication / snaptutorial.com
Cis 115 Effective Communication / snaptutorial.com
Baileyao
 
Final ProjectBe sure to follow the instructions for each step as.docx
Final ProjectBe sure to follow the instructions for each step as.docxFinal ProjectBe sure to follow the instructions for each step as.docx
Final ProjectBe sure to follow the instructions for each step as.docx
voversbyobersby
 
Interview Preparation
Interview PreparationInterview Preparation
Interview Preparation
Ravi Kanudawala
 

Similar to Abap query (20)

100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS
 
ContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docxContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docx
 
CS253: Divide & Conquer Sort (2019)
CS253: Divide & Conquer Sort (2019)CS253: Divide & Conquer Sort (2019)
CS253: Divide & Conquer Sort (2019)
 
7 qc toools LEARN and KNOW how to BUILD IN EXCEL
7 qc toools LEARN and KNOW how to BUILD IN EXCEL7 qc toools LEARN and KNOW how to BUILD IN EXCEL
7 qc toools LEARN and KNOW how to BUILD IN EXCEL
 
6 sigma
6 sigma 6 sigma
6 sigma
 
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
 
Lab 3 Set Working Directory, Scatterplots and Introduction to.docx
Lab 3 Set Working Directory, Scatterplots and Introduction to.docxLab 3 Set Working Directory, Scatterplots and Introduction to.docx
Lab 3 Set Working Directory, Scatterplots and Introduction to.docx
 
Sap query for task list data extraction
Sap query for task list data extractionSap query for task list data extraction
Sap query for task list data extraction
 
Basics in algorithms and data structure
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
 
Pl sql using_xml
Pl sql using_xmlPl sql using_xml
Pl sql using_xml
 
Data Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docxData Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docx
 
RSX™ Best Practices
RSX™ Best PracticesRSX™ Best Practices
RSX™ Best Practices
 
igorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsigorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reports
 
Exceljet excel shortcuts_160623
Exceljet excel shortcuts_160623Exceljet excel shortcuts_160623
Exceljet excel shortcuts_160623
 
Cis 115 Education Organization / snaptutorial.com
Cis 115 Education Organization / snaptutorial.comCis 115 Education Organization / snaptutorial.com
Cis 115 Education Organization / snaptutorial.com
 
fyp....fyp.....fyp.....
fyp....fyp.....fyp.....fyp....fyp.....fyp.....
fyp....fyp.....fyp.....
 
Workbench tutorial airfoil
Workbench tutorial airfoilWorkbench tutorial airfoil
Workbench tutorial airfoil
 
Cis 115 Effective Communication / snaptutorial.com
Cis 115  Effective Communication / snaptutorial.comCis 115  Effective Communication / snaptutorial.com
Cis 115 Effective Communication / snaptutorial.com
 
Final ProjectBe sure to follow the instructions for each step as.docx
Final ProjectBe sure to follow the instructions for each step as.docxFinal ProjectBe sure to follow the instructions for each step as.docx
Final ProjectBe sure to follow the instructions for each step as.docx
 
Interview Preparation
Interview PreparationInterview Preparation
Interview Preparation
 

Abap query

  • 1. ABAP QUERY – AN EXAMPLE 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.
  • 2. Table Of Contents What Is ABAP Query ? …………………………………………………………………………. 1 A Case Scenario ………...………………………………………………………………………… 2 Creating ABAP Query ...………………………………………………………………………… 3 Result OF ABAP Query ..………………………………………………………………………. 4 Tips And Tricks …………………………………………………………………………………….. 5
  • 3. What Is ABAP Query A tool to generate report without ABAP coding. All you need is to join the table and drag and drop field that you wish to occur in the report. Type of reports provided by ABAP Query : 1. Basic List Simple Report. 2. Statistics Report containing statistical functions like Average & Percentage. 3. Ranked List Report written for analytical purpose. A Case Scenario There is a request to generate a report display who should release a PO and message status of the PO. The selections are based on : Date on which the record was created Purchasing Organization Purchasing Group Release Code Vendor’s Account Number Purchasing Document Type 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). Creating ABAP Query Now, we come to step in creating ABAP Query. There are 3 steps : 1. Create User Group (SQ03) Specify the users who should be authorized to run the query. 2. Create Infoset (SQ02) Indicates from which part of the SAP database the data is going to be retrieved and how the data is to be retrieved by the query. 3. Create Queries (SQ01) Create the query and arrange the layout.
  • 4. Here are the detail explanation of each step : Create User Group (SQ03) Go to SQ03 to create User Group Clik Assign users and Infosets Assign user to this user group.
  • 5. Create Infoset This report need information about PO, PO releaser and PO Message Status. So that the table relation could be describe as below : Release T16FV, Strategy T16FS PO Output NAST EKKO Status
  • 6. 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).
  • 7. Join The Table Give a relation between the tables that you are going to join.
  • 8. Choose The Field For Display Choose field (from tables you have joined before) that you would like to display.
  • 9. Create Additional Fields Create additional fields if you need them.
  • 10. Create Coding You can add some coding in some section. Click the button inside the red circle. On this case I add coding at code section: • 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. SELECT kschl INTO ld_kschl FROM nast WHERE kappl = 'EF' AND objky = ekko-ebeln AND ( kschl = 'NEU' OR kschl = 'NEU1' OR kschl = 'NEU2' ) AND spras = 'E' AND vstat = '1'. IF sy-subrc = 0. IF ld_kschl = 'NEU'. NEU = 'X'.
  • 11. ELSEIF ld_kschl = 'NEU1'. NEU1 = 'X'. ELSEIF ld_kschl = 'NEU2'. NEU2 = 'X'. ENDIF. ENDIF. ENDSELECT. * ctrneu = ctrneu2 = ctrneu3 = 0. * CLEAR : NEU, NEU2, NEU3. IF T16FV-frggr IS NOT INITIAL AND T16FV-frgsx IS NOT INITIAL. CASE EKKO-frgzu. WHEN ' '. condition = 'frgc1'. WHEN 'X'. condition = 'frgc2'. WHEN 'XX'. condition = 'frgc3'. WHEN 'XXX'. condition = 'frgc4'. WHEN 'XXXX'. condition = 'frgc5'. WHEN 'XXXXX'. condition = 'frgc6'. WHEN 'XXXXXX'. condition = 'frgc7'. WHEN 'XXXXXXX'. condition = 'frgc8'. WHEN 'XXXXXXXX'. condition = 'frgc8'. ENDCASE. SELECT SINGLE (condition) INTO ld_frgc1 FROM t16fs WHERE frggr = T16FV-frggr AND frgsx = T16FV-frgsx. 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'.
  • 12. WHEN 'XXXXXXXX'. condition = 'frgc8'. ENDCASE. SELECT SINGLE (condition) INTO ld_frgc1 FROM t16fs WHERE frggr = T16FV-frggr AND frgsx = T16FV-frgsx. ENDIF. IF T16FV-frgco <> ld_frgc1. * CLEAR : EKKO, T16FV. DELETE : EKKO, T16FV. ELSE. MODIFY EKKO. ENDIF. ENDIF. Create Queries Go to SQ01 to create Queries Firstly, choose the Infoset that you are going to use for this query. Then give a title to this Query.
  • 13. Select Field that would be display by this Query. Started by choosing the Field Group.
  • 14. Thus select The field.
  • 15. Field For Selection Select field that will be used for the selection screen. Furthermore, you can define the sequence of these fields.
  • 16. Basic List Display Arrange how you wish you report to be displayed.
  • 17. Result Of ABAP Query Selection Screen
  • 19. 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. Infoset cannot be found If you find difficulty in finding an Infoset for a query : Just go to SQ03, enter the user group for the query then click Assign Users And Infoset Buttons.
  • 20.
  • 22. At Infoset you would like to use in SQ01, untick and tick again the Infoset. Then click save button. Now, all step has been describe. It’s time for you to try. Good Luck.