‎2007 Dec 31 10:28 AM
Hi All,
for my 1st selection , i'm finding some output. let it be 5 rows.
now i want to select 2 rows of this output and put them in one more internal table.in the next screen i want to see only those 2 rows not all. How to go about that?
i have given check box in the 1st column.
but still its not working....
PLz help.
Thanks in advance.
‎2007 Dec 31 10:30 AM
Hi,
use the method get_selected_rows
this will capture the selected row
regards,
siva chalasani.
‎2007 Dec 31 10:35 AM
can you send your code plz....
i can suggest one solution...
write your code under the part where you are putting checkbox logic.
‎2007 Dec 31 10:44 AM
data: cnt(2) ,
mark.
case sy-ucomm.
when 'SELE'.
loop at t_final where mark = 'X'.
move: t_final to b_final.
append b_final.
endloop.
endcase.
clear t_final.
delete adjacent duplicates from b_final.
loop at b_final.
write:/ b_final-idnrk.
endloop.
‎2007 Dec 31 10:49 AM
‎2007 Dec 31 10:53 AM
‎2007 Dec 31 10:58 AM
Hi
did you try like this
APPEND LINES OF ITAB1 TO ITAB2.
this will append new lines into the table itab2 from itab1
what the error you are getting
regards,
siva chalasani
‎2007 Dec 31 11:00 AM
Hi
sorry my ans was wrong ignore it
this will append new lines other than wat you have
regards,
siva.
‎2007 Dec 31 11:03 AM
Hi
can you tell me the output you are getting you are getting null values in the output ?
regards,
siva
Edited by: siva chalasani (vizac) on Dec 31, 2007 12:04 PM
‎2007 Dec 31 11:13 AM
my output is like this.
00000140 000000000002100021 F101 00002100020
00000138 000000000002100020 F101 00002100021
00000139 000000000002100021 F101 0002100022
here in the 1st column i have given check box.
now i want to select only 1st and 3rd rows.
how to do?
‎2007 Dec 31 11:22 AM
Hi
use the method given below this will update the internal table
with check box field back
call method ref1->check_changed_data.
now use the code you have written
Nothing to do with above menctioned method this will upodate your internal table
Regards,
siva
‎2007 Dec 31 11:01 AM
Hi deepika,
Use move-corresponding t_final to b_final.
instead of move: t_final to b_final.
Edited by: venkat reddy on Dec 31, 2007 12:02 PM
‎2007 Dec 31 11:20 AM
‎2007 Dec 31 11:46 AM
HI deepika,
Try this.
REFRESH gt_final.
CASE sy-ucomm.
WHEN 'PRIN'.
gv_chk = space. --> Check Box variable
DO gv_lines TIMES.
READ LINE sy-index FIELD VALUE gv_chk.
IF gv_chk = 'X'.
gt_final-kunnr = gwa_final-kunnr.
gt_final-knuma_ag = gwa_final-knuma_ag.
gt_final-oldcost = gwa_final-oldcost.
gt_final-change = gwa_final-change.
gt_final-matnr = gwa_final-matnr.
gt_final-mfrnr = gwa_final-mfrnr.
gt_final-maktx = gwa_final-maktx.
gt_final-ean11 = gwa_final-ean11.
gt_final-ppdate = gwa_final-ppdate.
*
APPEND gt_final.
CLEAR gt_final.
ENDIF.
ENDDO.
ENDCASE.
This is a part of my code.
Awrd Points if useful
Bhupal
‎2007 Dec 31 12:06 PM
try this sample code...
TABLES : makt.
DATA : itab LIKE makt OCCURS 0 WITH HEADER LINE.
DATA : itab2 LIKE makt OCCURS 0 WITH HEADER LINE.
DATA : pick.
AT LINE-SELECTION.
DO. "lines times.
READ LINE sy-index.
IF pick EQ 'X'.
itab2-matnr = itab-matnr.
itab2-maktx = itab-maktx.
APPEND itab2.
MOVE space TO pick.
MODIFY CURRENT LINE FIELD VALUE pick.
ENDIF.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDDO.
START-OF-SELECTION.
SELECT * INTO CORRESPONDING FIELDS OF TABLE itab FROM marc UP TO 10 ROWS.
LOOP AT itab .
WRITE 😕 pick AS CHECKBOX, itab-matnr, itab-maktx.
"make sure you've used hide statment in basic list.
HIDE : itab-matnr, itab-maktx.
ENDLOOP.