Posts

Showing posts from January, 2024

Mastering ABAP Events: Unraveling Interactive Classical Report Events and Control Break Statements

Image
 Welcome back everyone, We were discussing about Interactive Classical Report Events, So let’s continue it. 3. Top of Page During Line-Selection :- This event calls when the first WRITE statement occurs in a program for a page on secondary list. The purpose of this event is to provide title/header at the beginning of a new page on secondary list. Let’s take a requirement to understand it more clearly. Requirement :- I want on the first page my header details should be displayed and on the second page item details should be displayed. Also there should be a title for the secondary list. Code :- ************************************************************* *Start of Program *Declaring Strcutrure for header TYPES: BEGIN OF ty_header, order_number TYPE zar_order_number, order_date TYPE zar_order_date, payment_mode TYPE zar_payment_mode, currency TYPE zar_curency, END OF ty_header. ********************* *Internal table and Wo

Unlocking SAP ABAP Secrets: Interactive Classical Reports with GET CURSOR, At User Command, and a Comparison of HIDE Statements

Image
 Welcome back everyone, We were discussing about the interactive classical reports, so let’s continue it. Interactive Classical Reports- GET CURSOR :- In Interactive Classical Reports, GET CURSOR statement is used to create secondary list according to cursor position. The parameter FIELD provides the name of an output field. The parameter VALUE provide the output value. Syntax : GET CURSOR FIELD <lv_field> VALUE <lv_value>. In the above syntax - the field name and field value will be returned in to variables lv_field and lv_value respectively. Requirement :- If you remember, In our last two blog, We have been displaying the order header table in a basic list and order item table in the secondary list. We have used SY-LISEL and HIDE statements to achieve the requirement. Now, we have to use the get CURSOR to achieve the same to same requirement. Code :- ************************************************************* *Start of Program *Declaring Strcutrure

Unlocking the Power of HIDE Statements in Interactive Classical Reports: A Practical Guide with Examples

Image
 Welcome back everyone, We were discussing about Interactive Classical Event and We had seen the functionality of At line Selection. Now, Before jumping to next event, let’s discuss some important interactive classical report statements. 1. HIDE Statement :- The HIDE statement is one of the fundamental statements for interactive reporting. We can use HIDE statement to store the line-specific information while creating a basic list. This stored information will be used while creating secondary list. Syntax : HIDE<f>. The above statement places the contents of the variable <f> into the HIDE area. We can consider hide area as a table which stores the field name, field value and line number ( system variable SY-LINNO). Pre-requisites for HIDE statements :- HIDE statement must be written after the WRITE statement. HIDE statement must be called inside the loop. Working of the HIDE Statement :- The user selects a line for which data has been stored in the HIDE

ABAP Event Magic: Navigating Interactive Classical Reports for Dynamic Displays

Image
 Welcome back everyone, We were discussing about Interactive Classical Report events, So, let’s continue it. System Variables in Interactive Classical Report Events :- SY-LISEL :- It is a system variable which returns the contents of the selected line. SY-LSIND :- It is a system variable which returns the index of the displayed list. Interactive Classical Report Events :- 1. At Line-Selection :- When user double clicks on the line or select a line and press F2 or select a line and click choose at that time at line-selection event triggers. Suppose, user double click on the below line :- Then the output should be showing the respective line items for the respective header items in a new page :- Note :- F2 is the shortcut key for double click. It is a reserve key by SAP used for double click purpose. Let’s take a requirement to understand the At Line Selection event. Requirement :- Let’s use our order header and order item table, which we have been using so bar.

Exploring Classical Report Events: Page Overflow, At Selection-Screen Output, and More

Image
 Welcome back everyone, we were discussing about Classical Report events, So let’s continue it. Page Overflow :- There is always a big possibility to get a runtime error when we blindly give line count for End of page event, let’s analysis the reason, why we got a runtime error. Ans :- Page overflow generates when the size of page is not enough to adjust end of page and header of page, So we need to make sure that their size is compatible before taking any blind decision. 7. At Selection-Screen Output This event calls before displaying the selection screen or input screen. The purpose of this event is to modify the selection screen. Note :- We have seen that, Initialization event also triggers just before displaying the selection screen. So, What’s the difference Initialization Vs At Selection Screen Output :- Initialization event calls only first time before displaying the selection screen whereas at selection screen output event calls every time before displayin