2 Replies Latest reply: Jun 25, 2009 11:55 AM by Guest RSS

passing value to select options screen.

kumaresh kundu
Currently Being Moderated

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.

  • Re: passing value to select options screen.
    Radhika Vadher
    Currently Being Moderated

    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.

  • Re: passing value to select options screen.
    Currently Being Moderated

    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

Actions