Application Development and Automation 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: 
Read only

ALV Grid

Former Member
0 Likes
676

Suppose I have displayed itab1 in the ALV Grid. I have a button on application toolbar on which i click to process the selected records from alv grid. After processing i want to display the modified values on the alv grid. If i have the modified values in itab2. How can i display it on the alv grid?

Please dont tell me to use reuse alv grid display. I just want the present displayed itab to be modified after clickin a button on application toolbar.

Please help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
634
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
                        P_SELFLD TYPE SLIS_SELFIELD.

CASE SY-UCOMM.

  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

  WHEN 'DISPLAY'.
         " write code here to modify itab2.
  
ENDCASE.

P_SELFLD-REFRESH = 'X'.

ENDFORM.

Suppose I have displayed itab1 in the ALV Grid. I have a button on application toolbar on which i click to process the selected records from alv grid. After processing i want to display the modified values on the alv grid. If i have the modified values in itab2. How can i display it on the alv grid?

Please dont tell me to use reuse alv grid display. I just want the present displayed itab to be modified after clickin a button on application toolbar.

Please help

4 REPLIES 4
Read only

Former Member
0 Likes
635
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
                        P_SELFLD TYPE SLIS_SELFIELD.

CASE SY-UCOMM.

  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

  WHEN 'DISPLAY'.
         " write code here to modify itab2.
  
ENDCASE.

P_SELFLD-REFRESH = 'X'.

ENDFORM.
Read only

0 Likes
634

Chandresekhar, This code will only modify one row on the alv grid (check the last line in your code). I want to modify mulitple rows at a time. Can you help on this?

Read only

0 Likes
634

Mohammad, the above code will modify all the records in ur internal table if you had modified them,,

WHEN 'DISPLAY'.
  " you have to use the same ITAB1[].
   Loop at itab into wa_itab.
       modify itab from wa_itab.
   endloop.

P_SELFIELD-REFRESH = 'X'.  OR USe

SUBMIT ZREPORT.

Read only

0 Likes
634

I have an alv grid display....output is coming fine....if i try to store this output file to local file as excel.....in one of the column...one digit of the content is missing....can anybody throw some light on this please....

Thx & Rgds,