01-05-2008 1:23 PM
Hi Guys,
i have a requirement like this. i have table control and the internal table for that table control as IT_CASE. this internal table i declared as CHECKBX, MATNR, QUANTITY. but when i am enter the values in the table control i am getting the values in MATNR and QUANTITY in the that internal table IT_CASE. but when iam selecting that that line iam not getting CHECKBOX as 'X' in that internal table IT_CASE. i declared the table control as CAS_CONTROL and in that i have given the "w/selcolum" property as IT_CASE-CHECKBOX. now i want to fill that CHECKBOX as 'X' inthat internal table IT_CASE whatever the lines we are selecting only for those lines i want to fill up as 'X' in that internal table.
Can you please suggest any one reg this.
Thanks in advance
Rahul
01-05-2008 6:28 PM
Hello body,
You can give a name such as 'SEL' in w/selcol and declare SEL as char1. Then follow the coading.
in TOP.
data: sel type c.
PROCESS AFTER INPUT.
user_command_0011.
loop at <Your internal table>.
module get_data.
endloop.
Inside Module get_data.
if sy-ucomm = <Your Fcode>
if sel = 'X'.
<Your internal table>-<Field for checkbox> = 'X'.
append <Your internal table>.
endif.
endif.
I think your issue is resolved.
Regards.
S Mahanta.
01-07-2008 6:15 AM
Hi,
you don't give
"w/selcolum" property as IT_CASE-CHECKBOX
you just give filed name only
"w/selcolum" property as CHECKBOX
Then chek in PAI event. is it getting or not inside the loop statment
some tips, don't use standard name like CHECKBOX
L.Velu
01-07-2008 9:15 AM
hi,
u can get selected table control line by
GET CURSOR LINE lin.
so u can use this line number to make checkbox field 'X'...
reward if useful....
01-07-2008 9:34 PM
Hi Rahul,
When you hit enter and execute after you modify the content in table control - table control module will be processed in PAI.
In that module you need write the below logic to modify the contents of the internal table then only changed lines will be updated in the internal table.
modify ITAB index TC-current_line.
ITAB is the internal table and TC is the table control name.
please let me know if you need more info.
regards,
Satya
01-08-2008 5:19 AM
In top-include.
data : BEGIN OF it_mara occurs 0,
check TYPE c,
matnr
quantity
end of it_mara.
PAI module.
MODULE modify_itab INPUT.
MODIFY it_mara INDEX tbc1-current_line.
ENDMODULE.
Note: Give the checkbox name in Table Control as
it_mara-check. Then definitely you will get.
Regards
Sandeep.