Skip to Content
0
Former Member
Jan 27, 2008 at 02:46 AM

read_text function module - return value

150 Views

Experts,

I am calling function module READ_TEXT to read the value of text ids.

here is the code:

DATA: value type thead.

DATA: result TYPE p LENGTH 8 DECIMALS 2,

oref TYPE REF TO cx_root,

text TYPE string.

TRY.

RAISE EXCEPTION TYPE cx_sy_dyn_call_param_missing.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID =

LANGUAGE =

NAME =

OBJECT =

IMPORTING

HEADER = value

TABLES

LINES =

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8.

CATCH cx_sy_arithmetic_error INTO oref.

text = oref->get_text( ).

CATCH cx_root INTO oref.

text = oref->get_text( ).

ENDTRY.

WRITE SY-SUBRC.

somehow the value of the text id is not getting exported to the variable "value". Please let me know how to rectify this error.

Points will be rewarded for helpful answers.

Regards,

John.