Skip to Content
0
Jun 17, 2013 at 01:28 PM

SO10 text does not get displayed when called in Program

1637 Views

HI Guys,

I am facing an issue. I need to call texts from SO10 in the program. Now i went through some threads regarding this and develpoed the code accordingly, but in my case its not displaying the text.

Basically the text is an error message to check validation, which should be shown when the selection field is left blank.

I wrote the following code but its not displaying the message.

DATA BEGIN OF TEXTHEADER.

INCLUDE STRUCTURE THEAD.

DATA END OF TEXTHEADER.

DATA BEGIN OF LINES OCCURS 10.

INCLUDE STRUCTURE TLINE.

DATA END OF LINES.

DATA: l_TNAME LIKE THEAD-TDNAME,

lw_tline LIKE LINE OF lines.

CLEAR TEXTHEADER.

l_tname = 'VALIDATE_SALES_ORG'.

IF *zv3321128_mat_v-vkorg IS INITIAL.

CALL FUNCTION 'READ_TEXT'

EXPORTING

* CLIENT = SY-MANDT

id = 'ST'

language = 'P' "sy-langu'

name = l_tname

object ='TEXT'

* ARCHIVE_HANDLE = 0

* LOCAL_CAT = ' '

IMPORTING

HEADER = TEXTHEADER

tables

lines = lines

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME =3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

.

LOOP AT lines INTO lw_tline.

IF lw_tline-tdline ne ' '.

WRITE: lw_tline-tdline.

ENDIF.

ENDLOOP.

Please state if anything wrong with this code.

Thanks.