Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Re: How to declare a filled internal table as a constant ?

$
0
0

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.

 



Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>