Month: June 2018

Delete Duplicates in ABAP

541 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 involves internal table. Introduction DELETE ADJACENT DUPLICATES FROM <Internal […]

Continue Reading

ODATA in ABAP

429 In this article we have just mentioned imported keys related to ODATA in ABAP. Index What is ODATA? Why we need it? How to Create an ODATA Service? Exploring ODATA CRUD Operation via ODATA Calling CLASS, FM in ODATA Checking your Service: CRUD   Exploring ODATA Data Model Entity Types Association Entity Sets Vocabularies Service […]

Continue Reading

Constructor Program in ABAP

86 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 = ‘P_FILE’ IMPORTING file_name = p_file. START-OF-SELECTION. CALL FUNCTION […]

Continue Reading

Casting in ABAP Program

109 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. ENDMETHOD. METHOD m2. WRITE: ‘M2 in class b1’. ENDMETHOD. […]

Continue Reading

Editable ALV Program in ABAP

220 ************************************************************************ * INTERNAL TABLES ************************************************************************ DATA: lt_mapping TYPE STANDARD TABLE OF zBarry_emp, lt_fieldcat TYPE lvc_t_fcat. ************************************************************************ * WORK AREAS ************************************************************************ DATA: ls_fieldcat TYPE lvc_s_fcat, ls_mapping TYPE zBarry_emp, lw_layout TYPE lvc_s_layo. ************************************************************************ * REFERENCE OBJECT ************************************************************************ DATA: r_container TYPE REF TO cl_gui_custom_container, r_grid TYPE REF TO cl_gui_alv_grid. ************************************************************************ * Field symbol ************************************************************************ FIELD-SYMBOLS: <ls_fieldcat> TYPE […]

Continue Reading

Local Classes in ABAP

73 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 ABAP. Introduction Local Classes in ABAP are just like […]

Continue Reading

ABAP Excel Upload

489 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 the table fields should match the header of excel […]

Continue Reading

Translate »