<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Display Continuous Fluctuations in Input Data in Module Pool Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303666#M1534563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sid,&lt;/P&gt;&lt;P&gt;just a suggestion for the refreshing of an ABAP screen: you can use class CL_GUI_TIMER, but it only handles whole seconds, i.e. 1 second, 2 seconds and so on, but not 0.5 seconds...&lt;/P&gt;&lt;P&gt;An example of an ABAP listing could be the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZZAVV001
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zzavv001 NO STANDARD PAGE HEADING.

CONSTANTS: c_yes(1) TYPE c VALUE 'X'.

DATA: BEGIN OF t_bseg OCCURS 0.
        INCLUDE STRUCTURE bseg.
DATA: END OF t_bseg.

data: d_num_bkpf type i,
      d_num_bseg type i.

PARAMETERS: interval TYPE i DEFAULT 5.  "meaning 5 seconds

*----------------------------------------------------------------------*
*       CLASS lcl_receiver DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
      handle_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS.                    "lcl_receiver DEFINITION

*----------------------------------------------------------------------*
* Global data
*----------------------------------------------------------------------*
DATA:
  test       TYPE i,
  receiver   TYPE REF TO lcl_receiver,
  timer      TYPE REF TO cl_gui_timer.


START-OF-SELECTION.
  CREATE OBJECT timer.
  CREATE OBJECT receiver.
  SET HANDLER receiver-&amp;gt;handle_finished FOR timer.
  timer-&amp;gt;interval = interval.
  CALL METHOD timer-&amp;gt;run.

  PERFORM load_data.   "or whatever you have to do to read the weight
  PERFORM show_list.   "or whatever you have to do to print the weight you've read

*----------------------------------------------------------------------*
*       CLASS lcl_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_receiver IMPLEMENTATION.
  METHOD handle_finished.
    PERFORM carga_datos.
    PERFORM muestra_listado.
    CALL METHOD timer-&amp;gt;run.
  ENDMETHOD.                    "handle_finished
ENDCLASS.                    "lcl_receiver IMPLEMENTATION

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  load_data
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM load_data.

  clear: d_num_bkpf,
         d_num_bseg.

  select single count( * )
    into d_num_bkpf
    from bkpf.

  select single count( * )
    into d_num_bseg
    from bseg.

ENDFORM.                    "load_data


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  show_list
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM show_list.
*
  get time.

  skip to line 1.
  position 1.

  write: / 'Date / Time:', sy-datum, sy-uzeit.

  write: / 'Number of BKPF records:', d_num_bkpf.
  write: / 'Number of BSEG records:', d_num_bseg.

*
ENDFORM.                    " show_list
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okay, it's just a tiny code snippet, but I hope it may help you by designing auto-refreshing screens.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Sep 2010 07:13:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-21T07:13:14Z</dc:date>
    <item>
      <title>Display Continuous Fluctuations in Input Data in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303665#M1534562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are working on a Weighbridge Interface scenario, where the weighbridge is sending data to a digitizer, which is connected to the COM port of a PC. The objective is to read the data from the digitizer, and display in a Module pool screen. However, there is one more requirement: the weight may fluctuate until it stabilizes, and the fluctuations have to be displayed on screen. For example, the tare weight of a vehicle may be 12.4 TON, but when the vehicle is standing on the weighbridge, the weight may vary from 10.4 to 12.4 TON. The idea is to capture the stable weight, so that any discrepancies can be avoided. In the current IT system implementation, the fluctuations in the weight are displayed. But using ABAP, can these fluctuations be captured? For example, we may design a screen containing a field for capturing the weight, and the weight displayed there automatically refreshes as soon as there is a change in the digitizer reading. Is this possible to achieve? If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awaiting answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Sep 2010 04:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303665#M1534562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-21T04:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Display Continuous Fluctuations in Input Data in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303666#M1534563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sid,&lt;/P&gt;&lt;P&gt;just a suggestion for the refreshing of an ABAP screen: you can use class CL_GUI_TIMER, but it only handles whole seconds, i.e. 1 second, 2 seconds and so on, but not 0.5 seconds...&lt;/P&gt;&lt;P&gt;An example of an ABAP listing could be the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZZAVV001
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zzavv001 NO STANDARD PAGE HEADING.

