• 内表内容的新添加方法(7.5部分新语法练习)


    TABLES:vbak.
    DATA:S_VBELN TYPE RANGE OF VBAK-VBELN."相当于select-option:S_WERKS FOR MARD-WERKS
    DATA:S_ERDAT TYPE RANGE OF VBAK-ERDAT."相当于select-option:S_WERKS FOR MARD-ERDAT
    DATA:S_ERZET TYPE RANGE OF VBAK-ERZET."相当于select-option:S_WERKS FOR MARD-ERZET
    DATA:S_ERNAM TYPE RANGE OF VBAK-ERNAM."相当于select-option:S_WERKS FOR MARD-ERNAM
    S_VBELN = VALUE #( SIGN ='I' OPTION = 'BT' ( LOW = 50000000 HIGH = 60000000 )
                                               ( LOW = 7000 HIGH = 8000 )
                                 OPTION = 'NB' ( LOW = 9000 ) ).
    ”图1
    DATA: LT_WHERE TYPE STRINGTAB. INSERT CONV #( 'VBELN IN @S_VBELN ' ) INTO TABLE LT_WHERE. INSERT CONV #( 'AND ERDAT IN @S_ERDAT ' ) INTO TABLE LT_WHERE. INSERT CONV #( 'AND ERZET IN @S_ERZET AND ERNAM IN @S_ERNAM' ) INTO TABLE LT_WHERE.
    ”图2
    SELECT VBELN,ERDAT,ERZET,ERNAM FROM VBAK UP TO 10 ROWS INTO TABLE @DATA(LT_VBAK) WHERE (LT_WHERE) . cl_demo_output=>DISPLAY( LT_VBAK ).
    ”图3

    图1如下:

    图2如下:相当于代替了where后面的全部条件,注意要声明类型

    图3如下:

  • 相关阅读:
    TreeView checkbox
    学习wcf
    Python导入其他目录的模板
    xcode中如何设置编译后的app路径
    python中package机制的两种实现方式
    Page Object封装思想
    mac xcworkspace xcodebuild
    mac软件管理软件HomeBrew
    app被Rejected 的各种原因翻译
    scan-build static analyze help
  • 原文地址:https://www.cnblogs.com/BruceKing/p/11430329.html
Copyright © 2020-2023  润新知