2012 May 12 10:30 AM
How to populate a table control with values while i type in a text field, ie i want to get the my table control values to be narrowed as per the characters i enter with out any action....
How to populate a table control with values while i type in a text field, ie i want to get the my table control values to be narrowed as per the characters i enter with out any action....
2012 May 12 12:09 PM
could please send me the code which you written and explain clearly?
2012 May 14 5:17 AM
2012 May 14 10:01 AM
You can use class CL_GUI_TIMER to trigger a PAI at constant intervals. Take a look to the standar demo report SAP_TIMER_DEMO.
And, also, take a look to this report I have just written. It defines a selection screen with parameters P_A and P_B. Execute it and write anyting in P_A, wait 1 second and you will see that P_B adopts the value of P_A. You can use the same technique to solve your problem.
REPORT ztimer_test.
*----------------------------------------------------------------------*
* CLASS lcl_update DEFINITION
*----------------------------------------------------------------------*
CLASS lcl_update DEFINITION.
PUBLIC SECTION.
METHODS constructor.
PROTECTED SECTION.
DATA: my_timer TYPE REF TO cl_gui_timer.
METHODS on_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_update DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_update IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_update IMPLEMENTATION.
METHOD constructor.
CREATE OBJECT my_timer.
my_timer->interval = 1.
SET HANDLER me->on_finished FOR my_timer.
my_timer->run( ).
ENDMETHOD. "constructor
METHOD on_finished.
cl_gui_cfw=>set_new_ok_code( 'REFRESH' ).
my_timer->run( ).
ENDMETHOD. "on_finished
ENDCLASS. "lcl_update IMPLEMENTATION
DATA: gr_update TYPE REF TO lcl_update.
PARAMETERS: p_a TYPE text20 LOWER CASE,
p_b TYPE text20 LOWER CASE.
INITIALIZATION.
CREATE OBJECT gr_update.
AT SELECTION-SCREEN.
IF sy-ucomm EQ 'REFRESH'.
p_b = p_a.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |