Tuesday 3 May 2016

Pooled Tables



  1. Pooled tables are the tables that have a many to one relationship between the database table and those contained in the ABAP Dictionary.
  2. All the pooled tables inside the database are stored inside a table pool.
  3. A table pool has a special structure that stores different pool tables inside it.

Wednesday 27 April 2016

Difference between LIKE and TYPE

LIKE
TYPE
It is used to take reference of those variables that occupy memory.
It is used to refer to a built in data type or the one that is defined by ‘Types’ keyword.

It is used to refer to data objects.

It is used to refer to standard data types.
Eg:   data var1 type c.
        data var2 like var1.

Eg: data count type i.



Tuesday 26 April 2016

Events in Classical Reporting

Events in Classical Reports

  • Classical Reports are basic type of reports, where not much functionality is given to the user. 
  • ABAP language is an event-driven language which means it is executed based on different events and not line by line.
Below are some events in classical reporting :-

  1. INITIALIZATION

  • This event is triggered before the selection screen is called.
  • This event is used to pass some initial values to the variables, set default values.
  • It is basically used with Select-Options , to pass some initial values. 
Example:- 

INITIALIZATION.
S_Date-low = sy-datum.    "set the lower limit of the range to the system's date
append s_date. 

       2. At Selection Screen


  • This event is used to validate more than one fields on the selection screen.
  • Validating is essential to stop the program flow at the very moment where an error occurs i.e an invalid value is entered. 
Syntax:- AT SELECTION_SCREEN.

       3. At Selection Screen On

  • This event is used to validate only a field provided in the syntax. 
  • Whenever an invalid value is entered and executed, the corresponding field gets highlighted and rest of the fields are disabled.
Syntax:- AT SELECTION-SCREEN ON <parameter_name>.


      4. Start of Selection


The actual selection logic is written under the start of selection event.
Syntax:- START-OF-SELECTION.

      5. Top Of Page


To print heading on every page in the report.
Syntax:- TOP-OF-PAGE.

     6. End Of Page


To print footer on every page in the report.
Syntax:- END-OF-PAGE.

     7. End of Selection


  • The END-OF-SELECTION event is triggered in type executable programs once the logical database has finished reading all data and before the list processor is started.
  • It tells the server that all the database reading is completed and no further reading is going to take place.
Syntax:- END-OF-SELECTION.