Posts

Showing posts with the label Classical Reports

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 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

Exploring Classical Report Events in ABAP: Initialization and At Selection-Screen

Image
 Welcome back everyone, So basically We were discussing about some best programming practices in our previous blog. Let’s discuss Classical Report Events. Events :- Classical Reports are the most basic ABAP reports, in which we display the output using WRITE statement. Event is always triggered by a specific action or a specific occurrence ( when a particular time has been reached ). The example of specific actions are mouse click, pressing a key etc. The example of specific occurrence is running out of memory etc. Classical Report Events :- The same concept of events is applicable to classical reports. Some events trigger by specific user action and some events trigger at specific occurrence in classical reports. The various classical report event are as follows :- Initialization At selection-screen Start of Selection End of Selection Top of page End of page At selection screen output At selection screen on value request for <field> At selection screen o

Mastering ABAP Reports: Building a Classical Report with Input Selection and Data Retrieval from Order Header and Item Tables

Image
 Welcome back everyone, In our last blog we were discussing about Classical Reports. So , let’s create a program on some complex scenario than yesterday. Requirement :- 1. Suppose we have our Order header and Order item table. 2.Now, On the selection screen, we want to take input as order number using select options, make select option as mandatory and also write select option in a box. 3. On the basis of above input, we want to display the below output :- 4. Use the below logic :- Solution :- I think we are clear with the requirement, So let’s develop a classical report Process :- Step 1 :- Create a executable Program in ABAP Editor. Step 2 :- Create the type structure for both header and item table and also declare a final type structure to display the output. Step 3 :- Declare the internal table and work area for the above three type structure. Step 4 :- Defining a block for selection screen and writing select option in it. Step 5 :- Go to text el

Mastering SAP ABAP: Exploring Selection Screens and Classical Reports

Image
 Welcome back everyone, So we have started the concept of Selection Screen in our previous blog, So let’s Continue it. How To create a Selection Screen block ? Requirement :- We have to create a selection screen block which consists of two select options and one parameter as given below. Step 1 :- Create a executable program in ABAP Editor. Step 2 :- Follow the below code. Code :- *****************************Start Of Selection Screen SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001. ******************************** *Declaring Parameters PARAMETERS : p_ono TYPE zar_ono OBLIGATORY. *Creating Radiobuttons PARAMETERS : p_r1 TYPE c RADIOBUTTON GROUP r1, p_r2 TYPE c RADIOBUTTON GROUP r1 DEFAULT 'X', p_r3 TYPE c RADIOBUTTON GROUP r1. ************* *Creating Checkboxes PARAMETERS : p_chk1 AS CHECKBOX, p_chk2 AS CHECKBOX. *Creating a select option DATA : lv_ono TYPE zar_ono. SELECT-OPTIONS : s_ono FOR lv_ono. *************