2007 Apr 02 9:52 AM
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
2007 Apr 02 9:58 AM
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.
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.
2007 Apr 02 9:58 AM
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.
2007 Apr 02 10:04 AM
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?
2007 Apr 02 10:10 AM
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.
2007 Apr 30 3:55 PM
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,
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |