Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic SELECT-OPTION based on PARAMETER

Former Member
0 Kudos
346

Hi,

I am just wondering if it is possible on the SELECTION-SCREEN to dynamically update a SELECT-OPTION with values based on what is selected by a PARAMETER on the same screen.

Thanks

6 REPLIES 6

Former Member
0 Kudos
247

Yes its possible using event - AT SELECTION-SCREEN OUTPUT.

Check below code:

 REPORT  YSAT_020210_TEST1.
tables: mara.
parameters: p_matnr type i.

SELECT-OPTIONS: s_opt for mara-matnr.

at SELECTION-SCREEN output.
  if not p_matnr is initial.
    do p_matnr times.
      s_opt-option = 'BT'.
      s_opt-sign = 'I'.
      s_opt-low = 'AAAA'.
      s_opt-high = 'BBBB'.
      append s_opt. clear s_opt.
    enddo.
  endif.

Edited by: Satya suresh Donepudi on Feb 2, 2010 9:57 AM

Former Member
0 Kudos
247

Sure.

Use:

AT SELECTION-SCREEN ON <parameter_name>.

<select_option_name>-low = <something>.

APPEND <select_option_name>.

0 Kudos
247

I dont think I must have made myself clear

On the selection screen there will be a parameter which I will select plant.

I want then to filter the records in the select option below to only display the possible options for this particular plant so the user can only select relevant items.

Is this possible?

0 Kudos
247

Hi,

Then try to create a search help to meet your requirement.

in At selection-screen on value request.

call the FM 'F4IF_INT_FIELD_VALUE_REQUEST'.

Thanks,

Sudheer

Edited by: sudheer kumar on Feb 3, 2010 11:26 AM

Edited by: sudheer kumar on Feb 3, 2010 11:27 AM

0 Kudos
247

Hello,

For this you have to code in the AT SELECTION-SCREEN ON VALUE REQUEST populating the internal table based on the parameter input. Then use the FM: F4IF_INT_TABLE_VALUE_REQUEST to display your F4 help.

Search in SDN, you will find many related posts.

BR,

Suhas

Former Member
0 Kudos
247

Hi,

You can use the FM 'DYNP_VALUES_READ' to read the value entered for plant and then use the FM 'F4IF_INT_TABLE_VALUE_REQUEST' to create an F4 help.