REPORT demo_dynpro_dropdown_listbox.

DATA: name  TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list. DATA: wa_spfli TYPE spfli,
ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm. TABLES demof4help. name = 'DEMOF4HELP-CONNID'. CALL SCREEN 100. MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE. MODULE init_listbox OUTPUT. CLEAR: demof4help-connid,
list. SELECT connid, cityfrom, cityto, deptime
FROM spfli
WHERE carrid = @demof4help-carrier2
INTO CORRESPONDING FIELDS OF @wa_spfli. value-key = wa_spfli-connid. WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'. value-text =
|{ value-text } { wa_spfli-cityfrom } { wa_spfli-cityto }|.
APPEND value TO list. ENDSELECT. IF sy-subrc <> 0.
MESSAGE 'No connections for that airline' TYPE 'I' DISPLAY LIKE 'E'.
LEAVE TO SCREEN 100.
ENDIF. CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list. ENDMODULE. MODULE user_command_100.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.
LEAVE TO SCREEN 200.
ELSE.
SET SCREEN 100.
ENDIF.
ENDMODULE. MODULE user_command_200.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'SELECTED'.
MESSAGE i888(sabapdemos) WITH text-001 demof4help-carrier2
demof4help-connid.
CLEAR demof4help.
ENDIF.
ENDMODULE.

Description

The static next screen number of screen 100 is 200. The input field has been assigned the component CARRIER2 of the structure DEMOF4HELP from the ABAP Dictionary. Its dropdown attribute is L, the output length is 15, the value list attribute is empty, and it has been assigned the function code CARRIER. The function code of the pushbutton is CANCEL with function type E. The screen flow logic is as follows:

PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
  MODULE cancel AT EXIT-COMMAND.
  MODULE user_command_100.

The static next screen number of screen 200 is 100. The input field has been assigned the component CONNID of the structure DEMOF4HELP from the ABAP Dictionary. Its dropdown attribute is L, the output length is 30, the value list attribute is A, and it has been assigned the SELECTED function code. The function code of the pushbutton is CANCEL with the function type E. The screen flow logic is as follows:

PROCESS BEFORE OUTPUT.
  MODULE init_listbox.
PROCESS AFTER INPUT.
  MODULE cancel AT EXIT-COMMAND.
  MODULE user_command_200.

The user is not allowed to enter values in the screen fields. When choosing the input field on screen 100, the user sees a value list in the list box derived from the input help of the DEMOF4HELP-CARRIER2 field. In this case, this is the search help H_SCARR assigned to the SCARR check table in the Dictionary. The value list contains the names of the airlines. When the user selects an entry, the screen field is filled with the ID of the airline, and the event PAI is triggered. The module user_command_100 checks the OK field and calls screen 200.

In the PBO event of screen 200, the system fills an internal table called list with values from database table SPFLI. The key component is filled with flight connection numbers, and the corresponding information is stored in text. The list table is passed to the VRM_SET_VALUES function module. When the user chooses the input field on screen 200, the internal table column text is displayed in the list box. When the user selects an entry, the screen field is filled with the associated entry from the key column, and the event PAI is triggered. The module user_command_200 checks and processes the OK field.

最新文章

  1. MyBatis基于注解的动态SQL——概览
  2. UILabel多种字体
  3. JE22环境安装配置(JDK/ANT/TOMCAT/ECLIPSE)
  4. CEF3开发者系列之CEF3入门
  5. nginx添加模块 (非覆盖安装)
  6. Android 带checkbox的listView 实现多选,全选,反选
  7. hdu 5007 水 弦
  8. 比量iOS6/iOS7, 3.5inch/4.0inch
  9. Spring之SpringMVC的RequestToViewNameTranslator(源码)分析
  10. 要重定向 IO 流,Process 对象必须将 UseShellExecute 属性设置为 False。
  11. 并串转换FPGA电路结构的探讨
  12. eclipse中svn插件在线安装方式
  13. LeetCode 104. Maximum Depth of Binary Tree (二叉树的最大深度)
  14. 第三章 CLR如何解析引用类型
  15. DNS Tunnel隧道隐蔽通信实验 &amp;&amp; 尝试复现特征向量化思维方式检测
  16. Linux+Shell常用命令总结
  17. vue脚手架安装步骤vue-cli
  18. 未能加载文件或程序集“System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKe
  19. delphi absolute 应用实例
  20. [UE4]Return Node节点好用法

热门文章

  1. docker基础容器中bash: vi: command not found问题解决
  2. HTML/CSS+JS制作一个高考倒计时页面
  3. 9.Jenkins进阶之流水线pipeline基础使用实践(2)
  4. Hystrix熔断初体验
  5. 图片杂乱无章、分享麻烦?HMS Core图片分类服务教你快速筛选、分类、整合相册
  6. css 实现随风摆动
  7. Intellij IDEA 2022 正式发布,这些功能真不错
  8. 背包问题dp的初步总结
  9. Java语言学习day14--7月19日
  10. Msf路由转发