Category: ABAP Programs
Delete Duplicates in ABAP
Preface – This post is part of the ABAP Programs series. To delete duplicates in ABAP either from a string or an internal table, we need to use ABAP statement “DELETE ADJACENT DUPLICATES FROM”. In this article, we have taken an example, which implements deletion of duplicate data when two strings are merged. This process also…
Constructor Program in ABAP
Preface – This post is part of the ABAP Programs series. TYPE-POOLS truxs. PARAMETERS p_file TYPE rlgrap-filename. TYPES : BEGIN OF t_tab, workstream TYPE char50, task TYPE zci_task, task_type TYPE char50, END OF t_tab. DATA : t_upload1 TYPE STANDARD TABLE OF ZDEMO_TEST2, wa_upload1 TYPE ZDEMO_TEST2. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file. CALL FUNCTION ‘F4_FILENAME’ EXPORTING field_name…
Casting in ABAP Program
Preface – This post is part of the ABAP Programs series. CLASS a1 DEFINITION. PUBLIC SECTION. DATA: num1 TYPE i VALUE 100. METHODS:m1. ENDCLASS. CLASS a1 IMPLEMENTATION. METHOD m1. WRITE: ‘a1:’,num1. ENDMETHOD. ENDCLASS. CLASS b1 DEFINITION INHERITING FROM a1. PUBLIC SECTION. METHODS:m2, m1 REDEFINITION. ENDCLASS. CLASS b1 IMPLEMENTATION. METHOD m1. num1 = num1 . WRITE: ‘b1:’,num1.…
Editable ALV Program in ABAP
Preface – This post is part of the ABAP Programs series. Introduction ALV in ABAP enables users to view data in a tabular format. We can even make it editable. In this article, we will explore the same. Editable ALV Program in ABAP ************************************************************************ * INTERNAL TABLES ************************************************************************ DATA: lt_mapping TYPE STANDARD TABLE OF zBarry_emp, lt_fieldcat…
Local Classes in ABAP
Preface – This post is part of the ABAP Programs series. In ABAP, you might have learned to create global classes using SE24, Transaction code. But some time, there is a requirement to create a local class and its method call altogether in a report. In this article, we will learn how to implement Local Classes in…
Enqueue and Dequeue: Lock Program in ABAP
Preface – This post is part of the ABAP Programs series. Lock Objects in SAP ABAP are global reusable component which generates function modules i.e. ENQUEUE_E_TABLE and DEQUEUE_E_TABLE that are used to set and release locks on data record. This Enqueue and Dequeue method is used to lock and unlock any object in SAP ABAP. In this…
Interactive Report Program in ABAP
Preface – This post is part of the ABAP Programs series. Interactive Report in SAP ABAP is a report where you can interact with the output page of report. You can click on an item of a list to get its details. In this article, we will discuss an example of Interactive Reports. To know more about…
Create, Read, Update & Delete – CRUD Operations in ABAP Report
Preface – This post is part of the ABAP Programs series. In ABAP, if you know basic SQL operation to perform CRUD Operations in ABAP report, then this article will teach you multiple ways to perform the same. Introduction ABAP report has more often a requirement to perform any of the following operation: Create : It…
ABAP Excel Upload
Preface – This post is part of the ABAP Programs series. To perform ABAP excel upload using ABAP report, we need to call a FM ‘TEXT_CONVERT_XLS_TO_SAP’. This FM converts the excel data to ABAP data. Now we can store the same in our internal table and later in our database table. The only mandatory requirement is that…
Truncate, Round Down and Round Up Decimal Number in SAP ABAP
Preface – This post is part of the ABAP Programs series. Many times in SAP ABAP, there is a requirement to Truncate, Round Down and Round Up a Decimal Number. In that case, we may use the predefined ABAP keywords to achieve the same. In this article, we will be discussing them altogether. Introduction We can truncate…