Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

hotspot in table control

Former Member
0 Kudos

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 .

4 REPLIES 4

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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