‎2008 Nov 04 9:42 AM
We had a problem with the sales order
header texts.we have 3 text ids in the header.
sometimes user will enter the data or sometimes not.
now we are trying to read a text id with read_text fm.
if the data is not there in that , then abaper getting a error
message like "text id z3214 not maintained in english".
so tell me how to solve this issue.
I seen in the text ids configuration also , there the text id is maintained in all languages.
thank you for all the help.
‎2008 Nov 04 10:30 AM
Just write a select statement for just checking whether or not the table STXH has entry in the desired table, if not then don't run the Function Module.
Select * from stxh
into stxh
where tdid = Suitable Text Id
and tdname = Suitable text name
and tdobject =
and spras = sy-langu.
if sy-subrc = 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = tdid
LANGUAGE = sy-langu
NAME = tdname
OBJECT = tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
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 SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
‎2008 Nov 04 10:30 AM
Just write a select statement for just checking whether or not the table STXH has entry in the desired table, if not then don't run the Function Module.
Select * from stxh
into stxh
where tdid = Suitable Text Id
and tdname = Suitable text name
and tdobject =
and spras = sy-langu.
if sy-subrc = 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = tdid
LANGUAGE = sy-langu
NAME = tdname
OBJECT = tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
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 SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
‎2008 Nov 04 10:55 AM
Hi,
I think Tdname and td object will be diffrent.check it.
First you check in stxh table, and pass it to READ_TEXT fm.
and you can add text in t-code SO10.
Regards,
manjula