Application Development and Automation 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: 
Read only

Table control autorefresh

former_member215561
Participant
0 Likes
713

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....

3 REPLIES 3
Read only

Former Member
0 Likes
651

  could please send me the code which you written and explain clearly?

Read only

Former Member
0 Likes
651

Hi,

Please explain your issue in detail.

Regards,

Gaurav.

Read only

arseni_gallardo
Active Participant
0 Likes
651

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.