*&---------------------------------------------------------------------*
*& Report DEMO_DROPDOWN_LIST_BOX *
*&---------------------------------------------------------------------* REPORT demo_dropdown_list_box. * Dynpro Interfaces TABLES sdyn_conn.
DATA ok_code TYPE sy-ucomm. * Local class definition CLASS dynpro_utilities DEFINITION.
PUBLIC SECTION.
CLASS-METHODS value_help.
ENDCLASS. * Local class implementation CLASS dynpro_utilities IMPLEMENTATION.
METHOD value_help.
TYPES: BEGIN OF carrid_line,
carrid TYPE spfli-carrid,
carrname TYPE scarr-carrname,
END OF carrid_line.
DATA carrid_list TYPE STANDARD TABLE OF carrid_line.
SELECT carrid, carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE @carrid_list.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = carrid_list
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
...
ENDIF.
ENDMETHOD.
ENDCLASS. * Event Blocks and Dialog Modules START-OF-SELECTION.
CALL SCREEN 100. MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE. MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE. MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdemos) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE. MODULE create_dropdown_box INPUT.
dynpro_utilities=>value_help( ).
ENDMODULE.

Description

The static dynpro number of dynpro 100 is 100. The screen contains a single input field, namely the component SDYN_CONN-CARRID. Its attribute dropdown is "Listbox", the output length is 20, the attribute value list is empty, and it is assigned function code SELECTED. The functions BACK, EXIT, and CANCEL are defined in the GUI status with the function type E. The screen flow logic is as follows:

PROCESS BEFORE OUTPUT.
  MODULE status_0100.
PROCESS AFTER INPUT.
  MODULE cancel AT EXIT-COMMAND.
  MODULE user_command_0100.
PROCESS ON VALUE-REQUEST.
  FIELD sdyn_conn-carrid MODULE create_dropdown_box.

The user is not allowed to enter values in the screen field. When the user selects the input field on dynpro 100, the system displays a list box. The Value list attribute is empty, so the system launches the input mechanism. In this case, the event block PROCESS ON VALUE-REQUEST is defined in the screen flow logic which overrides all other mechanisms. The system fills a two-column internal table in the corresponding dialog module and passes it to the input help using the function module F4IF_INT_TABLE_VALUE_REQUEST. The system inserts the two columns of the table into the list box.

If the user chooses a row from the list box, the event PAI is triggered with the function code SELECTED, and the value in the first column of the internal table is copied to the input field.

最新文章

  1. Front End Developer Questions 前端开发人员问题(三)JavaScript部分
  2. UIView的setNeedsDisplay和setNeedsLayout
  3. Apache Server Status主机状态查看
  4. org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter与org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
  5. iOS之通过PaintCode快速实现交互动画的最方便方法 未解问题
  6. MyEclipse无法启动调试:Cannot connect to VM
  7. js运动 多物体运动含Json 但是里面数值不一样
  8. C++学习笔记(九):作用域和命名空间
  9. 重大发现Android studio 如何简单快速修改package name
  10. asp.net 后台使用js弹窗失效问题
  11. 运用Unity实现AOP拦截器
  12. 蓝桥杯-加法变乘法-java
  13. 苹果新的编程语言 Swift 语言进阶(十五)--协议
  14. ASP.NET MVC]WebAPI应用支持HTTPS的经验总结
  15. Django content-type 使用
  16. java操作elasticsearch实现基本的增删改查操作
  17. sql server字符串的类型
  18. 名字&amp;值
  19. linux下查看当前登陆的用户数目
  20. SAS8.1安装步骤(附图)

热门文章

  1. PostgreSQL常用初级技能树
  2. 面试官:为什么Vue中的v-if和v-for不建议一起用?
  3. Java-GUI编程之ImageIO的使用
  4. .NET 7 Preview 3添加了这些增强功能
  5. Docker系列教程02-操作Docker容器
  6. Docker系列教程01-使用Docker镜像
  7. RabbitMQ 3.9( 基础 )
  8. os模块,sys模块,json模块,subprocess模块
  9. wait 和async,await一起使用引发的死锁问题
  10. CSAPP 之 AttackLab 详解