Read text alternative
TYPES: BEGIN OF ty_stxl,
tdname TYPE stxl-tdname,
clustr TYPE stxl-clustr,
clustd TYPE stxl-clustd,
END OF ty_stxl.
DATA: longtext TYPE t247-ltx,
shorttext TYPE t247-ktx,
langu_back TYPE sy-langu,
lv_month TYPE string.
DATA: t_stxl TYPE STANDARD TABLE OF ty_stxl.
DATA: d_week TYPE scal-week..
FIELD-SYMBOLS: <stxl> TYPE ty_stxl.
* compressed text data without text name
TYPES: BEGIN OF ty_stxl_raw,
clustr TYPE stxl-clustr,
clustd TYPE stxl-clustd,
END OF ty_stxl_raw.
DATA: t_stxl_raw TYPE STANDARD TABLE OF ty_stxl_raw.
DATA: w_stxl_raw TYPE ty_stxl_raw.
* decompressed text
DATA: t_tline TYPE STANDARD TABLE OF tline.
FIELD-SYMBOLS: <tline> TYPE tline.
DATA: t_stxh TYPE STANDARD TABLE OF stxh,
w_stxh TYPE stxh.
DATA: GV_TEXT.
SELECT tdname clustr clustd
INTO TABLE t_stxl
FROM stxl
PACKAGE SIZE 3000
WHERE relid = 'TX' "standard text
AND tdobject = 'VBBK'
AND tdname = gs_htab-vbeln
AND tdid = 'ZP01'
AND tdspras = sy-langu.
LOOP AT t_stxl ASSIGNING <stxl>.
* decompress text
CLEAR: t_stxl_raw[], t_tline[].
w_stxl_raw-clustr = <stxl>-clustr.
w_stxl_raw-clustd = <stxl>-clustd.
APPEND w_stxl_raw TO t_stxl_raw.
IMPORT tline = t_tline FROM INTERNAL TABLE t_stxl_raw.
* access text lines for further processing
LOOP AT t_tline ASSIGNING <tline>.
MOVE <tline>-tdline TO GV_TEXT.
CONCATENATE GV_TEXT5 GV_TEXT INTO GV_TEXT5 SEPARATED BY SPACE.
ENDLOOP.
ENDLOOP.
FREE t_stxl.
ENDSELECT.
Please support my work
tdname TYPE stxl-tdname,
clustr TYPE stxl-clustr,
clustd TYPE stxl-clustd,
END OF ty_stxl.
DATA: longtext TYPE t247-ltx,
shorttext TYPE t247-ktx,
langu_back TYPE sy-langu,
lv_month TYPE string.
DATA: t_stxl TYPE STANDARD TABLE OF ty_stxl.
DATA: d_week TYPE scal-week..
FIELD-SYMBOLS: <stxl> TYPE ty_stxl.
* compressed text data without text name
TYPES: BEGIN OF ty_stxl_raw,
clustr TYPE stxl-clustr,
clustd TYPE stxl-clustd,
END OF ty_stxl_raw.
DATA: t_stxl_raw TYPE STANDARD TABLE OF ty_stxl_raw.
DATA: w_stxl_raw TYPE ty_stxl_raw.
* decompressed text
DATA: t_tline TYPE STANDARD TABLE OF tline.
FIELD-SYMBOLS: <tline> TYPE tline.
DATA: t_stxh TYPE STANDARD TABLE OF stxh,
w_stxh TYPE stxh.
DATA: GV_TEXT.
SELECT tdname clustr clustd
INTO TABLE t_stxl
FROM stxl
PACKAGE SIZE 3000
WHERE relid = 'TX' "standard text
AND tdobject = 'VBBK'
AND tdname = gs_htab-vbeln
AND tdid = 'ZP01'
AND tdspras = sy-langu.
LOOP AT t_stxl ASSIGNING <stxl>.
* decompress text
CLEAR: t_stxl_raw[], t_tline[].
w_stxl_raw-clustr = <stxl>-clustr.
w_stxl_raw-clustd = <stxl>-clustd.
APPEND w_stxl_raw TO t_stxl_raw.
IMPORT tline = t_tline FROM INTERNAL TABLE t_stxl_raw.
* access text lines for further processing
LOOP AT t_tline ASSIGNING <tline>.
MOVE <tline>-tdline TO GV_TEXT.
CONCATENATE GV_TEXT5 GV_TEXT INTO GV_TEXT5 SEPARATED BY SPACE.
ENDLOOP.
ENDLOOP.
FREE t_stxl.
ENDSELECT.
Comments
Post a Comment