12-21-2006 10:39 AM
hi all,
i am doing an interactive reporting. After executing the report, in the output i displayed each record preceding with a check box.
My requirement is when i check the checkbox that record should get updated in the internal table. how to do this task.
Thanks in advance.
Regards,
vijay
12-21-2006 10:55 AM
u can use READ LINE ...
After the basic list is displayed .
data : begin of itab ,
cb(i) type c,
---
---
end of itab
if its in normal report then u will be doing the output as
write:/ itab-cb as checkbox, "u'll be doing this
itab----
itab---- .
now u have to use READ LINE IN THE secondary list
place a push button and process the items for selected .
loop at itab.
Read Line ....where itab-cb is not initial..
if sy-subcr eq 0 .
move itab to itfinal.
endif.
endloop.
try this ..
regards,
vijay
12-21-2006 10:42 AM
Do something like this:
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
the internal table will have the updated data
endcase.
ENDFORM.
Regards,
ravi
12-21-2006 10:47 AM
Hello vijay,
as u r using interactive reports u can use the event At line selection and then use any of the system fields like sy-lisel which has contents of selected line to read further into ur internal table and set the field.
12-21-2006 10:55 AM
hi abhijith,
thanks for ur reply.
My requirement is to check the records in the output and run the BDC in background. eg. say there r 10 records in output in that i ll select only 5 records using checkboxes and i ll click the button. so i need, how to capture the screen records.
12-21-2006 10:55 AM
u can use READ LINE ...
After the basic list is displayed .
data : begin of itab ,
cb(i) type c,
---
---
end of itab
if its in normal report then u will be doing the output as
write:/ itab-cb as checkbox, "u'll be doing this
itab----
itab---- .
now u have to use READ LINE IN THE secondary list
place a push button and process the items for selected .
loop at itab.
Read Line ....where itab-cb is not initial..
if sy-subcr eq 0 .
move itab to itfinal.
endif.
endloop.
try this ..
regards,
vijay