Problem in Select rights

I have defined a role as:
create role my_role;
Then I granted the select on USER1.Table1 as:
Grant select on User1.Table1 to my_role:
Then I granted the role to User2 as:
grant my_role to User2;
Now I am able to execute the following query while I am connected with User2:
select * from User1.Table1;
All is working fine.
Now I have writen a procedure in User2 As
Create or replace procedure User2.someProceduere
cur_test out sys_refcursor
Begin
Opne cur_test
for 'select * from User1.Table1';
End;
While I runt this procedure it produces the error message
"Table or view does not exists"
Intrestingly when I give direct rights on User1.Table1 to User2 the procudure statrs working, without any error
(From direct rights I mean to say when I do not give rights through the roile "my_role"
instead I write:
grant select on User1.Table1 to User2;)
I want to know the reason? I am confused, because when I give rights through the role the procedure does not work
and when I give rights directly to the user the procudue starts working.
Edited by: Sayyed_Kamran on Aug 11, 2010 1:40 AM

Right. This is written in detail in the Oracle documentation. Some portion from that:
>
How Roles Work in PL/SQL Blocks
The use of roles in a PL/SQL block depends on whether it is an anonymous block or a named block (stored procedure, function, or trigger), and whether it executes with definer's rights or invoker's rights.
Roles Used in Named Blocks with Definer's Rights
All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer's rights. Roles are not used for privilege checking and you cannot set roles within a definer's rights procedure.
The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that executes with definer's rights queries SESSION_ROLES, then the query does not return any rows.
http://download.oracle.com/docs/cd/B28359_01/network.111/b28531/authorization.htm#DBSEG004
>
>
A unit whose AUTHID value is CURRENT_USER is called an invoker's rights unit, or IR unit. A unit whose AUTHID value is DEFINER is called a definer's rights unit, or DR unit. An anonymous block always behaves like an IR unit. A trigger or view always behaves like a DR unit.
The AUTHID property of a unit determines whether the unit is IR or DR, and it affects both name resolution and privilege checking at run time:
* The context for name resolution is CURRENT_SCHEMA.
* The privileges checked are those of the CURRENT_USER and the enabled roles.
When a session starts, CURRENT_SCHEMA has the value of the schema owned by SESSION_USER, and CURRENT_USER has the same value as SESSION_USER. (To get the current value of CURRENT_SCHEMA, CURRENT_USER, or SESSION_USER, use the SYS_CONTEXT function, documented in Oracle Database SQL Language Reference.)
CURRENT_SCHEMA can be changed during the session with the SQL statement ALTER SESSION SET CURRENT_SCHEMA. CURRENT_USER cannot be changed programmatically, but it might change when a PL/SQL unit or a view is pushed onto, or popped from, the call stack.
Note:
Oracle recommends against issuing ALTER SESSION SET CURRENT_SCHEMA from within a stored PL/SQL unit.
During a server call, when a DR unit is pushed onto the call stack, the database stores the currently enabled roles and the current values of CURRENT_USER and CURRENT_SCHEMA. It then changes both CURRENT_USER and CURRENT_SCHEMA to the owner of the DR unit, and enables only the role PUBLIC. (The stored and new roles and values are not necessarily different.) When the DR unit is popped from the call stack, the database restores the stored roles and values. In contrast, when an IR unit is pushed onto, or popped from, the call stack, the values of CURRENT_USER and CURRENT_SCHEMA, and the currently enabled roles do not change.
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/subprograms.htm#LNPLS00809

