Using READ_TEXT

Suppose if i want to display the standard text "PURCHSE ORDER REPORT".
HOW CAN I USE THE FM read_text (for example header window)
could you please explain it
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:37 PM

Hi
  Create a Text element. TYPE = Include Text.
Give the following parameters
TEXT NAME = EKKO-EBELN
TEXT object = EKKO
TEXT ID =      
  ( depends on the whch text you want to display in PO header TEXT).
( you can get this from TABLE T166K ).
Example :
SELECT SINGLE *  FROM T166K  INTO LS_T166K
WHERE DRUVO     = IV_DRUVO  AND
BSTYP     = IS_EKKO-BSTYP  AND
BSART     = IS_EKKO-BSART  AND
TDOBJECT  = LS_TEXT-TDOBJECT AND
TDID      = LS_TEXT-TDID.
Language = sy-langu.

Similar Messages

  • How to use read_text function module

    Hi how to use read_text function module to read purchase order header text .what are all tht things to pass in ID,Name and Object
    thanks,
    Mahe

    Dear,
    Use below code.
    DATA:IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
    V_TDNAME LIKE THEAD-TDNAME.
    V_TDNAME = PO_NUMBER.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
    *   CLIENT                        = SY-MANDT
        ID                            = 'F01'
        LANGUAGE                      = 'EN'
        NAME                          = V_TDNAME
        OBJECT                        = 'EKKO'
      TABLES
        LINES                         = IT_LINE.
    Thanks and Regards,

  • Using READ_TEXT to read SO10 (standard texts)

    Hi,
    When we use READ_TEXT F.M for SO10 texts what are the parameters to pass.
    ID - ST
    LANGUAGE - EN
    NAME - Z_TEL (SO10 text id)
    OBJECT - ?
    What i should pass to OBJECT & what else i need to input!
    Thanks in advance.
    Thanks,
    Deep.

    If u r reading text from Purchase Order text then Object ID will be EKKO.It depends what r u reading for.Look at the following code :
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT                  = SY-MANDT
            ID                      = 'F01'
            LANGUAGE                = 'E'
            NAME                    = W_TDNAME
            OBJECT                  = 'EKKO'
          TABLES
            LINES                   = IT_F01
          EXCEPTIONS
            ID                      = 1
            LANGUAGE                = 2
            NAME                    = 3
            NOT_FOUND               = 4
            OBJECT                  = 5
            REFERENCE_CHECK         = 6
            WRONG_ACCESS_TO_ARCHIVE = 7
            OTHERS                  = 8.
    Thanks & Regards,
    Rock.

  • Using Read_text want to print continuous text

    Hi,
    My requirement is to print continuous text using read_text.
    Here we are not supposed to use include text to print continuosly.
    For ex:The text in script is like as below
    *Firstline
    Secondline
    Reqirement is to ptint as Firstline Secondline by using read_text only.
    Please help.
    Thanks & Regards,
    Shirisha Kandula

    Hi Hari,
    If the text is as below the concatenate will not work because for the newline also it will print in the sameline.
    Ex:
    Firstline
    Secondline
    *Thirdline
    O/P if we concatenate is: Firstline Secondline Thirdline
    But my requirement is to print like
    Firstline Secondline
    Thirdline
    Hope u got my point.
    Thanks,
    Shirisha

  • How to read text in Production Memo tab of Production Order using READ_TEXT

    Hi all,
    Please help me, I was able to develop a program that using READ_TEXT function module to read the Production Order long text.
    Now my requirement is to read the text in the Production memo tabe of production order.
    Can some one tell mee how to do it? the same program is now not working.
    do i need to do any changes?

    Hi,
    TDOBJECT --> AUFK
    TDID -->KOPF
    IF your given same means it's correct i think check your coding
    i will give u sample coding analyze .
    REPORT  z_test1.
    TABLES:
      thead.
    PARAMETERS:
      p_vbeln TYPE vbak-vbeln.
    PARAMETERS:
      p_textid TYPE thead-tdid.
    DATA:
      BEGIN OF t_thead OCCURS 0.
            INCLUDE STRUCTURE thead.
    DATA:
    END OF t_thead.
    DATA:
      w_line TYPE i,
      w_idx TYPE i,
      w_flag TYPE i.
    DATA:
      BEGIN OF t_tline OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA:
    END OF t_tline.
    DATA:
      w_test TYPE thead-tdname,
      w_temp TYPE string VALUE 'TEST'.
    START-OF-SELECTION.
      w_test = p_vbeln.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = p_textid
          language                = sy-langu
          name                    = w_test
          object                  = 'VBBK'
        TABLES
          lines                   = t_tline
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc NE 0.
        MESSAGE 'HEADER TEXT NOT FOUND' TYPE 'I'.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT t_tline.
        IF t_tline-tdline = w_temp.
          w_flag = 1.
        ENDIF.
      ENDLOOP.
      IF w_flag NE 1.
        t_tline-tdline = w_temp.
        APPEND t_tline.
      ENDIF.
      REFRESH t_thead.
      t_thead-tdobject = 'VBBK'.
      t_thead-tdname = w_test.
      t_thead-tdid =   p_textid.
      t_thead-tdspras = sy-langu.
      APPEND t_thead.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          client          = sy-mandt
          header          = t_thead
          savemode_direct = 'X'
        TABLES
          lines           = t_tline
        EXCEPTIONS
          id              = 1
          language        = 2
          name            = 3
          object          = 4.
      IF sy-subrc NE 0.
        WRITE: / 'ERROR'.
      ELSE.
        COMMIT WORK.
        WRITE: / 'TEXT SAVED'.
      ENDIF.
      LOOP AT t_tline.
        WRITE: / t_tline-tdline.
      ENDLOOP.
    Regards
    swamy

  • How to use Read_Text  in Smartforms

    Hi Experts,
    I am developed smartforms .My probelm is i need to use the read_text in smartforms . i am fetch the text in print program how to use this text in smartform.
    Pls suggest me.
    This is my print program .
    REPORT  zsd_invoice_text.
    PARAMETERS : p_vbeln TYPE vbrk-vbeln.
    DATA : fname TYPE rs38l_fnam.
    DATA:BEGIN OF i_vbrk OCCURS 0,
         vbeln type VBELN_VF,
         END OF i_vbrk.
    DATA: lt_lines  TYPE STANDARD TABLE OF tline,
          wa_lines  TYPE tline.
    DATA: ld_text(18) TYPE c.
    *DATA: tdobname TYPE tdobname.
    CONSTANTS: c_id TYPE thead-tdid VALUE  '0002',
                          c_object TYPE thead-tdobject VALUE 'VBBK'.
    DATA: lv_name TYPE tdobname.
    select vbeln from vbrk into table i_vbrk where vbeln eq p_vbeln.
    loop at i_vbrk.
    read table i_vbrk with key vbeln = i_vbrk-vbeln.
    endloop.
    lv_name = i_vbrk-vbeln.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id        = c_id
          language  = sy-langu
          name      = lv_name
          object    = c_object
    *  IMPORTING
    *    header    = ld_header
        TABLES
          lines     = lt_lines
        EXCEPTIONS
          id        = 1
          language  = 2
          name      = 3
          not_found = 4
          object    = 5.
        IF sy-subrc <> 0.
        ELSE.
          LOOP AT lt_lines INTO wa_lines.
            CONCATENATE ld_text wa_lines-tdline INTO ld_text.
          ENDLOOP.
        ENDIF.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname                 = 'ZSD_INVOICE_TEXT'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
    IMPORTING
       fm_name                  = fname
    EXCEPTIONS
       no_form                  = 1
       no_function_module       = 2
       OTHERS                   = 3
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CALL FUNCTION fname
      EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
        p_vbeln                    = p_vbeln
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
       formatting_error           = 1
       internal_error             = 2
       send_error                 = 3
       user_canceled              = 4
       OTHERS                     = 5
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Thanks in Advance
    purnaneelu
    Edited by: Purnaneelu on Jun 9, 2009 7:11 AM

    Hi,
    Used below code:
    1) Call FM READ_TEXT and pass
    DATA :
    T_LINES
    TYPE TABLE OF
    TLINE
    W_TDLINES
    TYPE
    TLINE
    V_WORK
    TYPE
    CHAR255
    CALL FUNCTION 'READ_TEXT'
       EXPORTING
        CLIENT                         = SY-MANDT
         ID                                = 'Z038'
         LANGUAGE                 = sy-langu
         NAME                         =  BIL_NUMBER
         OBJECT                      = 'VBBK'
       TABLES
         lines                            = T_LINES
    IF sy-subrc = 0.
    loop at t_lines INTO W_TDLINES.
       CONCATENATE V_WORK W_TDLINES-TDLINE INTO V_WORK SEPARATED BY SPACE.
       CONDENSE V_WORK.
       CLEAR W_TDLINES.
    ENDLOOP.
    REFRESH T_LINES.
    ENDIF.
                                                                          OR
    2 ) See below attached screen shot

  • How to print the texts retrived by using READ_TEXT fun module in Smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text.
    I have to print the trouble ticket. in that the notes log I have to pass.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    There are a few ways to do it. If you need to take all of the text in the text type, in your SF text element choose "Include Text".
    Populate the fields with the data that corresponds to the text type. It is similar to the interface to the FM "Read_Text.
    Text Name
    Text Obje
    Text ID 
    Language
    Encase any variables with the "&" symbol.
    If you have already coded the call to the FM "READ_TEXT" and loaded the text into an internal table, create a loop and loop through the itab. Inside of the loop create a text element and add a variable in the text element for the field you are looking to output.

  • Error while reading the Long text Using READ_TEXT

    Hi friends,
    Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT  I am getting the following error if the text is not there.
    OUT_PURCH_PO ID GRUN language EN not found.
    I should not get this error Instead I should get the blank value.
    OUT_PURCH_PO   -  my material name.
    Following is my code.
    IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.
       READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.
       WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.
         NAME = WA_EKPO-MATNR.
        CALL FUNCTION 'READ_TEXT'
           EXPORTING
             CLIENT            = SY-MANDT
             ID                =  ID
             LANGUAGE          =  SY-LANGU
             NAME              =  NAME 
             OBJECT            =  OBJECT
          IMPORTING
            HEADER            =  THEAD
           TABLES
             LINES             =  LTEXT.

    Hi,
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                      = id
        language                = sy-langu
        name                    = name
        object                  = object
      TABLES
        lines                   = ltext
      EXCEPTIONS                           " --> have this
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM

  • Problem using Read_text

    Hi,
    I am using the Read_text in the following manner:
    TYPES : BEGIN OF STR_VBRP,
              VGBEL TYPE VBRP-VGBEL,
              VGPOS TYPE VBRP-VGPOS,
              END OF STR_VBRP.
      DATA : IT_VBRP TYPE STANDARD TABLE OF STR_VBRP INITIAL SIZE 0,
             WA_VBRP TYPE STR_VBRP.
    DATA: ITAB_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'READ_TEXT'
                      EXPORTING
                       CLIENT                        = SY-MANDT
                        ID                            = 'Z002'
                        LANGUAGE                      = SY-LANGU
                        NAME                          = WA_VBRP-VGBEL
                        OBJECT                        = 'VBBK'
                      ARCHIVE_HANDLE                = 0
                      LOCAL_CAT                     = ' '
                      IMPORTING
                      HEADER                        =
                        TABLES
                        LINES                         = ITAB_LINES
                      EXCEPTIONS
                       ID                            = 1
                       LANGUAGE                      = 2
                       NAME                          = 3
                       NOT_FOUND                     = 4
                       OBJECT                        = 5
                       REFERENCE_CHECK               = 6
                       WRONG_ACCESS_TO_ARCHIVE       = 7
                        OTHERS                        = 8
    And when I am running it I am getting the following dump:
    The function module interface allows you to specify only
    fields of a particular type under "NAME".
    The field "WA_VBRP-VGBEL" specified here is a different
    field type.
    Please let me know how should I pass the data.
    Regards,
    Ashutosh

    Hi,
    Try using sample code below:
    TABLES: PBIM.
    * stxh, stxl, stxb - trans tables for text
    * ttxit - text on text-ids
    * ttxot - Short texts on text objects
    * Transaction MD63
    SELECT-OPTIONS: S_MATNR FOR PBIM-MATNR,
                    S_WERKS FOR PBIM-WERKS.
    DATA: BEGIN OF HTEXT.
            INCLUDE STRUCTURE THEAD.
    DATA: END OF HTEXT.
    DATA: BEGIN OF LTEXT OCCURS 50.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF LTEXT.
    DATA: BEGIN OF DTEXT OCCURS 50.
    DATA:   MATNR LIKE PBIM-MATNR.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF DTEXT.
    DATA: TNAME LIKE THEAD-TDNAME.
    SELECT * FROM PBIM WHERE WERKS IN S_WERKS.
      MOVE PBIM-BDZEI TO TNAME.
      CALL FUNCTION 'READ_TEXT'
           EXPORTING
    *           CLIENT                  = SY-MANDT
              ID                      = 'PB'
              LANGUAGE                = 'E'
              NAME                    = TNAME
              OBJECT                  = 'PBPT'
    *         ARCHIVE_HANDLE          = 0
         IMPORTING
              HEADER                  = HTEXT
         TABLES
              LINES                   = LTEXT
         EXCEPTIONS
              ID                      = 1
              LANGUAGE                = 2
              NAME                    = 3
              NOT_FOUND               = 4
              OBJECT                  = 5
              REFERENCE_CHECK         = 6
              WRONG_ACCESS_TO_ARCHIVE = 7
              OTHERS                  = 8.
      LOOP AT LTEXT.
        IF LTEXT-TDLINE NE ''.
          MOVE LTEXT-TDLINE TO DTEXT-TDLINE.
          MOVE PBIM-MATNR TO DTEXT-MATNR.
          APPEND DTEXT.
        ENDIF.
      ENDLOOP.
    ENDSELECT.
    LOOP AT DTEXT.
      WRITE:/ DTEXT-MATNR, DTEXT-TDLINE.
    ENDLOOP.
    Hope it helps
    Regards
    Mansi

  • How to use Read_text in Smart Forms for printing Header Texts

    Dear ALL,
    I want to print Header Texts in SmartForms, For that
    I am using T/Code VL02N .. and choosed  Header ..
    got this details...  from Text Header.
    Text Name       :0080000441
    Language         :EN
    Text ID             :Z002
    Text Object       :VBBK.
    So in Smart forms Under Template i have created a text and Program Code .
    Inside that I have used this below code .
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    *CLIENT= SY-MANDT
    ID = 'Z002'
    LANGUAGE =  SY-LANGU
    NAME = NAME
    OBJECT = 'VBBK'
    TABLES
    LINES = IT_TLINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
    IF SY-SUBRC 0.
    CLEAR IT_TLINE.
    ENDIF.
    Kindly suggest me, Where  to declare the variables and loops for using this Read_Text Syntax in Smartforms .
    Response to this will be highly appreciated........  
    Regards ,
    Vinoth.

    hi
    good
    please check this code
    CONSTANTS:
    *For text reading like in LCNMMFTX / FORM SET_CONTROL_TEXT
               text_id  like thead-tdid     value 'MATK',
               text_obj like thead-tdobject value 'AUFK  '.
    data tlines like tline occurs 0 with header line.
    data tdname like thead-tdname.
    data tdheader like thead.
    if not it_proj-ltxsp is initial.
    refresh tlines.
            tdname = sy-mandt.
            tdname+3 = it_proj-rsnum.
            tdname+13 = it_proj-rspos.
            tdname+17 = it_proj-rsart.
            call function 'READ_TEXT'
                 exporting
                    id        = text_id
                    language  = it_proj-ltxsp
                    name      = tdname
                    object    = text_obj
                 importing
                    header    = tdheader
                 tables
                    lines     = tlines.
                exceptions
                   not_found = 01.
    thanks
    mrutyun^

  • How to use read_text...

    Hello experts,
    I have been tasked to get the start and end date from t-code FB03. Now my question is, what will I put in it? Here is my code where I plan to put the read text:
    LOOP AT it_bsis ASSIGNING <fs_bsis>.
        SELECT SINGLE bukrs belnr gjahr budat bldat xblnr bktxt FROM bkpf
        INTO (bkpf-bukrs, bkpf-belnr, bkpf-gjahr, it_bseg-budat,
              it_bseg-bldat, it_bseg-xblnr, it_bseg-bktxt)
        WHERE bukrs = <fs_bsis>-bukrs
          AND belnr = <fs_bsis>-belnr
          AND gjahr = <fs_bsis>-gjahr.
        SELECT SINGLE bukrs belnr buzei gjahr shkzg dmbtr lifnr sgtxt
        FROM bseg INTO (it_bseg-bukrs, it_bseg-belnr, it_bseg-buzei,
                        it_bseg-gjahr, it_bseg-shkzg, it_bseg-dmbtr,
                        it_bseg-lifnr, it_bseg-sgtxt)
        WHERE bukrs = <fs_bsis>-bukrs
          AND belnr = <fs_bsis>-belnr
          AND gjahr = <fs_bsis>-gjahr
          AND koart = 'K'
          AND hkont = <fs_bsis>-hkont
          AND umskz = 'K'
          AND fdlev = 'DP'.
      ENDLOOP.
    Again, thank you guys and have a great day!

    First you need to find out exactly what text that you need to get.  The text headers are stored in STXH,  here you can see the object, id, and name of the text.  You can get the object and id by using transaction code SE75.  This will list all of the text objects and the ids underneath them.  The NAME is usually the key of the object.  For example, for Sales Document Header Text, the name is the sales document number.  Other NAMEs are a combination. For example, material memo text, It is a combination of material number and plant.  To find exactly what object, id, and how the NAME is built, I usually create a text using the standard transaction.  Then go to SE16, on table STXH, and do a query for "Created By" = me, and "Created Date" = today.  This will give me the header record of the text that I just created.  Now I can see what the Object, ID, and NAME is.  With this information, you can pass to the READ_TEXT function module and get your text.
    Make sense?
    Regards,
    Rich Heilman

  • Reading item text of sales order using READ_TEXT but getting error

    Hi Experts,
    I want to read the Billing item text which is processed through from delivery.
    For that I am using FM  READ_TEXT, but getting error.
    Text 0090014392 ID 0001 language EN not found
    I am providing data in FM...
    ID : 0001
    LANGUAGE : E
    NAME : 0090014392 (Billing Document Number)
    OBJECT : VBBP
    but still I am getting the error...
    Can anyone provide solution?
    Regards,
    SURYA
    Edited by: suryabasu on Mar 10, 2011 5:49 AM

    hii
    try with this,
    select single tdtxtlines
                   from stxh
                   into v_textline
                   where tdid = '0001'
                   and   tdname = wa_tname-name
                   and   tdobject = 'VBBP'.
    if v_textline ne 0.
    call function 'READ_TEXT'
       exporting
         id                            = '0001'
         language                      = sy-langu
         name                          = wa_tname-name
         object                        = 'VBBP'
       tables
         lines                         = it_tline
      exceptions
        id                            = 1
        language                      = 2
        name                          = 3
        not_found                     = 4
        object                        = 5
        reference_check               = 6
        wrong_access_to_archive       = 7
        others                        = 8.
    endif.
    read table it_tline into wa_tline index 1.
    regards,
    Sri.

  • How to pull the data using READ_TEXT

    Hi,
        I was trying to use the READ_TEXT function module to pull the data from the sales order, but i am not sure what are the values exactly i need to pass.
    ID
    LANGUAGE
    NAME
    OBJECT
    Since the above parameters are mandatory to get the text from sales order ... can you please suggest me. We are using customized screen ... if user enteres the data in the long text field in the customized screen - it should be updated in the sales order... how can i achieve... can any one suggest me
    regards
    jaya

    Hi,
    In that text TC --> come to change mode >menu goto->header.
    There you find all info.
    aRs

  • How to read more than 132 char using Read_Text Fn. Module

    Hi,
    I am using Fn. Module <b>Read_Text</b> in my program, but the fn. module is only retrieving 132char data and remaining data is getting truncated. In my case Text size is more than 132char...pls, let me Know, how can i get entire text or i have to use any other Fn. Module

    Hi,
    In READ_TEXT function module, TLINE structure has the component TDLINE with 132 characters. So, u can't read more than 132 characters. If u want to read more than that, u have to write FM of ur own which can read more than 132 characters.

  • Problem while using read_text fm

    Hi,
    iam having one problem if i call read_text fm
    only one line is coming in the output.
    eg: material(Text)
    plant (Text)
    my progaram write only one line ie. material i want to consider f all the line in single line.
    opt should be: materialplant.
    please correct this code
    loop at t_mara.
    *CONCATENATE t_mara-matnr t_mara-dwerks INTO TeMP IN CHARACTER MODE.
    temp = t_mara-matnr .
    temp+19(4) = t_mara-dwerks .
    WRK_NAME = temp.
    *WRITE: / temp..
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    ID = 'LTXT'
    LANGUAGE = SY-LANGU
    NAME = WRK_NAME
    OBJECT = 'MDTXT'
    IMPORTING
    HEADER =
    TABLES
    LINES = IT_LINES
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS .
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    READ TABLE IT_LINES INDEX 1.
    TXT_TD03 = IT_LINES-TDLINE.
    MOVE TXT_TD03 TO T_MARA-TEXT.
    MODIFY T_MARA.
    ENDIF.

    hai
    DATA wa_it_lines LIKE TLINE.
    DATA WRK_NAME LIKE THEAD-TDNAME.
    data TXT_TD03 (70).
    CONCATENATE W_IT_NUMBER W_IT_DE_NUMBER INTO W_NUMBER.
    *Get the dETAIL NUMBER
    call function 'READ_TEXT'
      exporting
        id                            = 'LTXT'
        language                      = sy-langu
        name                          = WRK_NAME
        object                        = 'MDTXT'
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = it_lines
    exceptions
       id                            = 1
       language                      = 2
       name                          = 3
       not_found                     = 4
       object                        = 5
       reference_check               = 6
       wrong_access_to_archive       = 7
       others                        = 8
    if sy-subrc <> 0.
    message id sy-msgid type 'I' number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    read table it_lines index 1 into wa_it_lines .
    *GET THE NUMBER BY
    TXT_TD03 = IT_LINES-TDLINE.
    MOVE TXT_TD03 TO T_MARA-TEXT.
    MODIFY T_MARA.
    do it like this
    regard
    nawa

Maybe you are looking for