Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Dynamic SELECT-OPTIONS at selection screen?

$
0
0

Hi! I am new in ABAP and have problem in my module pool program.

 

So, I have selection screen as subscreen:

 

  SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

  PARAMETERS: p_fname TYPE dd03l-fieldname MODIF ID fn OBLIGATORY.

  SELECT-OPTIONS: p_fvalue FOR (selected_type) MODIF ID fv.

  SELECTION-SCREEN END OF SCREEN 300.

 

In selection screen I enter field name in parameter p_fname. Based on this

parameter I search for field name in table dd03l:

 

SELECT SINGLE a~datatype a~fieldname a~tabname FROM dd03l as a

      INNER JOIN dd02l as b

      ON a~tabname = b~tabname

      INTO wa_table_type

      WHERE ( fieldname = p_fname ) AND

     ( b~tabclass = 'TRANSP' OR b~tabclass = 'CLUSTER' OR b~tabclass = 'POOL').

 

Then I use selected information to define SELECT-OPTIONS: p_fvalue type dynamicaly:

 

    selected_type = wa_table_type-tabname && '-' && wa_table_type-fieldname.

 

The problem is that when I run my Module Pool program, enter p_fname then

first time I get correct SELECT-OPTIONS: p_fvalue type, but when I enter another p_fname

then SELECT-OPTIONS: p_fvalue have old type in my screen. (See images)

 

first time.png

second time.png

 

Seems that screen is not refreshing.

 

If You have some misunderstandings or need more info, please let me know!

 

 

Hope for Your Help, best regards, Debuger!


Viewing all articles
Browse latest Browse all 8332

Trending Articles