FM u2018SELECT_OPTIONS_RESTRICTu2019 but it is not working.

I am trying to restrict the selection options using FM u2018SELECT_OPTIONS_RESTRICTu2019 but it is not working. Here is the code I am using and it is not changing any option for S_CoCd. Please help me out.
TYPE-POOLS SSCR.
DATA: T_***_TAB  TYPE SSCR_***,      "select-options to be restricted
      T_OPT_LIST TYPE SSCR_OPT_LIST, "switches controlling each option
      RESTRICT   TYPE SSCR_RESTRICT. "structure holding above 2 tables
  SELECTION SCREEN
selection-screen begin of block box1 with frame title text-t01.
select-options: S_CoCd for CoCd obligatory DEFAULT 'US10'.
selection-screen end of block box1.
Initialize Selection Screen
initialization.
Create t_opt_list entry to specify capabilities of S_CoCd.
  CLEAR T_OPT_LIST.
  T_OPT_LIST-NAME       = 'S_CoCd'."This must match ***_tab-op_main
  T_OPT_LIST-OPTIONS-BT = SPACE.     "Do not permit BETWEEN
  T_OPT_LIST-OPTIONS-CP = SPACE.     "Do not permit MATCHES-PATTERN
  T_OPT_LIST-OPTIONS-EQ = 'X'.       "       Permit EQUALS
  T_OPT_LIST-OPTIONS-GE = SPACE.     "Do not permit GREATER-OR-EQUAL
  T_OPT_LIST-OPTIONS-GT = SPACE.     "Do not permit GREATER-THAN
  T_OPT_LIST-OPTIONS-LE = SPACE.     "Do not permit LESS-OR-EQUAL
  T_OPT_LIST-OPTIONS-LT = SPACE.     "Do not permit LESS-THAN
  T_OPT_LIST-OPTIONS-NB = SPACE.     "Do not permit NOT-BETWEEN
  T_OPT_LIST-OPTIONS-NE = SPACE.     "Do not permit NOT-EQUAL
  T_OPT_LIST-OPTIONS-NP = SPACE.     "Do not permit NO-PATTERN-MATCH
  APPEND T_OPT_LIST TO RESTRICT-OPT_LIST_TAB.
Create t_***_tab entry to show we're restricting select-option S_CoCd.
  CLEAR T_***_TAB.
  T_***_TAB-KIND    = 'S'.        "Apply only to the named SELECT-OPTION
  T_***_TAB-NAME    = 'S_CoCd'.    "This is name of the SELECT-OPTION
  T_***_TAB-SG_MAIN = 'I'.        "I = ONLY Inclusions; * = Both
  T_***_TAB-SG_ADDY = Space.
  T_***_TAB-OP_MAIN = 'S_CoCd'. "This must match opt_list-name
  APPEND T_***_TAB TO RESTRICT-***_TAB.
Call function to restrict the capabilities of select-option
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      RESTRICTION                  = 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.
Provide error if attempt to restrict capabilities of S_BUKRS failed.
  IF SY-SUBRC <> 0.
    MESSAGE E089(ZZ) WITH SY-REPID
                          SY-SUBRC
                         'SELECT_OPTIONS_RESTRICT'.
  ENDIF.
Edited by: Rajesh Hemnani on Jun 17, 2009 11:42 AM

Hi,
Please use the name in capital letters while specifying the NAME value.
TYPE-POOLS sscr.
DATA: t_***_tab TYPE sscr_***, "select-options to be restricted
      t_opt_list TYPE sscr_opt_list, "switches controlling each option
      restrict TYPE sscr_restrict. "structure holding above 2 tables
* SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK box1 WITH FRAME TITLE text-t01.
SELECT-OPTIONS: s_cocd FOR CoCd OBLIGATORY DEFAULT 'US10'.
SELECTION-SCREEN END OF BLOCK box1.
***************************** Initialize Selection Screen
INITIALIZATION.
* Create t_opt_list entry to specify capabilities of S_CoCd.
  CLEAR t_opt_list.
  t_opt_list-name = 'S_COCD'.
  "This must match ***_tab-op_main
  t_opt_list-options-bt = space.
  "Do not permit BETWEEN
  t_opt_list-options-cp = space. "Do not permit MATCHES-PATTERN
  t_opt_list-options-eq = 'X'.  " Permit EQUALS
  t_opt_list-options-ge = space. "Do not permit GREATER-OR-EQUAL
  t_opt_list-options-gt = space. "Do not permit GREATER-THAN
  t_opt_list-options-le = space. "Do not permit LESS-OR-EQUAL
  t_opt_list-options-lt = space. "Do not permit LESS-THAN
  t_opt_list-options-nb = space. "Do not permit NOT-BETWEEN
  t_opt_list-options-ne = space. "Do not permit NOT-EQUAL
  t_opt_list-options-np = space. "Do not permit NO-PATTERN-MATCH
  APPEND t_opt_list TO restrict-opt_list_tab.
