12-30-2008 10:36 AM
Hello All....
i hav created a screen with table control .what i m doing is when i select a row n press execute ,it process the row n show the output in the desired feild i want ,but now what i want it as soon as i select a row it should execute , may be it can be done by hotspot but how to do it in table control for the entire row .
12-30-2008 12:54 PM
Nikita
You may set the attribute of the column, in screen layout, display attributes under which "Responds to Double Click".
Though it won't work on single click like in case of Hot Spot.
Thanks
Amol Lohade
12-31-2008 9:30 AM
Hi Nikita.,
You have to use AT-CURSOR SELECTION EVENT to achieve this ..place the following code in PAI of ur flowlogic .
FIELD ZERNUM_TSHT_HD-EMPID MODULE CALL_REPORT AT CURSOR-SELECTION .
In program add the following code .
&----
*& Module CALL_REPORT INPUT
&----
text
----
MODULE CALL_REPORT INPUT.
DATA V LIKE ZERNUM_TSHT_HD-EMPID .
GET CURSOR FIELD ZERNUM_TSHT_HD-EMPID VALUE V.
SUBMIT ZERUM_EMP_TIMS VIA SELECTION-SCREEN WITH PA_EMPID = V AND RETURN.
ZERNUM_TSHT_HD-EMPID = V .
ENDMODULE. " CALL_REPORT INPUT
Also set Function Code "CS" to "F2" function key .When u set like this Double Click will automatically set to that function code.Hope it helps, any queries revert back .
Thanks&Regards.,
S.Sivakumar
12-31-2008 10:11 AM
Hi Nikita.,
You have table control as global variable in your program as TC.
this has a component TOP_LINE this give the current top line.
and you can get the line on which the cursor placed using
*GET CURSOR FIELD fnam LINE lin.
Just add the lin value to the TC-TOP_LINE this will give you the current line on which the cursor is placed.
You can use this new value as sy-tabix and then can read the table if you require.
data tabix type sy-tabix.
tabix = above value
Read table itab index tabix.
Thanks & Regards.,
S.Sivakumar
01-02-2009 11:02 AM
Hi Nikita,
You have to build a table control which enable a line selected based on cursor field value changed.?
You have to map cursor value whith field value.
Rick