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

Text id problem

Former Member
0 Likes
1,076

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
738

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.

2 REPLIES 2
Read only

Former Member
0 Likes
739

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.

Read only

Former Member
0 Likes
738

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