2010 Apr 06 3:21 PM
hi experts,
I have a reqiurement .If i select certain records by using the check box and press execute(push button) ,these records must be displayed in next screen but i am facing problem in getting the selected records as the status of checkbox is not getting saved in my internal table.
LOOP AT IT_MAKT INTO WA_MAKT.
WRITE: / WA_MAKT-CHECK AS CHECKBOX,
WA_MAKT-MATNR,
WA_MAKT-MAKTX.
ENDLOOP.
Please guide me.
hi experts,
I have a reqiurement .If i select certain records by using the check box and press execute(push button) ,these records must be displayed in next screen but i am facing problem in getting the selected records as the status of checkbox is not getting saved in my internal table.
LOOP AT IT_MAKT INTO WA_MAKT.
WRITE: / WA_MAKT-CHECK AS CHECKBOX,
WA_MAKT-MATNR,
WA_MAKT-MAKTX.
ENDLOOP.
Please guide me.
2010 Apr 06 3:25 PM
You must uset the READ REPORT statement. Please read the help on this.
Rob
2010 Apr 06 3:33 PM
Hi manasa,
Use READ LINE statement.
Ex:
READ LINE sy-index FIELD VALUE WA_MAKT-CHECK . " Sy-index is line no in list
IF WA_MAKT-CHECK EQ 'X'.
" When check box is checked
ENDIF.
2010 Apr 06 3:38 PM
2010 Apr 06 3:43 PM
hi,
READ LINE sy-index FIELD VALUE WA_MAKT-CHECK . " Sy-index is line no in list
IF WA_MAKT-CHECK EQ 'X'.
" When check box is checked
ENDIF.
The problem is WA_MAKT-CHECK is not getting populated with value 'X' when i check the boxes.
Thanks .
2010 Apr 06 3:51 PM
As I said, you have to read the documentation. This is done inside a DO/ENDDO.
Rob
2010 Apr 06 4:42 PM
check the below one.
LOOP AT t_load_tab3.
READ LINE t_load_tab3-line_no OF PAGE t_load_tab3-page_no
FIELD VALUE w_sel INTO lw_sel.
t_load_tab3-sel = lw_sel.
MODIFY t_load_tab3 TRANSPORTING sel.
CLEAR lw_sel.
ENDLOOP.
In the above code, w_sel is the check box.
2010 Apr 07 5:32 AM
hi experts,
I have tried with this code given below to prepare a classical report having checkbox.But when select records by checking the check box and pressing execute , in the next screen i am getting all the records and not the selected ones.
Please can anyone guide me how to proceed.
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
Thanks.
Edited by: Rob Burbank on Apr 7, 2010 8:54 AM
2010 Apr 07 5:38 AM
Hi,
Please refer to this [Check box functionality in interactive classical report |http://wiki.sdn.sap.com/wiki/display/Snippets/Checkboxfunctionalityininteractiveclassicalreport]
Hope this helps.
Regards,
Chandravadan
2010 Apr 07 6:02 AM
Hi Manasa,
Write the code to read the checkbox (READ LINE...) under AT LINE-SELECTION command.
Regards,
Santosh
2010 Apr 07 6:20 AM
hi,
Write code as under:
At user-command [if you want to read check box values based upon button click]
do.
read line sy-index.
[ This will store line contents into sy-lisel ]
if sy-lisel+1(3) = 'X' [ Check box]
process it.
endif.
if sy-index > 1 and sy-lisel = space.
exit.
endif.
lv_message = 'Processed successfully'
modify line sy-lilli field value wa_xxxx from lv_message
[ if you want to assign any message after processing]
clear sy-lisel.
enddo.