cancel
Showing results for 
Search instead for 
Did you mean: 

Module function RFC for READ_TEXT

Former Member
0 Kudos

Hi everybody

I'm a novice in ABAP developement. I need a module function RFC for READ_TEXT

I created a Module function RFC Z_READ_TEXT

In tab import i created a parameter :

IW_THEAD / TYPE THEAD

In the code :


SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S32 {
color: #3399FF;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}

FUNCTION Z_READ_TEXT.

*"----------------------------------------------------------------------

*"*"Interface locale :

*"  IMPORTING

*"     VALUE(IW_THEAD) TYPE  THEAD OPTIONAL

*"  EXPORTING

*"     VALUE(EW_SUBRC) TYPE  SYSUBRC

*"  TABLES

*"      LINES STRUCTURE  TLINE

*"  EXCEPTIONS

*"      ID

*"      LANGUAGE

*"      NAME

*"      NOT_FOUND

*"      OBJECTREFERENCE_CHECK

*"      WRONG_ACCESS_TO_ARCHIVE

*"----------------------------------------------------------------------



   DATA : l_textlines TYPE TABLE OF tline WITH HEADER LINE.

   DATA : l_thead TYPE thead.



   DATA : stream TYPE line.



   l_thead = iw_thead.


      CALL FUNCTION 'READ_TEXT'

        EXPORTING

          client                  = '141'

          object                  = iw_thead-tdobject

          name                    = iw_thead-tdname

          id                      = iw_thead-tdid

          language                = iw_thead-tdspras

          local_cat               = 'G'

*        IMPORTING

*         header                  = gs_textheader

        TABLES

          lines                   = l_textlines[]

        EXCEPTIONS

          id                      = 01

          language                = 02

          name                    = 03

          not_found               = 04

          object                  = 05

          reference_check         = 06

          wrong_access_to_archive = 07

          OTHERS                  = 16.



      IF sy-subrc = 0.

        LOOP AT l_textlines.

          AT FIRST.

            CONTINUE. "skip first line which is description

          ENDAT.

          CONDENSE l_textlines-tdline.

          line = l_textlines-tdline.

          APPEND line TO stream.

        ENDLOOP.

      ENDIF.


ENDFUNCTION.

But i have an error : Area "LINE" unknow. An area with a similar name "LINES" exist.

Can you help me to create this module fucntion RFC to CALL READ_TEXT ?

Thank you in advance

Accepted Solutions (0)

Answers (0)