ABAPタイミングリフレッシュ選択画面
げんり
利用タイマークラスCL_GUI_TIMER、絶え間ないループ呼び出し、ステップは以下の通りです.はタイマをインスタンス化し、タイマのfinishedイベントに対して をリスニングする. at selection outputで画面要素の属性と値を変更し、タイマ の実行を開始する.タイミングで終了し、finishedイベントをトリガし、function codeを設定することによって、スクリーンロジックストリームは再びat selection outputに戻る.
個人推測:スクリーンとALVをカスタマイズし、タイミングリフレッシュを実現し、ループ呼び出しタイマを実現し、PBOをトリガすればよい.しかし、いくつかの文章を见て、このタイマー类を使うことを推荐しないようで、原因は未知で、ALVもUI 5が开発したあのような看板ではありませんて、私はタイミングを更新して面白くないと思って、派手です.
リファレンスコード
利用タイマークラスCL_GUI_TIMER、絶え間ないループ呼び出し、ステップは以下の通りです.
個人推測:スクリーンとALVをカスタマイズし、タイミングリフレッシュを実現し、ループ呼び出しタイマを実現し、PBOをトリガすればよい.しかし、いくつかの文章を见て、このタイマー类を使うことを推荐しないようで、原因は未知で、ALVもUI 5が开発したあのような看板ではありませんて、私はタイミングを更新して面白くないと思って、派手です.
リファレンスコード
parameters : p_time type i default 3.
class lcl_event definition.
public section.
methods m_timer_finished for event finished of cl_gui_timer.
endclass.
class lcl_event implementation.
method m_timer_finished.
" cl_gui_cfw=>set_new_ok_code(
" exporting
" new_code = 'REFR').
" ,
call function 'SAPGUI_SET_FUNCTIONCODE'
exceptions
others = 0.
endmethod. "handle_finished
endclass. "lcl_event IMPLEMENTATION
initialization.
data(lo_timer) = new cl_gui_timer( ).
lo_timer->interval = 1.
data(lo_event) = new lcl_event( ).
set handler lo_event->m_timer_finished for lo_timer.
at selection-screen output.
if lo_timer is bound.
lo_timer->run( ).
p_time = p_time - 1.
endif.
if p_time le 0.
lo_timer->cancel( ).
endif.