* Create t_***_tab entry to show we're restricting select-option S_CoCd.
  CLEAR t_***_tab.
  t_***_tab-kind = 'S'. "Apply only to the named     SELECT-OPTION
  t_***_tab-name = 'S_COCD'. "This is name of the SELECT-OPTION
  t_***_tab-sg_main = 'I'. "I = ONLY Inclusions; * = Both
  t_***_tab-sg_addy = space.
  t_***_tab-op_main = 'S_COCD'. "This must match opt_list-name
  APPEND t_***_tab TO restrict-***_tab.
*  Call function to restrict the capabilities of select-option
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      restriction            = 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.
*       * Provide error if attempt to restrict capabilities of S_BUKRS failed.
  IF sy-subrc NE 0.
    MESSAGE e089(zz) WITH sy-repid sy-subrc 'SELECT_OPTIONS_RESTRICT'.
  ENDIF.
Regards
Bhupal Reddy

Similar Messages

  • IMAGEIO IS WORKING BUT BYTEARRAY IS NOT WORKING:

    Hi all
    I am getting images from gmail contacts and trying to store it in DB
    using my http code:InputStream is=urlconnection.getInputStream();
    i could able to store the inputstream in file using:
    BufferedImage filebuffer=ImageIO.read(is);
    FileOutputStream fos=new FileOutputStream("picturerecent.jpg");
    ImageIO.write(filebuffer, "jpg", fos);
    but i was trying to store it in DB using the following code but it is not working.i am having a question that
    how it writing to a file without any problem.why not to database:
    try {
           String url = "jdbc:mysql://localhost:3306/";
             String db = "test";
             String driver = "com.mysql.jdbc.Driver";
                    Class.forName(driver);
                    con = DriverManager.getConnection(url+db,"root","");
                    try{
    PreparedStatement psmnt;
         psmnt = con.prepareStatement("insert into gmailphoto(id,Photo) "+ "values(?,?)");
         psmnt.setInt(1, 9);
         psmnt.setObject(2, is, java.sql.Types.BLOB);
         int s = psmnt.executeUpdate();
           Statement st = con.createStatement();
        try{
            ResultSet rs=st.executeQuery("select photo from gmailphoto where id=9");
            if(rs.next())
              {     //byte[] bytearray = new byte[4096];
                  int size=0;
                File sImage;
    //FIRST TRY
                FileWriter wr=new FileWriter(new File("c:\\imageOutput.jpg"));
                IOUtils.copy(rs.getBlob("photo").getBinaryStream(),wr);
                //SECOND TRY
                BufferedImage bf=ImageIO.read(new ByteArrayInputStream(rs.getBytes("photo")));
                FileOutputStream fout=new FileOutputStream(new File("C:\\imageOut"));
                if(bf!=null)ImageIO.write(bf, "jpg", fout);
                if(wr!=null)
                wr.flush();
                wr.close();
              rs.close();
           }}catch(SQLException e){
                System.out.println(e);
           }Thanks a lot for help

    but i was trying to store it in DB using the following codeThere is no code here that writes to a database. There are two lots of code that write to a file.

  • My iPhone safair says it cannot open because it is not connected to the internet.  What do I do? I do not believe I changed any settings.  I have turned the phone off but this did not work.

    Safari cannot open because the iPhone is not connected to internet.  I do not believe I have changed any settings.  I have turned off the phone and then on, but this did not work.  Help?

    For Safari to work, you need either Wi-Fi or cellular data.
    Are you connected to a Wi-Fi hotspot?
    If not is Settings > Mobile/Cellular > Mobile/Cellular Data: ON

  • I get this error when I go to imovie, I have instalerat on via appstore, but it does not work. The QuickTime components necessary to view, edit, import and export various types of films are not installed. The components included in the iMovie installer. R

    I get this error when I go to imovie, I have instalerat on via appstore, but it does not work.
    The QuickTime components necessary to view, edit, import and export varioustypes of films are not installed. The components included in the iMovie installer.Reinstalling iMovie.

    I get this error when I go to imovie, I have instalerat on via appstore, but it does not work.
    The QuickTime components necessary to view, edit, import and export varioustypes of films are not installed. The components included in the iMovie installer.Reinstalling iMovie.

  • I cannot access the internet, I tried to answer that said to go to settings, safari, tap clear history, cookies and cache, cut off, then on, but it did not work.  When I go to internet the screen is grey??? please help I am a new user!!

    I cannot access the internet the screen is grey, I have tried by using the answer from someone but it does not work...I went to settings, tap safari, then clear the history, cookies, and cache, then turn off ipad.  When I did that twice, it did not work.  How long does it take for the clear history to work?  I am a brand new
    user of the ipad2 and I am disappointed that this is happening already.

    Have you been able to access the internet previously and now it's suddenly not working, or are you still trying to access the internet for the first time on your iPad?  Are you at home trying to connect through your home router?  If you are at home, did you put your home routers encryption code as your password?  The encryption code is what your iPad is looking for and it is usually found on the router and is typically a 13 digit combination of letters and numbers.  Let us know......

  • Is it possible to  downgrade ios 6 to 5.1.1(i upgrade my iphone 4s from 5.1.1 to 6 but map is not working )

    is it possible to  downgrade ios 6 to 5.1.1(i upgrade my iphone 4s from 5.1.1 to 6 but map is not working )

    best answer to your question I've ever seen is;
    Kappy Tampa, FL and Vancouver, BC
    Re: Downgrading     Oct 16, 2012 2:57 PM    (in response to nbabbit2013) 
    I'm sorry, but Apple does not provide a downgrade path for iOS. Because downgrading is unsupported by Apple we cannot discuss it on these forums, but you can use Google to find information on how to install an older version of iOS on any iDevice.

  • HT4108 I'm trying to connect my iPad to my tv so that I can mirror whatever is on my iPad. I want to stream movies online and watch on the tv. I have the digital av adapter and an hdmi cable but it's not working. Any tips ?

    I'm trying to connect my iPad to my tv so that I can mirror whatever is on my iPad. I want to stream movies online and watch on the tv. I have the digital av adapter and an hdmi cable but it's not working. Any tips ?

    If this is an iPad 1, it won't mirror, but it will still output video from the 30 Pin dock connector.
    If your new TV has a conventional VGA in and stereo inputs you can try this connector.
    http://store.apple.com/us/product/MC748ZM/A/apple-composite-av-cable?fnode=3a
    I used to stream video from both Netflix and YouTube and from my Mac using iTunes sharing through my iPad then with this connector plug into my iPad and TV.
    It won't be high resolution, but it will get you picture from iPad to TV.
    Good Luck.

  • Greetings, I am working in Final Cut Pro 7. In the timeline some clips show as offline. I tried going to sequence and reconnecting to media but it does not work. I can still see the video in the timeline and work with it. It just has the red box.

    Greetings, I am working in Final Cut Pro 7. In the timeline some clips show as offline. I tried going to sequence and reconnecting to media but it does not work. I can still see the video in the timeline and work with it. It just has the red box. Thanks! Olga

    If the clips are not actually missing, you could try to refresh the timeline by using cmd-0 and then going to the timeline options tab. Then select name only where it says "thumbnail display". Press ok to accept the change, then repeat the process to add thumbnails back to your timeline.

  • " help me please"  I have Windows 7 installed on my mac pro and Bought Mini DisplayPort to VGA Adapter to connect to lcd tv But it does not work? why? please help me

    " help me please"  I have Windows 7  32 bit installed on my mac pro and Bought Mini DisplayPort to VGA Adapter to connect to lcd tv But it does not work? why? please help me
    I have to boot with a Windows
    When I use the Mac operating system not have a problem  and DisplayPort to VGA Adapter Working properly
    why does not work with windows ?
    What should I do؟
    I'm grateful to give advice
    tanks
    [email protected]

    Someone in another section answered this. Thanks.

  • My ipad mini is not syncing music onto in, my ipad has been replaced to see whether the issue is to do with the ipad but its still not working. i have a a windows PC please help thanks

    my ipad mini is not syncing music onto in, my ipad has been replaced to see whether the issue is to do with the ipad but its still not working.
    ive tried everything and ive been to the store which was when i was given a new ipad mini. i have a a windows PC please help thanks

    Are you attempting to sync music from your iTunes Music Library on your PC?
    What options do you have set on the Music Tab for your iPad in iTunes?
    What happens when you sync?
    Any error messages?

  • Macbook pro to HDTV, video is working but audio is not working, how to make audio work as well

    Macbook pro to HDTV, video is working but audio is not working, how to make audio work as well

    If you use an HDMI cable, the audiostream will be integrated, so there will be sound when using an HDMI cable!
    Not necessarily.  That only works as stated if you have one of the most recent MBP's that has a built-in HDMI port.
    If the MBP only has a Thunderbolt or miniDisplayPort, you need an appropriate adapter cable and even if you use an HDMI adapter or cable to connect to your HDTV there is no guarantee it will carry audio.  You have to determine if your specific MBP model supports audio out through its miniDisplayPort or Thunderbolt output, and whether the adapter does likewise.

  • I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card)

    I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card).
    Things to note:
    I have been unable to update firmware on this computer for about a year now. Im not sure why.
    I am running a bootleg copy of Windows XP on this computer, I would not like to spend $149 to get Windows 7 if possible.
    any thoughts on the matter would be greatly appreciated, thank you.

    Why don't you take your 'old' MBP into your local Apple Store and have them check out everything that's wrong with it - and I mean everything? Then, when you get an estimate about how much it would cost to get the machine completely repaired, ask about the Apple flat-rate repair pricing?
    It's worth a shot - and with what you may save, you can put in the bank for a new MBP.
    Clinton

  • I am trying to setup my new time capsule but it is not working. after entering the airport utility and locating the TC, after I tell the program to continue, the unit just disappear and the setup menu says there is an error. Any idea of what is happening?

    I am trying to setup my new time capsule but it is not working. after entering the airport utility and locating the TC, after I tell the program to continue, the unit just disappear from the menu and the setup menu says there is an error. I tried using the wireless connection, and also the cable, but none worked. Any idea of what could be happening?

    What are you setting it up as.. join wireless network .. the very worst setup, it will disappear.. reboot the whole network in order modem. router TC.. clients and it will likely reappear.
    Tell us what network setup you are using..
    If you setup with cable to a computer completely isolated from the network with TC also isolated.. finish the setup of everything you want. .before update.. then plug it into the network. .then restart everything in correct order.. it will work most of the time.

  • I was trying to put my password but it is not working. My Ipod touch is showing "Ipod is disabled, connect to Itunes". But I tried to connect but the Itunes tells me that I need the password first to connect.I do not know the password. what should I do?

    I put the password in my Ipod and now I am trying to put it again but it is not working....I tried to connect with the Itunes and it is not working because to the Itunes work with my Ipod, I need the password first, which I do not know. In my Ipod is showing "Ipod is disable, connect to Itunes". I was trying to connect but I can't...what should I do ?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I downloaded CS6 and am having issues with my print driver. It is not compatible with the HP 2600n and have tried to download drivers given to me by adobe ( (Jupiter 3) but it is not working. after a few days. Its a temporary fix and is still looking for

    I downloaded CS6 and am having issues with my print driver. It is not compatible with the HP 2600n and have tried to download drivers given to me by adobe ( (Jupiter 3) but it is not working. after a few days. Its a temporary fix and is still looking for the HP driver when i boot up. It also will not save in any print or postscript format. Does anyone know how to fix?
    Currently use a Mac with the latest Mavericks 10.9.4

        Oh boy! Acting kind of weird seems to be an understatement, aquaequus!
    What type of troubleshooting were we able to do with you? I want to make sure that we can get some sort of resolution for this problem.
    It is quite possible the battery door may get your phone in working order again. I'm not sure if the store has it in stock, but it is available in our warehouse for $14.99 which can be ordered via customer service.
    Tamara H.
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • My Mac is very, very slow

    Hi there, Need help. Have MacBook Pro for last 5 years. It has OS X 10.5.8, 2 GB RAM and 4 GB of free cpace on 80 GB HD. Recently it became very slow. I mean REALLY slow. Except for the web page that I can scroll up and down for everything else i see

  • 2 Apps with the same name?

    Hi everybody! I finished my work on two ipad-magazines a few days ago (english/german version). The plan is, to transfer the whole .app package to our customer, who will publish the apps in the Apple App Store himself. Now, there has been a lot of di

  • How to make a ramp affect other layers

    I'm trying to create a lower thirds that will include some motion, otherwise I might try Photoshop for this. But basically, I'm trying to create a gradient using ramp in AE so that the lower thrids I've created fades away on the sides. Similar to the

  • Automatic Scheduling of Transports

    Hi, Is there a way in NWDI for automating the released transports from DEV to QA on a schedule? And also control them from QA to Prod? -Aarthi

  • Adobe Flash Professional CC 2014 Download Errors?

    So yeah, I installed Adobe Flash Proffesional from Creative Cloud but it installed the CS6 version instead of CC 2014. Before you ask, yes, I tried downloading the free trial from this website but somehow, the download didn't start AT ALL! So, please