Import Parameter as Select Option for a FM in ECC 6.0

Hi All,
Can someone help me get the import parameter of a function module to be of the type select-options( the way it is used in reports) in ECC 6.0.
Thanks for all your help in advance.
Divya

What I do is as following....
I create two parameters...One for <b>START</b> and the other for <b>END</b>....Then, inside my FM I create a RANGE...
  DATA: BEGIN OF r_datum OCCURS 1,
        sign(1),
        option(2),
        low  TYPE vekp-vhilm,
        high TYPE vekp-vhilm,
        END OF r_datum.
Passing the START to low and END to high....
P.S: Don't forget to assign points to useful answers.
Greetings,
Blag.
Message was edited by:
        Alvaro Tejada Galindo

Similar Messages

  • Parameter or select-option

    hello all,
    i have requierment in which i am confused.I have to declare a field in selection screen for user input. I have declared the field as parameter.But there is no multiple select option. And user ant to have multiple select option(.i.e interval range).
    The problem is the field i have declared in parameter is type c.Like:: Enterprise(30) type c,
                  divivsion(30)  type c.
    So this is not having any interval range.If i use select-option i can provide the range. SO plz help how can i define the parameter in select-option if its possible.
    Most important thing is is there is no filed for refrence like: s_matnr for mara-matnr. as we can define in select-option.
    Plz suggest some thing on this.
    Thanks & Regards,
    Anu Maheshwari

    Hi Anu,
    Decalare it as
    1)If you want your SELECT -OPTIONS to behave like parameters. USe the option.
    <b>SELECT-OPTIONS ..... NO INTERVALS NO-EXTENSION</b>
    REPORT abc.
    DATA : v_enterpr(30) TYPE c,
    v_divin(30) TYPE c.
    SELECT-OPTIONS : s_enterp FOR v_enterpr NO INTERVALS NO-EXTENSION ,
                     s_divin  FOR v_divin NO INTERVALS NO-EXTENSION .
    2)If you want to have it as SELECT-OPTIONS.
    Then
    REPORT abc.
    DATA : v_enterpr(30) TYPE c,
    v_divin(30) TYPE c.
    SELECT-OPTIONS : s_enterp FOR v_enterpr ,
                     s_divin  FOR v_divin .
    Refer to the program I gave in this link for more details.
    Re: Difference of "NO INTERVALS NO-EXTENSION" and  "Parameter"
    Regards,
    Arun Sambargi.

  • Select option for selection valid and invalid data.

    Hi All,
    Any one pleas help in validating following case :-
    In the selection screen there is a select option for equipment number like EQUI-EQUNR
    if any user will give wrong equipment no. It will generate an error message from the  range of equipment no.
    and put it to an internal table it error.
    and if any value in between the select option(equipment no) is correct then that value I need to proceed for some other logic.
    Iu2019d appreciate if some one help me in generation code for the above case or logic.
    Thanks

    Hi,
    Use FM 'RS_REFRESH_FROM_SELECTOPTIONS'
    DATA: RSPAR TYPE STANDARD TABLE OF RSPARAMS.
          REFRESH RSPAR.
          CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
              EXPORTING
                CURR_REPORT           = 'prog name'
        IMPORTING
          SP                    =
              TABLES
                SELECTION_TABLE       = RSPAR
             EXCEPTIONS
               NOT_FOUND             = 1
               NO_REPORT             = 2
               OTHERS                = 3.
          IF SY-SUBRC <> 0.
       MESSAGE I000.
          ENDIF.
    In table parameter you ll get the all entries entered .
    Check out the values with respective tables.If value is not correct tk it into internal table
    else proceed ahead. You can Remove incorrect entries this way.
    regards,
    ajit.

  • Change the Parameter as Select option

    Hi Guy's,
    Please help me friends, present requirement is like this : change the Parameter into Select-Option.
    Here they are using one function module, this function module import parameter taking single value, how  loop this function module with in this select-option.
    PARAMETERS p_fictr LIKE fmfctr-fictr.
    START-OF-SELECTION.
    Move the select options to internal tables (import parameter for fn)
      move_sel_option  : sel_buk   s_bukrs ,
                         sel_pern  s_pernr ,
                         sreinr    s_reinr ,
                         spdatv    s_pdatv ,
                         sberei    s_berei .
    Call the function to get all trips corresponding to sel criteria
      CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
        EXPORTING
          p_fictr = p_fictr
          p_sub   = p_sub
        TABLES
          s_bukrs = s_bukrs
          s_pernr = s_pernr
          s_reinr = s_reinr
          s_pdatv = s_pdatv
          s_berei = s_berei
          i_trip  = i_trip
        EXCEPTIONS
          OTHERS  = 1.
    Thanks and Regards,
    Sai

    hi,
      You can first the field values using the select statement and then loop that internal table and pass the values to the function module.
    try this
    *PARAMETERS p_fictr LIKE fmfctr-fictr.
    select-options: s_fictr for fmfctr-fictr.
    START-OF-SELECTION.
    Move the select options to internal tables (import parameter for fn)
    move_sel_option : sel_buk s_bukrs ,
    sel_pern s_pernr ,
    sreinr s_reinr ,
    spdatv s_pdatv ,
    sberei s_berei .
    select fictr
       from fmfctr
       into tabel itab
    where fictr in s_fictr.
    loop at itab.
    Call the function to get all trips corresponding to sel criteria
    CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
    EXPORTING
    *p_fictr = p_fictr
    p_fictr = itab-fictr
    p_sub = p_sub
    TABLES
    s_bukrs = s_bukrs
    s_pernr = s_pernr
    s_reinr = s_reinr
    s_pdatv = s_pdatv
    s_berei = s_berei
    i_trip = i_trip
    EXCEPTIONS
    OTHERS = 1.
    endloop.
    regards,
    Veeresh

  • How to create the select option for the Plant in screen (Module pool)

    HI,
    I am developing one module pool program and I have below requirement,
    currently plant is acting like PARAMETER and the now it should be changed to select option.
    how to create the select option in the screen
    Thanks and regarding,
    Malla
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Dec 16, 2009 1:41 PM

    Steps to get SELECT-OPTIONS in module pool programs.
    1.Start one dialog program with SAPMZ_001.
    Place the below code in the TOP include of the dialog program.
    TABLES marc.
    SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
    SELECT-OPTIONS: werks FOR marc-werks.
    SELECTION-SCREEN END OF SCREEN 3200. 
    2 .Create one screen 3000.
    Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
    Place the below code in the Flow logic of the screen.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN l_subscreen.
    Activate all.
    Create Transaction code for the dialog program .
    Execute the transaction code. You will see the select-option for werks how we see on Selection-screen.

  • Select-options for time stamp

    Any ideas on which data element to be used for select-options for timestamp on the screen so that a user is able to f4 help too.
    i am using data element 'tzntstmps' but i am not getting f4 help for it.

    Hello Trivenn
    I do not think it makes sense to search for any other timestamp data element which might be part of a search help.
    TZNTSTMPS = UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
    How could such a search help look like? A calendar control combined with some kind of "time control"?
    You may facilitate the entry of time stamps in such a way that if the user enters only a date in the LOW field (e.g. 20080422 without time) you change it AT SELECTION-SCREEN (PBO of your selection screen to 20080422000000).
    Correspondingly, you change a date value (e.g. 20080422) at the HIGH field into 20080422235959).
    If, however, the user enters already a complete timestamp you do not change anything.
    Regards
      Uwe

  • Select-options for OO Methods

    Hi all,
    How can I define select-options for a method in a global class.
    And how can I pass these select-options from a report.
    Thanks & Regards
    Eshwar

    Hi all,
    How can I define select-options for a method in a global class.
    And how can I pass these select-options from a report.
    Thanks & Regards
    Eshwar

  • Multiple select options for an input field

    Hi All,
    We have a requirement where in we need to provide multiple select options for an input field in a BSP application and get output relevant to all the given inputs(do not require range).
    Please do let me know how to solve this.
    Thanks & Regards,
    Lavanya .

    Hi,
    The requirement is : Suppose there is a input field PLANT.
    If we give input for plant it gives related output.
    Now if it is required to give 5 or 6 inputs..like plant1,plant2...plant6 and get the output related to all 6 inputs.
    (Like we implement in ABAP)
    Please do let me know how can this be implemented in BSP.
    Thanks & Regards,
    Lavanya.

  • Select-options for date field.

    Hi all,
    i need to give select options for Date field.How can i give that.
    Thanks & Regards
    Ravi.

    Hi Ravi,
    Use the Component WDR_SELECT_OPTIONS to include select options in Web Dynpro ABAP. Follow these steps:
    1. In your Component , "Used Componet" tab add Component WDR_SELECT_OPTIONS . Component Use can be any name that you want to give, eg SELECT_OPTIONS
    2. Go to the View where you want to include the Date Select Options. I am assuming that you already have an Attribute of Type DATS in your context.
    3. View: Properties Tab:Create Controller Usage and select
    SELECT_OPTIONS     WDR_SELECT_OPTIONS                   
    SELECT_OPTIONS     WDR_SELECT_OPTIONS     INTERFACECONTROLLER
    4. View Layout Tab:Include a View Container. In this view container we will show the Date Select Options.
    5. View Attributes Tab: Create Following two attributes:
    M_HANDLER type IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS type IWCI_WDR_SELECT_OPTIONS
    6: View Methods Tab: Create a method eg CREATE_SELECTION_SCREEN. Call this method in the WDDOINIT of the view.
    7:CREATE_SELECTION_SCREEN: Write following Code:
    * Data Declaration
      data:
            lt_range_table TYPE REF TO DATA.
      data:
            lr_componentcontroller TYPE REF TO IG_COMPONENTCONTROLLER,
            lr_componentusage TYPE REF TO IF_WD_COMPONENT_USAGE.
    * Execution
    *  Create Used Component
      lr_componentusage = wd_this->wd_cpuse_select_options( ).
      if LR_COMPONENTUSAGE->HAS_ACTIVE_COMPONENT( ) is initial.
        lr_componentusage->create_component( ).
      endif.
    *  Get pointer to interface controller of select options
      wd_this->M_WD_SELECT_OPTIONS = wd_this->wd_cpifc_select_options( ).
    * initialize selction screen
      wd_this->M_HANDLER = wd_this->M_WD_SELECT_OPTIONS->init_selection_screen( ).
    *  Create Range Table for: Date
      CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
        EXPORTING
          I_TYPENAME     = 'DATS'
        RECEIVING
          RT_RANGE_TABLE = lt_range_table.
    * Add Selection Field for: Date
      CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
        EXPORTING
          I_ID                         = '<name of date attribute in the context>'
    *      I_WITHIN_BLOCK               = MC_ID_MAIN_BLOCK
    *      I_DESCRIPTION                =
    *      I_IS_AUTO_DESCRIPTION        = ABAP_TRUE
          IT_RESULT                    = lt_range_table
    *      I_OBLIGATORY                 = ABAP_FALSE
    *      I_COMPLEX_RESTRICTIONS       =
    *      I_USE_COMPLEX_RESTRICTION    = ABAP_FALSE
    *      I_NO_COMPLEX_RESTRICTIONS    = ABAP_FALSE
    *      I_VALUE_HELP_TYPE            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
    *      I_VALUE_HELP_ID              =
    *      I_VALUE_HELP_MODE            =
    *      I_VALUE_HELP_STRUCTURE       =
    *      I_VALUE_HELP_STRUCTURE_FIELD =
    *      I_HELP_REQUEST_HANDLER       =
    *      I_LOWER_CASE                 =
    *      I_MEMORY_ID                  =
    *      I_NO_EXTENSION               = ABAP_FALSE
    *      I_NO_INTERVALS               = ABAP_FALSE
    *      I_AS_CHECKBOX                = ABAP_FALSE
    *      I_AS_DROPDOWN                = ABAP_FALSE
    *      IT_VALUE_SET                 =
    *      I_READ_ONLY                  = ABAP_FALSE
    *      I_DONT_CARE_VALUE            =
    *      I_EXPLANATION                =
          I_TOOLTIP                    = 'Select Date'.
    8: To Fetch Data entered in the selection field, write following code on action of button click:
      data:
            lt_date type REF TO DATA.
    FIELD-SYMBOLS:
                     <fs_date> TYPE table.
      *  retrieve Date from Select Options
      CALL METHOD WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD
        EXPORTING
          I_ID           = '<attrib_name>'
        RECEIVING
          RT_RANGE_TABLE = lt_date.
    *  assign Date Field Symbol
      ASSIGN lt_date->* to <fs_date>.
    9: Windows Window Tab: In the View Conatiner, embed the WND_SELECTION_SCREEN view from SELECT_OPTIONS component Usage of  WDR_SELECT_OPTIONS component.
    Regards,
    Reema.

  • Restrict Select-Options for Logical Database field

    The way we restrict select options for custom defined select option fields on selection screen.. can we restrict select options for standard Logical Database fields?
    i.e. report uses PNPCE logical database and has field called PERNR. I want to restrict select options for this PERNR field so that it has options for 'Select single values' only.
    Thanks,
    Falguni
    Edited by: Falguni V on Nov 13, 2010 6:42 AM

    You can user AT SELECTION-SCREEN event, and check whether any record is having high value for PNPPERNR.

  • Requirement to maintain select-options for multiple fileds in webdynpro aba

    Hello Gurus,
    We have a requirement to maintain select-options for multiple fileds in webdynpro abap.
    now we are able to create select-options for a single field using wdr_select_options componet usage.
    how can we achive this select-options feature for multiple fields.
    Could anyone please suggest solutions?
    and if possible send me the sample code for this requirement.
    Thanks in Advance for your replies.
    Regards,
    Shyam

    Hi,
    Nothing different for more fields, same. some declaration changes.
    For example code i am using.. in WDDOINIT method.
    TYPES:
        fiscal_year TYPE RANGE OF GJAHR,
        S_KUNNR TYPE RANGE OF J_3RS_KUNNR,
        S_VKORG TYPE RANGE OF VKORG_RAN,
        status type PVWTY-RETPA,
        ty_r_date TYPE RANGE OF s_date,
        ty_s_date TYPE LINE OF ty_r_date.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Reference variable used instantiate the select-options component
      DATA
        lr_cmp_usage TYPE REF TO if_wd_component_usage.
    * Variables used to create the select-options fields and
    * define its initial values
      DATA:
        lr_field TYPE REF TO data,
        ls_date  TYPE ty_s_date.
      FIELD-SYMBOLS:
        <fs_field> TYPE ANY,
        <fs_range> TYPE INDEX TABLE.
    * Instantiate the select-options component
      lr_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller =   wd_this->wd_cpifc_cmp_sel_opt( ).
    wd_this->m_sel_opt = lo_interfacecontroller->init_selection_screen( ).
    data : vhelp type wdy_md_value_help_mode_enum .
    * Sets the helper reference
      wd_this->m_sel_opt1 = wd_this->wd_cpifc_cmp_sel_opt( ).
      wd_this->m_helper  = wd_this->m_sel_opt1->init_selection_screen( ).
    * Hide the standard select-options components.
      wd_this->m_helper->set_global_options(
        i_display_btn_cancel = abap_false
        i_display_btn_check  = abap_false
        i_display_btn_reset  = abap_false
        i_display_btn_execute  = abap_false
      lr_field = wd_this->m_helper->create_range_table( `KUNNR` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `KUNNR`
        I_DESCRIPTION  = 'Customer Code'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
      lr_field = wd_this->m_helper->create_range_table( `VKORG` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `VKORG`
        I_DESCRIPTION  = 'Sales Organization'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
    Go through this..
    http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages
    Cheers,
    Kris.

  • How to assign search help using ovs for select options for ALV in web dynpr

    how to assign search help using ovs for select options for ALV in web dynpro

    Hi,
    refer http://wiki.sdn.sap.com/wiki/display/WDABAP/InputhelpofObjectValueSelectioninWDABAP
    http://www.****************/Tutorials/WebDynproABAP/OVS/page1.htm
    and http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproAbap-OVSsearch+help
    Thanks,
    Chandra

  • Missing select-options for kna1-kunnr

    Hi,
    Has anybody ever come across this before ?
    I've modified a program to add a new select options for kna1-kunnr and added a bit of code that processes the value entered.
    In "development" it all tested OK and the program was transported up to "test".
    In "test" the users tested and everything was OK.
    The program was eventually transported up to "production" but when I run it in production the select-options for kna1-kunnr does not appear on the selection screen ? However, the when I run the program the additional bit of code that I also included does actually execute.
    I haven't been able to look at the code yet because SE38 and SE80 are disabled in "production".
    It sounds to me that the selection screen has somehow not generated correctly when the program was transported into production but the transport logs didn't display any errors or warnings. I have also had the program retransported into production but I still can't see the select-options.
    There are no variants for the program and I'm not getting any security issues on the SU53.
    Any help would be gratefully received.
    Thanks
    Stan

    Hi,
    You can try system->staus->program name. Double click on program name and see if you enter abap editor. You can check your code there.
    Or else just create another transport in development and send to production
    Thanks,

  • Select option for date

    i want give default values in select option for date (for a period)
    I used
    SELECT-OPTIONS y_s_mnth FOR y_v_dt_month default first to last OPTION BT.
    first and last are dates.
    I am getting error dialog box....specify ranges...
    Please give sample code..

    Hi Suhas,
    I hope this code will help you.  Reward me if it is helpful.
    select-options : y_s_mnth FOR sy-datum.
    initialization.
    y_s_mnth-sign   = 'I'.
    y_s_mnth-option = 'BT'.
    y_s_mnth-low    = sy-datum - 30.    "first_day
    y_s_mnth-high   = sy-datum.         "last_day
    append y_s_mnth.
    clear  y_s_mnth.
    Regards,
    Sagar

  • How to create select-options for 3 fields out of 5 by FREE_SELECTIONS_INIT

    Hi Experts,
    I am using the Function Modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG to create the select-options dynamically on the selection screen.
    My problem is that I am passing a field list of 10 fields in the FIELDS_TAB of the function.
    Now it creates the select-options for all 10 fields. I want to create select-options for only 5 fields initially and let the user select out of the remaining 5 fields to create the select-options.
    How to achieve this.?
    I tried by passing the 5 fields in FIELDS_NOT_SELECTED table but they get hidden and once hidden I am not able to get them back in my field list.
    Please help me out.
    Useful answers will be suitably rewarded.
    Thanks in advance.
    Regards,
    Himanshu

    Hi Experts,
    I am using the Function Modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG to create the select-options dynamically on the selection screen.
    My problem is that I am passing a field list of 10 fields in the FIELDS_TAB of the function.
    Now it creates the select-options for all 10 fields. I want to create select-options for only 5 fields initially and let the user select out of the remaining 5 fields to create the select-options.
    How to achieve this.?
    I tried by passing the 5 fields in FIELDS_NOT_SELECTED table but they get hidden and once hidden I am not able to get them back in my field list.
    Please help me out.
    Useful answers will be suitably rewarded.
    Thanks in advance.
    Regards,
    Himanshu

Maybe you are looking for

  • A new database explorer project

    Hi folks! I've planed to write a new "database explorer" firtly I mean to use this project in my Java Developer Certification Exams, after(or before) I want to open the source and have another database explorer in the open source world. :) My firts i

  • Alter settings pdf after original save?

    Using adobe acrobat 7.0 professional on mac. I scanned something recently, saved it as a pdf. Upon the first time saving (every time with first save of new document) I had the options. To save as 5 version or later all that stuff! Once it has been sa

  • Af:table. How to add extra column.

    Hi, On my page I have a table that is generated from a view object. The attributes from the VO are coming from a entity object. table looks fine on my page. But now I need to add a extra column on the table and the value for that is coming from a oth

  • Current_date different in forms 10g (variable:=current_date differente from select current_date into varialble)

    If in a form, I assign current_date to a variable like ' wdate:=current_date' the variable get incorrect value than if i assign like 'select current_date into wdate from dual' Why?, current_date is always from database session isn't it? Thanks for yo

  • Types of DVDs

    What is better quality, Dual layer or double sided? I need to burn some movies that are too big for normals. And can you get both of these in re-writable? What's more common? Another question, what is the difference between re-writable, re-inscriptab