Result in SELECT-OPTIONS not valid

Hi, I wrote the next statment about SELECT-OPTIONS..but for example if the selection criterio S_HKONT is initial..this is don´t have a value...all the result are true when I compare..
I wrote:
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:   S_BUDAT        FOR  EKBE-BUDAT OBLIGATORY,    "Posting Date in the Document
                  S_HKONT        FOR  BSEG-HKONT.
SELECTION-SCREEN END OF BLOCK 1.
When I wrote:
  SELECT BUKRS BELNR GJAHR KOART SHKZG BUZEI DMBTR
    WRBTR PSWBT PSWSL SAKNR HKONT LIFNR WERKS MENGE EBELN EBELP
    INTO CORRESPONDING FIELDS OF FILTER_BSEG
    FROM BSEG
    WHERE BELNR = A1
      AND GJAHR = A2.
      AND HKONT IN S_HKONT.
      APPEND FILTER_BSEG.
  ENDSELECT
The result are many rows behind S_HKONT don´t have results..this mean..is initial..
Or If I compare:  
      IF FILTER_BSEG-HKONT IN S_HKONT.
           Sentence...
      ENDIF.
all the sentence that be in inside of IF are made..
Only when S_HKONT has a value... the condition is evaluated ok.
I hope that someone can help me.
Thank you

Hi Alicia...I see that you finally understand about reward points...coz you assign me some points -:) Thanx -:)
Yes...I speak spanish, it's my mother language...But you know...We can't speak spanish here... -;)
Of course you can write me to my personnal e-mail...But i actually prefer to answer in the forums, coz here at work, i just can access my mail -:(
This is the link to my business card, you can check my e-mail in there -:)
<a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=nkxegtflwze%3d">blag's Business Card</a>
If i undestand what you're saying...You actually need to delete HKONT initial records only if the SELECTION-SCREEN is initial, right??? If so...You need to use the DELETE code. Or maybe you only need to get record if the SELECT-OPTION is not initial...
So...AFAIK you can do this...
IF NOT MY_FILTER[] IS INITIAL.
SELECT *
INTO MY_TABLE
FROM SOME_TABLE
WHERE SOME_FIELD IN MY_FILTER.
ENDIF.
Now, you only select record if MY_FILTER got some value on it.
Hope this helps you -:)
Greetings,
Blag.

