PUT OWN HELP IN SELECT-OPTIONS ( REPORTS)

HOW CAN I USE MY OWN QUERY HELP IN SELCT-OPTIONS F4 HELP

Hi,
Check this sample code and reward points if it helps.
tables kna1.
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
refresh t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
s_begru-low = t_return-fieldval.
endif.

Similar Messages

  • Help on select options.

    Hi gurus!!
    I have a report where in i am putting the values in select-options. but yj eproblem i have is when i am not putting any values i am getting the correct output.
    but with the same data i am putting the values in low or high i am not getting any data..
    so i think i need to put all the entrioes of the select option in an internal table or ranges i dont know and then we give some code like
    ranges : ra_stotal for ztsd120-zlow.
    ra_stotal-sign = 'I'.
    ra_stotal-option = 'BT'.
    ra_stotal-low = zlow-low.
    ra_stotal-high = zlow-high.
    append ra_stotal.
    clear ra_stotal.
    Can anyone tell me if this is what i got to do if so how?
    or is there some other way out?

    Hi Mona,
    Please check the below code in BOLD letter....
    I guess you are having a problem in SELECT-OPTIONS because ...might be u r using EQ in where condition of your select query. Whenever u r using SELECT-OPTIONS, it should be "IN" in the where condition.
    Eg:-  SELECT  <field names>
               FROM MARA
               INTO TABLE  <it_tablename>
              WHERE matnr IN  s_matnr.
    Reward points for helpful answers.
    Regards,
    HK.

  • How to created Freely Programmed F4 help in Select Options

    hi,all
       I have a probelm about how to created a Freely Programmed F4 help in Select Options,and put help value into select options field
      Thanks and Best Regards

    Hi Haung,
    You need to use FREE_HELP not the component name.
    Modify you code as below:
       LT_RANGE_TABLE_V = wd_this->m_handler_V->create_range_table( 'ZCYPHDATE' ).
      wd_this->M_HANDLER_V->add_selection_field(
          i_id                         = 'ZCYPHDATE'
          it_result                    = LT_RANGE_TABLE_V
          i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_APPLDEV
          i_value_help_id              = 'FREE_HELP'
          i_no_intervals               = abap_false ).
    Hope this helps you.
    Regards,
    Rama

  • Applying stadard search help to SELECT-OPTIONS

    applying stadard search help to SELECT-OPTIONS
    i have the below code in the selection screen:
    SELECT-OPTIONS : so_stain FOR gv_stai1
                                  MATCHCODE OBJECT ZSTA,
                     so_staex FOR gv_stai1
                                  MATCHCODE OBJECT ZSTA.
    where ZSTA is the search help defined in the data dictionary which is the copy on standard SAP search help..
    but this is not working..:(  when i run the program and click on the
    F4 help for these two fields i get no out put..
    can any one suggest me to search help to select-options..

    Hi,
    u can see this example code for f4 help on the select-option,
    DATA: li_ret_tab TYPE STANDARD TABLE OF ddshretval,
            lws_retfield TYPE dfies-fieldname.
      DATA : wa_ret_tab LIKE LINE OF li_ret_tab.
    **- Get the device numbers
      SELECT serge FROM equi
             INTO TABLE i_help1
             WHERE sparte EQ c_51.
      IF sy-subrc EQ 0.
        lws_retfield = text-030.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = s_device
            dynpprog        = sy-repid
            dynpnr          = c_dynpnr
            dynprofield     = s_device
            value_org       = 'S'
          TABLES
            value_tab       = i_help1
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    Regards,
    kk.

  • F4 help in select option

    Hi All,
    We have created a select option for a field of our database table. This field has a value range in its domain. For Example
    Fix Val    Short Description
    01           INR
    02           US
    03           EUR
    When i press the f4 help of select option, am able to see both the number and the description in the F4 help. But when i select a value, it is only displaying the fixed value (01) in the select option field.
    But i want the Short Description to be displayed instead of the fixed value.
    Please tell me how to proceed.
    Thanks in advance.

    Hi,
    When there are any values in the domain range it considers only the fixed values (keys)
    to get the description what you can do is:
    1.create a your own f4 help with  the  field description.
    2.in the  select options you can give the name of F4 help when you are populating the selection field.
    wd_this->m_handle->add_selection_field(
                            i_description = 'Candidate Profit Center'
                            i_id = '/MRSS/T_RMOR_PROF_CENTER'
                             *i_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp*
                            *i_value_help_id = '/MRSS/SH_RM_PC_GROUP'*    
                               it_result = lt_range_table
                            i_read_only = read_only ).
    Priya

  • Problem on Search Help  for select-option

    Hi,
    Iam working on a search help for select-option,
    is there a way to incorporate select-all or multiple
    selection on this?
    Thanks!

    Hi catherine,
    1. Just copy paste this program.
      (It will POPULATE the SELECT-OPTION,
       based upon
       MULTIPLE Selection,
       selected by the user,
       in the  help provided thru F4IF_INT_TABLE_VALUE_REQUEST.)
    2. Eg. is for BUKRS (company code)
    3.
    REPORT ABC.
    TABLES : T001.
    DATA : ITAB LIKE TABLE OF T001 WITH HEADER LINE.
    DATA : RETURN LIKE TABLE OF DDSHRETVAL WITH HEADER LINE.
    SELECT-OPTIONS : BUKRS FOR T001-BUKRS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-LOW.
    PERFORM MYPOPULATE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-HIGH.
    PERFORM MYPOPULATE.
    FORM MYPOPULATE.
      REFRESH ITAB.
      SELECT * FROM T001 INTO TABLE ITAB.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BUKRS'
          dynprofield     = 'BUKRS'
          dynpprog        = sy-REPID
          dynpnr          = sy-dynnr
          multiple_choice = 'X'
          value_org       = 'S'
        TABLES
          value_tab       = ITAB
          return_tab      = return.
    IF RETURN[] IS NOT INITIAL.
    REFRESH BUKRS.
    CLEAR BUKRS.
      LOOP AT RETURN.
        BUKRS-SIGN = 'I'.
        BUKRS-OPTION = 'EQ'.
        BUKRS-LOW = RETURN-FIELDVAL.
        BUKRS-HIGH = RETURN-FIELDVAL.
        APPEND BUKRS.
      ENDLOOP.
    ENDIF.
    ENDFORM.
    regards,
    amit m.

  • Can i assign a collective srch help for select option in list display

    can i assign a collective srch help for select option in list display

    Hi,
    Yes ,u can assign a collective search help for select-option in list display.
    Eg:
    Define your select option like this
    SELECT-OPTIONS: s_vbeln FOR likp-vbeln MATCHCODE OBJECT vmva.
    Regards,
    Shiva.

  • How to get calender in f4 help for select options in module pool (URGENT)

    Hi All,
    how to get calender in f4 help for select options in module pool
    Please help .
    Thanx in advance,
    amruta

    Hi Amruta,
    First of all, you can not create select-options directly in module pool.
    For creating <b>select-option is dialog prog</b> follow these steps:
    1. create your selection screen model as subscreen by:
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
    PARAMETRS: P_MATNR LIKE MARA-MATNR.
    SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
    SELECTION-SCREEN END OF SCREEN 2000.
    2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
    3. write this bit of code in PBO and PAI of the screen 100;
    CALL SUBSCREEN SUBSCREEN_2000.
    4. include this code in PBO:
    INCLUDING SY-REPID '2000'
    6. write user_command of PAI, call screen which is going to executable after selection-screen.
    5. create a transcation for this dialog module pool with screen 100.
    6. execute this transaction and you can see it's behaving like cool with select-options.
    After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
    Hope it will solve the problem.
    Regards
    Krishnendu

  • F4 help for select options based on parameter value

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

  • Freely Programed Help for select-option field

    Hi,
    how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    Please suggest where i am doing wrong??
    Edited by: kranthi kumar on Dec 29, 2010 6:19 PM

    >
    kranthi kumar wrote:
    > Hi,
    >
    > how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    >
    > i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    >
    > i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    >
    > View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    >
    > Please suggest where i am doing wrong??
    >
    > Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
    Hi Kranthi,
    Please help me to understand your design.
    Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ?

  • Select Options, Report Painter

    How can I create "Select Options" for a variable in the "General Data Selection" of the report painter screen.
    Thank You.

    If you specify selection parameters for several years and periods in a
        Report Writer or Report Painter report, the characteristics year and
        period are taken into account independent of each other.
        A report with the selections:
               From-year   :    1997
               To-year     :    1999
               From-period :     003
               To-period   :     008
        will hence select all the following data:
                003/1997 .. 008/1997, 003/1998 .. 008/1998, 003/1999 .. 008/1999
         This is the standard behavior of Report Writer and Report Painter
         reports.
         However, reports which directly display the data for the period
                003/1997 .............................................  008/1999
         are required in some cases.
         You can achieve this in the report definition using the following
         procedure.
         Additional key words
         several years several periods GS274
         rolling periods, rolling
               SUPPORTGUIDE 20010330131459
         REPORTWRITER, SGRW_DOCU_CONS_NOTE,
         SGRW_OM SGRW_PS SGRW_PC SGRW_SL SGRW_PCA SGRW_EC SGRW_LIS
         Cause and prerequisites
         This is a standard behavior of the Report Writer.
         Solution
         A procedure is described below to implement the selection over a period
         of several years and periods. This is merely an example which should
         serve as a support for experienced users of the Report Painter and
         Report Writer when defining their own reports.
         1.  Definition of auxiliary column 1: 'All-periods'
             Period:   0  ...  17
             Year:      From-year .. To-year
             000/1997.....................................................017/1999
             Definition of auxiliary column 2: 'Periods before'
             Period:   0 ... From-period - 1
             Year:      From-year
             000/1997..002/1997
             Definition of auxiliary column 3: 'Periods after'
             Period:    To-period + 1 .. 17
             Year:      To-year
             009/1999..017/1999
             Definition of the formula column:
             Formula = 'All-periods' - 'Periods before' - 'Periods after'
             000/1997.....................................................017/199
             9
             000/1997..002/1997
             009/1999..017/1999
                                003/1997............... 008/1999
             Hide the three auxiliary columns. The formula column now correctly
             shows the required period
                                003/1997............... 008/1999
      Note:The new reporting table RWCOOM is also available as of Release 4.0
      for reports which were, up to now, defined in table CCSS. RWCOOM
      contains the characteristic FISCPER which represents a combination of
      year and period. You can directly define reports over several years and
      periods using characteristic FISCPER without having to follow the
      procedure described above.
      Please take into account that you cannot call reports via report
      Interfaces in the formula columns (see Note 98187).
      If you have any query, you may reach me
    Dr. Ravi Surya Subrahmanyam, PhD Finance,
    SAP FICO Consultant,
    Answerthink (India) Limited,
    Hyderabad. AP. India
    Phone : +91 9848550024
    Email : [email protected]

  • Value help for select options  (pass the selected values to the select opt)

    Hi everyone,
    I created a custom value help for my select options.
    It works fine, when the user clicks on the value help, my own view is displayed, and the user can select the required values:
    lt_range_table =
      wd_this->m_handler->create_range_table(
      i_typename = 'ORGEH' ).
    * add a new field to the selection
      wd_this->m_handler->add_selection_field(
      i_id = 'ORGEH'
      i_value_help_id = 'MYSO'
      i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
      it_result = lt_range_table
      i_read_only = read_only ).
    The problem is, how can I pass the values to the select option? When the user selects the values in my view, I have them in an internal table. But how can i pass these values to the select option?  I suppose there is declared method for this... but which one?
    Thanks
    N.

    Sorry for the stupid question, but it seems I can't acces my attribute:
    I create it in the component controller
    NODE: 'APP_DATA'
    Attribute: M_HANDLER TYPE IF_WD_SELECT_OPTIONS
    Cardinality 1..1
    Selection 1..1
    Singleton = 'X'
    I pass the values int he EDOINIT method of MAIN view:
    * Get compnent controller API
      lo_component = wd_comp_controller->wd_get_api( ).
      lo_controller ?= lo_component.
    * Get the controler context node
      CALL METHOD LO_CONTROLLER->GET_CONTEXT
        RECEIVING
          CONTEXT = lo_context.
    *Get the root node
      lo_node = lo_context->root_node.
    *Get the child node
      lo_child = lo_node->get_child_node( 'APP_DATA' ).
    ls_app_data-m_handler = wd_this->m_handler.
    lo_child->bind_structure( ls_app_data  ).
    After this code I test it if the binding is correct:
    DATA: ls_test TYPE wd_comp_controller->element_app_data.
    CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
      IMPORTING
        STATIC_ATTRIBUTES = ls_test.
    The lstest is correct_. It has the reference for the SelectOption
    Now, in the SEL_TREE View:
    * Get compnent controller API
      lo_component = wd_comp_controller->wd_get_api( ).
      lo_controller ?= lo_component.
    * Get the controler context node
      CALL METHOD LO_CONTROLLER->GET_CONTEXT
        RECEIVING
          CONTEXT = lo_context.
    *Get the root node
      lo_node = lo_context->root_node.
    *Get the child node
      lo_child = lo_node->get_child_node( 'APP_DATA' ).
    *Get the data from the node
      CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
        IMPORTING
          STATIC_ATTRIBUTES = ls_app_data.
      wd_this->m_handler = ls_app_data-m_handler.
    The ls_app_data-m_handler is INITIAL. There is no value in it.
    What did I do wrongly? 
    Please help
    Thanks
    N.

  • F4 help in select options

    Hi All,
          I have a select-options variable in my program for a field of a database table. I want to delete some of the values in the F4 help for this select options variable. Any pointers on how I can do this.
    Thanks & Regards,
    Rahul Rathi

    hi,
    chk a sample code.
    REPORT abc.
    TYPES: BEGIN OF ztable,
    numde(20),
    KUNNR LIKE KNA1-KUNNR.
    TYPES: END OF ztable.
    DATA: i_ztable TYPE ztable OCCURS 0 WITH HEADER LINE.
    DATA:r_table TYPE ztable OCCURS 0 WITH HEADER LINE.
    DATA: v_choice TYPE i.
    PARAMETERS: p_kunnr LIKE kna1-kunnr .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_kunnr.
    i_ztable-numde = 'JOHN05001'.
    i_ztable-kunnr = '1'.
    APPEND i_ztable.
    CLEAR i_ztable.
    i_ztable-numde = 'PETE05001'.
    i_ztable-kunnr = '2'.
    APPEND i_ztable.
    CLEAR i_ztable.
    i_ztable-numde = 'JOHN05002'.
    i_ztable-kunnr = '1'.
    APPEND i_ztable.
    CLEAR i_ztable.
    i_ztable-numde = 'PETE05002'.
    i_ztable-kunnr = '2'.
    APPEND i_ztable.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    * DDIC_STRUCTURE = ' '
    retfield = 'I_ZTABLE-KUNNR'
    * PVALKEY = ' '
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    dynprofield = 'P_KUNNR'
    * STEPL = 0
    * WINDOW_TITLE =
    * VALUE = '*'
    value_org = 'S'
    * MULTIPLE_CHOICE = ' '
    * DISPLAY = ' '
    * CALLBACK_PROGRAM = ' '
    * CALLBACK_FORM = ' '
    * MARK_TAB =
    * IMPORTING
    * USER_RESET =
    TABLES
    value_tab = i_ztable
    * FIELD_TAB =
    * return_tab =
    * DYNPFLD_MAPPING =
    * EXCEPTIONS
    * PARAMETER_ERROR = 1
    * NO_VALUES_FOUND = 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.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    CLEAR i_ztable.
    READ TABLE i_ztable INDEX v_choice.
    MOVE i_ztable-kunnr TO p_kunnr.
    ENDIF.
    rgds
    Anver

  • OVS Help in Select Options-Text to be Shown and Code to be captured

    Hello Experts,
    I am using Select options in web dynpro abap.
    On a particular View container i have added a selection field using ADD_SELECTION_FIELD which has an OVS help to it.
    The selection field is of type CODE.
    And on click of a button i am reading the select option fields using GET_RANGE_TABLE_OF_SEL_FIELD and assigining this to a
    field symbol which inturn is being set to an attribute.
    My requirement is to show the TEXT to the user and send the CODE to the method which is called
    when the button is clicked and a table is populated.
    Normally we can keep two attributes one for TEXT and the other for CODE but for Select options i am not very sure how this can be achieved.
    Because in select options we are reading the values present on the select option field and there may be multiple values.
    Please guide me through this.
    Thanks in Advance,
    Shravan

    Hello Shravan,
    This can be easily achieved if you convert the selection field to dropdown.
    Create a valueset containing the list of valid values and then pass this to the ADD_SELECTION_FIELD method
    "Creating valueset
    DATA lt_valueset TYPE wdy_key_value_table.
    DATA ls_valueset LIKE LINE OF lt_valueset.
      ls_valueset-key = 'EN'.
      ls_valueset-value = 'English'.
      APPEND ls_valueset TO lt_valueset.
    "Creating selection field as Dropdown
    lr_helper->add_selection_field( i_id = <ID>
                                                       it_result = lt_range
                                                       i_as_dropdown = abap_true
                                                      it_value_set = lt_valueset ).
    BR, Saravanan

  • Serach help in Select-option in WD ABAP

    Hi Folks,
    I am using WDR_SELECT_OPTIONS reusable component in my Component.  I want to attach customized search help particular fild while creating select-option using
    wd_this->m_handler->add_selection_field(
                 i_id        = 'IWERK'
                 it_result   = lt_range_table
                 i_read_only = read_only ).
    Can anyone explian how can I attach search help here.
    Regards,
    Vishal.

    Hi Vishal,
    If its a search help, use the following code:
    lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'S_PLANETYE' ).
    wd_this->m_handler->add_selection_field(
    i_id = 'S_PLANETYE'
    it_result = lt_range_table
    i_read_only = read_only
    I_VALUE_HELP_TYPE = 'SEARCHHELP'
    i_value_help_id = 'Z_SAPLANE' ).
    In this example, 'Z_SAPLANE' is the dictionary search help.
    This will solve your problem
    For further details, goto interface IF_WD_VALUE_HELP_HANDLER to get a list of values you can supply to parameter I_VALUE_HELP_TYPE.
    This is similar to what you do with a context, similar to the options you get in the dropdown for Input Help property.
    Regards,
    Chitrali

Maybe you are looking for

  • Pricing,conditions transport to another server

    Hi my client had a pricing procedure in which a condition type had delivery cost with accural.after using for some time they wanted delivery cost to be deleted & price to add in  material cost. i had made changes in Development client(100) & generate

  • Breaking up xml configurations?

    Hi, I'm wondering if there's an easy way to break up xml cache configurations into different (partial) xml files so that they can be easily included into other (master) xml files. That way one can easily reuse definitions without requiring to apply a

  • Command line in text module is not working

    Hi , I have the follwoing if condition inside the text module (smartform) but the if statement is not working. /:     IF  &T001-BUKRS& = '0201'.         please ignore /:     ENDIF. it is not checking for company code and printing the text. Please let

  • Preverify ERROR for in Eclipse while using SATSA-crypto.jar

    I have created simple application to encrypt the string using Cipher class like below: This code snippet I got from the forums.nokia; In this The string "THIS IS A SECRET MESSAGE" is encrypted and decrypted using the key "SECRET!!" . import java.secu

  • MacBook Pro- Weird Problem

    Well, whenever I press down on places near the trackpad, as I remove the pressure I hear sounds coming from the trackpad. I've never noticed it before, and I want to know what it is. Is there a way to fix it? If so, how? My MacBook Pro is a late-2011