CONSTANTS: c_yes(1) TYPE c VALUE 'X'.

DATA: BEGIN OF t_bseg OCCURS 0.
        INCLUDE STRUCTURE bseg.
DATA: END OF t_bseg.

data: d_num_bkpf type i,
      d_num_bseg type i.

PARAMETERS: interval TYPE i DEFAULT 5.  "meaning 5 seconds

*----------------------------------------------------------------------*
*       CLASS lcl_receiver DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
      handle_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS.                    "lcl_receiver DEFINITION

*----------------------------------------------------------------------*
* Global data
*----------------------------------------------------------------------*
DATA:
  test       TYPE i,
  receiver   TYPE REF TO lcl_receiver,
  timer      TYPE REF TO cl_gui_timer.


START-OF-SELECTION.
  CREATE OBJECT timer.
  CREATE OBJECT receiver.
  SET HANDLER receiver-&amp;gt;handle_finished FOR timer.
  timer-&amp;gt;interval = interval.
  CALL METHOD timer-&amp;gt;run.

  PERFORM load_data.   "or whatever you have to do to read the weight
  PERFORM show_list.   "or whatever you have to do to print the weight you've read

*----------------------------------------------------------------------*
*       CLASS lcl_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_receiver IMPLEMENTATION.
  METHOD handle_finished.
    PERFORM carga_datos.
    PERFORM muestra_listado.
    CALL METHOD timer-&amp;gt;run.
  ENDMETHOD.                    "handle_finished
ENDCLASS.                    "lcl_receiver IMPLEMENTATION

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  load_data
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM load_data.

  clear: d_num_bkpf,
         d_num_bseg.

  select single count( * )
    into d_num_bkpf
    from bkpf.

  select single count( * )
    into d_num_bseg
    from bseg.

ENDFORM.                    "load_data


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  show_list
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM show_list.
*
  get time.

  skip to line 1.
  position 1.

  write: / 'Date / Time:', sy-datum, sy-uzeit.

  write: / 'Number of BKPF records:', d_num_bkpf.
  write: / 'Number of BSEG records:', d_num_bseg.

*
ENDFORM.                    " show_list
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okay, it's just a tiny code snippet, but I hope it may help you by designing auto-refreshing screens.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Sep 2010 07:13:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303666#M1534563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-21T07:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display Continuous Fluctuations in Input Data in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303667#M1534564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use fm SAPGUI_SET_FUNCTIONCODE.&lt;/P&gt;&lt;P&gt;This module allows you to simulate user input (or rather to enforce user input) - in other words to make your program behave as if the user clicked some function (SY-UCOMM). You specify that user-clicked-function as the module parameter. Due to this simulated "user input " the next dialog step is preformed by the running program (PAI, PBO) which involves refreshing the screen.&lt;/P&gt;&lt;P&gt;So you can have a loop that contains yuor code reading the weight data and a call to this module - that should keep refreshing the screen until you exit from loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Sep 2010 08:13:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303667#M1534564</guid>
      <dc:creator>Maciej_DomagaBa</dc:creator>
      <dc:date>2010-09-21T08:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Display Continuous Fluctuations in Input Data in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303668#M1534565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alvaro and Maciej,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delayed reply. Your answers were really very helpful. Combining both the approaches, we could refresh the screen. Rewarded the answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your inputs again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincere Regards,&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2011 10:10:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/display-continuous-fluctuations-in-input-data-in-module-pool-screen/m-p/7303668#M1534565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-07T10:10:47Z</dc:date>
    </item>
  </channel>
</rss>