Similar Messages

  • CHECK SELECT-OPTIONS not allowed in ECC6.0

    HI,
    Obsolete Statement 4.7 version and Ecc 6.0 Version,
    CHECK SELECT-OPTIONS not allowed
    The construct SELECT-OPTIONS in the statement CHECK is not allowed in ABAP Objects.
    Error message in ABAP Objects if the following syntax is used:
    CHECK SELECT-OPTIONS.
    Correct syntax:
    CHECK f IN seltab.
    Reason:
    This form of the statement CHECK is intended only for use during the event GET during execution of type-1-programs with logical databases. The statement checks whether the content of the work area, which was filled by the logical database for the current GET event, meets the conditions in all the selection tables that are connected with the database table read. The name of the database table is taken statically from the next higher GET statement in the ABAP program. Thus the statement does not make sense outside of an GET event block. However, the previous event concept of the ABAP runtime environment, that is, the previous way of processing logical databases, is not supported by ABAP Objects.
    I want the simple example program for Correct syntax .Can any one send me with example program and pinpoint information of the statement.
    Regards,
    venkat
    Moderator message: please search for available information.
    Edited by: Thomas Zloch on Jan 8, 2011 10:32 AM

    Hey i have the same issue with this FM
    Did u find any solution to this..?
    plz help me ... urgent..!!

  • I have the latest version of photoshop cc . Why is the focus select option not available ? (for selecting the in focus area)a)

    I have the latest version of photoshop cc. Why is the focus selection option not available ?

    Use CC 2014 menu Help>System Info... use its copy option and paste the info here.  So we know your running CC 2014 not CC and that you have an enabled GPU....and latest device drivers.

  • Event should trigger when enter is pressed on select option for validation

    Hi,
    I want to trigger a event when enter is pressed on a select option field for validation.
    I have created a select option through coding. I am not able to find out any method or class for that.
    please advice.

    Hi Sachin ,
         If you want ot use the methods in the class CL_WDR_SELECT_OPTIONS.
    You can find here:-
    [WDR_SELECT_IPTIONS|https://cw.sdn.sap.com/cw/docs/DOC-20864.pdf]
    Check these if can find ur required one.
    If you are using any ui element then you can use ON_ENTER event as a action as stated by Baskaran.
    Check also if these threads can help you:-
    [WebDynpro ABAP select options method SET_VALUE_OF_PARAMETER_FIELD;
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60474842-91ca-2b10-3390-d2fd30f335fd]
    Thanks & Regards,
    Monishankar Chatterjee

  • Text element assigned to select options not showing

    Hi guys,
    We have a problem in shaowing the text assigned to the select-options...
    When we run the program the text element ssigned to the select options is not showing instead the element name is shown.
    The original language is german, and it wont show the english word we appended to as text element for select-options.
    example:
    AUART insteat od blocked order
    How can we show the text elemen when we run the program?
    Thanks!

    Hi Mark,
    Go to the program text elements and select the Selection Texts tab,
    There you fill find the select option for AUART and the corresponding text maintained.
    You need to maintain translations for this text entered.
    Chose Goto (in menu bar) -> Translation
    Then maintain translation in English.
    Regards,
    Aditya

  • SQD3 select options not fetching all the data?

    Hi abapers,
    standard SDQ3 tcode is not fetching all the data?
    In this standard t.code how to find that for different Select-options, different data retrieval queries have been written?
    where to find the select options conditions are written?
    thans in advance

    This could be an issue as ROWTERMINATOR and FIELDTERMINATOR are not well placed.
    Use FORMAT FILE while using BULK INSERT.

  • 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

  • Reg : Multiple Select Option with validation.

    Hi Abap Guru's,
            In my report iam giving the Input using the select option : Movement type in which i need to take only few mov.types like 101,105,321,344 in my report .Pls help me how to do ASAP..?

    Hi ,
    refer the below code.
    First it defaults the required values to selection screen ( at initialization event ).
    and then if user enters any other value then this value will be ignored.
    *& Report  ZRTESTTEST
    REPORT  ZRTESTTEST.
    data: mtype(3) type c.
    select-options: s_mtype for mtype.
    Types: begin of ty_range,
                 sign type bapisign,
                Option type bapioption,
                low(3) type c,
                high(3) type c,
         End of ty_range.
    Data: i_range type standard table of ty_range,
               wa_range type ty_range.
    initialization. " initialization.
    s_mtype-sign ='I'.
    s_mtype-option = 'EQ'.
    s_mtype-low    = '101'.
    append s_mtype.
    clear s_mtype.
    s_mtype-sign ='I'.
    s_mtype-option = 'EQ'.
    s_mtype-low    = '105'.
    append s_mtype.
    clear s_mtype.
    s_mtype-sign ='I'.
    s_mtype-option = 'EQ'.
    s_mtype-low    = '321'.
    append s_mtype.
    clear s_mtype.
    s_mtype-sign ='I'.
    s_mtype-option = 'EQ'.
    s_mtype-low    = '344'.
    append s_mtype.
    Clear wa_range.
    Wa_range-sign = 'I'.
    wa_range-option = 'EQ'.
    wa_range-low = '101'.
    Append wa_range to i_range.
    start-of-selection.
    Clear wa_range.
    Wa_range-sign = 'I'.
    Wa_range-option = 'EQ'.
    Wa_range-low = '105'.
    Append wa_range to i_range.
    Clear wa_range.
    Wa_range-sign = 'I'.
    Wa_range-option = 'EQ'.
    Wa_range-low = '321'.
    Append wa_range to i_range.
    Clear wa_range.
    Wa_range-sign = 'I'.
    Wa_range-option = 'EQ'.
    Wa_range-low = '344'.
    Append wa_range to i_range.
    delete s_mtype[] where low not in i_range[].
    If  s_mtype[] is initial.
    break-point.
    *“ raise the error here.
    Endif.
    Hope this helps you.
    Kind Regards,
    Ravi Sankar.Z

  • Set Parameter id is not working in case of select-options

    Hi,
    i am using the below code to get the SWIA first field fill with some data which i am getting by logic written..but its not getting filled since in tcode the first input box is select-options not a parameter..if it would have been a parameter than my logic would have worked finest. so kindly suggest what to do now in case of select-options.
    form user_command  using p_ucomm    type sy-ucomm
                             p_selfield type slis_selfield.
      data : wi type sww_wiid .
      clear : wi .
      read table it_final into wa_final index p_selfield-tabindex.
      if sy-subrc = 0.
        check ( wa_final-wi_id is not initial ).
        wi = wa_final-wi_id .
        case p_ucomm.
          when '&IC1'.
            set parameter id 'WID' field wi.
            call transaction 'SWIA'and skip first screen.
        endcase.
      endif.
    endform.
    Regards,
    HiM

    ThanQ..i got you totally..thanks to remind
    Regards,
    HiM

  • How to set the parameter selection *optional* for each subreport?

    Hi,
    I am using Crystal Reprots 11.
    I create 10 subreports, and each subreport contains a Parameters Field.
    The 10 subreports are put in 10 footer sections in increasing order, i.e. subreport1, subreport2, subreport3, ..., subreport10.
    When I use "Print Preview" to take a look at the whole report, CR prompts a "Edit Values" window for selecting parameter values for all 10 subreports.
    For example, if I only select parameter values for subreport1 and click "OK", 9 error messages on the "Edit Values" window come out above the selection list box of every other subreports (i.e. subreport2 ~ subreport10) showing that: 'The value is not valid'.
    Sometimes, I just want to review some specific subreports but not all.
    How should I do to set the parameter selection optional (not mandatory) for each subreport?
    Thank you in adavance.
    Edited by: Holdup on Feb 17, 2012 3:44 PM

    Hi,
    Here's how you can make the prompts optional (Assuming you're using CR 2008 or higher):
    1) Go into each subreport
    2) You should see the parameter in the Field Explorer. Right-click the name and select Edit > Look for an option called 'Optional Prompt'. Set it to true
    3) If you have a record selection in the subreport, then you need to modify the selection formula to something like this:
    if not(hasvalue({?Parameter_Name})) then True else = {?Parameter_Name}
    Hope this helps!
    -Abhilash

  • WD: Select Options shows empty ranges

    Hi there,
    Im using select options in my wd application... I defined a few fields (numeric, dats and so on).  I was expecting that the select options in wd works like the normal ones in normal abap report.
    But when I try to read the results from select options , the result range table has no sign or option value (low value ok) ... when I reach the result to a Select statement a shortdump happen with the notice there is no sign or option value in the IN parameter of the Selection statement.
    Does any one know if this is standard behavior of WD select options ?

    Hi ,
    try to understand following code .
    METHOD wddoinit .
      DATA:
           lr_componentcontroller TYPE REF TO ig_componentcontroller,
           l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      DATA:
          lt_range_table       TYPE REF TO data,
          lt_types             TYPE string_table,
          rt_range_table       TYPE REF TO data,
          text                 TYPE string,
          typename             TYPE string.
      DATA: vbeln TYPE lips-vbeln,
            erdat TYPE lips-erdat,
            auart TYPE vbak-auart,
            trnsp TYPE vtadd01t-add_info,
            kunnr TYPE likp-kunnr.
      DATA:
        num_events TYPE i.
      DATA: uname TYPE sy-uname.
      uname = sy-uname.
      wd_context->set_attribute(  name = 'CUSTOMER'
      value = uname  ).
    *  wd_context->GET_ATTRIBUTE( Name = 'TRANSPORTER_CODE'
    *  Value = uname ).
    * create the used component
      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.
    * get a pointer to the interface controller of the select options component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    * init the select screen
      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 = 'VBELN_VL' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document'
        i_id                         = 'VBELN'
        i_obligatory                 = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'LIPS'
        i_value_help_structure_field = 'VBELN' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ERDAT' ).
      wd_this->m_handler->add_selection_field( i_id = 'ERDAT'  i_obligatory = 'X' it_result = lt_range_table ).
    *lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VTTK_ADD01' ).
    *wd_this->m_handler->add_selection_field( i_id = 'VTTK_ADD01' I_DESCRIPTION  = 'CHAHA' it_result = lt_range_table ).
    *    wd_this->m_handler->add_selection_field(
    *      i_description                = 'Transporters Code'
    *      i_id                         = 'VTTK_ADD01'
    *      it_result                    = lt_range_table
    *      i_value_help_structure       = 'VTADD01T'
    *      i_value_help_structure_field = 'ADD_INFO' ).
    *Supress Global options in Used Component
      wd_this->m_handler->set_global_options(
          i_display_btn_cancel  = ''
          i_display_btn_check   = ''
          i_display_btn_execute = ''
          i_display_btn_reset   = '' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBAK-AUART' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document Type'
        i_id                         = 'AUART'
         i_obligatory                = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'VBAK'
        i_value_help_structure_field = 'AUART' ).
    ENDMETHOD.
    METHOD onactionexecute .
      DATA: node_saledoc TYPE REF TO if_wd_context_node.
      DATA: node_crdate TYPE REF TO if_wd_context_node.
      DATA: node_transcode TYPE REF TO if_wd_context_node.
      DATA: node_doctype TYPE REF TO if_wd_context_node.
      DATA: node1 TYPE REF TO if_wd_context_node.
      DATA: node2 TYPE REF TO if_wd_context_node.
      DATA: rt_saledoc TYPE REF TO data.
      DATA: rt_crdate TYPE REF TO data.
      DATA: rt_transcode TYPE REF TO data.
      DATA: rt_doctype TYPE REF TO data.
      FIELD-SYMBOLS: <fs_saledoc> TYPE table,
                      <fs_crdate> TYPE table,
                      <fs_transcode> TYPE table,
                      <fs_doctype> TYPE table.
    * Retrieve the data from the select option
      rt_saledoc = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'VBELN' ).
    * Assign it to a field symbol
      ASSIGN rt_saledoc->* TO <fs_saledoc>.
    * Retrieve the data from the select option
      rt_crdate = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'ERDAT' ).
    * Assign it to a field symbol
      ASSIGN rt_crdate->* TO <fs_crdate>.
    * Retrieve the data from the select option
      rt_doctype = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'AUART' ).
    * Assign it to a field symbol
      ASSIGN rt_doctype->* TO <fs_doctype>.
    * Retrieve the data from the select option
    *rt_transcode = wd_this->m_handler->get_range_table_of_sel_field(
    *i_id = 'VTTK_ADD01' ).
    ** Assign it to a field symbol
    *assign rt_transcode->* to <fs_transcode>.
      node_saledoc = wd_context->get_child_node( name = 'S_VBELN' ).
      node_saledoc->bind_table( <fs_saledoc> ).
      node_crdate = wd_context->get_child_node( name = 'S_ERDAT' ).
      node_crdate->bind_table(  <fs_crdate> ).
      node_doctype = wd_context->get_child_node( name = 'S_AUART' ).
      node_doctype->bind_table( <fs_doctype> ).
      IF <fs_doctype> IS NOT INITIAL
        AND <fs_crdate> IS NOT INITIAL
        AND <fs_saledoc> IS NOT INITIAL
        wd_comp_controller->execute_zotddelvnote_vend_tari( ).
      ENDIF.
    ENDMETHOD.
    Regards,
    Amit solanki
    Edited by: Amit Solanki on Aug 19, 2009 11:30 AM
    Edited by: Amit Solanki on Aug 19, 2009 11:32 AM

  • How to pass values to select options of custom transactions?

    I have to call custom transaction-ZMM_POST  from my custom report.
    I have to pass values to select options(Not to parameters) of ZMM_POST  from my report only.
    Please tell me how to pass values to select options of custom transactions?

    Have you tried this?
    DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
    T_RSPARAMS-SELNAME = "S_BUKRS".
    T_RSPARAMS-KIND = "S".
    T_RSPARAMS-SIGN = "I".
    T_RSPARAMS-OPTION = "BT".
    T_RSPARAMS-LOW = "100".
    T_RSPARAMS-HIGH = "300"
    APPEND T_RSPARAMS.
    SUBMIT Z_DUMMY WITH SELECTION-TABLE  T_RSPARAMS.
    Greetings,
    Blag.

  • 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

  • Multiple select options validation at selection screen

    Hi,
    I have the requirement to create a selection screen with 3 select options. Two of them are cross-dependent. It is mandatory to fill one of them and it is not allowed to fill both. The third one is optional. I tried the validation at selection-screen on block... and I have a problem that search help buttons for select options react like execution buttons, when I press any of them I am getting one of errors instead of search help.
    Any help on this issue would be appreciated.
    Here is my code:
    DATA:
          so_rbkp TYPE rbkp,
          so_mseg TYPE mseg.
    SELECTION-SCREEN BEGIN OF BLOCK blok WITH FRAME.
      SELECT-OPTIONS:
            s_fakt   FOR so_rbkp-belnr,
            s_matdok FOR so_mseg-mblnr,
            s_god FOR so_mseg-gjahr.
    SELECTION-SCREEN END OF BLOCK blok.
    INITIALIZATION.
    SET TITLEBAR '0100'.
    START-OF-SELECTION.
      AT SELECTION-SCREEN on block blok.
          if s_fakt <> space and s_matdok <> space.
            MESSAGE 'Message1' TYPE 'E'.
          elseif s_fakt = space and s_matdok = space.
            MESSAGE 'Message2' TYPE 'E'.
          endif.
        ENDIF.

    Only perform the check when user wants to execute or submit the program, not when pressing F4 or even Enter, but in a selection-screen event, before START-OF-SELECTION which were program would terminate in error :
    TABLES: SSCRFIELDS.
    AT SELECTION-SCREEN OB BLOCK b01.
        IF sscrfields-ucomm EQ 'ONLI'
        OR sscrfields-ucomm EQ 'PRIN'
        OR sscrfields-ucomm EQ 'SJOB'.
          IF s_fakt[] IS NOT INITIAL AND s_matdok IS NOT INITIAL.
            MESSAGE 'Message1' TYPE 'E'.
          ELSEIF s_fakt[] IS INITIAL and s_matdok[] IS INITIAL.
            MESSAGE 'Message2' TYPE 'E'.
          ENDIF.
        ENDIF.
    (You could also always send the message, but using type 'E' for those function code and 'S' status for any other value.)
    Regards,
    Raymond

  • Validation of select-options in WEb DynPro ABAP

    Can anyone please help me on validating select-options. I want to have a functionality like what we use in normal text field while validating the field. We generally use the REPORT_ATTRIBUTE_ERROR_MESSAGE funciton.
    How can we achieve the same thing with select-options, cuz the select-options are not bound with any attribute.
    Edited by: Tirth Pandya on May 7, 2009 2:02 AM

    Hi,
    Refer to this link..Re: validate select option fields

