cancel
Showing results for 
Search instead for 
Did you mean: 

passing value to select options screen.

Former Member
0 Kudos

Hi All,

Can anybody help me how to pass a value to select option screen from another screen?

It's like a user enters a value in a input field and press a button to navigate to the next screen which contains the select option fields.How can i show the value enterd in the previous screen to be shown in one of teh input field in the select option screen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Store the values that you have to pass in a global variable declared in component controller and

Use the following piece of code in the second view,

DATA: lt_range_table TYPE REF TO data,
          rt_range_table TYPE REF TO data,
          read_only TYPE abap_bool,
          typename TYPE string.

* create a range table that consists of this new data element
  lt_range_table = lo_r_helper_class->create_range_table( i_typename = 'MATNR' ).

FIELD-SYMBOLS: <tab> TYPE INDEX TABLE,
<struct> TYPE ANY,
<wa> TYPE ANY,
<option> TYPE char2,
<sign> TYPE char1,
<high> TYPE ANY,
<low> TYPE ANY,
<wa_values> TYPE ANY.
ASSIGN lt_range_table->* TO <tab>.
APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
<sign> = 'I'. "Default sign which you want to give
<option> = 'EQ'. "Default option you want to give
<low> = 'M-01'." pass your valriable name here
*<high> = 'High_value'.


* add a new field to the selection
  lo_r_helper_class->add_selection_field( i_id = 'S_MATNR'
  i_description = 'Material'
  it_result = lt_range_table ).

Regards,

Radhika.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can use the method upd_selection_field to do the same thing.

Please check if the helper class attribute is initial or not before doing any of the actions on it.

This might result in the ASSIGNMENT dump.

Regards,

Varsha