Filtering Select-Options criteria?

Hi Experts,
I populated the itab.
From this itab, I need to delete the KUNNR records, which wuld not satisfy the S_KUNNR (select-options) range. So, the follwoing codes is not working!
DELETE ITAB WHERE  KUNNR LT S_KUNNR-LOW AND KUNNR GT S_KUNNR-HIGH.
DELETE ITAB WHERE  KUNNR NE S_KUNNR.
What is the correct code?
ThanQ.

Hi,
Try this..
DELETE ITAB WHERE NOT KUNNR IN S_KUNNR[].
Thanks,
Naren

Similar Messages

  • Select option criteria (urgent)

    hi all,
    i have one select option craeted for matnr from mara table.
    SELECT-OPTIONS : S_matnr FOR mara-matnr.
    so it creates internal table with 4 fields.
    my criteria is that in  low option i give default value 100 and
    it should be protected ie not open for any input and having default as 100.
    but the high open should be open for entry by user.
    how to get this done.
    plz reply

    Hi Sanjeev
    <b>You can initialize the low value in the initialization.</b>
    S_MATNR-low = '100'.
    Append s_MATNR.
    <b>To disable low write the following code.</b>
    select-options: s_matnr for mara-matnr.
    at selection-screen output.
    loop at screen.
      if screen-name = 'S_MATNR-LOW'.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
      endif.
    endloop.
    I have tested it... it's working fine.
    Regards
    Surya.

  • Any standard FM to print select-options criteria on a basic report?

    Hi Experts,
    Am trying to print the user entered selection criteria on a classical/basic report. I wrote the code for select-options entries, but, am looking for any standard function module (if i pass my_select_options table, I need to get printable/readable entires) to print on my basic report, pls. let me know (I tried in SE37, but i got an in-active FM - PRINT_SELECTOPTIONS!!)
    Thank you

    Hello,
    CALL FUNCTION 'PRINT_SELECTIONS'
        EXPORTING
          rname     = program name
          rvariante = sy-slset "It will catch the selected variant
          mode      = 'TABLE'
        TABLES
          infotab   = li_info.
    li_info table will contain all selection screen data, you will can restrict what needs to be shown on spool list!
    Thanks.

  • Can we hide the select-option in a selection screen

    Hi all,
    I have two radio buttons in my selection screen with 1 select-option criteria, now on choosing the other radio button I want that a different select-option criteria should appears.
    Thanks

    hi kunal check the code below.
    TABLES : SSCRFIELDS,MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
    PARAMETERS : R1 RADIOBUTTON GROUP RB1 DEFAULT 'X',
    R2 RADIOBUTTON GROUP RB1,
    R3 RADIOBUTTON GROUP RB1,
    R4 RADIOBUTTON GROUP RB1.
    SELECTION-SCREEN PUSHBUTTON /10(20) FRST USER-COMMAND FRST.
    SELECTION-SCREEN PUSHBUTTON /10(20) SCND USER-COMMAND SCND.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : ACTIVE1 VALUE '1',
    ACTIVE2 VALUE '1'.
    initialization.
    move 'frst' to frst.
    move 'scnd' to scnd.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'R1' OR SCREEN-NAME = 'R2' .
    SCREEN-INVISIBLE = ACTIVE1.
    screen-output = '1'.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-NAME = 'R3' OR SCREEN-NAME = 'R4' .
    SCREEN-INVISIBLE = ACTIVE2.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS-UCOMM.
    WHEN 'FRST'.
    ACTIVE1 = '0'.
    ACTIVE2 = '1'.
    WHEN 'SCND'.
    ACTIVE2 = '0'.
    ACTIVE1 = '1'.
    ENDCASE.

  • Get Selection options from one view to another view

    Hi Experts,
    I am using two views, first view  it shows basic list of records based on selection options criteria , here I used component WDR_SELECT_OPTIONS . Then if we click on any record in first view then it opens popup window with record relevant information. Here I want to get selection option values while editing record values.
    Initially I used context node for one value, for that just I created node and attribute then bind to table then I used with method get_static_attributes_table(  ) in second view.
    But I need all values to be used in second view.
    Please could you suggest, is there another way to get values into second view?
    Regards,
    BBC

    Hello BBC,
    you can access the SELECT_OPTION component usage in second view and then you retrieve the selection fields and its corresponding range table. In this case the component usage instance will be shared across the application unless you explictly delete the component usage.
    BR, Saravanan

  • Geting select option value on the basis of filtering criteria

    Hi
    I have a selection parameter field is PRPS-WERKS. when user will go for f4 help, the value should come as filtered on the basis of the condition : select the respective WBS ELEMENT (PRPS- PSPNR) and select the respective PR LINE item. (The relation is PRPS-PSPNR=EBKN-PS_PSP_PNR and EBKN-BANFN = EBAN-BANFN and EBKN-BNFPO = EBAN-BNFPO).now the value iof WERKS is not comming from the database table PRPS itself. how to manage this thing?

    Hi,
      Refer the link select option in smartforms and read what i suggested..
    Regards,
    Dhina..

  • Result of the query is not filtered as value given in Select Option variabl

    Hello ,
    A Select option Variable is created on Navigational Attribute( ZINV_PROG) of 0WBS_ELEMT.
    The Compound Key for object ZINV_PROG(Investment program) is APPR_YEAR( Approval Year)
    This ZINV_PROG object does not bear Master data.
    The values in the field get populated as you load Master data of 0WBS_ELEMT.
    The values for this objects is as shown below:
    APPR_YEAR ZINVPROG
    2005 ESCCCAPS
    2007 ESCCCAPS
    2008 FIRE
    2006 CAPITAL
    A select option variable is craeted on this Navigational attribute.
    When you execute the query , On the selection screen of the query..
    If you provide i/p for Investment programm field as 2007 ESCCCAPS, the data should ideally be filtered for this values only.
    But the result of the query shows data for both values 2005 ESCCCAPS and as well as for 2007ESCCCAPS.
    Let me know how to sort this issue.
    Points will be assigned for the correct and helpfull answere.
    Thanks,

    Thanks Srini for your prompt explanation.
    My Question is if Approval year is a compounded key of ZINV_PROG object why data would not get filter out directly.
    I mean on the screen for this particualr variable i take help - F4 to see values there you are able to see all the values of Investment programm along with the apprroval year.
    If i select value as 2005 ESCCCAPS from the help F4 screen then ideally data should be fileterd out for this particular value. But it is not happening so.
    Is that so in Query desgining that if you creating a variable on Nav Attribute, and that particular Nav attribute has a compound key then if you want to filter out the data for this Nav attribute correctly you would also require to create a variable for Compound key also.
    Please let me know
    Thanks

  • VT04 - Adding new select options in grouping screen for capacity criteria

    Hi,
    I am trying to add a new select option(min & max) for grouping the delivery based on the quanity/no of units just like the weight/volume. Is there an exit/enhancement available in the program. The program for VT04 is RV56TRGN and the actual program for grouping criteria is RV56TRSP. 
    I have looked into  the user exit EXIT_SAPLV56M_001.  This I guess is only for adding the grouping criteria and not for adding select options like weight/volume.... I would need to add something similar to this.
    THnks
    Chinna

    You should search for Screen Exit .
    Also you can check if any enhancement point is avaliable in screen display place.
    You need to debud and find the exact place where this change will be required and then it will be easy to find the option  for making desired changes.
    Hope this helps you.

  • How to delete selection criteria for select-option in program

    Hi all,
    I have a selection screen with few select-options. the question is if i inserted some value at the select option, how can i delete the selection criteria in the program ? example if i have 3 radio button A,B,C. if I click rb A, select option A1 will be active and other 2 select oprtion B1 and C1 will dim, when I click rb B, the value at select option A1 will be deleted and dim and at the same time, B1 will be active, C1 will dim. when i click rb C, the value at A1 and B1 will be cleared if there is any value in it and then A1 and B1 will dim but C1 will be active. I've found a way to make the select option active n inactive when depending on which rb i click, thanks to a forummer here but to clear the value when the select-otpion is inactive?
    Thanks for any help.

    Hi
    See the sample code and do accordingly
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
    pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
    pa_vkorg TYPE vbak-vkorg MODIF ID abc.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
    SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
    s_date FOR gs_lfa1-erdat MODIF ID def,
    s_augru FOR gs_vbak-augru MODIF ID def,
    s_vbeln FOR gs_vbak-vbeln MODIF ID def.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b3.
    IF pa_rep EQ gc_x.
    LOOP AT SCREEN.
    IF screen-group1 = gc_abc.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_def.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF pa_upd EQ gc_x.
    *For Reprocessing
    LOOP AT SCREEN.
    IF screen-group1 = gc_def.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_abc.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    CLEAR pa_upd.
    ENDLOOP.
    ENDIF.
    REPORT zrich_001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
                            user-command chk,
                p_rad2 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
                    s_datum2 FOR sy-datum MODIF ID d2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_rad1 = 'X'
          AND screen-group1 = 'D2'.
          screen-active = '0'.
        ENDIF.
        IF p_rad2 = 'X'
         AND screen-group1 = 'D1'.
          screen-active = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • 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.

  • Need to call a Report Painter Report with filtered selection criteria

    Hello All,
    I have created a Report through which I am calling a Report Painter Program 'Z443'  as I have to first filter out the selections and then pass it to the Report Painter Report.
    I tried the following two ways and found these problems :
    1. Submit (program) with selection-table ..... and Return.
      The output had many entries i.e the parameters were not passed correctly to the Report Painter Report.
    2. Tried using the FM ' CRIF_RW_WEB_CALL_REPORT '.
      The transaction for the Report Painter is opening but selections from the first Report is not being transferred.
    Please help if you have worked on any similar requirements .
    Thanks!

    hi
    thanx for ur reply.
    i think the select-options is the best way to get more then one currency values.
    but i need to know what code i have to write for display of this day.
    in the standard report MCTA there he is using only one currency. similarly i need to add 2 more columns for each currency in that same report o/p.
    how to do that can any body help me
    regards,
    maqsood

  • Using select-option in webdynpro for ABAP where I have two separate pages

    Hi Experts,
             I have a requirement where I have two pages. The first page is a selection screen that contains 2 select-options to select carrid and connid. There is also a button 'Submit'. The second page contains a ALV grid output based on the selection screen criteria.
    Second page is opened on the clicking the 'Submit' button in first page.
    How to design a ABAP webdynpro component for this scenario?
    How to pass select-option values to the next page?
    What nodes/attributes should I have to create in component controller?
    Please provide me the step by step info.
    I have seen the weblog by Rich Heilman at /people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application
    But it has only one page. So I am not able to recreate my scenario based on this.
    Thanks
    Gopal

    Hi Experts,
             I have a requirement where I have two pages. The first page is a selection screen that contains 2 select-options to select carrid and connid. There is also a button 'Submit'. The second page contains a ALV grid output based on the selection screen criteria.
    Second page is opened on the clicking the 'Submit' button in first page.
    How to design a ABAP webdynpro component for this scenario?
    How to pass select-option values to the next page?
    What nodes/attributes should I have to create in component controller?
    Please provide me the step by step info.
    I have seen the weblog by Rich Heilman at /people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application
    But it has only one page. So I am not able to recreate my scenario based on this.
    Thanks
    Gopal

  • Select-options in WEB UI View on SAP CRM7

    Hello,
    I wanted to know how to make a u2018select-optionu2019  on a view in Web UI on CRM7.
    Is there a standard BSP application that I can use in component usage for this?
    I need to have show only one value but for one field I may have several values filled like a multivalues in select-options as in Transaction SE16.
    I can't use an advanced search page because for some criteria I can have more 100 different values.
    Tank you for your response.

    Thank you Kiran for your response, but you misunderstand my question.
    In my process I can't use a ADVANCED SEARCH PAGE for these reason :
    - the display of fields depends on a value selected from a dropdown list on a first view
    - Some fields can contain multiple values ​​(value list) not a range value like Between, but i can't show all theses values in a view like in an ADVANCED SEARCH PAGE
    I need to know if exist a standard BSP application that can used in USAGE COMPONENT for my specific BSP application like a Popup to put several values and associate this value list to a field of my specific view.
    Regards.
    David Méloux

  • SELECT-OPTIONS in a "Get_Persistent_by_QUERY".

    Hi Experts,
    I am using a SELECT-OPTIONS in the method: "Get Persistent by Query". But I have an error. This is my code below.
    SELECT-OPTIONS so_date     FOR    sy-datum                      .
    DATA lo_query_manager TYPE REF TO if_os_query_manager           .
    DATA lo_query         TYPE REF TO if_os_query                   .
    DATA lo_agent         TYPE REF TO zca_persistence_zint_rsbankinv.
    DATA lo_base          TYPE REF TO zcb_persistence_zint_rsbankinv.
    DATA lo_rsbankinv     TYPE REF TO zcl_persistence_zint_rsbankinv.
    DATA lo_table         TYPE        osreftab                      .
    DATA ls_table         TYPE REF TO zcl_persistence_zint_rsbankinv.
    DATA ls_tmp           TYPE REF TO object                        .
    DATA lv_string        TYPE        string                        .
    DATA lo_exception     TYPE REF TO cx_root                       .
    TRY .
       lo_agent    = zca_persistence_zint_rsbankinv=>agent.
    * Create Query
       lo_query_manager = cl_os_system=>get_query_manager( ).
       lo_query         = lo_query_manager->create_query( i_filter     = 'ZEXDAT IN PAR1' ).
       lo_table         =
       lo_agent->if_os_ca_persistency~get_persistent_by_query(
       i_query = lo_query
       i_par1  =  so_date
       LOOP AT lo_table INTO ls_tmp.
         ls_table ?= ls_tmp        .
         lv_string = ls_table->zget_all_fields( ).
         WRITE lv_string.
       ENDLOOP.
    CATCH cx_root INTO lo_exception.
       lv_string = lo_exception->get_text( ).
       WRITE lv_string.
    ENDTRY.
    Error message :
    Syntax error when parsing a query : Excepected symbol 'IN' (row: O, column: 7)
    Have you got any idea regarding this error. And how could I code a SELECT-OPTION in a Get Persistence by Query ?.
    Also, I have found something interesting. I have used the MF: "RDS_RANGE_TO_WHERE" to build a WHERE SQL condition from a SELECT-OPTION but I don't know if it is usable for my need:
    WHERE Statement: 'ZEXDAT BETWEEN '20110203' AND '20150203' AND NOT ZEXDAT IN ('20140219','20140306','20140321')'
    Many thank for your help !
    Rachid.

    Hi Custodio,
    thank you for reply. I have a last question.
    Is it possible to build a Query with the SELECT OPTION through attribut I_PARAMETERS_TAB ?
    I guess attr. I_PARAMETERS_TAB is used when you need to use more than 3 criteria of selection (PAR1,PAR2,PAR3) .
    My SELECT OPTION is like that :
    Have you got any idea for using I_PARAMETERS_TAB ?
    ...if_os_ca_persistency~get_persistent_by_query( i_query = lv_query
                                                                                    i_parameter_tab = ?????
    *                                                                               i_par1 =
    *                                                                               i_par2 =
    *                                                                               i_par3 =
    Unfortunately, I have no examples in SCN.
    Best regards.
    Rachid.

  • Total funcnality of select options in function module

    Dear ABAPers
    i am using structure and  ranges  to meet the functionality of select-options in function module3
    but unlike reports if i leave it blank rather than selecting all the data it comes blank.
    how can i do that
    coz my select query uses 8 selection criteria and user may enter one two or three as per his need.
    in that case the output comes out to be blank.
    how this can be resolved
    Thanks and Regards
    Luthra, Deep.

    You have to maintain conditions for all your possibilities.
    Something like this.
      IF ( post_dt_from IS INITIAL AND post_dt_to IS INITIAL AND
       doc_dt_from IS INITIAL AND doc_dt_to IS INITIAL ) OR
         ( post_dt_from IS INITIAL AND post_dt_to IS NOT INITIAL AND
       doc_dt_from IS NOT INITIAL AND doc_dt_to IS NOT INITIAL ) OR
         ( post_dt_from IS NOT INITIAL AND post_dt_to IS INITIAL AND
       doc_dt_from IS NOT INITIAL AND doc_dt_to IS NOT INITIAL ) OR
         ( post_dt_from IS NOT INITIAL AND post_dt_to IS NOT INITIAL AND
       doc_dt_from IS INITIAL AND doc_dt_to IS NOT INITIAL ) OR
         ( post_dt_from IS NOT INITIAL AND post_dt_to IS NOT INITIAL AND
       doc_dt_from IS NOT INITIAL AND doc_dt_to IS INITIAL ) OR
       ( post_dt_from IS NOT INITIAL AND post_dt_to IS INITIAL AND
       doc_dt_from IS INITIAL AND doc_dt_to IS INITIAL ) OR
         ( post_dt_from IS INITIAL AND post_dt_to IS NOT INITIAL AND
       doc_dt_from IS INITIAL AND doc_dt_to IS INITIAL ) OR
         ( post_dt_from IS INITIAL AND post_dt_to IS INITIAL AND
       doc_dt_from IS NOT INITIAL AND doc_dt_to IS INITIAL ) OR
         ( post_dt_from IS INITIAL AND post_dt_to IS INITIAL AND
       doc_dt_from IS INITIAL AND doc_dt_to IS NOT INITIAL ) OR
        ( ( post_dt_from IS NOT INITIAL AND post_dt_to IS NOT INITIAL ) AND
         ( doc_dt_from IS NOT INITIAL AND doc_dt_to IS NOT INITIAL ) ).

Maybe you are looking for

  • How do I save "form letters" in Mail?

    I would like to keep a number of form letters in mail that I can click open, slap an address on, and click send.  Right now I can save an e-mail in my draft mailbox, but this only words the first time.  Once I click send, it's gone.  And I have to re

  • Dynamic interface determination based on file content

    Dear all, I am trying for a while to solve my issue, but wasn't able to find the answer. Maybe you could point me in the right direction whether using standard or BPM... I've got one file with multiple entries. Dependend on a field value, I would lik

  • Need a dynamic Heading in a text box.

    We have one column for each month of the year and the CurMth sub var is set to July. We have the full YTD total (all the way until Dee) at the end. Jan - Jul columns are Actual . Aug-Dec are Forecast. We want the report to reflect the column name as

  • Flash 8 vs flash cs3

    Hi I would just like to know if you think flash 8 is better than flash cs3 and does flash cs3 contain ALL the features of flash 8? and which is easier to use!?! Thanks nows in advance and in the future!

  • ATT anyone running Fedora Core 4

    Can anyone running Fedora Core 4 please compile and run the following code several times and post the output here. import java.math.BigInteger; import java.security.SecureRandom; class RndTest {     public static void main(String[] args) {         Se