Reports Complete Notes
Reports Complete Notes
Reports:
Types of Reports:
2. Hierarchical Report
Hierarchical Reports:
VBAK (Sales Document Header Data) -> vbeln , erdat , erzet , ernam.
Each sales document of VBAK table can contain one or more sales items
in VBAP table.
Before using ‘for all entries’, check whether source internal table
contains at least one entry.
As part of this we use control break events which are also called as
“AT” events. These events are used only in loop- endloop.
Syntax:
At first.
Statements.
Endat.
At new:
Syntax:
Statements.
Endat.
At end of :-
Syntax:
Statements.
Endat.
At last:
Syntax:
At last .
Statement.
Endat.
Sum statement:
Sum statement can be used as part of “at end of” and “at last” event.
This statement will do the sum of numeric fields of the corresponding
rows and stores the sum value with in the same field. This sum value
can be accessed within the same events. i.e. the sum value will be
destroyed once a control comes out of the event.
Onchange of:
It is similar to “at new “event, but “on change of” event can be used
in any of the looping statements like while – endwhile., do enddo,
select – endselect, loop-endloop whereas ‘at new’ can be used only
inside loop-endloop.
Note: The field specified in ‘at new’ and ‘at end of’ event should be
at the beginning of the internal table otherwise, these 2 events are
triggered for every record of the internal table.
CORE ABAP FROM GENSOFT TECHNOLOGIES
POWERED BY Mr. Sridhar Sunkari
Select-options:
Ranges:
CORE ABAP FROM GENSOFT TECHNOLOGIES
POWERED BY Mr. Sridhar Sunkari
Joins:
Joins are used for retrieving data from multiple database tables using
a single select query.
i. Inner join
For retrieving data from multiple tables using joins, there should be
at-least one logically related field between the two tables and this
field should be compared by using ‘ON’ statement as part of Select
Query. The compared field/s between two tables must have the same
property i.e. data types and size must be same. The field names need
not be same.
i. Inner join:
In this, the left hand side table is compared with right hand side
table.
As part of this comparison, the value of the compared field from the
left hand side row will be compared with all the rows of the right
CORE ABAP FROM GENSOFT TECHNOLOGIES
POWERED BY Mr. Sridhar Sunkari
hand side table. If any matching row is found in the right hand side
table, it picks the corresponding rows from left hand side and right
hand side tables. If no matching row is found in the right hand side
table, SAP even ignores the left hand side row also.
“SY-LSIND” is the system field which stores the index OF NEXT LIST
(secondary list). For the basic list, index is zero and the secondary
lists indexes ranges from 1 to 20.
value. In this case, the line content where the user has done
the interaction is captured in the system field “SY-LISEL” and
the line number is captured in “SY-LINNO”.
Note: If the no. of lines reserved for the page is consumed by ‘TOP-
OF-PAGE’ event or ‘TOP-OF-PAGE DURING LINE-SELECTION’ event itself, it
leads to runtime error ‘list page overflow’ as the content cannot be
fitted on the page.
SY-LISEL - stores entire line content where the user has done the
interaction.
Hide statement:
interaction. Based on this value, we can get the content for the next
list.
Get cursor field: It is used for identifying the field name and field
value on the list where the user has done the interaction..
1. Load-of-program
2. Top-of-page
3. Initialization
1. At selection-screen
2. Start-of-selection
3. End-of-selection
1. At selection-screen
2. At selection-screen output
Note: We can use ‘stop’ statement for exiting the control from the
current event in execution.
1. PBO
a) PAI
b) PBO
1. Execute --> displays selection screen --> input values --> execute
Advantages:
Procedure:
CORE ABAP FROM GENSOFT TECHNOLOGIES
POWERED BY Mr. Sridhar Sunkari
d) define step
Note: Once the job is released, job gets executed depending on the job
start condition
Note: Once the job is executed, the output associated with the job
will be stored as a spool request which can be viewed through
'SP01' / Business workplace
1. job_open
2. job_submit
3. job_close