Check that at least on Selection Options are filled

I have a program that has four selection options.  The user needs to enter a selection for at least one of the four selection options.  I coded this check in AT SELECTION-SCREEN ON BLOCK xyz.  This does not work because I have to enter at least one value first before I can load multiple values from a text file or the clipboard.
I only want the code that checks if at least one selection option is populated to execute when I select the EXECUTE button.  How do I do this?
Thanks.
Sandy

HI
GOOD
GO THROUGH THIS REPORT
REPORT ZSUBSCREEN.
TABLES: USR02,       "Logon data
         SSCRFIELDS.  "FIELDS ON SELECTION SCREENS
SUBSCREEN 1
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-010.
    SELECT-OPTIONS: USERNAME FOR USR02-BNAME.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN END OF SCREEN 100.
SUBSCREEN 2
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.
    SELECT-OPTIONS: LASTLOGI FOR USR02-TRDAT.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN END OF SCREEN 200.
SUBSCREEN 3
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-030.
    SELECT-OPTIONS: CLASSTYP FOR USR02-CLASS.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN END OF SCREEN 300.
STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT
SELECTION-SCREEN: FUNCTION KEY 1,
                   FUNCTION KEY 2.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,
                   END OF BLOCK SUB.
START-OF-SELECTION.
     SELECT * FROM USR02 WHERE BNAME IN USERNAME
                           AND ERDAT IN LASTLOGI
                           AND CLASS IN CLASSTYP.
        WRITE: / 'User ', USR02-BNAME,
                 'Last Login Date ', USR02-TRDAT,
                 'Last Login Time ', USR02-LTIME,
                 'CLASS ', USR02-CLASS.
     ENDSELECT.
END-OF-SELECTION.
INITIALIZATION.
SCREEN ICON LEFT AND RIGHT
   SSCRFIELDS-FUNCTXT_01 = '@0D@'.
   SSCRFIELDS-FUNCTXT_02 = '@0E@'.
   SUB-PROG = SY-REPID.
   SUB-DYNNR = 100.
AT SELECTION-SCREEN.
   CASE SY-DYNNR.
     WHEN 100.
       IF SSCRFIELDS-UCOMM = 'FC01'.
         SUB-DYNNR = 300.
       ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
         SUB-DYNNR = 200.
       ENDIF.
     WHEN 200.
       IF SSCRFIELDS-UCOMM = 'FC01'.
         SUB-DYNNR = 100.
       ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
         SUB-DYNNR = 300.
       ENDIF.
     WHEN 300.
       IF SSCRFIELDS-UCOMM = 'FC01'.
         SUB-DYNNR = 200.
       ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
         SUB-DYNNR = 100.
       ENDIF.
   ENDCASE.
AND TRY TO IMPLEMENT IN YOUR REPORT
THANKS
MRUTYUN

