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. 状态机引擎在vivo营销自动化中的深度实践 | 引擎篇02

    本文是<vivo营销自动化技术解密>的第3篇文章,分析了营销自动化业务背景和状态机引入原因.状态机的三种基本实现方式,同时介绍了几种业界流行的开源状态机框架实现和特点,以及在项目开发过程中 ...

  2. docker基础_数据卷

    docker数据卷 为什么要使用数据卷 如果数据都在容器中,那么容器一旦删除,数据就会丢失!docker容器需要将产生的数据同步到本地.容器与容器之间也需要有一个数据共享的技术 将某些文件共享.这就是 ...

  3. uniapp 入门

    uniapp官网 uni-app 是一个使用 Vue.js (opens new window)开发所有前端应用的框架,开发者编写一套代码,可发布到iOS.Android.Web(响应式).以及各种小 ...

  4. 【前端干货】别再羡慕别人的Excel啦,教你点击按钮直接打开侧边栏!

    负责技术支持的葡萄又来啦. 三日不见,我们的客户又为我们发来新的问题. 这次我们需要实现的场景是在前端表格环境中,像模板按钮那样,点击之后弹出一个侧边栏,然后通过点击不同的单元格显示不同的内容. 挤接 ...

  5. 深入理解mmap--内核代码分析及驱动demo示例

    mmap是一个很常用的系统调用,无论是分配内存.读写大文件.链接动态库文件,还是多进程间共享内存,都可以看到其身影.本文首先介绍了进程地址空间和mmap,然后分析了内核代码以了解其实现,最后通过一个简 ...

  6. UI自动化滑动登录

    一.使用OpenCV图像识别函数 1 import time 2 import cv2 3 import requests 4 from selenium import webdriver 5 fro ...

  7. 【Hadoop】9、Sqoop组件

    目录 Sqoop组件安装与配置 1.使用xftp将软件包上传到/opt/software 2.部署sqoop(在master上执行) 3.启动sqoop集群(在master上执行) 4.连接hive配 ...

  8. Linux发行版--发行版之间的关系--哲学思想--目录的命名规则及用途

    作业2 点此链接查看centos7安装 点此链接查看Ubuntu安装 点此链接查看作业3.5 点此链接查看作业7.8.9 作业1.4.6 Linux发行版--发行版之间的关系 1.Linux是什么 L ...

  9. 【Python爬虫案例】用Python爬取李子柒B站视频数据

    一.视频数据结果 今天是2021.12.7号,前几天用python爬取了李子柒的油管评论并做了数据分析,可移步至: https://www.cnblogs.com/mashukui/p/1622025 ...

  10. 代码审计VauditDemo程序到exp编写

    要对一个程序做系统的审计工作,很多人都认为代码审计工作是在我们将CMS安装好之后才开始的,其实不然,在安装的时候审计就已经开始了! 一般安装文件为install.php或install/或includ ...