Docstoc

SAP ABAP Query Tutorial

Document Sample
SAP ABAP Query Tutorial Powered By Docstoc
					SAP Query




            SAP Query
SAP Query

       OBJECTIVE

       The objectives of this Power Point Presentation are


       y    To explain what SAP Query is.

       y    To explain the terms User Group, Info Sets, Query etc.

       y    To explain through sequence of screen shots the steps
            involved in creating a simple Query
SAP Query


     Reporting Options in R/3 Environment

    1. SAP Standard Delivered Reports
    2. Information Systems Reporting (EIS, LIS)
    3. Custom ABAP Reports (hard-coded reports created by
       ABAP programmers)
    4. InfoSet Query and Quick Viewer
    5. SAP Query Reporting

     Reporting Options Outside of the R/3 Environment

    1. BW (Business Information Warehouse and Data Warehouse)
    2. Third Party Reporting Tools (Crystal reports, Microsoft
       Access etc.)
SAP Query



    What is SAP Query?

    y   SAP Query, formerly known as the ³ABAP Query´ in
        versions earlier than 4.6 is an end user reporting tool that
        can be used to easily create reports from any application
        area in SAP

    y   SAP Query offers users a broad range of ways to define
        reporting programs and create different types of reports
        such as basic lists, statistics, and ranked lists.
SAP Query

        y   SAP Query is a powerful tool to generate simple reports
            without the need for any coding.

        y   A very handy tool for the functional consultants who don¶t
            have any prior programming experience.

        y   Steps to create simple SAP Query.

                1.   Create user Group.

                1.   Create Info Sets.

                1.   Assign the User Group to the Info Sets.

                1.   Create the Query based on Info Sets.
SAP Query



       ABAP/4 Query has been designed to allow you to combine
        users with similar concerns together in user groups.

       The members of a user group can use all programs (queries)
        created by any user of the group.

       Changes to such a program are at once visible to all users.
        This ensures that all members of a user group use the same
        evaluation programs.
SAP Query



        ABAP/4 Query allows you to evaluate data in the R/3
         System. Since the R/3 System contains several hundred
         thousand fields in logical databases, tables and
         sequential datasets, it is simply not practical to offer all
         these fields to the user for selection when creating
         queries.

        Therefore, before starting to create queries you create
         Infosets.

        Infosets provide the user with a framework for defining a
         query quickly and without difficulty.
SAP Query



        An Infoset combines related fields together into a
         meaningful unit. It provides you with a preselection so
         that you do not have to search through all fields of a
         logical database just to produce, for example, a simple
         list of flight connections.

        This means that the end-user only has access to
         precisely those fields assigned to an Infoset.

        Fields must be assigned to a Infoset before they can be
         used in queries.
SAP Query




        You can assign fields of different tables to one Infoset. In
         this way, you can treat fields of linked additional tables
         and also additional fields in the same way as true logical
         database fields.
SAP Query



   How Does it Works ?   Query
                         Groups


          SAP                           SAP
       R/3 Security                     Query



                          Info
                          Sets



     SAP R/3 Database
                         Application Areas
SAP Query


    What is a Query Group?

    A ³Query Group´ or ³User Group´ is a defined grouping area
    in SAP where queries are housed

    Users groups are about security groupings, they are for
    logically grouping reporting users in categories

    For example a user group called ZMAT1 Group would contain
    all of the report users in the Materials department and all of
    their queries would be grouped together into a single user
    group to make accessing their InfoSets and queries easier.

    Users can be in more than one user group and can have one
    set as their default.
SAP Query   How to Create Query Group ?


                                          Go to
                                          SQ03
                                          Enter
                                          User
                                          Group
                                          name
                                          And click
                                          CREATE
SAP Query

            From Main
            Menu select
            Assign Users
            and Infosets
            Enter User
            IDs you need
            to add in this
            User Group
            Press SAVE
            (Look at Tick
            mark against
            special users)
SAP Query


    What is an InfoSet?

    An ³InfoSet´ (formerly known as a ³Functional Area in versions
       earlier than 4.6) is a prearranged grouping of data from the
       SAP R/3 database

    The SAP Query tool uses an InfoSet as the source of the data
       used for reporting. It can be a table, a program or the most
       popular option, a Logical Database (LDB).

    The LDB is a hierarchal pre-arranged subset of data. There are
       hundreds of LDB¶s delivered with your SAP system.
            How to create InfoSets ?
SAP Query


                                       Go to
                                       SQ02
                                       Enter
                                       Infoset
                                       Name
                                       And click
                                       CREATE
