Change query select option values via enhancement RSR00001

I have got a query that calls the The enhancement RSR00001. Does anyone know if there is any way of changing the values of the selection screen variable once the user has press execute?
I can get the values they have entered in step 3 with the table I_T_VAR_RANGE but dont seem to be able to change them and get the values back to the program.
Any help would be much appreciated!
Regards
Martin

Hi Mart,
here's an example coding. Use step 2 (after user-input) for the coding.
Let's say your old variable is named ZFVAROLD the new one is ZFVARNEW.
DATA: xh_var TYPE  rrrangeexit,
      l_s_range type rsr_s_rangesid.
CASE i_step.
  WHEN '2'.
    CASE i_vnam.
      WHEN 'ZFVARNEW'.
        READ TABLE i_t_var_range INTO xh_var WITH KEY 
                   vnam = 'ZFVAROLD'.
        IF sy-subrc EQ 0.
calculate the new value dependend on the old value (xh_var-low).
            l_s_range-low = new value.
            l_s_range-sign   = 'I'.
            l_s_range-opt    = 'EQ'.
            CLEAR e_t_range.
            APPEND l_s_range TO e_t_range.
         endif.
That's it! Just let me know if you need more information.
Regards
Nicola

Similar Messages

  • SELECT-OPTIONS Values via DYNP_VALUES_READ in a Search Help Exit

    Hi all,
    I appended a standard search help of a standard report with a search help of my own. Now I am trying to retrieve the values the user has entered into the selection screen of the report using the FM DYNP_VALUES_READ in my search help exit FM. It works fine for single values defined by PARAMETERS and for low and high values of SELECT-OPTIONS (so_example-LOW and so_example-HIGH), but I need the entire SELECT-OPTIONS table. I cannot make any changes in the report, so do you have any solutions I could implement in my search help exit FM?
    Many thanks!
    Vladan
    P.S.
    I found several questions on this topic but they either just different enough not to be applicable in my case or the formatting has made the replies useless.

    Most of the time we just copy the standard FM F4IF_SHLP_EXIT_EXAMPLE to a new one and give our own name.
    You can see that on the 12th line there is the following code
    * EXIT immediately, if you do not want to handle this step
      IF CALLCONTROL-STEP <> 'SELONE' AND
         CALLCONTROL-STEP <> 'SELECT' AND
         " AND SO ON
         CALLCONTROL-STEP <> 'DISP'.
         EXIT.
      ENDIF.
    you should comment those line in order for the control to reach the PRESEL step (which is already defined in the SH Exit FM) which is on line 44.
    Most of the time, when someone says they don't hit PRESEL, this is the problem.
    Edited by: ajithkpunnoose on Jan 5, 2012 12:00 PM

  • How can we pass the select-option value to modulepool program?

    hi,
      how can we pass the select-option value to modulepool program ?
      Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
               My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
               How i get select-option values to PAI of call screen for getting the data from database table to my internal table?

    Oh I thought that you have selection-screen and again you are working on dialog programming.
    if you want to use select-option directly in module pool then it is not possible.
    but you can do other way.
    create two varaiables
    data : v_kun_low like kna1-kunnr,
             v_kun_high like kna1-kunnr.
    use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
    and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
    use can enter only low value and high value.
    when you come to program point of view
    declare one range
    ranges r_kunnr for kna1-kunnr.
    do the coding like
    r_kunnr-low = v_kun_low.
    r_kunnr-high = v_kun_high.
    r_kunnr-options = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    now you can use r_kunnr in select query ,it will work like select-option.
    other than this there is no option.
    Thanks
    Seshu

  • Filtering internal table using select-option values

    Hi,
    I got an internal table with select-option values. for eg.  it_perno with the values  I  BT    000160    000170.
    Now i got another second internal table which is have the person number. Now i need to filter this second internal table based on the values from the select option table. my question is
    i can collect all the values from 160 to 170 in a separate table by looping over the select option table. and then based on the values filter the second internal table person number.
    But what would be the case if the select option contains both intervals and multiple options. For eg.
    I BT 000160      000170.
    I EQ 000185.
    So can you suggest any good solution, that based on this select option table i need to filter the second internal table Person number.
    Thanks in advance.
    Regards,
    anbu.

    Hi,
    Can you not use the select-options in the Select query while populating the internal table.
    SELECT pernr FROM pa0000 INTO it_tab WHERE pernr IN s_pernr.
    If you cannot do this and you do not want to delete the unwanted entries, then you can use the WHERE clause in the LOOP statement to process the specific entries required:
    LOOP AT it_tab INTO wa_tab WHERE pernr IN s_pernr.
    Regards,
    Aparna Alashe.

  • How to pass select option value to function module while using service call

    Hi,
    I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
    rgds
    sudhanshu

    Hi,
    Thank s for your reply. In fact im doing similar with following variation:
    i) collected range values using get_range* method.
    ii) separate low and high values as: 
    read table <field2> index 1 into wa_range.
    vert2_low = wa_range-low.
    vert2_high = wa_range-high.
    (Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
    iii) Now setting these RFC attribute as:
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_LO`
          value = vert2_low ).
    and
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_HI`
          value = vert2_high ).
    iv) In RFC im having my query as :
    select <fld list> from BUT000 into table itab where vertical in r_vert.
    Here, r_vert is a range defined as:
    ranges r_vert for <fld refrence>
    r_vert-sign = 'I'.
    r_vert-option = 'BT'.
    r_vert-low = S_VERT_LO.
    r_vert-high = S_VERT_HI.
    append r_vert.
    Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
    Please suggest.
    Rgds
    Sudhanshu

  • Displaying Selection option values in header using alv-factory

    Hi all,
    I am using alv factory class 'CL_SALV_TABLE'.
    I want to display selection-option values on my header.
    I have creted grid using class 'CL_SALV_FORM_LAYOUT_GRID' and am displaying other values.
    But am facing problem in displaying selection option values.
    Any pointer on this will be GR8.
    Thanks & Regards.
    Yats.

    Hi,
    Use this sample code.
    form top_of_the_list_main  changing lv_grids type ref to cl_salv_table.
    *Creating instances of the clases
      data :     lv_grid   type ref to  cl_salv_table,
                 lv_header type ref to  cl_salv_form_element,
                 lv_layout type ref to  cl_salv_form_layout_grid.
      move lv_grids to lv_grid.
    *Creating the layout object
      create object lv_layout.
    *Setting the Header Text
      lv_layout->create_label(
                             row     = 1
                             column  = 1
                             text    = text-008 ).
      lv_header = lv_layout.
      lv_grid->set_top_of_list( lv_header ).
    endform.                    " TOP_OF_THE_LIST_MAIN
    Loop it and keep changing the row and colom..Pass the selection option to the text field.
    Regards
    Ansair

  • Select-option value is not getting captured in at selection-screen on value

    In Selection screen , we have Select-option and  a parameter.
    Based on the values given in Select-option, the values of Parameter should get populate.
    To achieve this functionality,
    I  used  At selection u2013screen  on value request  for <parameter>  EVENT and 'F4IF_INT_TABLE_VALUE_REQUEST' Function Module.
    But the Select-option values are not getting captured in this event,unless u press Enter key.
    Is there any other way to achieve this functionality.
    Please Guide me.

    When you call function 'F4IF_INT_TABLE_VALUE_REQUEST'. make sure you send it the name of the screen variable - the F4IF_INT_TABLE_VALUE_REQUEST function calls DYNP_VALUES_READ itself if you tell it the name of your report, screen number, and the variable name... snippet below.
    Jonathan
      data:
        l_repid             type syrepid.
      l_repid = sy-repid.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          dynpprog         = l_repid
          dynpnr           = '1000'
          dynprofield      = 'S_FIELD-LOW'  "Select options - low value
    * etc

  • How can i used pai in screen 1000 to change the select-options field?

    hi,all.
    I want used pai to change the select-options field,but it can't works.
    the mainly code is:
    REPORT  ZTEST99.
    TABLES :MARA,MAKT,MARC.
    SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TITLE0 .
    select-options:s_matnr for mara-matnr,
                   s_werks for marc-werks MODIF ID ID1.
    SELECTION-SCREEN END OF BLOCK B0.
    parameters:p_flag as checkbox.
    at selection-screen OUTPUT.
       LOOP AT SCREEN.
       IF P_FLAG = 'X' .
       IF screen-group1 = 'ID1'.
             screen-input = '0'.
        ELSE.
          screen-input = '1'.
        ENDIF.
        MODIFY SCREEN.
    ENDIF.
        ENDLOOP.
    START-OF-SELECTION.
    CALL SCREEN 1000.
    when i click p_flag,then i want to change s_werks from OBLIGATORY to no OBLIGATORY.
    how can i realized?
    Thanks for all.
    Sun

    Hi ,
    change your code like this.
    Change in your code:
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : s_matnr for mara-matnr,
    s_werks for marc-werks MODIF ID ID1.
    SELECTION-SCREEN END OF SCREEN 100 .
    At selection-screen.
    if sy-dynnr = '100'.
    IF P_FLAG = 'X' .
    LOOP AT SCREEN.
    IF screen-group1 = 'ID1'.
    screen-required = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    else.
    LOOP AT SCREEN.
    IF screen-group1 = 'ID1'.
    screen-required = 1.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    my code :
    REPORT  Z50871_SELECTOPS_DYNAMIC.
    PARAMETERS : CH_EBELN AS CHECKBOX,
                 CH_VBELN AS CHECKBOX.
    DATA: V_EBELN TYPE EKKO-EBELN,
          V_VBELN TYPE VBAK-VBELN.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
                     VBELN FOR V_VBELN MODIF ID G2.
    SELECTION-SCREEN END OF SCREEN 100 .
    AT SELECTION-SCREEN OUTPUT.
      IF SY-DYNNR = 100.
        IF CH_EBELN = 'X' AND
           CH_VBELN = ''.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'G1'.
              SCREEN-ACTIVE = '1'.
            ELSE.
              SCREEN-ACTIVE = '0'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ELSEIF CH_VBELN = 'X' AND
           CH_EBELN = '' .
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'G2'.
              SCREEN-ACTIVE = '1'.
            ELSE.
              SCREEN-ACTIVE = '0'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'G1'
               OR SCREEN-GROUP1 EQ 'G2' .
              SCREEN-ACTIVE = '1'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
    IF SY-DYNNR = 1000.
      IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
        CALL SELECTION-SCREEN 100.
      ELSE.
        MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
      ENDIF.
    ENDIF.
    regards
    Sandeep Reddy

  • Select options values pass to function module

    Hi all,
            I want to pass the values entered in the select options to the function module. How should my function module interface be declared for passing the select options
    I tried declaring like
    t_range type data in the tables tab.  But this throws error. 
    Please let me know how to pass select option values back to function modules.
    Thanks,

    Hi,
    Check this code.
    data: node_flights type ref to if_wd_context_node.
    data: rt_carrid type ref to data.
    data: rt_connid type ref to data.
    data: isflight type table of sflight.
    data: wsflight type sflight.
    field-symbols: <fs_carrid> type table,
    <fs_connid> type table.
    Retrieve the data from the select option
    rt_carrid = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_CARR_ID' ).
    if rs_carrid is not initial.   Here you can check that if rs_carrid is no initial then assign value of field symbol
    Assign it to a field symbol
    assign rt_carrid->* to <fs_carrid>.
    endif.
    Retrieve the data from the select option
    rt_connid = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_CONN_ID' ).
    if rt_connid is not initial. Here you can check that if  rt_connid is no initial then assign value of field symbol
    Assign it to a field symbol
    assign rt_connid->* to <fs_connid>.
    endif.
    if  <fs_connid> is not initial and <fs_carrid> is not initial.
    Retrieve that data from the database. Normally it is suggested to
    encapsulate the data retrieval in a separate class.
    For simplicity, the SELECT statement has been implemented here.
    clear isflight. refresh isflight.
    select * into corresponding fields of table isflight from sflight
    where carrid in <fs_carrid>
    and connid in <fs_connid>.
    endif.
    Bind the data to the context
    node_flights = wd_context->get_child_node( name = `FLIGHTS` ).
    node_flights->bind_elements( isflight ).
    Hopes this will helps you.
    Regard
    Manoj Kumar
    Edited by: Manoj Kumar on Mar 16, 2009 10:41 AM

  • Adding select-option value in selection screen of FBL5N tcode.

    Hi Experts,
    I have one requirement that to add a Header Text Field(BKPF-BKTXT) in section screen of standard program RFITEMAR(tcode : FBL5N), i tried to add that field but it was not displayed where i required, i mentioned below  where i required.
    Customer account                     
    Company code   
    i required under company code select option value in same selection screen block.
    Please do the needful.
    thanks in advance.
    gsreddy.

    Hi,
    If you get the access key it is possible to edit the standard program,
    How u tried to add the field???
    regards,
    Mullai

  • Passing SELECT-OPTIONS value to Function Module

    Hi,
    I need to pass select-options value to a function module.
    Code is like the following:
    SELECT-OPTIONS seltab FOR object-type.
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
    However, that could not help me much in solving my problem.
    So far I have tried to created a structure in DDIC with the following components for the select-options:
    SIGN - BAPISIGN
    OPTION - BAPIOPTION
    LOW - ZBWOBJECTTYPE (my type)
    HIGH - ZBWOBJECTTYPE (my type)
    and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
    Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
    Could anyone please help me on this issue?
    Thanks in advance.
    Regards,
    Joon Meng

    Hello Joon,
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    You have defined SELTAB as a SELECT-OPTION.
    So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
    It is similar to the concept of an internal table with header line.
    Hope i am clear.
    Anyways how have you defined result_tab and sel_tab ?
    BR,
    Suhas

  • Passing select-options values using call transaction method

    Hi Experts,
    I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
    After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
    TYPES:  BEGIN OF t_tab,
              bukrs TYPE bukrs,
              werks TYPE werks_d,
              matkl TYPE matkl,
            END OF t_tab.
    DATA:  w_tab TYPE t_tab,
                i_tab      TYPE STANDARD TABLE OF t_tab.
    SELECT-OPTIONS: s_matnr FOR marc-matnr.
    Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
    Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
    for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
    Thanks a lot.
    Regards,
    Krishan

    Hi Krishan,
    For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
    ... OPTIONS FROM opt
    *Effect*
    This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
    DISMODE
    Processing mode (comparable with the MODE addition)
    UPDMODE
    Update mode (comparable with the UPDATE addition)
    CATTMODE
    CATT mode (controlling a CATT procedure)
    The CATT mode can have the following values:
    ' ' No CATT procedure active
    'N' CATT procedure without single screen control
    'A' CATT procedure with single screen control
    DEFSIZE
    Use standard window size
    RACOMMIT
    COMMIT WORK does not end CATT procedure
    NOBINPT
    No batch input mode, that s SY-BINPT = SPACE.
    NOBIEND
    No batch input mode after BDC data has been read
    The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
    'X' Yes
    ' ' No
    If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
    DISMODE from the MODE addition
    UPDMODE
    from the UPDATE addition
    CATTMODE
    No CATT procedure active
    DEFSIZE
    Do not use standard window size
    RACOMMIT
    COMMIT WORK ends procedure successfully
    NOBINPT
    Batch input mode, that is SY-BINPT =X.
    NOBIEND
    Batch input mode also active after BDC data has been read
    Regards,
    Swapna.

  • Passing select-options value in method

    How to pass select-options value in method ?
    Example:
    Select-options: carrid for spfli-carrid.
    class cl_myclass implementation.
    select  carrid connid from
    spfli where carrid in carrid.
    endclass.
    Thanks

    Hello Anee
    The coding of this functionality is quite simple:
    REPORT zmy_report.
    DATA:  go_myclass   TYPE REF TO zcl_myclass,
               gd_repid         TYPE syst-repid.
    PARAMETERS:
      p_bukrs   ...
    SELECT-OPTIONS:
      o_kunnr  ...
    START-OF-SELECTION.
      gd_repid = syst-repid.
      CREATE OBJECT go_myclass
        EXPORTING
          id_calling_program = gd_repid.
    And that's how your CONSTRUCTOR method should look like:
    METHOD constructor.  " IMPORTING parameter id_calling_program
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
      EXPORTING
        CURR_REPORT = id_calling_report
      TABLES
        SELECTION_TABLE = me->mt_selopts.
    " NOTE: define mt_selopts as instance attribute of table type RSPARAMS_TT
    ENDMETHOD.
    Finally you have to extract the parameter and select-options from MT_SELOPTS.
    Regards
      Uwe

  • How to assign select-option values to internal table

    hi all,
    how to assign select-option values to internal table
    thanks in advance.

    Hi,
    You just need to loop at your select-option field and take the values from low and high fields.
    for. e.g
    loop at s_werks .
    move:s_werks-low to <your itab>
    if not s_werks-high is initial .
    move: s_werks-high to <youritab>
    endif .
    append <your itab>
    endloop .
    OR use select statement.
    regards,
    Omkar.
    Message was edited by:
            Omkaram Yanamala
    Message was edited by:
            Omkaram Yanamala

  • Query - Selection Option on Subtotal

    A customer has created a query and interface using transactions SQ01 and SQ02 that generates a report from tables EKKO - Purchase Document Header and EKPO - Purchase Document Item.
    Referencing the Net Order Amount (EKPO-NETWR) they wanted subtotals to appear by Purchasing Document Number.  I was able to give them that by changing the Sort and Total check boxes in their original query.  So now they currently have a report that lists the Purchase Order Document (EKPO-EBELN), each Item Number for the Purchase Order (EKPO-EBELP), the Net Order Value for each item (EKPO-NETWR), as well as query-generated subtotals for each Purchase Order and a grand total of all Purchase Orders.
    Now the customer would like to be able to select on the query-generated subtotals.  For example, select all Purchase Order Documents whose query-generated subtotal is greater than $5,000, or select all Purcahse Order Documents whose query-generated subtotal is equal to $1,000.
    Any suggestions on how to accomplish that would be greatly appreciated.  Thank you.

    PK,
    Thanks for your reply.  I'm an ABAP programmer, but am unfamiliar with the query designer, so would appreciate a little more assistance.
    The customer has already defined a field, POTOTAL, but hasn't added it as a select-option, which I assume he will will need to do.  I'm assuming that's what you mean by "key figure".
    From there I'm kind of lost as far as creating the filter.  If I was writing a report in ABAP code I'd have no problem doing it.  Since the code that generates the report from the query designer is done dynamically, I'm scratching my head trying to figure out how I will stick the "filter" code in there.

Maybe you are looking for

  • After running f.13 open items not cleared.

    Hi Experts, Though i cleared open items of Gl through f.13, but still it is showing as open item in FBL3n report. the GL is of Provision a/c. Edited by: poonam laddha on Dec 30, 2008 12:15 PM

  • Optimiziing the Query

    Hi, Please help me in tuning the following query SELECT count(FM || '' || PD) INTO v_cnt FROM rms WHERE FM || '' || PD = pkey AND FE = vdate AND upper(PG) = upper(pc); Thanks......

  • XML database query through Java

    Hi all. I am collecting information about a little application i am trying to build: I have an XML database with records divided in a lot of subdirectory (with three or four .xml files); directories' names are defined by date in format "yyyymmdd", th

  • New Window Opens!

    I set my Finder preferences so that I do NOT open a NEW Window and yet it still opens a new window when I double click a folder. Is there any way to correct this? Any help would be appreciated. Thank you, Glenn

  • ORA-12564: TNS:connection refused

    C# code: private Oracle.DataAccess.Client.OracleConnection objConn; objConn.ConnectionString = "User Id=tst;Data Source=CZETEST;Password=1234;" objConn.Open(); tnsnames.ora CZETEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = X