Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

query related to alv list or disp

Former Member
0 Kudos

Hi guys,

I have empty internal table and i am passing it to the alv grid function module now it will display without any rows as the internal table is empty..now what i want is i need to able to create a empty row dynamically where i can edit that row to fill the values manually and save the data in the z-table.

regards,

Ravi V Ganji

3 REPLIES 3

Former Member
0 Kudos

Probably you can append a blank row to the internal table and pass it to avl. Further making the line editable.

rgds,

TM

Please mark points if helpful.

former_member181962
Active Contributor
0 Kudos

before passing the empty internal table to the alv grid:

do this:

if itab[] is initial.

append initial line to itab.

endif.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = W_REPID

I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

case p_ucomm.

when 'SAVE'.

Data ref1 type ref to cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

E_GRID = ref1.

call method ref1->check_changed_data

modift ztable from table itab.

endcase.

ENDFORM.

former_member188685
Active Contributor
0 Kudos

Hi Ravi,

You can try this with the help of Cl_GUI_ALV_GRID class. check this example <b>BCALV_EDIT_04</b>

Regards

vijay