My purpose i to do a hierarchic search for a standard text, which musn't be void.
I first search my standard text with language=sy-langu (FM READ_TEXT).
If I don't find it, I search if a translation of this text exists in English, if not, I search it in French, if not... etc...
I wrote a simplfied method in order to use READ_TEXT in this context, and want to simplified the code in the following way :
Instead of :
READ_TEXT ( sy-langu ).
IF sy-subrc <> 0
READ_TEXT ( 'E' )
IF sy-subrc <> 0 ... etc...etc....
I wish write :
DO n TIMES
lv_spras = my_constant_table[sy-index]
READT_TEXT (lv_spras ).
if sy-subrc = 0. RETURN. ENDIF.
ENDDO.
RAISE not_found.