Quantcast
Channel: SCN : All Content - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 831

Adding Blank Row in ALV GRID and LIST Display issue.

$
0
0

Dear Experts,

 

I got one requirement in ABAP . When we are displaying output in ALV Grid/List . I have created custom GUI Status . On the application toolbar , i have added two buttons , one for add and other for delete. When we click on add , one blank row will insert in displaying alv . I have added the below code on add button but i cant see blank record in alv , but i can see in internal table .

 

Kindly help me out to solve the below issue .

 

WHEN 'ADD'.

       PERFORM add_row.


*&---------------------------------------------------------------------*

*&      Form  ADD_ROW

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

form ADD_ROW .

 

DATA : lv_line TYPE int4,

        lv_max  TYPE int4,

        ls_selfield TYPE SLIS_SELFIELD,

        ls_grid     TYPE REF TO CL_GUI_ALV_GRID.

 

sort gt_display_dta[] by sr_no.

 

DESCRIBE TABLE gt_display_dta LINES lv_line.

 

 


CLEAR gs_display_dta.

gs_display_dta-sr_no  = lv_line + 1.

APPEND gs_display_dta to gt_display_dta.

endform.                    " ADD_ROW

 

 

Regards,

Puneet Mittal


Viewing all articles
Browse latest Browse all 831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>