Logic to control Screen Number
Iu2019m trying to implement logic to control screen number and need some help. Iu2019ve a config table which I use to retrieve screen numbers. So intend is not to hard code and whenever there is a change required instead of changing program just change values in this table. Iu2019m using FM u2018Z_VAR_DEFAULTSu2019 to get back these values and hold them in a table (lit_param ). Now the challenge is I need to write an IF statement where I compare SY-DYNNR with all entries I receive back from FM..
The question is can I write the following statement? If not then how I can do it.
IF ( sy-dynnr IN lit_param )
Many thanks in advance
well actually you can write
IF sy-dynnr in ITAB.
Just be aware, for this you itab must be a range table.
data: itab type range of SYDYNNR.
so after fetching your values from your customizing table, build a range table from it.