How to prevent the use of wild cards in select-option

Hello experts,
Is it possible to prevent the use of wild cards in a select-option? If yes, how is it done please?
I have a
SELECT-OPTIONS: o_comp  FOR dbtab-field OBLIGATORY DEFAULT 'FI'.
and, I want to prevent the users for giving in some thing like FI* with the wildcard bc it would lead to dump.
I want an error message to display and prevent the users for making such entry.
Please I need your help and I would be very grateful.
Thanks
Nadin

You have to use SELECT_OPTIONS_RESTRICT to restrict input allowed. Call this FM in INITIALIZATION or SELECTION-SCREEN OUPUT sections.
Sample :
TYPE-POOLS: sscr.
INITIALIZATION.
* Restrict SELECT-OPTIONS
  PERFORM restrict_select.
FORM restrict_select.
  DATA: restrict TYPE sscr_restrict,
        opt_list TYPE sscr_opt_list,
        *** TYPE sscr_***.
* Défine select-options modes (aka option list)
* - ALL standard - all options allowed
  CLEAR opt_list.
  MOVE 'ALL' TO opt_list-name.
  MOVE 'X' TO: opt_list-options-bt,
               opt_list-options-cp,
               opt_list-options-eq,
               opt_list-options-ge,
               opt_list-options-gt,
               opt_list-options-le,
               opt_list-options-lt,
               opt_list-options-nb,
               opt_list-options-ne,
               opt_list-options-np.
  APPEND opt_list TO restrict-opt_list_tab.
* - EQU only equality allowed (list of values)
  CLEAR opt_list.
  MOVE 'EQU' TO opt_list-name.
  MOVE 'X' TO opt_list-options-eq.
  APPEND opt_list TO restrict-opt_list_tab.
* Affect modes to parameters or block of parameters
* ALL by default
  CLEAR ***.
  MOVE: 'A'          TO ***-kind,
        '*'          TO ***-sg_main,
        'ALL'        TO ***-op_main.
  APPEND *** TO restrict-***_tab.
* EQU to internal material number
  CLEAR ***.
  MOVE: 'S'          TO ***-kind,
        'S-MATNR'    TO ***-name,
        'I'          TO ***-sg_main, " no exclusion
        'EQU'        TO ***-op_main. " only value list
  APPEND *** TO restrict-***_tab.
* Call  FM
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
            restriction = restrict
       EXCEPTIONS
            OTHERS      = 1.
ENDFORM.                    " restrict_select
In the sample, only select-options for matnr is restricted to single value list.
For your request build a mode with all options except "pattern" ones : CP and NP.
Regards

