SAP

How to rename columns in SAP ALV DISPLAY of type CL_SALV_COLUMNS_TABLE.

The columns can be renamed with the object of the class cl_salv_column_table. There are four methods available such as SET_SHORT_TEXT (), SET_MEDIUM_TEXT(), SET_LONG_TEXT and SET_TOOLTIP(). The method can be chosen based on our requirement of text length. DATA lr_salv_columns_table TYPE REF TO cl_salv_columns_table. DATA lr_salv_column_table TYPE REF TO cl_salv_column_table. DATA lv_short_text TYPE scrtext_s. DATA lv_medium_text …

How to rename columns in SAP ALV DISPLAY of type CL_SALV_COLUMNS_TABLE. Read More »

How to insert and delete column in SAP ALV Display of type CL_SALV_TABLE.

The column is inserted through the field catalog of the ALV Table. It is set during the method call FACTORY (). Step1: Extend the structure either locally or globally through the Transaction SE11 with the additional field. TYPES: BEGIN OF ty_contact.                             INCLUDE STRUCTURE ztt_db_table2.                             TYPES: contact_age TYPE ZDE_contact_age.               END OF …

How to insert and delete column in SAP ALV Display of type CL_SALV_TABLE. Read More »

How to hide the column in new SAP ALV Display of type CL_SALV_COLUMNS_TABLE

The column can be edited using the column object. The Column object can be retrieved from the get_columns( ) method of the ALV object. Step1: Get the columns object from the ALV object. DATA lr_columns TYPE REF TO cl_salv_columns_table. Lr_columns = lr_alv_object->get_columns( ). Step2: From the columns object, get the particular specific column object ‘CONTACT_ID’. …

How to hide the column in new SAP ALV Display of type CL_SALV_COLUMNS_TABLE Read More »

How to use events of class CL_SALV_EVENTS_TABLE in SAP ABAP ALV Display

The new ALV Display provides different events based on the class CL_SALV_EVENTS_TABLE. It is much lesser compared to the old ALV Display. The Events can be found in the ‘Events’ tab of the class. Let us discuss about the following important Events of the class CL_SALV_EVENTS_TABLE. Events Description DOUBLE_CLICK This event will be triggered, when …

How to use events of class CL_SALV_EVENTS_TABLE in SAP ABAP ALV Display Read More »

How to insert functions to the Functions toolbar of new SAP ALV Display CL_SALV_TABLE

The new ALV Display based on the class CL_SALV_TABLE offers you the possibility to add a new function. It is completely based on the Display mode. In the container mode, the function is added through the functions object. In the complete mode, it is added through the GUI status for the Dynpro. Adding functions in …

How to insert functions to the Functions toolbar of new SAP ALV Display CL_SALV_TABLE Read More »

How to insert a new column in to the SAP ALV list

A new column can be inserted in to the SAP ALV list by adjusting the following two entities. Structure or Type of the table. New entry in the field catalog internal table. Structure or Type of the Table. A local type is created with the new column.               TYPES: BEGIN OF ty_contact.                                 INCLUDE …

How to insert a new column in to the SAP ALV list Read More »

What are the different events of the class CL_GUI_ALV_GRID?

The class CL_GUI_ALV_GRID of the old ALV model provides different events. It is available in the Tab EVENTS of the class CL_GUI_ALV_GRID. Event Parameter Description BUTTON_CLICK E_ROW -> RowE_COLUMN -> ColumnE_ROW_NO -> Row id It is triggered when a button is clicked. USER_COMMAND E_UCOMM -> Function code It is triggered when a function is triggered, …

What are the different events of the class CL_GUI_ALV_GRID? Read More »

How to Delete records from the internal table in SAP ABAP

The Data records present in the internal table can be deleted in following ways. Key or work area (structure) WHERE conditions. Index From Index TO Index Clean, Refresh, free DATA lt_internal_table TYPE TABLE OF ztt_db_table2. DATA ls_structure TYPE ztt_db_table2. SELECT *FROM ztt_db_Table2 INTO TABLE lt_internal_table.               ls_structure – contact_id = 102.               ls_structure – contact_name …

How to Delete records from the internal table in SAP ABAP Read More »