Posts

Showing posts with the label ABAP Tutorial

Harnessing the Power of Message Class for Effective Program Communication

Image
 Welcome back everyone to our Complete SAP ABAP Master Series, We have started Message Class in our last blog, So let’s continue it. Message Class :- Suppose, I want to open a program in ABAP Editor which does not exist, then the SAP System will automatically generate a message that the Program does not exist. Messages play a very crucial and vital role in SAP. Types of Messages :- A(Abort) E(error) I(Information) S(success/status) W(warning) X(exit) Note :- We should always use Message class for writing Messages, Never hard code messages inside the program. Requirement :- Let’s understand the importance of Messages through a requirement. Suppose, I have the below program, I hope you remember the below code, Since we had discussed this program in our previous blogs. Now, Once we are trying to execute the program and we provide a wrong input number, then Suppose the Customer wants us to display a message that Order Number does not exist. Solution :- S...

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

Unlocking ABAP Mastery: A Comprehensive Guide to Internal Table Operations - Loop, Delete, Modify, Read, Clear, Describe

Image
 Welcome back everyone, So basically we have started with internal table operations in our last blog. So let’s continue it. Internal Table Operations - Loop :- Loop allows you to execute a group of statements multiple times. Loop at <itab> where stands for internal table. Loop is used to read the records one by one from the internal table. Practical Implementations :- *********************************************************** *Start Of Program *Using loop LOOP AT lt_header INTO ls_header. WRITE :/ ls_header-order_number, ls_header-payment_mode. ENDLOOP. *End of Program. ************************************************************ Output :- Internal Table Operations - DELETE :- Delete is used to delete the records from the internal table. There are two ways to perform delete operations. Delete based on where condition. Delete based on index. Delete based on where condition :- ********************************* *Start of Program *Using delete to del...

Embarking on ABAP Adventures: Unveiling the Sum of Two Numbers

Image
 Welcome back everyone, So basically we were discussing the basic points of ABAP programming in our previous blogs, So we will continue with writing our first program { sum of two numbers }. As you remember, we have selected the type of above program as executable why? It is because, we have to execute the program Note :- In any programming language, a program generally have 3 parts :- Input Processing Logic Output so, for our first program we will first go for input, then processing logic and then for output. We have discussed in our previous blog, that DATA is used to define a variable. So, basically we have to create three data object, one for output and 2 for input. Then we will provide the input, in this program we will start with default input and in the upcoming one we will take inputs from the user. Then we will perform the operation. In SAP we use write statement to display the output. After writing the code, for best practices always use the pretty p...