How to restrict more than one 1 range in select option on selection screen.

Hi all,
I have a requirement where I need to restrict user from giving more than 1 range for a date selct option ..other all features of multiple selection will be as usual...
for eg we can do this if we disable / hide other cells if the user clicks on multiple ranges tab.. If only 1 cell is available to give the range user will not be able to give more than 1 range....
I was thinking if I could use select_options_restrict but how do i fill its parameters...
Can anyone send me the sample code or the same to achieve this functionality...I have used select_options_restrict to hide multiple ranges itself  ... But here user will be able to give range but only 1....
Thanks and Regards
Sweta

HI,
Please try the below logic.
SELECT-OPTIONS: so_addr   FOR    ADR6-SMTP_ADDR NO INTERVALS.
***********remove_range_for_select_option******************* .
  DATA: ls_restrict  TYPE  SSCR_RESTRICT,    "The type for SELECT_OPTIONS_RESTRICT
        ls_opt_list  TYPE  SSCR_OPT_LIST,    "One list of options
        ls_asn       TYPE  SSCR_***.         "One line of table associating selection screen
                                                                  "object with opt. list
  CLEAR: ls_restrict,
         ls_opt_list,
         ls_asn.
*Only EQ valid, discrete values, Include & Exclude
  ls_opt_list-name       = 'EQ'.
  ls_opt_list-options-eq = 'X'.
  APPEND ls_opt_list TO ls_RESTRICT-OPT_LIST_TAB.
  LS_ASN-KIND            = 'S'.
  LS_ASN-NAME            = 'SO_ADDR'.            "Select Option
  LS_ASN-SG_MAIN         = 'I'.
  LS_ASN-SG_ADDY         = '*'.
  LS_ASN-OP_MAIN         = 'EQ'.
  LS_ASN-OP_ADDY         = ' '.
  APPEND LS_ASN TO LS_RESTRICT-***_TAB.
*Make use of SELECT-OPTIONS easier on the selection screen
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      RESTRICTION            = LS_RESTRICT
    EXCEPTIONS
      TOO_LATE               = 1
      REPEATED               = 2
      SELOPT_WITHOUT_OPTIONS = 3
      SELOPT_WITHOUT_SIGNS   = 4
      INVALID_SIGN           = 5
      EMPTY_OPTION_LIST      = 6
      INVALID_KIND           = 7
      REPEATED_KIND_A        = 8
      OTHERS                 = 9.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Edited by: Rajasekhar Reddy P on Mar 16, 2009 2:03 PM

