zoukankan      html  css  js  c++  java
  • OO ALV 后台运行时错误:Control Framework: Fatal error

    这个错误的原因,是GUI容器依赖GUI的存在,因为它是在后台运行,没有GUI,因此控制错误。

    可以通过做一些编码绕过这个。

    * ALV Grid
    DATA: R_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: R_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.
    
    
    MODULE STATUS_0100 OUTPUT.
    
      SET PF-STATUS 'LISTOUT1'.
      SET TITLEBAR 'LIST1'.
    
    IF R_CONTROL IS INITIAL.
    * Check whether the program is run in batch or foreground(判断是否后台运行)
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    * Run in foreground
          CREATE OBJECT R_CONTROL EXPORTING CONTAINER_NAME = 'CONTAINER_1'.
          CREATE OBJECT R_GRID EXPORTING I_PARENT = R_CONTROL.
        ELSE.
    * Run in background
          CREATE OBJECT R_GRID EXPORTING I_PARENT = G_DOCK.
        ENDIF.
    
    * Structure ZBA_MARA1 is defined in DDIC as linetype
        CALL METHOD R_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
           I_STRUCTURE_NAME = 'MARA'
          CHANGING
           IT_OUTTAB = ITAB.
      ENDIF.
    
    ENDMODULE. " STATUS_0100 OUTPUT
  • 相关阅读:
    Flutter-常用插件庫
    Flutter-發送短信驗證碼
    Flutter-Radio單選框
    Flater-Provide狀態管理
    android sdk安装
    Android Studio的安装
    Flutter SDK安装(windows)
    Flutter-dialog彈出框
    python中的迭代器与生成器
    python闭包与装饰器
  • 原文地址:https://www.cnblogs.com/dy-debug/p/5691340.html
Copyright © 2011-2022 走看看