‎2009 Oct 21 4:25 PM
Hiii
I have a development where the original developer have make used of the
table control to display data instead of ALV, since may be due to development needing to navigate to different screen.
Please advise is it possible to
1. Add hotspot in a table control.
2. On a table control on the screen there are some field which are modifiable and i need to implement a search help such i mus display stock category applicable to that article only.
3. Add a button which will do sorting... just like in the ALV report
‎2009 Oct 22 8:26 AM
Hi,
1. for giving hotspot to the field in table control , go to the layout of the screen then double click the field where u want to give hotspot,then go to its attibutes and select the display tab and click the checkbox 'Respond to double click'.
then go to pf status and select the function keys and in Recommended Function Key Settings give a pick command .
F2 PICK Choose
then in op when u double click the table control in user command..
when 'PICK'. ..... then u can read the line where u have clicked and u can write codes for where u want to navigate
‎2009 Oct 22 8:31 AM
for sorting..
add 2 buttons in table control one for sort ascending and the other for sort descending
in user command write
data : wtab type cxtab_column,t_field(30),wfld1(20),wfld2(20).
*for ascending...
loop at tc into wtab.
IF wtab-SELECTED = 'X'.
T_FIELD = wtab-SCREEN-NAME.
SPLIT T_FIELD AT '-' INTO WFLD1 WFLD2.
SORT IJOBH BY (WFLD2).
ENDIF.
endloop.
*for descending..
loop at tc into wtab.
IF wtab-SELECTED = 'X'.
T_FIELD = wtab-SCREEN-NAME.
SPLIT T_FIELD AT '-' INTO WFLD1 WFLD2.
SORT IJOBH BY (WFLD2) descending.
ENDIF.
endloop.