2010 Dec 04 12:41 PM
Hi guys ,
i have a module pool screen with a table control , which contains a radiobuttons in one coloumn .
so i want to get the index of the row which i have clicked on (the radio buton) or the content of that row
waiting for the reply ...
thanks & regards
2010 Dec 04 12:46 PM
have you used events...??
use User Command Event...
check sy-ucomm....
if it is &IC1 then param2-tabindex is the selected row index....
2010 Dec 04 12:48 PM
Hi
Into loop of PAI you need to insert a module to get the position of the cursor
DATA V_FIELD(15).
DATA V_LINES TYPE I
GET CURSOR FIELD V_FIELD LINE V_LINES.
So you'll have the i/o field nane and the line of table control in the variables v_field and v_line
Rember v_line is the index of table control, if tuo want the index of internal table:
V_TABIX = V_LINE + <Table control>-TOP_LINE.
If you need to trigger pai as soon as the radiobutton is clicked, you need to assign an ok-code to the radiobutton
Max
2010 Dec 06 6:58 AM
thanks dude ... i took
GET CURSOR FIELD V_FIELD LINE V_LINES.
as you said v_line is the index of table control, if i want the index of internal table:
V_TABIX = V_LINE + <Table control>-TOP_LINE.
but it got mismatch
i took V_TABIX = V_LINE + <Table control>-TOP_LINE + 1 .
it was working fine for me
thanks & regards
2010 Dec 06 7:00 AM
thanks dude ... i took
GET CURSOR FIELD V_FIELD LINE V_LINES.
as you said v_line is the index of table control, if i want the index of internal table:
V_TABIX = V_LINE + <Table control>-TOP_LINE.
but it got mismatch
i took V_TABIX = V_LINE + <Table control>-TOP_LINE - 1 .
it was working fine for me
thanks & regards
2010 Dec 06 7:45 AM