Maybe you are looking for

  • How can i stop itunes from downloading a podcast?

    on my itunes I have a subscription to a series of podcasts (screencastsonline)  I therefore have a folder for the 2011 episodes....  that FOLDER has a GET button to the right... I have not at least I dont think I did press that GET button...  when I

  • "Page cannot be displayed" when opening DatabaseControl in Oracle 11g

    Hi, This is a new installation of Oracle 11.2.0.3 on Win 2003 32bit. The install was successful (at least no errors) but I am having a problem with Enterprise Manager. When I go to the web page (https://servername:1158/em) then I receive the error "P

  • Best use of import settings and DSLR video workflow

    I now use a Canon 7D for most of my video, which does 1080p. I used to move my video clips into iMovie, thinking I could use it as a master repository like Aperture. Alas, it iMovie 09 crashed repeatedly and I have lost many of those clips when I mar

  • Upgrade Simple Viewer

    The "Simple Viewer" website indicates that the viewer will now work with iPhones and other non-Flash enable applications. Yet, when I build a gallery in Bridge using Simple Viewer it does not work without Flash. Is this an upgrade issue? And, does an

  • Inbound Delivery Notification(IDN)-Activation

    Hi Folks, Hope every one is doing great. I am trying to receive material in a warehouse managed by EWM. The problem is I am not able to activate my IDN neither my PPF setting can do it automatically. When I tried to activate it, I get the following m