corresponding
一、工作区Work Area
DATA: gt_out TYPE STANDARD TABLE OF zssd005_out_1,
gs_out TYPE zssd005_out_1.
**********************************************
*OLD SYNTAX:先定义工作区ls_export
DATA: ls_export TYPE zssd005_out_2.
LOOP AT gt_out INTO gs_out.
MOVE-CORRESPONDING gs_out TO ls_export.
ENDLOOP.
**********************************************
*NEW SYNTAX:不需要预先定义工作区ls_export
LOOP AT gt_out INTO gs_out.
DATA(ls_export) = CORRESPONDING zssd005_out_2( gs_out ).
ENDLOOP.
工作区(mAPPing&except)
REPORT ztest.
DATA:BEGIN OF ls_data1,
fd1 TYPE char10,
fd2 TYPE char10,
fd3 TYPE char10,
END OF ls_data1.
DATA:BEGIN OF ls_data2,
fd1 TYPE char10,
fd2 TYPE char10,
fd4 TYPE char10,
END OF ls_data2.
ls_data1 = VALUE #( fd1 = |First|
fd2 = |Second|
fd3 = |Third| ).
ls_data2 = CORRESPONDING #( ls_data1 ).
WRITE: / |****************************************|.
WRITE: / |*CORRESPONDING NO MAPPING AND NO EXCEPT*|.
WRITE: / |FD1:|,ls_data2-fd1,|FD2:|,ls_data2-fd2,|FD4:|,ls_data2-fd4.
SKIP.
ls_data2 = CORRESPONDING #( ls_data1 MAPPING fd4 = fd3 ).
WRITE: / |****************************************|.
WRITE: / |*CORRESPONDING MAPPING AND NO EXCEPT*|.
WRITE: / |FD1:|,ls_data2-fd1,|FD2:|,ls_data2-fd2,|FD4:|,ls_data2-fd4.
SKIP.
ls_data2 = CORRESPONDING #( ls_data1 EXCEPT fd2 ).
WRITE: / |****************************************|.
WRITE: / |*CORRESPONDING NO MAPPING AND EXCEPT*|.
WRITE: / |FD1:|,ls_data2-fd1,|FD2:|,ls_data2-fd2,|FD4:|,ls_data2-fd4.
SKIP.
ls_data2 = CORRESPONDING #( ls_data1 MAPPING fd4 = fd3 EXCEPT fd2 ).
WRITE: / |****************************************|.
WRITE: / |*CORRESPONDING MAPPING AND EXCEPT*|.
WRITE: / |FD1:|,ls_data2-fd1,|FD2:|,ls_data2-fd2,|FD4:|,ls_data2-fd4.
二、内表 Internal table
REPORT ZTEST.
DATA: LT_T001 TYPE STANDARD TABLE OF ACDOCA.
SELECT
BUKRS,
BELNR,
GJAHR,
BUZEI
FROM BSEG
UP TO 3 ROWS
INTO TABLE @DATA(LT_BSEG).
"CORRESPONDING
LT_T001 = CORRESPONDING #( LT_BSEG MAPPING RBUKRS = BUKRS
DOCLN = BUZEI ).
"display data
CL_SALV_TABLE=>FACTORY(
IMPORTING
R_SALV_TABLE = DATA(LCL_ALV)
CHANGING
T_TABLE = LT_T001 ).
LCL_ALV->DISPLAY( ).
文章最后发布于: 2018-09-21 09:50:45
相关阅读
1、什么是hbase HBASE是一个高可靠性、高性能、面向列、可伸缩的分布式存储系统,利用HBASE技术可在廉价PC Server上搭建起大规模
The following table shows the potential SQL functions for strings in a CDS view in ABAP CDS, plus the requirements ma
JDK1.8 新特性 本文主要介绍了JDK1.8版本中的一些新特性,乃作者视频观后笔记,仅供参考。 jdk1.8新特性知识点: Lambda表达式 函数
中国定制功能 iOS 6拥有更完善的文本输入法,并内置了对热门中文互联网服务的支新浪微博与土豆网持, 从而让iPad、iPhone和iPod t
关于iwatch的交互特性及使用情境_iwatch个人使用感受
借了同事的iwatch玩了几天,今天来写写关于交互和使用场景方面的一些个人感受。iwatch界面主要是分为:表盘主界面、通知界面、快捷视