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.

Similar Messages

  • Modify selection screen for Logical Database 'SDF'

    Hi
    I need to make a section of the standard selection screen for logical database 'SDF' invisible. I have tried the differet selection screen options of the report attributes, but none of the provided ones give me what I want.
    How can I find the name of the screen group for the "Line Item Selection" block of the selection screen so that I can make it invisible when the selection screen is displayed?
    Thanks,
    Thomas

    I tried to do this:
    Loop at screen.
             if   screen-group4 = '026'
               or screen-group4 = '027'
               or screen-group4 = '028'.
                 screen-invisible = 1.
                 modify screen.
             endif.
    endloop.
    This removed the selection text for these fields, but the Line Item Selection block is still visible, and the actual input fields are also visible. They now look like password input fields with all ***** in them.
    What am I doing wrong?
    Thanks for your help!
    Thomas

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

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

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

  • How to get dynamic select options from logical database?

    Hi,
    in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
    Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
    WHERE bukrs = p_burks AND ... AND
    (where_tab)
    Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
    Thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    Senior SAP Abap Consultant

    Hi,
    Try to use the following fm in your report and check
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = sy-cprog
          mode_write_or_move = 'M'
        importing
          p_trange           = gt_dyn_trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
    PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values

  • User defined Selection screen for Logical database

    hi all,
           can we display a user defined selection screen instead of the default selection screen in LDB . eg pnp
    cheers
    senthil

    Hi,
    to my knowledge, the selection screen of a logical database can only be changed (versions!) in the logical database itself.
    What you can do is, write a program with your own selection screen an then either call another program that uses the LDB or -  much better - you call the LDB from your program with function module LDB_PROCESS!
    Example taken from the example library (TA ABAPDOCU):
    <b>REPORT demo_logical_database.
    DATA wa_spfli TYPE spfli.
    SELECT-OPTIONS s_carr FOR wa_spfli-carrid.
    DATA: callback TYPE TABLE OF ldbcb,
          callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
          seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode     = 'SPFLI'.
    callback_wa-get         = 'X'.
    callback_wa-get_late    = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SPFLI'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    callback_wa-ldbnode     = 'SFLIGHT'.
    callback_wa-get         = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SFLIGHT'.
    APPEND callback_wa TO callback.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'CARRID'.
    LOOP AT s_carr.
      MOVE-CORRESPONDING s_carr TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
         EXPORTING
              ldbname                     = 'F1S'
              variant                     = ' '
         TABLES
              callback                    = callback
              selections                  = seltab
         EXCEPTIONS
              ldb_not_reentrant           = 1
              ldb_incorrect               = 2
              ldb_already_running         = 3
              ldb_error                   = 4
              ldb_selections_error        = 5
              ldb_selections_not_accepted = 6
              variant_not_existent        = 7
              variant_obsolete            = 8
              variant_error               = 9
              free_selections_error       = 10
              callback_no_event           = 11
              callback_node_duplicate     = 12
              OTHERS                      = 13.
    IF sy-subrc <> 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    FORM callback_spfli USING name  TYPE ldbn-ldbnode
                              wa    TYPE spfli
                              evt   TYPE c
                              check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.
    FORM callback_sflight USING name  TYPE ldbn-ldbnode
                                wa    TYPE sflight
                                evt   TYPE c
                                check TYPE c.
      WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.
    ENDFORM.</b>

  • Changing selection sequence for logical database

    Hi,
    One of my current report is using logical database PNP. The users are satisfy with the standard selection screen. However they would like me to change the sequence of the selection field. Example, current sequence is Personnel number, company code, employee subarea. They would like it be Personnel number, employee subarea, company code.
    Is there any way I can change the sequence of the selection screen? I tried using report catagory but it don't allow me to change the sequence. Please advise.
    Regards,
    Lanwu

    Rich is correct.. but there is a workaround..
    Use the Report Category that suppresses all the selection fields.. I the program deifne your selection screen with the fields in your own order preference. In the STARt-OF-SELECTION event.. pass the values entered to the PNP fileds.. ie suppoes you have declared S_PERNR ( for Pers No), then use PNPPERNR[] = s_pernr[]. This way you will not have to change the LDB program..
    ~Suresh

  • Selection screen for logical database PNP..

    hi all,
    I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
    i have been looking all around and i got few of the below methods.
    its good to use a report category.
    somewhere it says include it in ur program using selection screen block..
    can you please guide me which is the best way and what would be a perfect solution?
    thanks in advance,
    Reena

    Hi reeena,
    1. simple
    2. u want to
      a) add ur own fields
      b) suppress some fields
    3. a) is simple, just add your parameters,
       in your program, and they will appear
       b) use SCREEN logic
    4. just copy paste to get a taste of it
      (it will HIDE the PAYROLL AREA field)
      and add MATNR field
    5.
    report abc.
    TABLES : PERNR.
    PARAMETERS : MATNR LIKE MARA-MATNR.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-NAME CS 'ABKRS'.
          SCREEN-INVISIBLE = '1'.
          SCREEN-INPUT = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    regards,
    amit m.

  • SELECT OPTION in logical database PNP

    Hi,
    when i use ligical database PNP and i'm entering a range in personnel number, in which variables is that stored?
    The select option in pnppernr, but this one is initial in start-of-selection and get event.
    Is there any othe structure containing the range?
    Regards
      Rainer

    I think that PNPPERNR is the range.  This sample program works for me.
    report zrich_0001.
    TABLES: pernr.
    parameters: p_check.
    start-of-selection.
    GET pernr.
    write:/ pnppernr.
      check sy-subrc = 0.
    Regards,
    Rich Heilman

  • 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

  • Selection options for field display text instead of key

    Hi All,
    In the selection screen in my reports, when the user clicks on the selection options for one the fields to display the possible values they can use. Instead of the key the pop up box only displays the text for that field. This is an issue because one of the fields is equipment number and the user needs to be able to see the key not the descriptions. This is occurring in multiple reports and for multiple fields. I haven't been able to find anything in the infoobject properties or the query properties to change this.
    Please help!
    Edited by: Anthony Loh on Sep 29, 2010 10:57 PM

    Hi Anthony,
    Cud u pls check in backend how it is created ...
    RSA1>Mdeling>IO Properties>Second tab BEx properties>Display-->it shud be Key and not text...
    Check this and come back ..
    Rgds
    SVU123

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

  • Validation of Select Options for a field

    Hi All,
    I need to write a validation logic for a select option for VTWEG (Distribution Channel).
    select-options:  s_vtweg for komg-vtweg.
    I need to check whether the user has entered the correct value based on the search help. The check table of this particular field is TVTW. 
    Following is the code i wrote under the AT SELECTION-SCREEN block:
    IF NOT S_VTWEG-LOW IS INITIAL.
    SELECT SINGLE VTWEG INTO KOMG-VTWEG FROM TVTW
                                     WHERE VTWEG IN S_VTWEG.
    IF SY-SUBRC NE 0.
    CONCATENATE ' Please enter the correct
                                    Distribution Channel '
    Z_MSG INTO Z_MSG.
    SET CURSOR FIELD 'S_VTWEG-LOW'.
    MESSAGE E000 WITH Z_MSG.
    ENDIF.
    ENDIF.
    It works fine when the user enters a wrong value in the S_VTWEG-LOW field, where as if i gives more than one wrong value in the range or giving individual values its not working. Let me know how to do the validation check for multiple values entered individually or in ranges.
    Could you please suggest how to resolve this problem.
    Thank You,
    Suresh

    You could do something like this.....here looping at the select-option table and check the values for low and high.
    report zrich_0003.
    tables: komg.
    data: z_msg(100) type c.
    select-options: s_vtweg for komg-vtweg.
    at selection-screen.
      loop at s_vtweg.
        if not s_vtweg-low is initial.
          select single vtweg into komg-vtweg from tvtw
                 where vtweg = s_vtweg-low.
          if sy-subrc ne 0.
            concatenate ' Please enter the correct
            distribution channel '
                      z_msg into z_msg.
            set cursor field 'S_VTWEG-LOW'.
            message e001(00) with z_msg.
          endif.
        endif.
        if not s_vtweg-high is initial.
          select single vtweg into komg-vtweg from tvtw
                 where vtweg = s_vtweg-high.
          if sy-subrc ne 0.
            concatenate ' Please enter the correct
            distribution channel '
                      z_msg into z_msg.
            set cursor field 'S_VTWEG-HIGH'.
            message e001(00) with z_msg.
          endif.
        endif.
      endloop.
    Regards,
    Rich Heilman

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

Maybe you are looking for