Latest Value - Select Option - At Selection Value help

Hi,
I need the current values entered in the Select Option of the Selection Screen while generating the Value Help.
There are two selection option fields in the Selection Screen, Selopt1 and Selopt2, to generate the Value help of Selopt2 i need the latest values of the Selopt1, the function module dynp_read_values does not return all the values of the selectop option Selopt1 it returns only the first row of selopt1-high and selopt1-low, the function module RS_REFRESH_FROM_SELECTOPTIONS does not return the current values entered in the selection screen, is there any way to retrive the latest values of the select option in the event At Selection Screen on Value Request.
regards
Santosh

Hi Santosh,
When you go for f4 help on selopt2, you can use following code to get the current value of selopt1,
AT SELECTION-SCREEN ON VALUE-REQUEST
FOR selopt2-high.
select * from bkpf into table it_bkpf where
BKTXT in selopt1[].
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'BKTXT'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'Invoice Id'
      value_org   = 'S'
    TABLES
      value_tab   = it_bkpf .
  IF sy-subrc <> 0.
    " do nothing.
  ENDIF.
In selection screen, you can directly fetch the value of selection options or parameters by selopt1 or selopt2 (in your case by using AT Selection Screen for value request).
Reply for further doubts,
Please reward if useful.
Thanks and regards,
Ashlesha Desai
Edited by: ashlesha desai on May 26, 2008 6:06 AM

