abap select 拼接字段
Posted bruceking
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了abap select 拼接字段相关的知识,希望对你有一定的参考价值。
单个的字符型。
DATA:s TYPE c LENGTH 80. SELECT SINGLE matnr ernam INTO (s+0(18),s+18(40)) FROM mara . WRITE s. CLEAR s. SELECT SINGLE ( matnr && ernam ) INTO @s FROM mara . WRITE / s. CLEAR s. SELECT SINGLE concat( matnr , ernam ) AS aaa FROM mara INTO @s. WRITE / s.
数值型的
REPORT ZTEST02. TABLES:MARDH,ACDOCA. DATA:S TYPE C LENGTH 80. DATA:a(4) TYPE N VALUE 2019. DATA:b(2) TYPE N VALUE 03 . DATA:c(6) TYPE N. SELECT MARDH~MATNR, CAST( CONCAT( MARDH~LFGJA,MARDH~LFMON ) AS NUMC( 6 ) ) AS C FROM MARDH WHERE MATNR = ‘BA13G-CAA21D‘ INTO TABLE @DATA(LT_DATA1). LOOP AT LT_DATA1 ASSIGNING FIELD-SYMBOL(<FS_DATA>). WRITE:/ <FS_DATA>-MATNR , <FS_DATA>-c. ENDLOOP.
以上是关于abap select 拼接字段的主要内容,如果未能解决你的问题,请参考以下文章
abap中,select single 与 select ... endselect的区别?
SAP ABAP select 语句为啥取不到数据(确认后台表中有数据)