Lecture16 abap on line


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • QuickViewer available since SAP R/3 4.6B
  • Sample Quickview What sort of programming effort and code would have to go into producing this report? Table: spfli select..endselect or Get sort write with frames/colors Note the line between cities - how would you determine a change in cities?  Control Break
  • The QuickViewer is a tool for developing ad hoc reports that is new in Release 4.6B. You can start the QuickViewer using the menu path System  Services  QuickViewer The QuickViewer can use a database table or a database view as a data source. Lists can be generated using the fields in the data source specified. Two modes are available for this: basis mode and layout mode Basis Mode: to create the list quickly with no design input. Layout Mode: to create the list and define the design layout yourself The QuickViewer provides interfaces, for example, to ABC analysis. The list can also be processed further in external programs, such as Word. The generated list can be saved and then displayed again in the QuickViewer. Selection criteria are also saved along with the list, and can be queried again at any time.
  • Each user defines their own user-specific QuickViews which only they can display. This means that you cannot copy other users' QuickViews. (You can, however, compile an SAP Query from a QuickView, if the QuickView uses a functional area from the standard system as a data source—see later slide on SAP Query for explanation on functional areas and user groups ). The query is then visible to the user group . QuickViews are not connected to the transport system.
  • You must name a data source in order to generate a QuickView . The data source can be a database table, a database view, a logical database, a table join, or even a functional area of SAP query . You can access the specified data—fields in the table, but you cannot extend it with additional fields. For example you cannot add a field to calculate seats available.
  • In basis mode , the screen is divided into four areas: The available fields (data source) are displayed on the right in tree form. Further information on how to work in the basic mode is displayed in the lower left window. You can maintain the title and comments and control the output in the upper right area. This is also where you control the list structure, set the sort sequence and define the selection criteria. You can branch to the online documentation from the lower right window. You can structure your QuickView using two table controls . Select the fields you want in your list in the right table control and use the transfer functions to move them to the left table control ('List fields'). You can also control how many lines the list should have (using the 'Add line' function) in the left table control ('List fields'). Follow the same procedure for the sort and selection fields: select the fields you require in the right table control and copy them to the left control.
  • A report can be produced using ABAP code where the programmer determines: - which data is to be retrieved, - how the data is interrelated, - how it is sorted, and - how it is arranged for output. With SAP Query, you do not code to get a result. Instead you describe the desired list itself. The Query tool then uses this description to automatically make an ABAP program that produces the desired list
  • The administrative tasks in the query environment include creating functional areas and user groups , as well as assigning the functional areas to the user groups . The system administrator manages this. The functional area determines the tables (and the fields of those tables) to which a query can refer. The person creating the query can only use those fields when designing the query. Functional areas are frequently based on logical databases. Users may create and start queries only when they belong to at least one user group. A given user can belong to several user groups. Functional areas are allocated to a user group; Users in a user group have access to all the queries allocated to that group. For Example: FA1: scustom FA2: sbook FA3: spfli If you belong to UG1, you can create/access queries which use FA1 & FA2, i.e. access data from tables scustom & sbook. If you belong to UG2, you can create/access queries which use FA1 & FA3, i.e. access data from tables scustom & spfli. If you belong to both UG1 and UG2, you can create/access queries which use FA1, FA2 and FA3 i.e. access data from tables scustom, sbook and spfli.
  • When creating a query, the system leads you through a number of screens: Title, format: Used to assign the query title. You can set the page layout by making entries for the format. Functional area You must first choose a functional area. The system displays all the functional areas that have been assigned to your user group. Once you have chosen a functional area, you cannot modify your choice: the functional area is the basis for data retrieval. Field Selection Here you choose the required data fields of the previously selected functional area. If you require local fields, you can also define them here. (e.g. avail_seats) Selection fields: You can define fields to add to the selection screen to limit the selection criteria. 3 types of reports can be specified: Basic – list of db fields with some total options Statistics: allows display of average, % breakdown or count of records read for specified fields. Ranked: special form of statistics report, e.g list 10 flight connections with the highest sales.
  • Lecture16 abap on line

    1. 1. Lecture 16 SAP Query & QuickViewer BCO5647 Applications Programming Techniques (ABAP)
    2. 2. Readings & Objectives <ul><li>Readings </li></ul><ul><li>http://help.sap.com/ </li></ul><ul><li>Objectives This lecture will </li></ul><ul><li>Provide background to the SAP tools: SAP Query & QuickViewer </li></ul><ul><li>Provide a practical overview of QuickViewer </li></ul><ul><li>Distinguish between Basis Mode and Layout Mode when creating a QuickView </li></ul><ul><li>Provide an overview of SAP Query </li></ul><ul><li>Distinguish between Functional Areas and User Groups when working with queries </li></ul><ul><li>Discuss the advantages of SAP Query </li></ul><ul><li>Compare the features of QuickViewer and SAP Query </li></ul>
    3. 3. SAP Query & QuickViewer <ul><ul><li>SAP Query and QuickViewer are tools that enable you to generate a report without the need to write a program. </li></ul></ul><ul><ul><li>It is intended for users with no programming knowledge. </li></ul></ul><ul><ul><li>The user can select the database table fields required for the report and define the formatting and type of processing. </li></ul></ul><ul><ul><li>When the Query or QuickView is started a report generator creates a report based on the user’s field selections and format requirements. </li></ul></ul><ul><ul><li>QuickViewer is quick and not as complex as SAP Query. </li></ul></ul>
    4. 4. Sample QuickView
    5. 5. QuickViewer: Overview <ul><ul><li>QuickViewer is a tool for developing ad hoc reports quickly. </li></ul></ul><ul><ul><li>Available since SAP 4.6B. </li></ul></ul><ul><ul><li>QuickViewer uses a database table as a data source. </li></ul></ul><ul><ul><li>QuickViewer provides interfaces to external programs such as Microsoft Word. </li></ul></ul>
    6. 6. QuickViewer: Initial Screen <ul><ul><li>Start the QuickViewer: menu path System  Services  QuickViewer </li></ul></ul>
    7. 7. Creating a QuickView <ul><ul><li>You must name the data source in order to generate a QuickView. </li></ul></ul>
    8. 8. QuickViewer: Basis Mode Structure <ul><ul><li>In Basis Mode, the screen is divided into four areas. </li></ul></ul><ul><ul><li>You structure QuickView using two table controls. </li></ul></ul><ul><ul><li>Select fields you want in the right table and use transfer functions to move them to the left table. </li></ul></ul>
    9. 9. QuickViewer: Summary <ul><ul><li>User can produce ad hoc reports without knowledge of programming. </li></ul></ul><ul><ul><li>Each user defines their own QuickViews which only they can display. </li></ul></ul><ul><ul><li>Uses existing data. </li></ul></ul><ul><ul><li>No administrative effort (user groups/functional areas). </li></ul></ul><ul><ul><li>Interfaces to external applications. </li></ul></ul><ul><ul><li>Less functionality than SAP Query. </li></ul></ul><ul><ul><li>No transports. </li></ul></ul>
    10. 10. SAP Query & Programs: Overview <ul><ul><li>A report can be created by a programmer using ABAP statements. </li></ul></ul><ul><ul><li>A report can also be created by a SAP user using Query whereby the user defines the report and the Query tool generates an ABAP program to produce the report. </li></ul></ul>
    11. 11. Organisation of SAP Query <ul><ul><li>Controlling who can create or start a query and what data can accessed by a query is handled through functional areas and user groups. </li></ul></ul><ul><ul><li>A functional area determines the tables (and fields of those tables) to which a query can refer. </li></ul></ul><ul><ul><li>Functional areas are allocated to user groups. </li></ul></ul><ul><ul><li>Users may create and start queries only if they belong to a user group. </li></ul></ul><ul><ul><li>The System administrator manages the creating of functional areas and user groups and the allocation of users to user groups. </li></ul></ul>FA2 FA3
    12. 12. Creating a Query
    13. 13. Advantages of SAP Query <ul><ul><li>Reports can be generated without a knowledge of programming. </li></ul></ul><ul><ul><li>You can retrieve information from any database table or a logical database. </li></ul></ul><ul><ul><li>Lists can be dynamically re-arranged and sorted by the end user. </li></ul></ul><ul><ul><li>You can convert the list to a graph using the SAP graphics tool. </li></ul></ul><ul><ul><li>You can transfer the data produced to an external spreadsheet. </li></ul></ul><ul><ul><li>Queries have more features and admin control than QuickViews. </li></ul></ul>
    14. 14. SAP Query Vs QuickView