Similar Messages

  • Select-options are not destroyed while calling view of used component popup

    Hi Friends ,
    I'm facing a unique problem. I'm calling a view of a component within another component. the view that I'm calling has some select-options. When I close the popup window ( using close 'X' of popup ) and then try to reopen the popup system give me a dump. I debugged and found that select-options are not destroyed by system and once it tries to create the select-options again it dumps because they are already there.  
    This is the source code extract of that dump for your reference .
    1 method if_wd_select_options~add_selection_field.
    2
    3   data:
    4     lr_table_descr       type ref to cl_abap_tabledescr,
    5     lr_struct_descr      type ref to cl_abap_structdescr,
    6     lr_value_field_descr type ref to cl_abap_elemdescr,
    7     added_field          like line of mt_added_fields,
    8     dfies                type dfies,
    9     description          type string,
    10     complex_restrictions type if_wd_select_options=>t_complex_restrictions.
    11
    12   field-symbols:
    13     <it_result> type index table.
    14
    15 * check of someone wants to add a field that already exists
    16   read table mt_fields
    17        with key m_id = i_id
    18        transporting no fields.
    19   if sy-subrc = 0.
    20 *   might be deleted - recreating a field with different setting is of course allowed
    21     read table mt_all_removed_fields
    22          with key table_line = i_id
    23          transporting no fields.
    24     if sy-subrc <> 0.
    >>>       message x000(00).
    26     endif.
    27
    28 *   remove the existing field in order to avoid duplicates
    29     delete table mt_fields with table key m_id = i_id.
    30   endif.
    I've already tried using REMOVE_ALL_SEL_SCREEN_ITEMS( ) method of interface IF_WD_SELECT_OPTIONS before creating new elements ( select-options ). If any one can help me in this It would really help and I'll appreciate it.
    Thanks in advance,
    Laeeq

    I've sloved the problem

  • Check that at least one variable is set

    I have 10 variables/parameters and i want to ensure that at least one of those is not empty/null. What is the best way to check that?
    Example of parameters:
    p_item_category1 varchar2,
    p_item_category2 varchar2,
    p_item_category3 varchar2,
    p_item_category4 varchar2,
    p_item_category5 varchar2,
    p_item_category6 varchar2,
    p_item_category7 varchar2,
    p_item_category8 varchar2,
    p_item_category9 varchar2,
    p_item_category10 varchar2
    Should the best way be as:
    if (p1 is not null) or
    (p2 is not null) or
    (p10 is not null) then
    --at least one parameter has value, ok,
    else
    --all parameters are empty, give error message
    This code looks long, is there cleaner* better way to achieve the same?
    Maybe there is a system function "AtLeastOnInSetIsNotNull", something like
    if AtLeastOnInSetIsNotNull(p1,p2,..,p10) then...
    That would be more handful.

    Seems like coalesce is even better, thx.
    declare
    p1 varchar2(1) := null;
    begin
    dbms_output.PUT_LINE(coalesce(null,'1',null,'2'));-- outputs: 1
    if coalesce(null,p1,null,null) is null then
    dbms_output.PUT_LINE('all parameters are null');--outputs: all parameters are null
    end if;
    end;

  • "Check that the library name an prefix are correct." Yep, they are. Now what?

    Hello,
    I have a customer who is using a Labview wrapper for an IVI driver to create an application to send commands to an LXI instrument.  The problem is even the initialize call results in the following error:
    Driver Status:  (Hex 0xBFFA000A) Check that the library name (VTEXSwitch.dll) and prefix (VTEXSwitch) are correct.
    There are no problems communicating with the instrument using a web browser and NI-MAX sees the instrument fine.  The customer gets this exact same error when they rename the actual DLL file to something different, which indicates to me that the labview wrapper isn't finding it at all.  I've looked everywhere I can think of, but I can't see how Labview is supposed to know the path where it is looking for that DLL.
    This same wrapper has worked for a lot of other people.  I made sure they had installed the IVI Compliance Package and IVI Shared Components, and tried reinstalling the IVI driver from the manufacturer.  The problem is still there.  What should I do?

    BurlapSage wrote:
      I've looked everywhere I can think of, but I can't see how Labview is supposed to know the path where it is looking for that DLL.
     Probably it uses the standard windows algorithm as described in MSDN

  • How to use range for a field that is not in select options

    Dear All,
    I have a requirement to show Long Text of a G/L account , where G/L account is between a given range. But this field is not in select options. I have to show Long Text of this Account, if the field is in a given range. I have tried to use RANGE , but RANGE is not working here. Please help with some sample codes.
    Note: The range is too high so I cant use IN operator.
    Thanks ,
    Rosaline.

    Hi,
       Declare a range as :
    ranges : r_hkont for bseg-hkont.
    fill in the values
    r_hkont-sign = 'I'.
    r_hkont-option = 'BT'.
    r_hkont-low = '26000000'.
    r_hkont--high = '2999999'.
    append r_hkont.
    Select sgtxt from bseg into text
    where bseg-hkont in r_hkont.
    Regards,
    Srini.

  • Only checking the one limit of select options

    in this query,i am validating the field on the selection screen for the select options.
    but its validating only lower value and not the higher value.
    please guide me.
    SELECT LAND1
           ZREGION1
           FROM ZBWCNTRY
           INTO CORRESPONDING FIELDS OF TABLE IT_ZBWCNTRY UP TO 1000 ROWS
           where zregion1 in s_regn1.
    if sy-subrc NE 0.
    message e000(zbx).
    endif.

    Hi ,
    try this.
    SELECT LAND1
    ZREGION1
    FROM ZBWCNTRY
    INTO CORRESPONDING FIELDS OF TABLE IT_ZBWCNTRY UP TO 1000 ROWS
    where zregion1 =  s_regn1-low.
    if sy-subrc NE 0.
    message e000(zbx).
    else.
    SELECT LAND1
    ZREGION1
    FROM ZBWCNTRY
    INTO CORRESPONDING FIELDS OF TABLE IT_ZBWCNTRY UP TO 1000 ROWS
    where zregion1 = s_regn1-high.
    if sy-subrc NE 0.
    message e000(zbx).
    endif.
    endif.
    Hope this will help.
    Regards,
    Rohan.

  • Value help for select-option not filling selection field

    I'm having some problems with a value help on a select-option. I've managed to get the value help displaying the correct values but for some reason can't get it to populate the selection field after I've selected a record.
    I have the following call:
      wd_this->m_handler->add_selection_field(
                          i_id = 'SHORT_D'
                          i_description = 'Program'
                          it_result = lt_range_table
                          i_read_only = read_only
                          i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
                          i_value_help_id = 'ZPROGSTUDY' ).
    where ZPROGSTUDY is a new search help I've set up with an exit to retrieve the values.
    Any ideas ? Thanks.

    Hi Malcolm,
    The code you have is OK. I copied your code into a test program and it worked as expected.
    I used a search help where the possible values are populated in the search help exit, exactly as in your case. The only time it did not work was when read_only = X, but that is obvious also from a visual point of view since the input field is greyed out in that case. The popup also tells you is in RO mode...
    Does your SHLP work when you test it from SE11? Returns values?
    SAP provides a lot of WD4A sample code, see for example component WDR_TEST_SELECT_OPTIONS look for
    select-option fields > special cases > input helps > Non field-specific input help using search help
    Regards,
    George

  • Set parameter id for select-options to fill more than one value

    FROM MY CUSTOM PROGRAM I AM CALLING A TRANSACTION CODE. IN MY REPORT I WANT TO SELECT MORE THAN ONE RECORD AND TO CALL THE TRANSACTION BY PASSING THE SELECTED VALUES TO THE SELECT-OPTIONS OF THE TRANSACTION.
    IF IT IS A PARAMETER I CAN WRITE SET PARAMETER STATEMENT FOR ONE VALUE AND EASILY CALL THE TRANSACTION. BUT I WANT TO FILL THE SELECT-OPTIONS OF THE TCODE.
    CAN ANYBODY PLEASE PROVIDE ME THE LOGIC HOW TO FILL THE SELECT-OPTIONS FROM MY REPORT FOR CALLING THE TRANSACTION.
    REGARDS,
    VASU.

    Hi..
    Instead of calling the Transaction
    Call the Report directly using:
    (First declare the Ranges)
    ranges : R_matnr for mara-matnr.
    (Fill the values into Ranges Table and call the report )
    SUBMIT <REPORT>
      With s_matnr in R_matnr.
    <b>Reward if helpful.</b>

  • Regarding selection options

    whan i am using select-options prior to this i what to display check  box on the same line.
              when i am selecting the this check box it should execute automaticall
    could u plz explain the code clearly with example.

    search forums.
    Re: Dynamic Selection Options
    Posted on: Jul 17, 2006 5:50 PM, by user: Praveen -- Relevance: 100% -- Show all results within this thread
    am doing exactly as you had stated. But the user wants to see it something like this: 1. For the selection options, he wants to see three box's. a. Technical Name of the field selection. b. ...
    Re: regarding selection options
    Posted on: Mar 15, 2007 8:46 AM, by user: SHIBA DUTTA -- Relevance: 99% -- Show all results within this thread
    you have to use begin of line and end of line. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN COMMENT 1(10) TEXT-001 FOR FIELD P1. PARAMETERS: ...
    Re: Restricting selection-options
    Posted on: Jan 18, 2005 8:58 AM, by user: Andreas Mann -- Relevance: 90% -- Show all results within this thread
    FOR vbak-vbeln OBLIGATORY DEFAULT '5300000000'. INITIALIZATION. PERFORM init_1001. START-OF-SELECTION. SELECT belnr FROM bkpf INTO bkpf-belnr WHERE bukrs = '0001' AND ...
    Check that at least on Selection Options are filled
    Posted on: May 25, 2006 4:37 AM, by user: Boater -- Relevance: 90% -- Show all results within this thread
    I have a program that has four selection options. The user needs to enter a selection for at least one of the four selection options. ...
    possible entry for selection-options
    Posted on: Feb 22, 2007 7:32 AM, by user: Tiwa Noitawee -- Relevance: 89% -- Show all results within this thread
    F-1 At last 3 alphabets of Prod.hierarchy is Product line (EX1, PC5) that users have to choose via selection-options like this <b>EX1</b> EXCEL 251 : F-1 <b>PC5</b> POWERTOP W-200 ...
    select-options multiple selection
    Posted on: Mar 5, 2007 3:06 AM, by user: venkateswarao gangavarapu -- Relevance: 87% -- Show all results within this thread
    hi can u send code for getting multiple selections in select-options Thanks in advance venkat ...
    Submitting Report with selection screen options
    Posted on: Apr 27, 2005 5:45 PM, by user: Rajesh Nittala -- Relevance: 85% -- Show all results within this thread
    Hi all, I have a situation, in my report i am using a selection screen which contains input select-options are store(range), date (from ..to)....after that ...
    sample program to remove standard selection-options & replace user defined.
    Posted on: Dec 7, 2005 5:37 AM, by user: Josephine Clara Arokiasamy -- Relevance: 83% -- Show all results within this thread
    The standard selection-options are provided for the logical database. i need to supress the standard selection-options ...
    Adding default value for a select-options in a selection-screen
    Posted on: May 26, 2006 11:51 AM, by user: sid alpay -- Relevance: 77% -- Show all results within this thread
    hello gurus, i have a report program with the following select-options in a selection-screen block:
    select-options: so_site for MyTable-werks.
    i want the so_site ...
    Adding Selection Options Fields in Report(Using Query)
    Posted on: Aug 25, 2004 5:26 AM, by user: lijo joseph -- Relevance: 76% -- Show all results within this thread
    Hi, how can we add Selection Fields Options in Query Reports Which we create using SQ01. I need a default option by which ...
    Getting the selection parameters/options in a diffrent program
    Posted on: May 11, 2006 3:05 AM, by user: Chad Cheng -- Relevance: 75% -- Show all results within this thread
    use Submit to get a report from a diffrent program and I am using variants to get the value of the selection criteria. However, for a less tedious approach, I think it would be better if I get the selection ...
    Read options from selection-screen
    Posted on: Aug 24, 2006 3:30 PM, by user: Silke Eng -- Relevance: 75% -- Show all results within this thread
    Hi Kiran, as all other questions are answered already, remains the one on the select-options. Function module <b>RS_REFRESH_FROM_SELECTOPTIONS</b> returns those. Kind regards, Silke ...
    Selection screen for SAP Query: OR between options
    Posted on: Jun 29, 2006 3:04 PM, by user: Tania Pouli -- Relevance: 74% -- Show all results within this thread
    need a variant where either of two fields should not be 0. Is there some way to add an OR between two selection options? I can't change the actual query because it's used with many other variants. Thanks ...
    Pass internal table of selection-options through method!
    Posted on: Nov 22, 2004 3:49 PM, by user: Frank Roels -- Relevance: 74% -- Show all results within this thread
    I created a selection screen with multiple select-options. Now I want in a method of a class work with the internal ...
    select-options: at selection-screen on value-request
    Posted on: Sep 18, 2006 10:51 PM, by user: Sumit Agarwal -- Relevance: 72% -- Show all results within this thread
    one field is dependent on the values of the other field in the select-options. I am using the "at selection-screen on value-request event on" to populate the select-options field, S_AUFNR, that is dependent ...
    Pages: 16 [ 1 2 3 4 5 6 7 8 9 10 |

  • Check select-options in selection-screen

    I have two select-options in a selection-screen s_vbeln and p_ebeln with intervals & with extensions. Now i have to check whether values in  high or in low are valid or not? I have written the following code to check the validity of the values.
    AT SELECTION-SCREEN ON s_vbeln.
      IF SY-UCOMM EQ 'ONLI' .
        IF NOT s_vbeln[] IS INITIAL.
          LOOP AT s_vbeln.
            SELECT SINGLE VBELN
                        FROM VBAK
                        INTO gs_vbeln
                       WHERE VBELN EQ s_vbeln-LOW.
            IF SY-SUBRC <> 0.
              MESSAGE E398(00) WITH 'Invalid Sales Order Number!!'.
            ENDIF.
            SELECT SINGLE VBELN
                         FROM VBAK
                        INTO gs_vbeln
                       WHERE VBELN EQ s_vbeln-HIGH.
            IF SY-SUBRC <> 0.
              MESSAGE E398(00) WITH 'Invalid Sales Order Number!!'.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    The similar is with p_ebeln which is a field of ekko table.And vbeln is a field of vbak table. if gurus can post the code
    for the same.
    Regards,
    Priya

    Hi Shweta,
    select-options are represented as internal tables in the system. If the user extends the select-option and enters a couple of values, they should be checked all. So the code should be a little bit enhanced.
    To have the cursor positioned a the field with the error, you may use event
    AT SELECTION-SCREEN ON s_vbeln.
      PERFORM check_s_vbeln.
    *&      Form  CHECK_S_VBELN
    FORM check_s_vbeln .
      LOOP AT s_vbeln.
        IF s_vbeln-low IS NOT INITIAL.
          SELECT count(*) FROM vbak WHERE vbeln = s_vbeln-low.
            IF sy-subrc <> 0.
              MESSAGE e001(vb) WITH s_vbeln-low.
    *   Sales document & does not exist
            ENDIF.
          ENDIF.
          IF s_vbeln-high IS NOT INITIAL.
            SELECT count(*) FROM vbak WHERE vbeln = s_vbeln-high.
              IF sy-subrc <> 0.
                MESSAGE e001(vb) WITH s_vbeln-high.
    *   Sales document & does not exist
              ENDIF.
            ENDIF.
          ENDLOOP.
        ENDFORM.                    " CHECK_S_VBELN
    Kind regards,
    Clemens

  • Check syntax of select option structure

    I've got a custom transparent table which contains a select option:
    field = SIGN (data element = ddsign)
    field = OPTION (data element = ddoption)
    field = ROLE_FROM (data element = agr_name)
    field = ROLE_TO (data element = agr_name)
    This custom transparent table is populated via a custom dialog program where the user enters all four of these data fields.  Does SAP provide some type of function module which can check the syntax of a select option structure before the table is updated?  For example, it would flag the following as OK:
    SIGN = I
    OPTION = CP
    ROLE_FROM = 001*
    ROLE_TO = <blank>
    But it would flag the following as not OK (either OPTION needs to be CP or ROLE_FROM doesn't need to have a wildcard):
    SIGN = I
    OPTION = EQ
    ROLE_FROM = 001*
    ROLE_TO = <blank>
    Thanks,
    Brad

    Brad
    I don't know abuot available function modues.
    Another option is to use a SAP function to create the dialog screen to get the values:
    Function FREE_SELECTIONS_DIALOG returns a RANGE table.
    Using the fields_tab table you csn define which fields are shown.
    FORM get_selection_condition .
      DATA:
        w_selid         TYPE rsdynsel-selid,
        lt_tables       TYPE TABLE OF rsdstabs,
        ls_tables       TYPE rsdstabs,
        lt_fields       TYPE TABLE OF rsdsfields,
        lt_where        TYPE rsds_twhere,
        ls_where        TYPE rsds_where.
      ls_tables-prim_tab = p_tab.
      APPEND ls_tables TO lt_tables.
      CALL FUNCTION 'FREE_SELECTIONS_INIT'
    *    EXPORTING
    *      expressions  = lt_expr
        IMPORTING
          selection_id = w_selid
    *      expressions  = lt_expr
        TABLES
          tables_tab   = lt_tables
        EXCEPTIONS
          OTHERS       = 20.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    * Display free selection diaerrorlog
      CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
        EXPORTING
          selection_id            = w_selid
          title                   = 'Selection'
          status                  = 1
          as_window               = 'X'
          tree_visible            = 'X'
        IMPORTING
    *      expressions             = lt_expr
    *      field_ranges            = lt_ranges
    *      number_of_active_fields = w_active
          where_clauses           = lt_where
        TABLES
          fields_tab              = lt_fields
        EXCEPTIONS
          OTHERS                  = 1.
      IF sy-subrc IS NOT INITIAL.
    *    p_cancel = c_true.
        EXIT.
      ENDIF.
    * Get the where conditions for the master data table.
      READ TABLE lt_where INTO ls_where
        WITH KEY tablename = p_tab.
      APPEND LINES OF ls_where-where_tab TO selopt_tab.
    ENDFORM.                    " get_selection_condition

  • SELECT OPTIONS IN WEB DYNPRO ABAP

    Hello experts, im working with select options in a WEB Dynpro.
    There are four buttons (cancel,check,reset,copy) that apears above my select option.
    My question is: There is a way to hide that buttons?
    THANKS!

    Sure, you can disable them using the SET_GLOBAL_OPTIONS methdo of the IF_WD_SELECT_OPTIONS class.  Something like this:
    wd_this->m_handler->set_global_options(
        i_display_btn_cancel  = abap_false
        i_display_btn_check   = abap_false
        i_display_btn_reset   = abap_false
        i_display_btn_execute = abap_false ).

  • Hiding of Select Options in screen based on selection in selection list box

    Hi People,
             I have a screen where i have put a selection list box, it is pre-filled with values, Now based on the value which user selects, I want to show/hide some select-options fields. I have declared the select options in the top include of my program,
    SELECT-OPTIONS: so_user FOR ls_rsp_user-user_id MODIF ID 222,
                    so_userg FOR ls_rsp_usergrp-user_grp_id MODIF ID 333,
                    so_ccode FOR ls_vdmp-bukrs MODIF ID 444,
    then in the PBO of my screen, I have written a module, set screen in which I loop over screen & check the group id's
    LOOP AT SCREEN.
        IF screen-group1 = '111'.
          IF gv_hier_resp_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
        ELSEIF screen-group1 = '222'.
          IF gv_user_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
        ELSEIF screen-group1 = '333'.
          IF gv_user_group_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
        ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    I am setting some flags based on the value which user selects in the selection list box, When I debugged I found that the flags were being set correctly, but the screen group value never set to '222' or '333', these are id's i have used for select options. Hence I am unable to hide/show the select options fields.  Kindly suggest some solutions for this.
    Thanks & Regards,
    Deepak

    then in the PBO of my screen
    Your SELECT-OPTIONS are defined in a SELECTION-SCREEN so the PBO actions must be maintained in a AT SELECTION-SCREEN OUTPUT block.
    I suppose the selection-screen is a subscreen, if you dont want to get unwanted interactions with a main selection-screen of the report, check sy-dynnr
    AT SELECTION-SCREEN OUTPUT.
       CASE sy-dynnr.
         WHEN '1000'. " main screen of report
         WHEN '0100'. " selection-screen defined as subscreen
           LOOP AT SCREEN.
             CASE SCREEN-GROUP1.
               WHEN '111'.
             ENDCASE.
           ENDLOOP.
       ENDCASE.
    Regards,
    Raymond

  • Change values of select option in fuction of the variant

    Hi abappers,
    I want change the data that contain several select-options.
    I have a table internal (c_varint) that I obtain with the next code:
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
         EXPORTING
              report                = '/1BCDWB/DBBKPF'
              variant               = p_varint
    *         MOVE_OR_WRITE         = 'W'
    *         NO_IMPORT             = ' '
    *         EXECUTE_DIRECT        = ' '
    *    IMPORTING
    *         SP                    =
         tables
    *         L_PARAMS              =
    *         L_PARAMS_NONV         =
    *         L_SELOP               =
    *         L_SELOP_NONV          =
              valutab               = c_varint
    *         OBJECTS               =
    *         FREE_SELECTIONS_DESC  =
    *         FREE_SELECTIONS_VALUE =
    *    EXCEPTIONS
    *         VARIANT_NON_EXISTENT  = 1
    *         VARIANT_OBSOLETE      = 2
    *         OTHERS                = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and my select-options:
    SELECT-OPTIONS I1 FOR BKPF-BUKRS.
    SELECT-OPTIONS I2 FOR BKPF-BELNR.
    SELECT-OPTIONS I3 FOR BKPF-GJAHR.
    SELECT-OPTIONS I4 FOR BKPF-BLART.
    SELECT-OPTIONS In ...
    Now I want change the values but I got not him to changed it to me :
    loop at c_varint where selname eq i1.
       MOVE-CORRESPONDING c_varint to i1.
    endloop.
    loop at c_varint where selname eq i2.
       MOVE-CORRESPONDING c_varint to i2.
    endloop.
    loop at c_varint where selname eq i3.
       MOVE-CORRESPONDING c_varint to i3.
    endloop.
    loop at c_varint where selname eq i4.
       MOVE-CORRESPONDING c_varint to i4.
    endloop.
    but I dont obtain the data
    Can you help me, please?
    Cordial greetings.

    Hi,
    the documentation of the fm you´re using says:
    RS_VARIANT_CONTENTS
    This function module checks whether any parameters or select options of the variant have changed. If they have, it outputs an error message (variant obsolete).
    have you checked fm RS_CHANGE_CREATED_VARIANT instead?
    the documentation of this fm says:
    RS_CHANGE_CREATED_VARIANT
    Functionality
    This function module enables modification of a variant without processing the selection screen. In the table VARI_CONTENTS, you must supply all select-options and parameters of the variant with values. Any selection criteria missing from this table are set to their initial values in the variant. If no value is specified for the structure description (parameter VARI_DESC), all fields - except the name of the last user to make the change, the time of the change, the version and the language - are set to their initial values. The table VARI_TEXT is optional
    Best regards

  • Problem in Select-option in Module Pool Programming

    Hi,
    I'm making one module pool programming. In that, I've to make select-option. For that I'm using this command --
    1) In PBO --
    CALL SUBSCREEN sub INCLUDING 'YBOE_PRINT' '5100'.
    2) In PAI --
    CALL SUBSCREEN sub.
    But, Syntax Error is generated as below --
    "." or "ID.........FIELD" expected after "SUBSCREEN"
    Please suggest.
    Thanks.
    Kumar Saurav.

    Hi Ramchander,
    Thanks for replying. But, even if I changed Prog_Name with term 'repid', that same error regarding
    "." or "ID ... FIELD ..." expected after "SUBSCREEN"
    is coming up.
    I guess, there is any step missing.
    Lemme describe what I'm doing in points --
    1) I declared SELECTION-SCREEN with screen no --
    SELECTION-SCREEN BEGIN OF SCREEN 5100 AS SUBSCREEN.
          PARAMETERS : p_bukrs TYPE ekko-bukrs OBLIGATORY DEFAULT '1000'.
          SELECT-OPTIONS: kunnr FOR kna1-kunnr.
          select-options: gjahr for bsid-gjahr.
          select-options: bank for bsed-bank.
          select-options: budat for bsid-budat.
          SELECTION-SCREEN END OF SCREEN 5100.
    2) Then I made a call in PBO as given above.
    3) Finally, a call to that subscreen is made in PAI - again as given above.
    When I checked that, this gave the error.
    Are you looking any erroneous step ...?
    Please guide.
    Thanks.
    Kumar Saurav.

Maybe you are looking for