Similar Messages

  • Problem with table-indexes when using select-options in select

    Hello experts,
    is it right that table-indexes will not be used if you take select-options to select data from the database?
    in detail:
    i have build up an table-index for one of our db-tables and test it via an test-programm. The first test with '=' comparisons worked fine. Every key of the index was used; checked via ST05!
    e.g.:    SELECT * FROM TABLEA INTO ITAB WHERE keya = '1' AND keyb = '2' AND keyc = '3'.
    Now i startet the test with select-options
    e.g.:   SELECT * FROM TABLEA INTO ITAB WHERE keya IN seltabA  AND keyb IN seltabB AND keyc IN seltabC.
    First of all i just filled the seltabs with only 1 value:    eg:  seltabA=      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'     etc.
    Everything worked fine. Every key of the index was used.
    But now, I putted more than one entries in the seltabs e.g.
    seltabA:      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '2'   
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '3'
    From now on, the indexed was not used completely (with all keys).
    Isn't that strange? How can i use select-options or sel-ranges with using the complete table-indexes?
    Thanks a lot,
    Marcel

    Hi Hermann,
    i hope this helps:
    this is the first one, which uses the complete index:
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" = ? AND "ORGID" = ? AND "KOART_BASIS" = ? AND    
      "STATUS" = ? AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR "STATUS" = ? OR
      "STATUS" = ? )  WITH UR                 
    RESULT: 5 IXSCAN /dbcon/01_con05 #key columns:  4
    And the second one, which does not use the complete index! The 3 ranges are filled each with 2 values. Remember; when i fill them each with only one value, the result is the same as you can see above(/dbcon/01_con05 #key columns:  4):
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" IN ( ? , ? ) AND "ORGID" IN ( ? , ? ) AND        
      "KOART_BASIS" IN ( ? , ? ) AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR 
      "STATUS" = ? OR "STATUS" = ? )  WITH UR                                  
    and here the access-plan
       0 SELECT STATEMENT ( Estimated Costs =  5,139E+01 [timerons] )                                                                               
    5     1 RETURN                                                                               
    5     2 NLJOIN                                                                               
    5     3 [O] TBSCAN                                                                               
    5     4 SORT                                                                               
    5 TBSCAN GENROW                                                                               
    5     6 <i> FETCH /dbcon/01_con                                                                               
    7 IXSCAN /dbcon/01_con05 #key columns:  2   
    As you can see, only 2 keys were taken for indexed selection!
    Any idea?
    Kind regards,
    MArcel
    Edited by: Marcel Ebert on Jul 28, 2009 5:25 PM

  • Invalid value in OPTION field of value table for IN itab operator. operato

    Hi,
    I am working on SELECT-OPTIONS to accept single and multiple values for company code. I am using CREATE_RANGE_TABLE and ADD_SELECTION_FIELD and all is good but I was prompted with error "Invalid value in OPTION field of value table for IN itab operator. operator"  when I enter 2 single value.
    SIGN OPTION LOW  HIGH
        |      |CN01|    |
        |      |SG02|    |
    However, below combinations working good for me and I don't get the above error.
    SIGN OPTION LOW  HIGH
    I   |BT   |CN01|CN02|
         |     |SG02|    |
    SIGN OPTION LOW  HIGH
         |     |SG02|    |
    I am using below coding.
      DATA:
        ls_cmp_restrictions TYPE if_wd_select_options=>t_complex_restrictions,
        ls_rsoptions        TYPE rsoptions.
      CLEAR ls_rsoptions.
      ls_rsoptions-bt = abap_true.
      ls_rsoptions-cp = abap_false.
      ls_rsoptions-eq = abap_true.   " for enable only single value*
      ls_rsoptions-ge = abap_false.
      ls_rsoptions-gt = abap_false.
      ls_rsoptions-le = abap_false.
      ls_rsoptions-lt = abap_false.
      ls_rsoptions-nb = abap_false.
      ls_rsoptions-ne = abap_false.
      ls_rsoptions-np = abap_false.
      ls_cmp_restrictions-m_exclude = ls_rsoptions.
      CLEAR ls_rsoptions .
      ls_rsoptions-bt = abap_true.
      ls_rsoptions-cp = abap_false.
      ls_rsoptions-eq = abap_true.   " for enable only single value*
      ls_rsoptions-ge = abap_false.
      ls_rsoptions-gt = abap_false.
      ls_rsoptions-le = abap_false.
      ls_rsoptions-lt = abap_false.
      ls_rsoptions-nb = abap_false.
      ls_rsoptions-ne = abap_false.
      ls_rsoptions-np = abap_false.
      ls_cmp_restrictions-m_include = ls_rsoptions.
    * Create a reference to range table
      lr_field = wd_this->m_helper->create_range_table( `BUKRS` ).
    * Add the select-option to the group
      wd_this->m_helper->add_selection_field(
        i_id                         = `BUKRS`
        i_value_help_structure       = 'P0001'
        i_value_help_structure_field = 'BUKRS'
        it_result                    = lr_field
        i_no_intervals               = abap_true
        i_no_extension               = abap_false
        i_complex_restrictions       = ls_cmp_restrictions
        i_use_complex_restriction    = abap_true ).
      FREE lr_field.
    Edited by: Girish Nabar on Jul 22, 2011 12:35 PM

    Hi Girish,
    People are answering not for points, just to share the knowledge.
    And I think the way of structure is wrong.  i think we cannot pass two single values in your way. am not sure about .
    low means it will accept single value. for one record in sign structure.
    wait for other replys.
    Regards
    Srinivas

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • Length of select-options in selection screen.

    Hi,
    I was able to give the lemgth of select-options only upto 8 characters.
    Select-options :S_Mtrial for mara-matnr.
    But my requirement is I want total name which is more than 8 characters.
    Select-options:Material_numberl for mara-matnr.
    Can any one help how to do.
    Thanks in advance.

    The Statement...
    Select-options :S_Mtrial for mara-matnr
    The selection screen length depends on the type that you are assigning to it. Since the length of type
    mara-matnr is less, the selection option S_Mtrial  will be displayed with short length in the selection screen.
    The alternate to do this is...
    selection-screen begin of line.
    selection-screen comment 2(10) text-001.
    select-options : <ur select option name>
    selection-screen end of line.
    Text element,text-001 contains the select option text to be displayed in the screen
    Hope it helps.

  • PS:Copy of MBBS report with Date(GR) selection option in selection screen.

    Hi,
    We are developing a report, which is Copy of MBBS report, addition as Date(GR) selection option in selection screen to view historical data {i.e.Project Stock(Q) on back dates}.
    MBBS is showing Project Stock w.r.t. WBS. So pls suggest Table, which can fulfill the requirement to show the Project Stock from GR w.r.t. Purchase and Production order in back date w.r.t. that WBS.
    Pls do the needful.
    Thanks,
    Amit Jain.

    Hi Amit ,
    The Project Stock Table is MSPR , and the Project stock history table is MSPRH .
    Though not through with your actual requirement , There is a standard Report MB5B -- Stock on Posting Date . In the selection screen , we can have the Special Stock Q (Project Stock ) .
    If you can develop copying this report instead of MBBS , it would take care of receipts as well as issues ,and from the material Document you can build a relation to the account assignment  WBS/Network Activity through MSEG Table .
    Hope it helps .
    thanks and regards
    Kish

  • Side by side select options in selection screen

    Hai Gurus,
    In a report, I need to place Period From and Period To date select-options in selection screen.
    In one line (i.e side by side).
    Appreciate your immediate response.
    Thanks and Regards,
    Kiran.

    Thanks to all,
    I got it.
    my code here.
    SELECTION-SCREEN: BEGIN OF BLOCK sel1 WITH FRAME TITLE text-sel.
    PARAMETERS: SUMMARY AS CHECKBOX USER-COMMAND SUMMARY.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(13) text-pfr.
    SELECT-OPTIONS: VALID_FR FOR ZZUTIL_RATE-VALID_FR MODIF ID RAM no intervals NO-EXTENSION. "changed
    SELECTION-SCREEN COMMENT 30(13) text-pto.
    SELECT-OPTIONS: VALID_TO FOR ZZUTIL_RATE-VALID_TO no intervals NO-EXTENSION. "changed
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK SEL1.

  • Select-options in Selection Screen to show more rows for entering values

    Hi all,
    In my webdynpro abap  I have added the SELECT-OPTIONS componenet and working fine.
    User need  in the Selection Screen for select options  more rows to show entering values in single time.
    THe Default Rows show only 5 .
    user need to change to 10 or 15 Rows to show.
    Pl help .
    THanks in advance.
    Dev

    Hi,
    Here is the way which I just tested and found working.
    This is the main code which needs to be written.
    TYPES:
        ty_r_vbeln TYPE RANGE OF vbeln,
        ty_s_vbeln TYPE LINE OF ty_r_vbeln.
    data ls_vbeln type ty_s_vbeln.
    field-symbols <fs_range> TYPE INDEX TABLE.
    ASSIGN lt_range->* TO <fs_range>.
    do 10 times.
    APPEND ls_vbeln TO <fs_range>.
    enddo.
    For further refinement, you can create a input field in view for number of lines to be shown as enabled.
    The complete code is as below.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
    lo_interfacecontroller =   wd_this->wd_cpifc_select_options( ).
    DATA lo_r_helper_class TYPE REF TO if_wd_select_options.
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen(  ).
    Creating range table
    DATA lt_range TYPE REF TO data.
    CALL METHOD lo_r_helper_class->create_range_table
        EXPORTING
          i_typename     = 'VBELN'
        RECEIVING
          rt_range_table = lt_range.
    Disabling the global options
    CALL METHOD lo_r_helper_class->set_global_options
      EXPORTING
          i_display_btn_cancel  = abap_false
          i_display_btn_check   = abap_false
          i_display_btn_reset   = abap_false
          i_display_btn_execute = abap_true.
           TYPES:
        ty_r_vbeln TYPE RANGE OF vbeln,
        ty_s_vbeln TYPE LINE OF ty_r_vbeln.
    data ls_vbeln type ty_s_vbeln.
    field-symbols <fs_range> TYPE INDEX TABLE.
    ASSIGN lt_range->* TO <fs_range>.
    do 10 times.
    APPEND ls_vbeln TO <fs_range>.
    enddo.
    Adding the selection field
    CALL METHOD lo_r_helper_class->add_selection_field
        EXPORTING
          i_id                         = 'VBELN'
          I_OBLIGATORY                 = ABAP_TRUE
          I_NO_EXTENSION               = abap_false
          i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
          it_result                    = lt_range.
    Edited by: Jayanthi Jayaraman on Dec 2, 2010 8:29 AM

  • [Selection Screen] Select-Options populate mult. values & Green pushbutton

    Hi,
    I programmatically fill a SELECT-OPTIONS on event AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_us-low.
    As I use a FM ('RHP0_POPUP_F4_SEARK') that allows me to select several entries in a single step, the right pushbtton stays unchanged. I have to press enter to make it go green.
    I tried thinks like:
        ls_dynpfield-fieldname = '%_S_US_%_APP_%-VALU_PUSH'.  " 'S_US-LOW'.
        ls_dynpfield-fieldvalue = ICON_DISPLAY_MORE.
        APPEND ls_dynpfield TO lt_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = sy-repid
            dynumb               = sy-dynnr
          TABLES
            dynpfields           = lt_dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
    and it works but it's not that nice !
    Any idea how to avoid this behaviour and directly set it green?
    Thanks in advance.
    Best regards,
    Guillaume

    Hi
    Guillaume Garcia
    U can try following code. it may help you.when I press f4. Colour will change to Green.
    REPORT  ztest.
    tables: mara.
    CONSTANTS : tp_mara type C VALUE 'X'.
    select-OPTIONS: matnr for mara-matnr..
    at SELECTION-SCREEN on VALUE-REQUEST FOR matnr-low.
    matnr-sign = 'I'.
    matnr-option = 'BT'.
    matnr-low  = '1'.
    matnr-high = '2'.
    append matnr.
    matnr-sign = 'I'.
    matnr-option = 'BT'.
    matnr-low  = '4'.
    matnr-high = '5'.
    append matnr.
    SUBMIT ZTEST VIA SELECTION-SCREEN WITH matnr IN matnr.
    START-OF-SELECTION.
    BREAK-POINT.
    END-of-SELECTION.
    Many thanks,
    Suyog.

  • Restrict select option with few values by default

    I have few values with which i have to restrict in a select option by default.
    I have done in initialisation as below.
      s_ktokd-sign   = 'I'.
      s_ktokd-option = 'NE'.
      s_ktokd-low    = '0012'.
      append s_ktokd to s_ktokd.
      clear s_ktokd.
    Is there any other way?
    Thanks
    Kiran

    yeah you can do that in initalization.
    >   s_ktokd-sign   = 'I'.
    >   s_ktokd-option = 'NE'.
    >   s_ktokd-low    = '0012'.
    >   append s_ktokd to s_ktokd.
    >   clear s_ktokd.
    small correction to your code, corrected code...
    s_ktokd-sign   = 'E'.
       s_ktokd-option = 'EQ'.
       s_ktokd-low    = '0012'.
       append s_ktokd to s_ktokd.
      clear s_ktokd.

  • Select options higher range value not appearing

    Dear Experts,
    Carrid : AA to AZ
    But at runtime i see that low value is AA and high value is null....
    written code in wdoinit and code in button to search values.
    code of wddoinit:
      DATA: LT_RANGE_TABLE TYPE REF TO DATA.
      DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
                 L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
                 L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
      WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
      WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
      LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
                                                         ( I_TYPENAME = 'S_CARR_ID' ).
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
                                                         ( I_ID = 'S_CARR_ID'   IT_RESULT = LT_RANGE_TABLE ).
    can anyone pls help me to resolve this.
    Regards......
    Sajid
    Edited by: shaik sajid on May 17, 2009 3:39 PM

    got it."should press enter after entering values"..i am new to webdynpro and learning on my own,hope i will be successful...

  • Creating select option with the search help based on other select option

    Hi,
    I have displayed a selection screen with two select options S1 and S2.
    My requirement is that the values in the search help of S2 should get filled based on the values selected in S1.
    Note: User has option to select multiple values in S1.
    Does anybody know how to implement this?
    Thanks,
    Feroz

    >
    Sanjeeva wrote:
    > Hi,
    >
    > With standard f4 you cannot acheive this. You need to write customise with OVS or Simple value selector by reading S1 selected values.
    >
    > Thanks,
    > Sanjeev
    I'm getting fairly tired of seeing this completely incorrect information on this forum.  As stated before and already found out by this poster, you can map input and output values between multiple data dictionary search helps. You do NOT have to resort to using OVS for this option.

  • Problem in Select Option Freely programmed F4 Help

    Hi All,
    I had a Component 'A'  where i used select option. I used Freely programmed search help for the select option field.
    If i click F4 in the select option field it will call one component in which i have one more select option in component B.
    In component B select option field if i manually entering value and search and click apply values button the values are comming in the select option field in component A.
    But if i pressing the F4 in Component B and search and click apply values the value are not comming in the Component 'A'.
    If i open again component B and closing it without any action the value is coming in component A.
    If i debugged and see the WDDOMODIFYVIEW of tHE WDR_SELECT_OPTION is not getting called for component A.In which it has Rendering delta method of CL_WDR_SELECT_OPTION.
    Any idea about this.
    Regards,
    Ganesh.

    hi Ganesh,
    i have read your post several time and i am still not able to get hold on your problem. Probably it is to do with your complex approach of nested select_option, i can not judge why you did this way. I would advice you to step back and see it for yourself
    1)if it is need to have nested select_option
    2)check component initialization and destroy
    2)check event subscriptions

  • Selection Screen - User input to select option only through f4 help,

    Hi..
    In case of selection screen,  I need selection screen such a that user input must be through search help not manual entry is allowed/ possible

    TYPES:BEGIN OF ty,
          field1 TYPE char01,
          END OF ty.
    DATA:it TYPE TABLE OF ty,
         wa TYPE ty.
    data:v_var type c.
    select-options:so for v_var.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'SO-LOW'  .
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
        IF screen-name = 'SO-HIGH'  .
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so-low.
      CLEAR it[].
      wa-field1 = 'A'.
      APPEND wa TO it.
      wa-field1 = 'B'.
      APPEND wa TO it.
      CLEAR wa.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'FIELD1'
          dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
          dynprofield = 'SO-LOW'
          value_org   = 'S'
          display     = 'F' "F = Force
        TABLES
          value_tab   = it[].
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so-high.
      CLEAR it[].
      wa-field1 = 'A'.
      APPEND wa TO it.
      wa-field1 = 'B'.
      APPEND wa TO it.
      CLEAR wa.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'FIELD1'
          dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
          dynprofield = 'SO-HIGH'
          value_org   = 'S'
          display     = 'F' "F = Force
        TABLES
          value_tab   = it[].

  • Select-options in SELECT query - syntax error

    Hi all,
      I get the error below when I try to use the select options in a SELECT query . Please help me.
    "The IN operator with "SO_AWART" is followed neither by an internal
    table nor by a value list."
    The code i have used(Logical database  PNP is used):
    TABLES: pernr,
            catsdb.
    INCLUDE ztime_cwtr_top.    " global Data
    INCLUDE ztime_cwtr_f01.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
    PARAMETERS P_THRES TYPE I.
    SELECTION-SCREEN END OF BLOCK B1.
    Get data from CATSDB table. Workdates within the date interval are considered.
      SELECT pernr workdate awart catsquantity beguz enduz status
      FROM catsdb
      INTO TABLE it_catsdb
      WHERE pernr  = pernr-pernr    AND
           workdate GE pn-begda     AND
           workdate LE pn-endda     AND
           status   IN ('20', '30') AND
           awart    IN  so_awart .
          awart    IN ('1100', '1137', '1138', '1139', '1140',
                      '1147', '1148', '1149', '1157', '2003' ).
    when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
    I have tried different options like using only the select-options in the where condition.
    Thanks in advance.....
    Madhu

    Solved.
    Code with syntax error:
    include z...top .
    include z...fo1.
    select-options: xxxxxxx
    Code  with no syntax error:
    select-options: xxxxxxx
    include z...top .
    include z...fo1.
    Thanks for all your help,
    Madhu

Maybe you are looking for