Select options in madulupool

Hi Friends,
I need to add select-option in my modulepool screen.
the select option is for material Group.
how to add select options in madulepools?
thanks,
Sridhar

hi
good
if you want to use select-option directly in module pool then it is not possible.
but you can do other way.
create two varaiables
data : v_kun_low like kna1-kunnr,
v_kun_high like kna1-kunnr.
use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
use can enter only low value and high value.
when you come to program point of view
declare one range
ranges r_kunnr for kna1-kunnr.
do the coding like
r_kunnr-low = v_kun_low.
r_kunnr-high = v_kun_high.
r_kunnr-options = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
now you can use r_kunnr in select query ,it will work like select-option.
other than this there is no option.
thanks
mrutyun^

Similar Messages

  • Report help for multiple Date Select options

    Hi Friends,
    For a particular year wise report, the client wants 12 date select-options which are changeable and informal every year .The report will also be displayed as per the given date selection period wise. Please help me how to fetch the datas from the table as per the given selection period. Currently the report have one date select-option where the user gives selection range as 1.04 to 31.03. It's related to EB power consumption report and hence the new requirement on date selection which are informal and not a fixed date of every year.
    Ex:Selection-Screen
    Period 1 : 08.04.2008 to 12.05.2008
    Period 2: 12.05.2008 to 20.06.2008
    Period 3: 21.06.2008 to 28.07.2008
    Period 4: 29.07.2008 to 15.08.2008
    Period 5: 15.08.2008 to 21.09.2008
    Period 6 : 21.09.2008 to 14.10.2008
    The data will derive as per the above selection ranges.......
    Please advise with example.
    thanks & regards
    Sankar.

    >
    sankar babu wrote:
    > Ex:Selection-Screen
    > Period 1 : 08.04.2008 to 12.05.2008
    > Period 2: 12.05.2008 to 20.06.2008
    > Period 3: 21.06.2008 to 28.07.2008
    > Period 4: 29.07.2008 to 15.08.2008
    > Period 5: 15.08.2008 to 21.09.2008
    > Period 6 : 21.09.2008 to 14.10.2008
    Hi,
    In this case just derive all records matching dates between 08.04.2008 (low in first select-options) and 14.10.2008(high in last select-options.
    Also my advice is to use a single select-options and prompt the user to give the dates as ranges in the multiple entries dialog which can be opened by clicking the button on the right side of the select-options.
    Regards
    Karthik D

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • 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

  • How to hide some select-option of Logical Database in report?

    How to hide select-option of  Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET  PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
    Edited by: rongrong wang  on Mar 26, 2008 9:31 AM

    U need to write code in initialization as
    initialization.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW'.
    screen-active = '0'.
    modify screen.
    endif.
    if screen-name = 'PNPPERNR-HIGH'.
    screen-active = '0'.
    modify screen.
    endif.
    endloop.

  • Re : select-options in abap-objects program

    Dear friends,
                      I want to give select-options in abap-objects program. How to give that.
                                 Thanking You
    with regards,
    Mani

    In the transaction SE24, enter your class name, click modify.
    in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
    " P_SAKNR FOR SKAT-SAKNR".
    you've got to declare two types in the class:
    a- TYPES:  begin of E_S_SAKNR,
                          sign(1),
                          option(2),
                          low(10),
                          high(10),
                      end of E_S_SAKNR.
    b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
    so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
    method TEST importing ET_SAKNR type E_T_SAKNR.
    now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example..

  • Re : select-options in abap objects

    Dear friends,
    I want to give select-options in abap-objects program. How to give that.
    Thanking You
    with regards,
    Mani

    HI Mani,
    It's common mix ABAP Procedural with ABAP Objects in the same program.
    You should use the same way used in ABAP procedural program as Marco Cerdelli sad.
    But inside ABAP OBJECTS classes you can't use is these statement type.
    Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].
    Best Regards.
    Marcelo Ramos

  • Select-option in ABAP objects

    Hi Guys,
               I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very important

    check this code
    REPORT ZSELOPT_TO_CLASS .
    TABLES: VBRK.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
    DATA: IT_VBELN TYPE RSELOPTION.
    DATA: X_VBELN TYPE RSDSSELOPT.
    CLASS C1 DEFINITION.
    PUBLIC SECTION.
    DATA: IT_VBRP TYPE VBRP_TAB,
          X_VBRP LIKE LINE OF IT_VBRP.
    METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
    METHODS: DISP_DATA.
    ENDCLASS.
    CLASS C1 IMPLEMENTATION.
    METHOD GET_DATA.
      *SELECT * FROM VBRP*
       INTO TABLE IT_VBRP
       WHERE VBELN IN S_VBELN.
    ENDMETHOD.
    METHOD DISP_DATA.
      LOOP AT IT_VBRP INTO X_VBRP.
        WRITE:/ X_VBRP-VBELN,
                X_VBRP-POSNR.
      ENDLOOP.
    ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    DATA OBJ TYPE REF TO ZCL_SELOPT.
    CREATE OBJECT OBJ.
    LOOP AT S_VBELN.
      MOVE S_VBELN-LOW TO X_VBELN-LOW.
      MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
      MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
      MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
      APPEND X_VBELN TO IT_VBELN.
    ENDLOOP.
    CALL METHOD OBJ->GET_DATA
                        EXPORTING
                          S_VBELN = IT_VBELN.
    CALL METHOD OBJ->DISP_DATA.
    Edited by: moazam hai on May 17, 2008 6:17 AM
    Edited by: moazam hai on May 17, 2008 6:19 AM

  • Can we use select options in smartform

    can we use select options in smartform if so can any one send me a sample code...
    Thanks
    bhaskhar

    Hi ,
    Can u explain why u want to use select options in smartforms . U can try it in program lines .
    Its better to use select options in the driver program and fetch data accordingly in the driver program or passing the selected values from select options to the smatfrom and fdetching the data there in smartform .
    Regards

  • Checking against Select-Options with "CP" using "IF value IN select_option"

    Dear experts,
    first of all: I'm sorry, if this question already should have been asked and answered!
    I tried quite a lot of search terms but didn't find anything helpful.
    We are using a statement like "IF value IN select_option" to perform comparisons after the Select-Options have been used in a SELECT statement. This logical expression fails (compared to the results of the DB-SELECT) whenever a select-option line contains the option CP (Contains Pattern). To be more specific: The case sensitivity of the LOW value doesn't seem to play a role any more. A variable with the value 'ABCD' would be positively checked against a select-option with OPTION 'CP' and LOW 'abc*', whereas this value wouldn't have been selected if the select-option had been used in a DB-SELECT.
    Does anybody know a workaround?
    Thanks in advance
    Andreas

    Dear Keshav,
    it's an own field in an own table, defined as CHAR of length 140 (lowercase allowed), reflecting to a line of remittance info of an account statement. A regular Select-Option for this field is provided in a report which works perfectly fine regarding the case sensitivity. For reasons I don't want to point out in detail we need to check a value in this field against the select-option without selecting it from the db again.
    Let's assume that a field remittance_info contains the value 'ABCD'.
    A line of the select-option table looks like this:
    select_option_table-SIGN = 'I'
    select_option_table-OPTION = 'CP'
    select_option_table-LOW = 'abc*'.
    Then an ABAP statement such as
    IF remittance_info IN select_option_table.
    * would be true !!!
    ENDIF.
    but wouldn't deliver a result in a SELECT such as
    SELECT * FROM my_table INTO TABLE my_internal_table WHERE remittance_info IN select_option_table.
    because of the differences in lower/upper case.
    regards
    Andreas

  • Select-option value is not getting captured in at selection-screen on value

    In Selection screen , we have Select-option and  a parameter.
    Based on the values given in Select-option, the values of Parameter should get populate.
    To achieve this functionality,
    I  used  At selection u2013screen  on value request  for <parameter>  EVENT and 'F4IF_INT_TABLE_VALUE_REQUEST' Function Module.
    But the Select-option values are not getting captured in this event,unless u press Enter key.
    Is there any other way to achieve this functionality.
    Please Guide me.

    When you call function 'F4IF_INT_TABLE_VALUE_REQUEST'. make sure you send it the name of the screen variable - the F4IF_INT_TABLE_VALUE_REQUEST function calls DYNP_VALUES_READ itself if you tell it the name of your report, screen number, and the variable name... snippet below.
    Jonathan
      data:
        l_repid             type syrepid.
      l_repid = sy-repid.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          dynpprog         = l_repid
          dynpnr           = '1000'
          dynprofield      = 'S_FIELD-LOW'  "Select options - low value
    * etc

  • Search help is not coming while using select-options?

    Hi All,
    I am using select options in my selection screen, i used wdr_select_options, also i coded some parameter values also
    ( non select-options ). For that field i am not getting search help. If i create as normal i am getting? Suggestions pelase?
    Thanks,
    Venkat.

    HI
    what kind of search help is associated with the field.
    ADD_SELECTION_FIELD method has some specific parametrs for value_help
    give the input there and try again.
    these parameters are
    I_VALUE_HELP_TYPE
    I_VALUE_HELP_ID
    I_VALUE_HELP_MODE
    I_VALUE_HELP_STRUCTURE
    thanks
    sarbjeet dingh

  • Using roadmap and select-options

    I'm new to abap web dynpro, i'm using a roadmap with 4 views. This is working fine but, when I try to use select options in view1 they don't show. When I set view1 as default view the select options are working fine.
    this is how my current web dynpro looks like:
    Main view -> roadmap with viewcontainerUIElement
        view1 -> viewContainerUIElement + table (in the window I embedded the select options in the viewContainerUIElement)
        view2
        view3
        view4
    In view1 I'm using wddoinit to initialise the select options.
    Thanks in advance!

    Hi Srinivas,
    According to you mail, I will provide some solution please try them. It will definitely works.
    ---> Create a attribute which holds the lead selection values of the RADIO_GROUP.
    ---> When you click on the Next View, You will fire the plug. Right. Just before firing the Plug, update the above
          attribute with update information.
    > Do the same code for Select-options code in the WDDOINIT except the passing the values to the select-options.
    > Please pass the attribute information to Select-options with updated information in the method WDDOMODIFYVIEW every time. Without creating a attribute also you can approach the same method. Just for simple access we can create a attribute. Otherwise without that we can do the same.
    So Just populate the values into Select-options depending on the value of RADIO_GROUP you will do the same coding WDDOMODIFYVIEW. But initialization of SELECT-OPTIONS can be only done in the method WDDOINIT method only. WDDOINIT method only execute first time once you go through it and go back and move forward then this method won't execute.
    I hope this logic will work for you. If not Please send me the Code related to SELECT-OPTIONS and RADIO_GROUP Button information.
    I will be in office today up to 4.45 PM (IST). You can contact me in this time otherwise we will discuss on webex tomorrow morning at 9 AM.
    Warm Regards,
    Vijay

  • 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

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

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

    I've sloved the problem

Maybe you are looking for