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. Pinpoint介绍及docker安装方式

    一.介绍 Pinpoint是用Java编写的大型分布式系统的APM(Application Performance Management应用程序性能管理)工具,受Dapper论文的启发,Pinpoin ...

  2. JavaScript学习总结4-规范

    昨天学习了JS的严格检查模式,今天做一点补充 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 & ...

  3. 【课程汇总】OpenHarmony 成长计划知识赋能第三期系列课程(附链接)

    OpenHarmony 开源开发者成长计划第三期知识赋能课程硬核程度再次升级,带领开发者上手 OpenHarmony 的标准系统应用开发,学习标准设备应用开发,使用 eTS UI 开发分布式应用样例, ...

  4. java高级用法之:在JNA中使用类型映射

    目录 简介 类型映射的本质 TypeMapper NativeMapped 总结 简介 JNA中有很多种映射,library的映射,函数的映射还有函数参数和返回值的映射,libary和函数的映射比较简 ...

  5. AngularJS ui-router 用resolve、service预先加载数据写法,属于优化性能方面吧

    AngularJS的service怎么声明此处就不再赘述,下面的例子是ui-router中使用service的实现代码 $stateProvider.state('myState', { url: & ...

  6. LevelDB 学习笔记2:合并

    LevelDB 学习笔记2:合并 部分图片来自 RocksDB 文档 Minor Compaction 将内存数据库刷到硬盘的过程称为 minor compaction 产出的 L0 层的 sstab ...

  7. 爬虫篇-如何下载selenium及其适配谷歌浏览器插件chromedriver(含chrome各版本及下载地址)

    最近换了电脑,练习爬虫时用到selenium,结果在重新安装chromedriver插件的时候发现原网址不能使用,找了好久终于找到了了新网址,顺便更一篇详细使用的文章,希望可以对屏幕前的你有所帮助.本 ...

  8. JDK内置锁深入探究

    一.序言 本文讲述仅针对 JVM 层次的内置锁,不涉及分布式锁. 锁有多种分类形式,比如公平锁与非公平锁.可重入锁与非重入锁.独享锁与共享锁.乐观锁与悲观锁.互斥锁与读写锁.自旋锁.分段锁和偏向锁/轻 ...

  9. Unity制作一个小星球

    制作过程 在场景中新建一个球体(Planet)和一个胶囊(Player),适当缩放并添加材质,这里胶囊会被视为玩家 然后将摄像机设为胶囊(Player)的子物体 自行调整合适的摄像机视角 新建脚本Gr ...

  10. 2022 Java生态系统报告:Java 11超Java 8、Oracle在缩水、Amazon在崛起!

    近日,New Relic发布了最新的2022 Java生态系统报告,这份报告可以帮助我们深入的了解Java体系的最新使用情况,下面就一起来看看2022年,Java发展的怎么样了,还是Java 8 YY ...