Similar Messages

  • How to restrict more than one popup window

    Hello All,
    Is it possible to have only one pop up window at a time?
    My problem is:
    From parent window, I can use a link to open a pop up window. Now I have to restrict the user not to have more than one pop up window at a time.
    Kindly suggest any solution to this .
    Best Regards

    This is a Javascript related question. Javascript related questions should be posted in a forum devoted to Javascript. There are ones at webdeveloper.com and dynamicdrive.com.

  • How to restrict more than one delivery from one sales order.

    Hi Guys,
    We have a requirement that is, system should not allow more than one delivery from one sales order no even if when there is some line item still to be delivered.
    We want only one delivery for one sales order and rest of line items should be treated as rejected.
    Kindly help
    Thanks in advance,
    Balu

    Hi MP,
    Its also not working as we have the requirement is that once sales order is saved and one delivery is created then again if we are adding some more item inthe same sales order then system should not allow to create delivery document as one delivery already created.
    Thanks,
    Balu.
    Edited by: Balu Sajja on Aug 30, 2010 1:29 PM

  • How to send more than one value to the Jump target report variable screen.

    Hi,
       I have two reports with Plant variable on their input variable screens. Say this Plant can take two values X and Y. The first report is executed with Plant value X and displays data. When a jump is made  to report two, Plant value X is retrievd into report two's plant varible value. Now how to send value Y also to Report two when jump is made. I think we can do it with a customer exit? Any help is appreciated
    Thanks
    Bhanu

    Hi Bhanu,
    I guess u have created a Variable with Sinlge value ,So Create a Variable which has Multiple Sinlge Values or Interval so that u can have more than one value and if u hvae more than value u will get data for those values and when u do a jump then u can see the data in the JUMP query for both the Values of Input.
    Rgds
    SVU123

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • How to display more than one documents on windows 8 desktop?

    how to display more than one documents on windows 8 desktop?

    Adobe Reader Touch doesn't show more than one file on screen and doesn't show them on the desktop. Apparently these are very old fashioned things that Microsoft doesn't think we'll want to do any more and calls them "legacy" to make them sound antiquated.
    If you want to do these things use the legacy Adobe Reader, a much more powerful and flexible app (and not obsolete in the slightest). http://get.adobe.com/reader . There are no legacy apps in the Windows App Store.

  • How to make more than one partition on Airport Time Capsule?

    how to make more than one partition on Airport Time Capsule?

    Only for the very brave......
    Open up the Time Capsule (voids the warranty)
    Pull the hard drive
    Place the hard drive in a separate enclosure
    Connect the enclosure directly to your Mac
    Use Disk Utility to partition the hard drive
    Reinstall the hard drive back in the Time Capsule
    For the rest of us.....
    The next best thing might be to set up one or more disk images on the Time Capsule, which will allow you reserve a given amount of space for each disk image.
    Open up Macintosh HD > Applications > Utilities > Disk Utility
    Click on the New Image tab
    Navigate to the Time Capsule
    Set up the disk image by naming it and specifying how much space you want to reserve

  • How to attach more than one picture on an email

    How to attach more than one picture on an email?

    Tap the square with arrow on top right and select pictures you want to send (max 5 pictures)
    http://i1224.photobucket.com/albums/ee374/Diavonex/f0bd7d73.jpg

  • How to sync more than one iphone to a macbook?..

    How to sync more than one iphone to a macbook?..

    Open itunes, connect iphone, select what you want to sync, sync
    Do the same for each iphone.

  • How to add more than one tabular region in a page?...

    How to add more than one tabular region in a page?
    i have a page, that page contain form and tabular region. when i trying to add another tabular region it showing error
    1 error has occurred
    Updatable SQL Query already exists on page 2. You can only add one updatable SQL query per page. Select a different page.
    but i have to add the tabular in that page.
    Is it possible?
    pls help...
    Thanks and regards,
    skud

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

  • I have an HP Photosmart C4180 all in one printer scanner and copier, I can't figure out how to scan more than one page at a time and then send as a PDF file via email

    I have an HP Photosmart C4180 all-in-one, printer, scanner and copier.  I can't figure out how to scan more than one page?  It will only let me do one page at a time and then I have difficulty sending pages 1, 2 and 3 as one docuement.  Any ideas??
    Thank you, Jetteski

    Hello Jetteski,
    Hello Jetteski, Thanks for the post.
    Since you are running a MAC, check the below links for some excellent information on scanning.  Good Luck!
    http://goo.gl/M8Cl2
    http://goo.gl/cufK6
    http://goo.gl/OTQoR
    I work for HP but my posts and replies are my own....Thank you!

  • Just bot a macbook pro to replace one of my pc's. can't figure out how to have more than one website open at a time like explorer. Is it possible to do?

    I can't figure out how to open more than one website at a time like explorer does on a pc. would like to know if it Is possible or not.

    Tabbed browsing is the way. Go to Safari's View menu:
    and click "Show Tab Bar." When you see a link on another site you wish to open without closing the first site, simply right-click and select "Open Link in New Tab."

  • How to share more than one Time Machine folder

    Hi,
    With Snow Leo Server I found how to find how to share more than one Time Machine Folder but I can't see how to do the same with Lion Server, could you help me with that ?
    The goal of that is to offer one TM folder per user which is located on a dedicated partition in order to limit the size of TM backups per user (150Gig).
    In Lion, in can only share one TM folder for everybody and I didn'tfind if I can set a limit size per user...
    Thank you in advance,

    I have figured out a way to enable multiple backup targets.
    However, it's one of these things I wouldn't want to describe to anyone except true programmer types, because everyone else has a 90%+ chance of messing up their system if they do something wrong.
    It involves turning off file sharing, and then editing the plist files in /private/var/db/dslocal/nodes/Default/sharepoints/
    The gist of it is this:
    a) first create all the share points you later want to use for TimeMachine, and set them up for afp-only file sharing, also create one TM target, which you can either use later, or have there so the system has one entry it knows how to handle. I just made a bogus one that I'm not actively using.
    b) turn off file sharing in Server.app
    c) turn off TimeMachine in Server.app
    d) now you can edit the files, the easiest is with Xcode, so you may want to install that first
    e) for each sharpoint you made in a) there will be a corresponding .plist file in the location indicated, these are the files that need to be edited.
    f) for each of these files
         1) the item0 string property in the timeMachineBackup array must be switched from 0 to 1
         2) a new key of type array with the name timeMachineBackupUUID must be created
         3) in the newly created array an item of type string must be placed with the value of a UUID, which can be created with the shell command uuidgen
    g) make sure all the edited plist files are saved
    h) turn on TimeMachine in the Server.app again
    If all went well, you now should be able to go to one of your networked client computers and see all the time machine share points just created as options for being a time machine target.
    Anyway, if you go that route: be careful, don't blame me if you muck things up...

  • How to pass more than one value for one column in procedure

    hi
    select id, name from col_tab where dept_name in ('ECE','CIVIL');
    when i was running this it is working well.
    CREATE OR REPLACE PACKAGE pack_str
    AS
    TYPE type_refcur IS REF CURSOR;
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
    IS
    BEGIN
    OPEN ans FOR
    select id,name from col_tab where dept_name in char_in ;
    END str;
    END pack_str;
    the package was created.
    my doubt is
    1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
    2. when i was storing the value in string like val = 'ECE,CIVIL' ,
    how to get the id,name for ECE and CIVIL.
    plz help me

    Hi Rebekh ,
    I am recreating your packages for the desired output.
    CREATE OR REPLACE PACKAGE pack_str
    AS
         TYPE type_refcur IS REF CURSOR;
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
         IS
              lv_t varchar2(200);
         BEGIN
              lv_t := REPLACE(char_in,',',''',''');
              lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
              OPEN ans FOR lv_t;
         END str;
    END pack_str;
    Note:-
    Input Parameter char_in is a comma seperated value for dept_name
    -Debamalya

Maybe you are looking for

  • How resize pictures in table on PAGES 5.2?

    The new version 5.2 was be optmized for import image in table, but how resize these pictures in table?

  • Watching iTunes Movie on Apple TV while streaming sound to multiple AirPlay speakers

    Hi Everyone, I bought a pair of Airplay speakers and Apple TV 3rd generation to watch my Movies in the iTunes library. Importantly, I want to listen to the movies sound on multiple Airplay speakers while watching. So far I couldn't activate the speak

  • 2 5508's connecting to 2 6500 switches

    Looking to design for redundancy and mobility. My initial plan was to use LAG on both but I am confused on the setup because typcially all interfaces on these two switches are setup with HSRP. Does anybody have a matching configuration example they c

  • Quantity Mapping in Message mapping

    I have the below mapping conditions... Create for every quantity related to billcode and Sponsorcode.  If there is no quantity, create segment with quantity 0. How to map this?  Please help how to map this clearly... Thanks in advance..

  • Add new dictionaries or languages to 10.9.2

    Hi, I need to add some Danish-English, English-Danish dictionaries to the native Dictionary app. This was possible in 10.8 and earlier, but now I can't get it to work, or i've forgotten how to. Back in the days, I just download the dictionaries I nee