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: 

How to save the output in internal table.....

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

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