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

How to display checked values from internal table

Karan_Chopra_
Active Participant
0 Likes
1,280

hi .

i have an internal table with a checkbox column.

using interactive report plz tell me how to display only those fields which i have checked

1 ACCEPTED SOLUTION
Read only

Karan_Chopra_
Active Participant
0 Likes
1,211

PLZ HELP SOON

hi .

i have an internal table with a checkbox column.

using interactive report plz tell me how to display only those fields which i have checked

9 REPLIES 9
Read only

Former Member
0 Likes
1,211

Hi,

Loop at <itab>.

if itab-checkbox = 'X'.

write : itab-v1.

Endif.

Endloop.

Regards,

Padmam.

Read only

Former Member
0 Likes
1,211

hi,

if itab_final- checkbox = 'X'.

sttements.

endif.

reward with points if helpful.

Read only

Karan_Chopra_
Active Participant
0 Likes
1,211

i cannot change the chk box value in itab using this loop as the check box is selected from the screen using mouse which does not change values in itab

Read only

0 Likes
1,211

Hi,

You have read the data from the list o/p.

data: begin of itab1 occurs 0,

wline(600),

end of itab1.

data: wa like itab. "The final internal table is itab.

if any_click_event .

refresh itab.

get cursor line line_no value wa.

if sy-subrc eq 0.

do.

read line line_no line value into wa.

if sy-subrc = 0.

itab1-wline = wa-(firstfield) "eg : wa-vbeln.

append itab1.

hide itab1.

clear itab1.

clear wa.

endif.

else.

exit.

endif.

line_no = line_no + 1.

enddo.

endif.

Reward points if it helps.

Regards,

Kumar.

Read only

0 Likes
1,211

Hi,

in my previous post in the code after those data declarations declare the event,

At Line-selection, and then use the code which I have sent you, accordingly.

Regards,

Kumar.

Read only

Karan_Chopra_
Active Participant
0 Likes
1,212

PLZ HELP SOON

Read only

Former Member
0 Likes
1,211

you have to use like this...

put a push button in application toolbar.

at user-command.

case sy-ucomm.

when 'PUSH'.

describe table itab lines lin<which will hold the line val>

do lin times.

read line sy-index line value into wa.<wa like your itab you are displaying>

if wa-chk = 'X'.

append wa to itab2<which you want to show in next list>.

endif.

enddo.

loop at itab2.

<your write statement for next list..

endloop.

endcase.

regards

shiba dutta

Read only

0 Likes
1,211

Hi,

Try this...

REPORT ztest_prog NO STANDARD PAGE HEADING.

DATA: BEGIN OF wa,

check,

name(30),

END OF wa,

itab LIKE STANDARD TABLE OF wa,

wa_itab LIKE wa.

DATA: lin TYPE i.

START-OF-SELECTION.

wa-name = 'ABAP'.

APPEND wa TO itab.

wa-name = 'BSP'.

APPEND wa TO itab.

wa-name = 'DYNPRO'.

APPEND wa TO itab.

LOOP AT itab INTO wa.

WRITE: / wa-check AS CHECKBOX, wa-name.

HIDE wa.

ENDLOOP.

CLEAR wa.

DESCRIBE TABLE itab LINES lin.

AT LINE-SELECTION.

DO lin TIMES.

READ LINE sy-index LINE VALUE INTO wa.

IF sy-subrc = 0 AND wa-check = 'X'.

WRITE: / wa-name.

ENDIF.

CLEAR wa.

ENDDO.

Thanks & Regards

Santhosh

Read only

Former Member
0 Likes
1,211

Hi Karan,

loop at itab1 where chk_box = 'X'.

append itab1 to itab2.

endloop.

at line-selection.

case sy-lsind.

when 1.

loop at itab2.

write:/10 itab-field1,itab2-field2.........

endloop.

Reward points if helpful.

Regards,

Hemant