Application Development and Automation 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: 
Read only

standard text

Former Member
0 Likes
437

hi,

i have created a standard text and then used that id in the table as one field and if in the program if i use the select query in which i fetch the standard text will the contents of the standard text come or not.

like if i have a field like text id in the table that contains the value as the standard text name and if i use the same name in fetching the data will i get the content or not. please help me.

thanks and regards,

md.ibrahim.

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
420

I dont think it will appear.

You need to get this through Read_Text FM based on the condition from your Select Query of that table.

Regards,

Amit

Read only

0 Likes
420

hi amit,

thank you for your reply it will surely help me out but i will be very thank ful to you if you can help me out for using the FM correctly.

i went through that FM but was unable to know what parameters are to be given and how to retrieve the content from that standard text.

as you said i will be fetching the standard text name from the table and should be using that name to fetch the content so, if you can please help me out.

we have id, name and object as the parameters in that FM that i was unable to know. please help me in that matter.

thanks and regards,

md.ibrahim.

Read only

Former Member
0 Likes
420

Hi,

Here i am sending following code

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = 'ST'

LANGUAGE = 'E'

NAME = 'Z_PO_HEADER_TEXT'

OBJECT = 'TEXT'

TABLES

LINES = i_line.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

HEADER = i_theader

  • INSERT = 'X'

SAVEMODE_DIRECT = 'X'

TABLES

LINES = i_line[].

reward me if it use full answer

Read only

messier31
Active Contributor
0 Likes
420

*Internal table to store standard texts

DATA: IT_TEXTS like T_LINE occurs o with header line.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = 'ST'

language = 'E' "language in which you have maintained text

name = "Text name from so10

object = 'TEXT'

  • ARCHIVE_HANDLE = 0

  • IMPORTING

  • HEADER =

tables

lines = IT_TEXTS "Internal table

  • 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 SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

hope this helps.

Enjoy SAP.

Pankaj Singh.