单个的字符型。
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.