Similar Messages

  • How to retrieve data using logical database and custom select options

    Hi all,
    I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
    Thanks in advance.

    Hai Gupta
    Check the following Document & Links
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB
    good info about Logical Database. you can check the link.
    http://www.geekinterview.com/question_details/1506
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Re: How to Create and Use ldb in reports?
    Re: Logical databases
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Functions for displaying and changing logical databases:
    Call Transaction SE36 or
    Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
    Interaction between database program and report:
    During program processing, subroutines are performed in the database program and events are executed in the report.
    To read data from a database tables we use logical database.
    A logical database provides read-only access to a group of related tables to an ABAP/4 program.
    advantages:-
    The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
    i)An easy-to-use standard user interface.
    ii)check functions which check that user input is complete,correct,and plausible.
    iii)meaningful data selection.
    iv)central authorization checks for database accesses.
    v)good read access performance while retaining the hierarchical data view determined by the application logic.
    disadvantages:-
    i)If you donot specify a logical database in the program attributes,the GET events never occur.
    ii)There is no ENDGET command,so the code block associated with an event ends with the next event
    statement (such as another GET or an END-OF-SELECTION).
    1. transaction code SLDB.
    2.enter name z<ldb-name>
    3.create
    4.short text
    5.create
    6. name of root node (here Ekko)
    7. enter short text (f6)
    8.node type -> data base table.
    9.create
    10 change logical DB
    riht click on ekko and insert node
    here node name ekpo
    11.create
    12. click on selections
    13. press no Should the changed structure of Z<ldb name> be saved first.
    14.select tables which you want to join.
    15.transfer
    16 now you have to o to coding part.
    17. save
    activate.
    19.click to src code
    double click on first include and activate
    Regards
    Sreeni

  • How to avoid the truncation of  field values in select-options

    Hi all,
    I have a requirement where i have used select-options to select multiple filenames.  I have taken the filename of type rlgrap-filename(128 char) But the problem is in select-options if the values of the filename which is selected has length ( i.e the length of the selected field value) exceeds 45 character , then he remaining charactes are truncated. Hence i am not able to get the
    correct field value in the internal table of the select-options.
    i came to know that if NO_DISPLAY addition is used then this truncation wont occur. But in my case user has to select the files and hence this addition cannot be used.
    please let me know if anyone has a solution for this or if there is any other way to select multiple entries in selection screen.
    Regards
    Manipal parkala

    rlgrap-filename is having the length of only 128 characters.If the file path exceeds 128 characters then the rest will get truncated.If you file name exceeds more than 128 characters and the pafth is fixed,then harcode the entire path in the program and later on concatenate the path and the file name into a string which can be used for further processing.
    paramters:p_file like rlgrap-filename.
    here just give the filename as say 1234.XLS.(Assuming that you are not browsing for the file using F4_filename).
    In the program harcode the path say C:\Documents and setting\sapworkdir\user\.
    Now concaternate these two and pass it to string which can be used for further processing.
    If the user intneds to browse the file and the path name exceeds 128 characters then follow the way to delcare the paramter in the selection screen as said above.If it is working for parameters then I think it should be working for select option also.

  • How to get the max. and min. of a selection-option?

    hi experters
    I wonder if there is any way can fetch the max value and minimum value from a select-option?
    please hint, many thanks
    wanlei.sun

    a®s wrote:
    > Try this way
    >
    >
    > SELECT-OPTIONS S_WERKS FOR T001W-WERKS.
    >
    > START-OF-SELECTION.
    > SELECT * FROM T001W INTO IT_T001W
    >        WHERE WERKS IN S_WERKS.
    >
    > SORT IT_T001W BY WERKS ASCENDING.
    > READ TABLE IT_T001W INDEX 1.
    > MOVE IT_T001W-WERKS TO V_WERKS_MIN. " MIN Value
    >
    > SORT IT_T001W BY WERKS DESCENDING.
    > READ TABLE IT_T001W INDEX 1.
    > MOVE IT_T001W-WERKS TO V_WERKS_MAX. " MAx Value
    >
    >
    > a®s
    Please try this.
    TABLES : t001w.
    SELECT-OPTIONS S_WERKS FOR T001W-WERKS.
    data: lv_min type T001W-WERKS,
          lv_max type T001W-WERKS,
          lv_count type i.
    START-OF-SELECTION.
      sort s_werks by low.
      describe TABLE s_werks LINES lv_count.
      if lv_count = 1.
        lv_min = s_werks-low.
        lv_max = s_werks-high.
      elseif lv_count > 1.
        read TABLE s_werks index 1.
        lv_min = s_werks-low.
        if not s_werks-high is INITIAL.
          lv_max = s_werks-high.
        endif.
        READ TABLE s_werks INDEX lv_count.
        if lv_max is INITIAL.
          lv_max = s_werks-low.
        else.
          if lv_max < s_werks-low.
            lv_max = s_werks-low.
          endif.
        endif.
      endif.
      write :/ lv_min,
               lv_max.

  • How to unset the 'use itunes for internet music playback' option

    In Advanced Preferences, I mistakenly clicked the SET button for "Use itunes for internet music playback". Since then, I have closed and opened itunes, so it appears the preference has been saved (the field is no longer highlighted)
    I cannot find any way to unset this option. I want to unset this option. Could someone please tell me how?

    I don't think that deleting the plist file will help.
    Clicking that button sets the handler for a bunch of file types. You can't just unset it, you need to set the handler to something other than iTunes. Normally audio and video are handled by the Quicktime Plugin. You can restore that behavior in System Preferences:
    System Preferences -> QuickTime (in the Internet and Network set) -> Advanced -> Mime Settings...
    You may have other plugins or programs you want to use for some formats (like .wmv or .avi). Those programs should be able to reclaim the file and MIME types from their preferences.

  • How do I prevent the use of a digital signature?

    I realize this flies in the face of some core security issues built into PDFs, but here we go...
    We have a customer for whom we are creating fillable PDF forms.  Due to the nature of the documents, they require handwritten signatures on printed hard copy.  Since the ability to digitally sign any PDF is enabled by default, and especially since Acrobat Reader X apparently prompts the user to use a digital signature, our customer is concerned that some end-users (most of whom will be non-tech-savvy) will be confused by the digital signature concept and would prefer to prevent the use of digital signatures at all.  I have played with the security settings in Acrobat Pro, but they are not granular enough to allow filling in a form without also allowing a digital signature.  Any way to prevent signing?
    Thanks,
    Mike

    @George Johnson:
    I tried to edit and save the form from within Acrobat Standard X, but it didn't seem to make any difference.
    @brogers_1:
    I am not familiar with EchoSign, but since the end-users are not part of my organization, nor my customer's, I won't have access to their registry settings.
    I don't want DigSigs at all.
    There is no signature field in the document--unless it is somehow hidden. 
    When a user either left- or right-clicks any form field (in Reader X at least), a window pops up titled "Form Can Be Filled and Signed Electronically" with a note to click "Sign" etc.:

  • What is the use of sim card in ipad2 wifi +3G and how to use it?

    what is the use of sim card in ipad2 wifi +3G

    Use the SIM card to connect to the cell carrier 3G network when there is no wifi available.
    To set it up, see this -> http://support.apple.com/kb/HT4157

  • Can I use a wild card in a dialed number in ICM

    Hi there,
    I need to enter several thousand dialed numbers which will all be mapped to the same call type.  Instead of adding each individual number or bulk imporing them can I use a wild card?
    Cheers

    I can tell you that we do exactly what you want to do, and it's the correct way.
    When blocks of numbers are caught by the gateway translation rules on the POTS dial peers and then matched by VOIP dial peers and sent up to CVP, you often end up having to deal with this situation.
    To prevent callers from hearing the CVP error message we have a message (WAV file) copied from Call Manager (we use the Annunciator-VCA.uLaw.wav file - something like "the number you have called is not configured. Please check the number and dial again" in different languages) and a simple PM microapp script to play it, scheduled against a call type.
    All of the numbers coming up from CVP that otherwise don't do anything are mapped to this call type and play the message.
    I pay attention to the Router Log Viewer and keep hammering the addition of dialed numbers until I get no more errors there. It sure can take a while. When the branch office (we have 11 or so in different countries, expanding to 20) owns a large block of numbers (say 100) you want to catch all of the "unconfigured" numbers so the caller (who may have fat fingered) hears a message in their language that has meaning.
    I do these large configs using Excel, with formulae etc to make the work easy. You will figure out the shortcuts - necessity is the mother of invention.
    Once the Excel is correct on all the CVP routing clients, export it as TAB separated and Bulk Import.
    To do the call type association (a painful task), I change the name of the call type - I put AAAAA in front. This forces it to the top of the combo box. So now you can actually fly through the Dialed Numbers you are trying to set and just use "Enter - Enter" to set the association. Once all done, change the name of the call type back.
    That's the best I can do.
    Regards,
    Geoff

  • Can you prevent the use of consecutive numbers in a password, using Group Policy?

    The regular old password complexity requirements disallow the use of 3 consecutive characters that appear in the user's account name / display name, but does not prevent the use of consecutive numbers at all. For example, a user can have a password including
    the string "12345". We have the need to disallow this via GP in order to make our passwords compatible with an outside service to which we would like to synchronize. I see no way to do this with the typical Password Policy settings. Anyone out
    there have any hints as to how I might accomplish this?
    This is on a Windows Server 2008 R2 Domain.

    Am 24.09.2014 um 20:01 schrieb dklein73:
    > We have the need to disallow this via GP in order to make our passwords
    > compatible with an outside service to which we would like to
    > synchronize. I see no way to do this with the typical Password Policy
    > settings. Anyone out there have any hints as to how I might accomplish this?
    You need a custom password filter dll on your DCs:
    http://msdn.microsoft.com/library/ms721766.aspx
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • How to prevent others use their iDevices to remote control apple tv?

    Hi All,
    I'm wondering that does anyone know how to prevent others use their iDevices to remote control my apple tv?
    settings
    1. the apple tv is in the school.
    2. all students could access the Internet
    3. The apple tv is sharing the same Internet with students.

    Welcome to the Apple Community.
    The remote app uses homesharing, therefore anyone wanting to control an Apple TV with the remote app would need to know the home sharing ID and password.

  • HOW TO CHANGE THE USEFUL LIFE FOR MORE ASSETS AT A TIME FOR ASSET CLASS

    Hi All,
    Asset which is under Asset Class Support system-B700. Here every thing is ok but the problem in USE FULL LIFE which is come by default. It must be 4 instead of  5.   So can any body help me out from this how to change the Useful life in that Asset class.  In that Asset Class we have the morethan 200 Assets. It was happend in Prdocution system so now the problem is where i can change the useful life for the asset class either in DEV or PRD.
           Also i want to know the information of How these assets are Uploaded into the system (Lsmw or etc). this is very urgent for me.
    Thanks in Advance,
    Regards,
    Siva.

    Hi Ashok,
         Can i know the reason how it was happend. i mean instead of 4 years the system showing is 5yesrs any reason is there behind that.
    Thanks in Advance.

  • How to configure the use of WS-RM in "PI 7.11 EHP1?

    How to configure the use of WS-RM in "PI 7.11 EHP1?
    Currently in the editing window of the communication channel (adapter type WS), I can not see any options regarding Reliable Messaging protocol (WS-RM).
    The scenario that is required is as follows.
    (Consumer WS-RM) -> (Provider WS-RM PI 7.11 EHP1) -> (ABAP Proxy Backend NW 7.0)
    I would greatly appreciate any help,
    Thanks,
    Roger.
    Edited by: Roger Solano on Apr 7, 2011 10:31 PM

    WS adapter supports WS Reliable Messaging.  But WS adapter is used to communicate between two SAP web service runtime. 
    Check this blog and its links for understanding direct connection or point to point communcation using WS adapter
    /people/william.li/blog/2008/02/13/point-to-point-connection-using-abap-in-sap-using-pi-71
    Hoe that helps.

  • How to prevent the code viewing of jsp files

    hello friends
    How to prevent the code viewing on directly opening .jsp files at the server side
    Thanks in advance

    hello friends
    How to prevent the code viewing on directly opening
    .jsp files at the server side
    Thanks in advanceWhat exactly do you mean by code viewing? If by that you mean you don't want all the folders to show in the directory create a index.jsp file that has all the links to the pages you want to show
    If you mean something else please clarify

  • Hello , FMS is how to prevent the client into a large number of bytes?

    Hello , FMS how to prevent the client to pass a large number of bytes , such as one person put a 1G file in the argument , I also silly to receive ?Although there Client.setBandwidthLimit ( ) limit his maximum traffic per second , but is there a way , one more than the maximum amount of bytes to disconnect his.I assume that methods to determine the length is also obtained all of his transfer is finished , in order to determine out of it .

    How to limit the size of the parameters of the method.I wrote a method in the main.asc then the client NetConnection.call assignment, but if the client is malicious to upload very large data, how to limit it, I view the document did not find the clues, I hope that those parameters up to100KB.

  • New comer ask 2 simple questions:how to set the use of the right click of

    New comer ask 2 simple questions:how to set the use of the right click of your mouse?
    I don't know why when i click the right button of my mouse in logic, sometimes it's the same funcion as my left one, some times it's the same function that opens the tool menu....But in MacOSX,it's all okay.Just the weired thing in logic ,please help
    2.is there any kind of filter in Score? I mean, in midi track I have a C1 note, and I don't want the C1 note shown in my score, I want every note show which are above C2, like a filter. I think this is helpful dealling with some keyswich things,how can we do that?

    In Preferences -> Global -> Editing you can choose weather right click is assignable or opens the tools box.
    Not to sure about the score dude

Maybe you are looking for

  • Doubt in creation of a new object

    Hi All,              I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype of any existing object, then what should we enter in the Program field for creating the object? I hope I am clear with my quest

  • Strange sync behavior -- Itunes wants to sync music on two computers!

    I use my iphone to keep contacts and calendars synced between my office and home computers, which it does nicely (asking me each time I switch machines whether I want to merge or replace the data--to which I always reply merge). I thought Itunes was

  • Will apple TV effectively make my TV a wireless external monitor

    Would I be able to use the Apple TV to to display anything my iMac screen shows? ie could I use it to show an Excel spreadsheet or a Keynote presentation? Ta

  • SAP PO PRINT OUT

    Hi SAP gurus, I am not an expert in S A P  so my question is simple, how to add or instruct technical guy to add "ORDER NO (item detail Account Assignment tab)".So that the "ORDER NO" will apear in PO printout output.Thank you guys in advance.

  • QoS questions SG200

    If I don't have any VOIP devices, should I just leave all the QoS settings to default? We have an AirPlay speaker on our network, so could there be benefits in raising the QoS priority so that the audio streams smoothly to this device? Cheers, Max