02-10-2009 12:13 PM
Hai all,
I have displayed 5 rows of item details in output screen with check boxes.
if i select one check box means then the selected row should be stored in one internal table.
How can i achieve this?
Regards
02-10-2009 12:15 PM
hi
lopp on the internal table that is bein displayed on the screen chk the value of the field that is displayed as check box it where ever the value is abap_true move that record into new table.
like
loop at it_display into wa_display where chkbox = ABAP_TRUE.
move-corresponding wa_display to wa_inttable.
append wa_inttable into it_inttable.
endloop.
02-10-2009 12:19 PM
Try using
GET CURSOR {LINE line
Hope this helps!!
Regards,
Prashant
02-10-2009 12:22 PM
Hi,
What kind of report are you using?
Is it classical report or an ALV report or in Module Pool.
Regards,
Tarun
02-10-2009 12:24 PM
Hi ,
You can use where condition with checkbox
like
loop at itab_display into wa_display where chkbox = ABAP_TRUE.
Regards
02-10-2009 12:34 PM
Hi,
do.
read line sy-index field value w_check into w_check
w_name into w_name -----> " get all the fields into the variables.
if sy-subrc NE 0.
exit.
endif.
if w_check = 'X'.
append w_name to itab.
endif.
clear w_check.
enddo.
this will resolve your purpose.
thanks
sarves
02-10-2009 12:35 PM
HI, Kumar,
If you are using DynPro and displaying data in a table control than follow the steps bellow
--> First of all have a Flag Field in the Internal table to set Flag
--> Double Click the Table Control
--> A window will appear on the right side where you will find the Attributes
--> From Attributes Check the "w/selcolumn' check box and give the Internal Table field where you want to Set the Flag that this Record is selected or not.
than in PAI you can Check this flag and delete this record.
Hope will solve out your problem, if using Screen Painter. in Dyn Pro.
Kind Regards,
Faisal
02-10-2009 12:35 PM
Hi ,
You can try this code . It works -
AT USER-COMMAND .
.
.
.
DO w_no TIMES .
READ LINE sy-index FIELD VALUE w_checkbox
fs_spfli-carrid "into fs_spfli-carrid
fs_spfli-connid. "into fs_spfli-connid
IF w_checkbox EQ 'X'.
fs_store-carrid = fs_spfli-carrid .
fs_store-connid = fs_spfli-connid .
APPEND fs_store TO t_store .
ENDIF. " IF W_CHECKBOX EQ 'X'.
FREE fs_spfli .
CLEAR w_checkbox .
ENDDO . " DO W_NO TIMES
Regards
Pinaki
03-18-2009 7:26 AM
TYPES: BEGIN OF t_report,
sel,
vbeln TYPE vbak-vbeln, "ORDER NUMBER
erdat TYPE vbak-erdat, "ORDER WHEN RECORDED
kunnr TYPE vbak-kunnr, "SOLD TO WHICH PARTY
posnr TYPE vbap-posnr, "ITEM NUMBER
matnr TYPE vbap-matnr, "MATERIAL NUMBER
kwmeng TYPE vbap-kwmeng, "NO. OF QUANTITY
netwr TYPE vbap-netwr,
END OF t_report,
WHEN 'BUTON'.
clear wa_report.
loop at it_report into wa_report .
if wa_report-sel = 'X'.
append wa_report to itdet.
endif.
ENDLOOP.
sel field is not getting stored in internal table when i check the checkbox