Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Standard Text call

Former Member
0 Kudos

Hi ,

suppose i have created a standard text in SO10 like the following:

*----


  • event

*----


now i want to call this text using FM 'Read_text'. what shal i do to write this.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Prasenjit Sengupta,

Please use following function as:

data : tbody like TLINE occurs 0 with header line.

 CALL FUNCTION 'READ_TEXT'
   EXPORTING
     CLIENT                        = SY-MANDT
     ID                            = 'ST'
     LANGUAGE                      = sy-langu
     NAME                          = 'NAME_AT_SO10'
     OBJECT                        = 'TEXT'
*    ARCHIVE_HANDLE                = 0
*    LOCAL_CAT                     = ' '
*  IMPORTING
*    HEADER                        =
   TABLES
     LINES                         = tbody
*  EXCEPTIONS
*    ID                            = 1
*    LANGUAGE                      = 2
*    NAME                          = 3
*    NOT_FOUND                     = 4
*    OBJECT                        = 5
*    REFERENCE_CHECK               = 6
*    WRONG_ACCESS_TO_ARCHIVE       = 7
*    OTHERS                        = 8

and you can use loop to process tbody.

loop at tbody.

endloop.

This will solve your problem.

Deniz.

3 REPLIES 3

former_member705122
Active Contributor
0 Kudos

Hi,

Check Aditya Laud reply in this thread,

Regards

Adil

Former Member
0 Kudos

hI,

pass the parameteres to this function module as below:

CLIENT 100

ID ST

LANGUAGE EN

NAME <standard text name>

OBJECT TEXT

ARCHIVE_HANDLE 0

LOCAL_CAT

and in return you will get hte entire standard text in the internal table LINES.

Pass this internal table to function module 'EDIT_TEXT' to display the standard text.

Hope this helps.

Regards,

RSS

Former Member
0 Kudos

Hi Prasenjit Sengupta,

Please use following function as:

data : tbody like TLINE occurs 0 with header line.

 CALL FUNCTION 'READ_TEXT'
   EXPORTING
     CLIENT                        = SY-MANDT
     ID                            = 'ST'
     LANGUAGE                      = sy-langu
     NAME                          = 'NAME_AT_SO10'
     OBJECT                        = 'TEXT'
*    ARCHIVE_HANDLE                = 0
*    LOCAL_CAT                     = ' '
*  IMPORTING
*    HEADER                        =
   TABLES
     LINES                         = tbody
*  EXCEPTIONS
*    ID                            = 1
*    LANGUAGE                      = 2
*    NAME                          = 3
*    NOT_FOUND                     = 4
*    OBJECT                        = 5
*    REFERENCE_CHECK               = 6
*    WRONG_ACCESS_TO_ARCHIVE       = 7
*    OTHERS                        = 8

and you can use loop to process tbody.

loop at tbody.

endloop.

This will solve your problem.

Deniz.