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.

SAP 实例 12 List Box with Value List from PBO Module的更多相关文章

  1. SAP 实例 10 List Box with value list from input help

    *&---------------------------------------------------------------------* *& Report DEMO_DROP ...

  2. 自动化kolla-ansible部署ubuntu20.04+openstack-victoria之创建实例-12

    自动化kolla-ansible部署ubuntu20.04+openstack-victoria之创建实例-12  欢迎加QQ群:1026880196  进行交流学习 实例创建 1.  创建 2. 查 ...

  3. SAP 实例 4 CFW

    *&---------------------------------------------------------------------* *& Report demo_cfw ...

  4. oracle单实例12.2.0.1安装

    说明:本文描述oracle linux 6.8 安装 oracle 12.2.0.1 0. 查看操作系统版本 [root@12c01 ~]# cat /etc/os-release NAME=&quo ...

  5. SAP 实例- 页签tabsrip

    屏幕页签:项目上有一需求,对标准TCODE 一个屏幕增加一个页签.于是做了个例子. 下面屏幕有两个页签. 我们来看一下屏幕结构.100屏幕是主屏幕,101,102是子屏幕,对应页签test1,test ...

  6. SAP 实例 8 HTML from the MIME Repository

    REPORT demo_html_from_mime. CLASS mime_demo DEFINITION. PUBLIC SECTION. CLASS-METHODS main. PRIVATE ...

  7. SAP 实例- 下拉框

    效果图 源代码 REPORT rsdemo_dropdown_listbox . DATA init. TABLES scarr. TABLES spfli. TABLES sflight. TABL ...

  8. SAP 实例 13 Random Grouping with LOOP

    REPORT demo_loop_group_by_random. CLASS demo DEFINITION. PUBLIC SECTION. CLASS-METHODS: main, class_ ...

  9. SAP 实例 9 Text output

    REPORT demo_show_text. CLASS demo DEFINITION. PUBLIC SECTION. CLASS-METHODS main. ENDCLASS. CLASS de ...

随机推荐

  1. 【面试普通人VS高手系列】innoDB如何解决幻读

    前天有个去快手面试的小伙伴私信我,他遇到了这样一个问题: "InnoDB如何解决幻读"? 这个问题确实不是很好回答,在实际应用中,很多同学几乎都不关注数据库的事务隔离性. 所有问题 ...

  2. Java学习day11

    如果程序出现了问题,我们没有做任何处理,JVM会做默认处理,即:把异常的名称,原因和位置等信息输出在控制台,程序停止执行 一个简单的检测集合对象是否含有某元素,有就再添加一个某元素 public cl ...

  3. 开源框架YiShaAdmin如何使用任务计划

    1.在Startup添加 new JobCenter().Start();(红色字体,下同) // This method gets called by the runtime. Use this m ...

  4. javaScript中Math内置对象基本方法入门

    概念 Math 是javaScript的内置对象,包含了部分数学常数属性和数学函数方法. Math 不是一个函数对象,用户Number类型进行使用,不支持BigInt. Math 的所有属性与方法都是 ...

  5. vue 列表过滤和排序

    <body> <div id="root"> <h1>员工列表</h1> <input type="text&quo ...

  6. 「BUAA OO Unit 2 HW8」第二单元总结

    「BUAA OO Unit 2 HW8」第二单元总结 目录 「BUAA OO Unit 2 HW8」第二单元总结 Part 0 前言 Part 1 第五次作业 1.1 作业要求 1.2 架构设计 1. ...

  7. 史上最全Linux面试题(2020最新版)

    作者:ThinkWon 链接:https://blog.csdn.net/thinkwon/article/details/104588679 导读:本文整理了最新的Linux面试题,近3万字,约10 ...

  8. 版本控制之git

    1.Git的介绍 Git 是一个开源的分布式版本控制软件,用以有效.高速的处理从很小到非常大的项目版本管理. Git 最初是由Linus Torvalds设计开发的,用于管理Linux内核开发.Git ...

  9. 微信小程序云开发如何实现微信支付,业务逻辑又怎样才算可靠

    今天打了几把永劫无间后,咱们来聊一聊用云开发来开发微信小程序时,如何实现微信支付,并且保证业务逻辑可靠. @ 目录 注册微信支付商户号 小程序关联商户号 业务逻辑 代码实现 注册微信支付商户号 点击& ...

  10. jQuery操作标签,jQuery事件操作,jQuery动画效果,前端框架

    jQuery操作标签 jQuery代码查找标签绑定的变量名推荐使用 $xxxEle 样式类操作 addClass();// 添加指定的CSS类名. removeClass();// 移除指定的CSS类 ...