function to read text structure

//function to read text structure

FORM GET_TITLE USING  TEXT_ID T_NAME LIKE THEAD-TDNAME OBJ_ID CHANGING
 C_TEXT.
   DATA: G_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
   DATA: T_I TYPE I.
   CALL FUNCTION 'READ_TEXT'

        EXPORTING
            CLIENT                  = SY-MANDT
             ID                      = TEXT_ID
             LANGUAGE                = SY-LANGU
             NAME                    = T_NAME
             OBJECT                  = OBJ_ID
*          ARCHIVE_HANDLE          = 0
*    IMPORTING
*         HEADER                  =
        TABLES
             LINES                   = G_LINES
           EXCEPTIONS
                ID                      = 1
                LANGUAGE                = 2
                NAME                    = 3
                NOT_FOUND               = 4
                OBJECT                  = 5
             REFERENCE_CHECK         = 6
             WRONG_ACCESS_TO_ARCHIVE = 7
             OTHERS                  = 8.
   CLEAR C_TEXT.
   IF SY-SUBRC = 0.
     DESCRIBE TABLE G_LINES LINES T_I.
     IF T_I > 0.
       READ TABLE G_LINES INDEX 1.
       C_TEXT = G_LINES-TDLINE.
     ENDIF.
   ENDIF.

===============================================

 call function 'READ_TEXT'
       exporting
            CLIENT                  = SY-MANDT
            id                      = 'ZC31'
            language                = sy-langu
            name                    = u_name
            object                  = 'VBBP'
       tables
            lines                   = g_line
       exceptions
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            others                  = 8.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值