READ_TEXT alternative

      TYPESBEGIN OF ty_stxl,
               tdname TYPE stxl-tdname,
               clustr TYPE stxl-clustr,
               clustd TYPE stxl-clustd,
             END OF ty_stxl.
      DATA:  t_stxl TYPE STANDARD TABLE OF ty_stxl.
      FIELD-SYMBOLS<stxl> TYPE ty_stxl.
* compressed text data without text name
      TYPESBEGIN 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.
      DATAt_stxh TYPE STANDARD TABLE OF stxh,
            w_stxh TYPE stxh.
*      SELECT tdname tdobject tdid
*         FROM stxh
*           INTO CORRESPONDING FIELDS OF TABLE t_stxh.
*AND THEN
* select compressed text lines in blocks of 3000 (adjustable)
      SELECT tdname clustr clustd
              INTO TABLE t_stxl
              FROM stxl
              PACKAGE SIZE 3000
              WHERE relid    'TX'          "standard text
                AND tdobject 'VBBK'
                AND tdname   gs_vbak-vbeln
        AND tdid     'ZE10'
        AND tdspras  sy-langu.
        LOOP AT t_stxl ASSIGNING <stxl>.
*   decompress text
          CLEARt_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 gs_final-port_of_dis.
          ENDLOOP.
        ENDLOOP.
        FREE t_stxl.
      ENDSELECT.
Please support my work

Comments

Popular posts from this blog

all user exit mv45afzz (implicit user exit )

How to Give Dropdown in alv report in sap abap programming Language

Long Text in input and output field in module pool