SAPABAP

How to set the cell of the ALV List as a Dropdown list in SAP ABAP?

It is used to provide a list of values as a Drop down List. There are three important steps involved in setting the cell as a drop down list. Filling the internal table lvc_t_dral. Setting the fields drdn_hndl, drdn_alias of field catalog. Call the method set_drop_down_table of the ALV object. Filling the internal table lvc_t_dral. …

How to set the cell of the ALV List as a Dropdown list in SAP ABAP? Read More »

How to set the position of column in SAP ALV List using Field catalog

The column position in the SAP ALV List can be changed using the COL_POS field of the field catalog. In the below example, the ‘contact_address’ column is set in the first position of the SAP ALV List. Field-SYMBOLS: <ls_field_cat> TYPE lvc_s_fcat. LOOP AT lt_field_cat ASSIGNING <ls_field_cat> WHERE fieldname = ‘CONTACT_ADDRESS’.      <ls_field_cat> -col_pos = 1. …

How to set the position of column in SAP ALV List using Field catalog Read More »

How to rename the column in the SAP ALV List through field catalog

The column names can be changed with the help of the fields REPTEXT, SCRTEXT_L, SCRTEXT_M and SCRTEXT_L of field catalog. If you wish to use only text of field ‘scrtext_l’, then fill the text only in this field ‘SCRTEXT_L’. The other texts can be ignored as the ALV takes the filled text automatically. FIELD-SYMBOLS: <ls_field_cat> …

How to rename the column in the SAP ALV List through field catalog 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 »

How to hide the column of the SAP ALV List using Field Catalog field ‘NO_OUT’

The column can be hidden in the SAP ALV List using the field ‘NO_OUT’ of the field Catalog. This field value is set to ABAP_TRUE in order to hide the column. FIELD_SYMBOLS <ls_field_cat> TYPE lvc_s_fcat. LOOP AT lt_field_cat ASSIGNING <ls_field_cat> WHERE fieldname = ‘CONTACT_ADDRESS’. <ls_field_cat>-no_out = abap_true. ENDLOOP. The column can be shown once again …

How to hide the column of the SAP ALV List using Field Catalog field ‘NO_OUT’ 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 »