SAP Query


            Enter
            Infoset
            Details
            like
            Name,
            Authoriz
            ation
            Group,
            Table
            Name
            etc
SAP Query


            Enter Infoset
            Details like
            Name,
            Authorization
            Group,
            Table Name
            etc
SAP Query


            Select Insert
            Table (Shift
            F1)
            And enter
            another table
            name
            (if required)
SAP Query


            Links
            between the
            2 tables will
            be captured
            by the
            system
            Once done
            press F6 to
            go to Infoset
            Maintenance
SAP Query


            Select the
            option to
            create
            Empty Field
            Groups and
            press Enter
SAP Query


            Infoset
            screen is
            divided into
            3 areas
            A ± Lists
            Tables Used
            B ± Lists
            Field
            Groups/Field
            C- Field level
            details
SAP Query
            A                                 B

                                                               Drag and
                                                               Drop
                                                               required
                                                               fields from A
                                                               to B.
                                                               To view field
                                                               details
                                                               double click
                                                               on fields
                                                               from B
                                                               Field Details
                                                               are shown in
                                                               C


                                                                    C
   Note: Only fields from B are available for Query Selected
SAP Query




   Press SAVE and GENERATE when you complete adding all required fields
            Assign InfoSets to Query Group
SAP Query


                                             Go to
                                             SQ03
                                             Enter
                                             User
                                             Group
                                             Click
                                             Assign
                                             Users
                                             and
                                             Infosets
SAP Query


            Assign
            required
            Infosets
            and
            When
            done
            press
            SAVE
SAP Query


    Create a Report with the SAP Query

    1.   Give the report a name
    2.   Select field groups
    3.   Select fields
    4.   Add fields to the reports selection screen
    5.   Specify the order and output of your fields
    6.   Selection screen
    7.   Your finished report
SAP Query


                                                   Go to
                                                   SQ01
                                                   Enter
                                                   Query
                                                   Report
                                                   Name
                                                   and
                                                   press
                                                   CREATE




       System will prompt you to select InfoSets
SAP Query




       Select the required Infosets and press ENTER
            Title Format Report
SAP Query


                                  Enter
                                  Name of
                                  the report,
                                  page size
                                  and other
                                  basis
                                  information
                                  You can
                                  navigate
                                  between
                                  the basis
                                  screen
                                  using
                                  Directional
                                  Arrows on
                                  the tool bar
             Select Field Groups
SAP Query


                                                                This screen
                                                                is where
                                                                you select
                                                                Field
                                                                Groups that
                                                                contains
                                                                the fields
                                                                that you
                                                                want to
                                                                output on
                                                                the report.




      The list of fields groups from the infoset you selected
             Select Fields
SAP Query


                                                          This screen
                                                          is where
                                                          you select
                                                          Fields that
                                                          you want to
                                                          output on
                                                          the report.




      The list of fields from the Field Groups selected
             Add Fields to Selection Screen
SAP Query


                                                               This will list
                                                               all the
                                                               fields you
                                                               selected in
                                                               previous
                                                               screen.
                                                               From here
                                                               you select
                                                               the fields to
                                                               appear on
                                                               the
                                                               selection
                                                               screen.




  This selection screen will appear when you are executing the query
             Basis List
SAP Query


                                                         Here is
                                                         where you
                                                         setup what
                                                         you want
                                                         your report
                                                         look like.




  You can drag ,drop or move fields the way you want..
            Lets Test it ± Selection Screen
SAP Query


                                              The
                                              selection
                                              screen lets
                                              you specify
                                              exactly
                                              what data
                                              you want to
                                              see in your
                                              output.
             Lets Test it ± This is the output
SAP Query


                                                                Congrats !




            So you have just finished creating simple query !
SAP Query

       SAP Query Advanced Features

       ‡    Add Subtotals to the report
       ‡    Change Subtotal texts
       ‡    Format the list line
       ‡    Alter the column widths, add colors, hide leading
            zeros and create templates
       ‡    Insert text to appear before output for each line
       ‡    Create custom headers and footers
       ‡    Create graphics (charts and diagrams)
SAP Query

                                   SUMMARY

       The following topics were discussed in the above Power point
       Presentation.

       y    SAP Query in a nutshell.
       y    Creation of Query Groups
       y    Creation of Infosets
       y    Attaching a User Group to the Infoset
       y    Creating a simple Query
       y    Advanced features of SAP Query
SAP Query




            Thank You

				
DOCUMENT INFO