Posts

Showing posts with the label SAP Development

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

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

Exploring ABAP Classical Report Events: Start Of Selection, End Of Selection, Top of Page, and End of Page

Image
 Welcome back everyone, We have started Classical report events in the last blog. so, Let’s continue it. 3. Start Of Selection This event calls when user clicks execute button on the selection screen. The selection logic is the part of this event. Let’s create a type structure for our header table in our program, which we have seen in the last blog. Implementation :- Note :- Please go to the debug mode and check which events are triggering at what time, It will help everyone to understand the entire concept. Code :- *********************************************** *Start of Program *********************************************** *Declaring type strcuture 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 Work Area DATA : lt_header type table of ty_header, ls_h