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. Hyperledger Fabric组织的动态添加和删除

    前言 在Fabric定制联盟链网络工程实践中,我们虚拟了一个工作室的联盟链网络需求,并根据此需求分析了整个网络的架构且已经完成了一个简单 fabric 网络模型.本文将在其基础上,在 mychanne ...

  2. OSPF 路由协议详解(一)

    (文章目录) ospf 协议是网络层协议 此篇文章适合有一定网络基础的人 ospf 协议最多应用在企业网络中,针对于运营商网络并不是特别的适用,端口号为 89 通过 IP 进行数据的转发 ospf 基 ...

  3. 在vue项目中配置webpack

    首先我们来看一下使用Vue-cli2与Vue-cli2之后的版本(这里以Vue-cli4版本为例)创建项目目录结构的不同: Vue-cli2(左图)与Vue-cli4(右图)创建项目的目录 从上图可以 ...

  4. 新手小白入门C语言第四章:变量与常量

    C 变量 变量其实只不过是程序可操作的存储区的名称. C 中每个变量都有特定的类型,类型决定了变量存储的大小和布局,该范围内的值都可以存储在内存中,运算符可应用于变量上. 变量的名称可以由字母.数字和 ...

  5. 搜索与图论②--宽度优先搜索(BFS)

    宽度优先搜索 例题一(献给阿尔吉侬的花束) 阿尔吉侬是一只聪明又慵懒的小白鼠,它最擅长的就是走各种各样的迷宫. 今天它要挑战一个非常大的迷宫,研究员们为了鼓励阿尔吉侬尽快到达终点,就在终点放了一块阿尔 ...

  6. Go 语言 结构体和方法

    @ 目录 1. 结构体别名定义 2. 工厂模式 3. Tag 原信息 4. 匿名字段 5. 方法 1. 结构体别名定义 变量别名定义 package main import "fmt&quo ...

  7. Redis 内存满了怎么办?这样设置才正确!

    上回在<Redis 数据过期了会被立马删除么?>说到如果过期的数据太多,定时删除无法删除完全(每次删除完过期的 key 还是超过 25%),同时这些 key 再也不会被客户端请求,就无法走 ...

  8. [题解] 树(tree)

    题目大意 ​ 给定一颗 \(N\) 个点的有根树,其中 \(1\) 是树根,除了 \(1\) 以外的其他点 \(u\) 有唯一的父亲 \(Father_u\).同时,给定 \(M\) 条路径,第 \( ...

  9. MybatisCodeHelperPro简单使用

    1.idea安装 2.连接mysql 3.创建实体等关联类 ,选择数据库表右键选择如图 4配置 生成后的 5简单应用 可以直接生成xml 总结:非常的方便快捷.

  10. RabbitMQ 3.9( 基础 )

    1.认识MQ 1.1.什么是MQ? MQ全称:message queue 即 消息队列 这个队列遵循的原则:FIFO 即 先进先出 队列里面存的就是message 1.2.为什么要用MQ? 1.2.1 ...