Similar Messages

  • Problem with selecting text in Adobe Reader XI

    Hi all, I am encountering a problem with Adobe Reader XI and it is very strange I could not find an alike issue on the internet so I guess I have to submit a question with it.
    So here it is, I am using Adobe Reader XI Version 11.0.2, operating system: Windows 7. I do not know it starts from when but it has the problem with selecting text - to be copied in pdf documents. I ensure that the documents are not scanned documents but word-based documents (or whatever you call it, sorry I cannot think of a proper name for it).
    Normally, you will select the text/paragraph you want to copy and the text/paragraph will be highlighted, but the problem in this case that I cannot select the text/paragraph, the blinking pointer (| <-- blinking pointer) will just stays at the same location so I cannot select/highlight anything to be copied. It happens oftenly, not all the time but 90%.
    This is very annoying as my work involves very much with copying text from pdf documents, I have to close the pdf file and then open it again so I can select the text but then after the first copying or second (if I am lucky), the problem happens again. For a few text I have to type it myself, for a paragraph I have to close all opening pdf documents and open again so I could select the paragraph to copy. I ran out of my patience for this, it causes trouble and extra time for me just to copying those texts from pdf documents. Does this problem happen to anyone and do you have a solution for this? I would much appreciate if you could help me out, thank you!

    Yeah,  I totally agree, this is very strange. I have always been using Adobe Reader but this problem only occurred ~three months ago. It must be that some software newly installed I think. But I have no idea.
    About your additional question, after selecting the texts and Ctrl + C, the texts are copied and nothing strange happens. It's just that right after I managed to copy the texts, it takes me a while to be able to select the texts again. For your information, I just tested to select the texts and then pressed Ctrl, the problem happened. And then I tried pressing C and then others letters, it all led to the problem.
    I guess I have to stick with left-clicked + Copy until I/someone figure the source of this problem. Thanks a lot for your help!

  • Problem with:  select 'c' as X from dual

    Problem with 'select 'c' as X from dual'
    I get 2 different results when I execute the above with SQLPlus (or java) depending on the instance I am connected to. For one instance the result is a single character and for the other the character is padded with blanks to 32 chars in the SQLPlus window (and java). Does anyone know what database setting causes this to happen? Is it a version issue ?
    Test #1: Oracle 9.2.0.6 - SQLPlus result is padded with blanks
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:27:58 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    SQL> select 'c' as X from dual;
    X
    c
    SQL>
    Test #2 Oracle 9.2.0.1 SQLPlus result is a single character.
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:29:27 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL> select 'c' as X from dual;
    X
    c
    SQL>

    Using 9.2.0.6 On AIX 5.2 I get the single byte result:
    UT1 > select 'c' as X from dual;
    X
    c
    If the databases are on different Oracle Homes you may want to check the sqlplus global logon files for any set commands.
    If you executed the two sql statements from different OS directories you may also want to check your sqlpath for sqlplus .logon files.
    Try issueing clear columns and repeating the statement. Are the results the same?
    HTH -- Mark D Powell --

  • Performance problem with selecting records from BSEG and KONV

    Hi,
    I am having performance problem while  selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
    Regards,
    Prashant

    Hi,
    Some steps to improve performance
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING" creates more coding but is more effcient.

  • Problem about selecting waveform in waveform graph

    Hi all:
    I am developing a project by Labview. Now I meet a problem about selecting the waveform in the waveform graph.
    I am not sure whether it is possible about my idea.
    for example:
    In the waveform graph,  the different waveforms from a couple of channels are displayed. and then I want to select one waveform of them, and corresponding data about this waveform are shown. 
    Thanks so lot
    regards

    hanwei wrote:
    1.  can I zoom in and out in that "waveform graph"??
    You can do this using the graph palette. Just make it visible. The middle control allows you to zoom.
    2.  can I display the plot array or plot index that I select in the waveform graph?
    You can connect the same wire that goes to the ActivePlot property node to an indicator.
    3.  I build a sample codes for my project, in which , I used a random number generater to simulate a DAQmx data collection, and generate a overlapping waveform in the waveform graph.
         but it seems the program is not stable, when i first run the codes, it is ok, and I can select the plot what I want. but after I stop and restart the program, there is error message about "Property Node".
         it seems something wrong about the "waveform graph properties"
    I attached my codes here, anybody know what wrong about it?
    For some strange reason the property node is "messed up". I've seen this happen sometimes with graphs. I don't know what causes it, and the only way I've found to fix the problem is to delete the graph, put a new one on the front panel, and recreate the property nodes. I've typically seen this happen when copying code from another VI that has a graph with property nodes, as I suspect you did. If you delete the graph, put a new one on there, and recreate the property node you should be OK.
    That said, a few comments regarding the code:
    The architecture seems to be a mish-mash of operations, and I'm thinking that you probably want to look at using a producer-consumer architecture. Your producer loop responds to events, and the consumer loop does your DAQ collection.
    You have a race condition with your use of the "size(s) 2" local variable.
    Avoid right-to-left wires.
    The method of creating your arrays seems convoluted. However, since you said you will actually be getting the data from a DAQ system, the actual project code will likely be considerably different.

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

  • I'm having problems (1)selecting onscreen text, (2) having problems resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    I'm having problems (1) selecting onscreen text, (2) resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • My magic mouse behaves erratically with intermittent problems - slows down, right click doesn't work, disconnects for a few seconds then reconnects. Anyone suggest what I could do to fix this?

    My magic mouse behaves erratically with intermittent problems - slows down, right click doesn't work, disconnects for a few seconds then reconnects. Anyone suggest what I could do to fix this?

    I just figured out the print quality issue for my wife with her new iMac and new printer.
    She replaced both at once and she couldn't understand why her Artisan 730 was lower quality then her Epson R280 when they had the same specs.
    Turns out the newer printer had the option to connect via wifi which we used during setup.
    The driver options are completely different depending on how you connect.
    Once I connected via USB the correct options were available and the print quality was better.
    Looking at the R2400 it dies not have wifi, but while researching the problem for my wife someone esle was having an issue updating to the latest printer driver.
    If you go into the print utility from the Printer and Scanner system preference and under the general tab you should have driver 5.5.
    One user had to delete the old printer driver before Software Update loaded the newer printer driver.
    https://discussions.apple.com/message/15947486#15947486
    On my MacBook Pro (w Snow Leopard) I always had to reconnect my wifi at home when it woke up. I upgraded my router from an old Netgear to a newer N D-Link and stopped having to do that.
    I would be surprised you would have that problem with an Airport Extreme, you might check to see if there is a firmware update for it.

  • Problem in Selection Screen.

    Dear Experts,
    I am facing a problem in Selection Screen.
    <b>I have 2 radio buttons ,</b>
    <b>Radio Button 1</b> - Choosing the file from desktop and
    <b>Radio Button 2</b> - Executing from Database
    Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
    Problem Case -
    <b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
    Please see the entire code .</b>
    REPORT ZTEST.
    DATA: LV_FILE_PATH(20) TYPE  C.
    DATA: LV_MASK(20)      TYPE  C VALUE   ',*.XLS ,*.XLS.     '.
    *-- Macro to put radiobutton on selection screen
    *-- &1 - radiobutton parameter name
    *-- &2 - text element (description)
    *-- &3 - radiobutton group
    DEFINE MAKE_RADIOBUTTON.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    * From Config File
    MAKE_RADIOBUTTON RB_1  ALL_DATA SRC.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    * Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME  OBLIGATORY. "
    SELECTION-SCREEN END OF BLOCK A1.
    * From database table
    MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                QUERY  = 'CD'  "// Current Directory
           IMPORTING
                RETURN = LV_FILE_PATH.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_FILENAME     = 'TA_DOWNLOAD.MDB'
                DEF_PATH         = LV_FILE_PATH
                MASK             = LV_MASK
                MODE             = 'O'
           IMPORTING
                FILENAME         = P_FILE1
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    INITIALIZATION.
      ALL_DATA = 'From Desktop     : ? '.
      INC_DOWN = 'From Database    : ?'.
      T000     = 'Configuration Upload'.
    Please help
    Thanks

    Hi
    You should do some modifications like these:
    DEFINE MAKE_RADIOBUTTON_1.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    DEFINE MAKE_RADIOBUTTON_2.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    From Config File
    MAKE_RADIOBUTTON_1 RB_1  ALL_DATA SRC AAA.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME MODIF ID FIL. "
    SELECTION-SCREEN END OF BLOCK A1.
    From database table
    MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN OUTPUT.
      IF RB_2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FIL'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Max

  • A problem highlighting/selecting text in Illustrator CS3

    In several instances I can't highlight text to copy or to edit, other times it works fine. If I click the radio button for the text in layers (other layers may be locked to prevent accidental selection), the baselines appears and I should be able to highlight the text, but I can't. If I highlight some other unaffected area of text successfully (unlocked layers), sometimes it will allow me to select the problem text directly after. Then it will go back to being a problem, why?

    I'm using the general text tool, I've locked the other sublayers to avoid accidentally selecting those items. Then I click the radio button on the sublayer I wish to edit or copy, which reveals the baselines. Then if I click within that object to highlight text with the cursor, the text tool creates a new textbox/sublayer and does not highlight the text I intended.
    From: Monika Gause <[email protected]<mailto:[email protected]>>
    Reply-To: <[email protected]<mailto:[email protected]>>
    Date: Wed, 26 Oct 2011 14:49:40 -0600
    To: Roger Daleiden <[email protected]<mailto:[email protected]>>
    Subject: A problem highlighting/selecting text in Illustrator CS3
    Re: A problem highlighting/selecting text in Illustrator CS3
    created by Monika Gause<http://forums.adobe.com/people/Monika+Gause> in Illustrator - View the full discussion<http://forums.adobe.com/message/3992086#3992086

  • I can get the signed to Hotmail but I can not read my mail. Sorry, there's a problem with Hotmail right now Hotmail wasn't able to complete this request. Microsoft may contact you about any issues you report.

    about 10 days ago started having trouble with Hotmail. Could isgn in but keep getting the following message.
    Sorry, there's a problem with Hotmail right now
    Hotmail wasn't able to complete this request. Microsoft may contact you about any issues you report.
    I can send mail and review my contacts but that is it.
    I then tried getting in with Internet Explorer and it works fine. I do not like IE because I have problems with some websites.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • Problem with Select

    Hi All,
    I am Facing one problem in select query. My requirement is as follows.
    User Screen will Have 4 Fileds.
    Country Code, Zip Code From, Zip Code To, Delivery Area.
    All are Parameter's only.
    For Example ZTABLE having below Entries.
    US  12345-6787  12345-6789   AKRON             AKRON/CANTON
    Once User try to create new entry by Click on SAVE, Below Possiblities are there.
    Case 1: US  12345-6787  12345-6789   AKRON             AKRON/CANTON ( Error Message)
    Case 2: US  12345-6786  12345-6787   AKRON             AKRON/CANTON ( Error Message)
    Case 3: US  12345-6789  12345-6790   AKRON             AKRON/CANTON ( Error Message)
    Case 4: US  12345-6789  12345-6790   AKRON             AKRON/CANTON ( Error Message)
    Case 5: US  12345-6786  12345-6787   AKRON             AKRON/CANTON ( Error Message)
    Case 6: US  12345-6785  12345-6786   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 7: US  12345-6785  12345-6785   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 8: US  12345-6790  12345-6790   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 9: US  12345-6790  12345-6791   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 10: US  12345-6788  12345-6788   AKRON             AKRON/CANTON ( Error Message)(This Condition is Failing)
    Case 11: US  12345-6788  12345-6789   AKRON             AKRON/CANTON ( Error Message)(This Condition is Failing)
    In the above cases 10 and 11 is failing.
    I am using the below select statment.
    SELECT SINGLE * FROM zdt_sd_dlv_zcode   WHERE mandt = sy-mandt
                                              AND land1 = g_land1
                                              AND ( post_code_from GE g_pbox_from AND post_code_from LE g_pbox_to )
                                              OR ( post_code_to GE g_pbox_from AND post_code_to LE g_pbox_to ).
    Friends can anyone give me some valuable inputs to solve this problem.
    Points will reward.
    Thanks in Advance,
    Srinivas.

    Please use Select-options instead of Parameters so that you can use complex "and" and "or" in your select statements.
    for eg:if you are declaring parameters like this below.
    parameters post_code1  LIKE adrc-post_code1.
    change to
    select-options post_code1 for  adrc-post_code1 no intervals.
    siddu

  • Problem with select all cells in JTable

    Hi guys! I get some problem about selecting all cells in JTable. I tried to used two methods:
    1> table.selectAll()2> changeSelection(firstcell, lastcell,false,true)
    firstcell:[0,0], lastcell[rowcount-1,colcount-1]
    Result: only the first row selected when i use both methods.
    Note: i set up the selection model as following:
    this.dataSheet.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                    this.dataSheet.setCellSelectionEnabled(true);
                    this.dataSheet.setRowSelectionAllowed(true);
                    this.dataSheet.setColumnSelectionAllowed(true);Thanks !

    What selection properity should be changed in order to enable selectAll() method work properly? Is there Any constraints? Here is the TableModel I am using. And i set up selection mode use the following code:
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    table.setCellSelectionEnabled(true);
    table.setRowSelectionAllowed(true);
    table.setColumnSelectionAllowed(true);
    import java.util.Vector;
    import javax.swing.table.*;
    import javax.swing.JTable;
    public class DataSheetModel extends AbstractTableModel{
              private Vector data = new Vector();//Store data
              private Vector columnNames = new Vector();//Store head
              public DataSheetModel(){}
              public DataSheetModel(Vector headVector, Vector dataVector){
                   if(headVector != null) this.columnNames = headVector;
                   if(dataVector != null) this.data = dataVector;
              public int getColumnCount(){
                   return columnNames.size()+1;
              public int getRowCount(){
                   return data.size()+1;
              public String getColumnName(int col){
                   if(col==0) return "";
                   else return (String)columnNames.get(col-1);
              public Object getValueAt(int row, int col){
                   if(col==0) {
                        if(row != data.size()) return String.valueOf(row);
                        else return "*";
                   else{
                        if(row != data.size()){
                             Vector rowVector = (Vector)data.elementAt(row);
                             return rowVector.elementAt(col-1);
                        }else return null;
              public void setValueAt(Object value, int row, int col){
                   if(row != this.data.size()){
                        Vector rowVector = (Vector)data.elementAt(row);
                        rowVector.set(col-1,value);
                        this.data.set(row,rowVector);
                        this.fireTableDataChanged();
                   }else{
                        Vector rowVector = new Vector();
                        for(int i=0; i<this.getColumnCount()-1; i++) rowVector.add(null);
                        rowVector.set(col-1,value);
                        this.data.add(rowVector);
                        this.fireTableDataChanged();
              public Class getColumnClass(int c){
                   return getValueAt(0,c).getClass();
              public boolean isCellEditable(int row, int col){
                   if(col == 0) return false;
                   else return true;
              public void setDataVector(Vector head, Vector data){
                   if(head != null) this.columnNames = head;
                   if(data != null) this.data = data;
    }

  • I have a problem in select-options

    hi frns,
             i am facing a big problem in select-options
    the requirement is such that
    i have 2 select-options
    one for matnr and the other for maktx
    so wen the clent select matnr with f4
    in the maktx the similar description should come by using f4
    pls help me out

    hi,
    TYPES DECLARATION
    types: begin of tp_marc,
            matnr type marc-matnr,
            werks type marc-werks,
          end of tp_marc.
    INTERNAL TABLE AND WORK AREA DECLARATION
    data: t_marc type standard table of tp_marc,
          wa_marc type tp_marc.
    data : dd like table of dselc with header line. "*--- IMPORTANT
    data : ft like table of dfies with header line.
    data : t_makt like table of makt with header line.
    parameters : matnr like makt-matnr .
    parameters : maktx like makt-maktx.
    at selection-screen output.
      loop at screen.
        if screen-name = 'MAKTX'.
          screen-input = 0.
          modify screen.
        endif.
      endloop.
    at selection-screen on value-request for matnr.
    SELECT matnr maktx  FROM makt INTO TABLE makt up to 500 rows.
      select *
       from makt
        up to 500 rows
      into table t_makt
      where spras = syst-langu.
      if sy-subrc <> 0.
        message 'INVALID MATERIAL NUMBER' type 'E'.
      endif.
    IMPORTANT
      refresh dd.
    dd-fldname = 'MATNR'.
    dd-dyfldname = 'MATNR'.
    append dd.
      dd-fldname = 'MAKTX'.
      dd-dyfldname = 'MAKTX'.
      append dd.
    *------- IMPORTANT
      refresh ft.
      ft-tabname = 'MAKT'.
      ft-fieldname = 'MATNR'.
      append ft.
      ft-tabname = 'MAKT'.
      ft-fieldname = 'MAKTX'.
      append ft.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
      exporting
    ddic_structure = 'T001' "*----- IMPORTANT IF STANDARD STRUCT
      retfield = 'MATNR'
      dynpprog = sy-repid
      dynpnr = sy-dynnr
      dynprofield = 'MATNR'
      value_org = 'S'
      tables
      field_tab = ft "*---- IMPORTANT
      value_tab = t_makt
      dynpfld_mapping = dd "* IMPORTANT
      exceptions
      parameter_error = 1
      no_values_found = 2
      others = 3.
      start-of-selection.
      select matnr
             werks
             from marc
             into table t_marc
             where matnr = matnr.
      if sy-subrc <> 0.
        message :'no results IN MARC' type 'E'.
      endif.
      write: at 1(36) sy-uline.
      format intensified on color = 7.
      new-line.
      write :sy-vline,at 10 'MATERIAL NUMBER',at 29 sy-vline, at 30 'PLANT',sy-vline.
      new-line.
      write: at 1(36) sy-uline.
      format intensified off color = 4.
      loop at t_marc into wa_marc.
        new-line.
        write :sy-vline,at 10 wa_marc-matnr ,sy-vline, at 30 wa_marc-werks, at 36 sy-vline.
      endloop.
      new-line.
      write: at 1(36) sy-uline.
    reward points if useful.
    regards,
    Vinod Samuel.

  • Problem in selecting records

    Hi, everyone.
    I have a problem in selecting records.  In this case, I want to select records from database
    LFA1,and the components of this table are LIFNR,ERDAT,LOEVM ,and so on.The type of LIFNR is char(10).There is a internal table:tab_cdhdr , the elements of tab_cdhdr are: objectid,udate and change_ind.The type of objectid is char(50).
    And the select-rule is that: LIFNR = objectid. So I write like this:
    select   lifnr
                 erdat
                 loevm
    form     lfa1
    into       tab_lfa1
    for all entries in tab_cdhdr
    where   lfa1 = tab_cdhdr-objectid+0(10).
    But there is a warning: When using FOR ALL ENTRIES IN the specifyed length for "OBJECTID" is ignored in this condition.
    Can you help me to solve this problem?
    Thanks.

    Hi Feng..
    If you dont want to change the Internal table TAB_CDHDR, Then declare another internal table (TEMPTAB_CDHDR.) with the same structure but Objectid with only 10 chars.
    IF TAB_CDHDR[] IS NOT INITIAL.
    LOOP AT TAB_CDHDR.
    MOVE-CORRESPONDING TAB_CDHDR TO TEMPTAB_CDHDR.
    APPEND TEMPTAB_CDHDR.
    ENDLOOP.
    select lifnr
    erdat
    loevm
    form lfa1
    into tab_lfa1
    for all entries in tab_cdhdr
    where lfa1 = TEMPtab_cdhdr-objectid.
    ENDIF.
    Sure ... this will work for u.....
    REWARD IF HELPFUL.

Maybe you are looking for

  • How to add a new universe in population for Predictive Analysis

    Post Author: izhar CA Forum: Performance Management and Dashboards Hi all members I am working on BOXI R2, SP2 I have to ask that, How to add a new universe in population for "Predictive Analysis". Currently i can only view universe of "Direct Custom

  • My Mac Pro is......slow

    I hope you can help... I have a Mac Pro here at work. Pretty but dang, I seem to be waiting on it a LOT. Get the beachball what seems like WAY too many times a day. Seems to be most frequent with moving too or from Photoshop(CS3) or QuarkXpress(7). S

  • I don't want any discussion. I want a resolution of my issue. I am logged in from my iPad into Creat

    I am logged into Creative Cloud from my iPad and there is not an option for me to download iPad touch apps. Why? Message was edited by: Elena Sanjara

  • Majority of reports missing for non admin users

    I have followed the instructions here (SCCM 2012–Reporting in console for non-admins (Reporting User Role) v2) to allow non admin users the ability to view reports in the console. So far, so good. However, when viewing the reports with the non admin

  • URL to connect especific server node

    Hi personal, Some time behind, my friend showed me an url count I get to address the call for a certain server node. http://utic115:58300/webdynpro/dispatcher/sap.com/tcSLCMS~WebUI/Cms Anybody oh he/she knows? Thank you, Obrigado, Marco Zerbini