PROCEDURE DOENS'T WORK

Hello there, i'm new on pls/sql, so i wanted to do a procedure which execute a grant select on all tables from a specific schema, the name of the schema is TESO, and i'm creating that procedure in ASILVA schema.
The problem is when i try to execute the procedure, it doens't work it show me a message like
Informe de error:
ORA-00942: la tabla o vista no existe
ORA-06512: en "ASILVA.GRANT_SELECT_ON_TABLE_SCHEMA", línea 6
ORA-06512: en línea 1
00942. 00000 - "table or view does not exist"
*Cause:   
*Action:
that is when i execute: execute GRANT_SELECT_ON_TABLE_SCHEMA
This is my procedure, and i didn't have any problem when i created it:
CREATE OR REPLACE PROCEDURE GRANT_SELECT_ON_TABLE_SCHEMA
AS
BEGIN
FOR x IN (select * from dba_tables where owner ='TESO')
LOOP
EXECUTE IMMEDIATE 'GRANT SELECT ON TESO.'|| x.table_name ||' TO fswbd';
END LOOP;
END GRANT_SELECT_ON_TABLE_SCHEMA;
Please if anyone can help my, i would be gratefull.
Edited by: Ng! on 21-dic-2011 14:39
Edited by: Ng! on 21-dic-2011 14:39
Edited by: Ng! on 21-dic-2011 14:40

That the user can select from the tables is irrelevant to whether they have permission to access them via PL/SQL.
SQL respects privileges granted via roles ... PL/SQL requires explicit grants.

Similar Messages

  • Event double -click doens't work

    Dear All,
    Pls help event double -click doens't work.
    What can the reason be for it ?
    Regards
    Ilhan
    data tree1 type ref to cl_gui_alv_tree.
    data mr_toolbar type ref to cl_gui_toolbar.
    include <icon>.
    data: gt_sflight      type ZQMCOMP occurs 0,      "Output-Table
          gt_fieldcatalog type lvc_t_fcat, "Fieldcatalog
          ok_code like sy-ucomm.           "OK-Code
    *  TREE_EVENT_RECEIVER                                                 *
    class tree_event_receiver definition.
      public section.
        methods on_doubleclick
         for event link_click of cl_gui_alv_tree
          importing node_key fieldname.
    ENDCLASS.                    "lcl_handler DEFINITION
    *       CLASS tree_event_receiver IMPLEMENTATION
    class tree_event_receiver implementation.
      METHOD on_doubleclick.
        MESSAGE I000(38) WITH fieldname.
      ENDMETHOD.                    "on_doubleclick
    endclass.
    start-of-selection.
    end-of-selection.
    call screen 100.
    *&      Module  PBO  OUTPUT
    *       process before output
    module pbo output.
      set pf-status 'MAIN100'.
      if tree1 is initial.
        perform init_tree.
      endif.
      call method cl_gui_cfw=>flush.
    endmodule.                             " PBO  OUTPUT
    *&      Module  PAI  INPUT
    *       process after input
    module pai input.
      case ok_code.
        when 'EXIT' or 'BACK' or 'CANC'.
          perform exit_program.
        when others.
          call method cl_gui_cfw=>dispatch.
      endcase.
      clear ok_code.
      call method cl_gui_cfw=>flush.
    endmodule.                             " PAI  INPUT
    *&      Form  build_fieldcatalog
    *       build fieldcatalog for structure sflight
    form build_fieldcatalog.
      data: ls_fieldcatalog type lvc_s_fcat.
      ls_fieldcatalog-fieldname = 'DUNS'.
      ls_fieldcatalog-col_pos  = 7.
      ls_fieldcatalog-coltext  = 'Duns'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'MONAT'.
      ls_fieldcatalog-col_pos  = 8.
      ls_fieldcatalog-coltext  = 'Monat'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'ZE'.
      ls_fieldcatalog-col_pos  = 13.
      ls_fieldcatalog-coltext  = 'Ze'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'MATKOSTEN'.
      ls_fieldcatalog-col_pos  = 14.
      ls_fieldcatalog-coltext  = 'Mat.Kosten'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'ANTEIL'.
      ls_fieldcatalog-col_pos  = 15.
      ls_fieldcatalog-coltext  = 'Anteil'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'GESMAT'.
      ls_fieldcatalog-col_pos  = 16.
      ls_fieldcatalog-coltext  = 'Ges.Mat'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'GESLOH'.
      ls_fieldcatalog-col_pos  = 17.
      ls_fieldcatalog-coltext  = 'Ges.Lohn'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      clear ls_fieldcatalog.
      ls_fieldcatalog-fieldname = 'GESAMT'.
      ls_fieldcatalog-col_pos  = 19.
      ls_fieldcatalog-coltext  = 'Gesamt'.
      APPEND ls_fieldcatalog TO gt_fieldcatalog.
      call function 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name = 'ZQMCOMP'
           CHANGING
                ct_fieldcat      = gt_fieldcatalog.
    endform.                               " build_fieldcatalog
    *&      Form  build_hierarchy_header
    *       build hierarchy-header-information
    *      -->P_L_HIERARCHY_HEADER  strucxture for hierarchy-header
    form build_hierarchy_header changing
                                   p_hierarchy_header type treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy-Kopf'.            "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'Hierarchy-Kopf !'.
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    endform.                               " build_hierarchy_header
    *&      Form  exit_program
    *       free object and leave program
    form exit_program.
      call method tree1->free.
      leave program.
    endform.                               " exit_program
    *&      Form  build_header
    *       build table for html_header
    *  -->  p1        text
    *  <--  p2        text
    form build_comment using
          pt_list_commentary type slis_t_listheader
          p_logo             type sdydo_value.
      data: ls_line type slis_listheader.
      clear ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = 'LIBOLO '.
      append ls_line to pt_list_commentary.
      clear ls_line.
      clear ls_line.
      ls_line-typ  = 'A'.
      ls_line-info = 'Liste'.
      append ls_line to pt_list_commentary.
    *  p_logo = 'ENJOYSAP_LOGO'.
    endform.
    *       FORM create_hierarchy                                         *
    FORM create_hierarchy.
      data: ls_sflight type ZQMCOMP,
            lt_sflight type ZQMCOMP occurs 0.
    * get data
      select * from ZQMCOMP into table lt_sflight.
    *  sort lt_sflight by carrid connid fldate.
    * add data to tree
      data: l_carrid_key type lvc_nkey,
            l_connid_key type lvc_nkey,
            l_last_key type lvc_nkey.
      loop at lt_sflight into ls_sflight.
        on change of ls_sflight-KUNDE.
          perform add_carrid_line using    ls_sflight
                                  changing l_carrid_key.
        endon.
        on change of ls_sflight-MONAT.
          perform add_connid_line using    ls_sflight
                                           l_carrid_key
                                  changing l_connid_key.
        endon.
        perform add_complete_line using  ls_sflight
                                         l_connid_key
                                changing l_last_key.
      endloop.
    * calculate totals
      call method tree1->update_calculations.
    * this method must be called to send the data to the frontend
      call method tree1->frontend_update.
    endform.                               " create_hierarchy
    *&      Form  add_carrid_line
    *       add hierarchy-level 1 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    form add_carrid_line using     ps_sflight type ZQMCOMP
                 p_relat_key type lvc_nkey
                         changing  p_node_key type lvc_nkey.
      data: l_node_text type lvc_value,
            ls_sflight type ZQMCOMP.
    * set item-layout
      data: lt_item_layout type lvc_t_layi,
            ls_item_layout type lvc_s_layi.
      ls_item_layout-t_image = '@3P@'.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      append ls_item_layout to lt_item_layout.
    * add node
      l_node_text =  ps_sflight-KUNDE.
      call method tree1->add_node
        exporting
              i_relat_node_key = p_relat_key
              i_relationship   = cl_gui_column_tree=>relat_last_child
              i_node_text      = l_node_text
              is_outtab_line   = ls_sflight
              it_item_layout   = lt_item_layout
           importing
              e_new_node_key = p_node_key.
    endform.                               " add_carrid_line
    *&      Form  add_connid_line
    *       add hierarchy-level 2 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    form add_connid_line using     ps_sflight type ZQMCOMP
                                   p_relat_key type lvc_nkey
                         changing  p_node_key type lvc_nkey.
      data: l_node_text type lvc_value,
            ls_sflight type sflight.
    * set item-layout
      data: lt_item_layout type lvc_t_layi,
            ls_item_layout type lvc_s_layi.
      ls_item_layout-t_image = '@3Y@'.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensified.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      append ls_item_layout to lt_item_layout.
    * add node
      l_node_text =  ps_sflight-MONAT.
      call method tree1->add_node
        exporting
              i_relat_node_key = p_relat_key
              i_relationship   = cl_gui_column_tree=>relat_last_child
              i_node_text      = l_node_text
              is_outtab_line   = ls_sflight
              it_item_layout   = lt_item_layout
           importing
              e_new_node_key = p_node_key.
    endform.                               " add_connid_line
    *&      Form  add_cmplete_line
    *       add hierarchy-level 3 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    form add_complete_line using   ps_sflight type ZQMCOMP
                                   p_relat_key type lvc_nkey
                         changing  p_node_key type lvc_nkey.
      data: l_node_text type lvc_value.
      data: lt_item_layout type lvc_t_layi,
            ls_item_layout type lvc_s_layi.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      append ls_item_layout to lt_item_layout.
      l_node_text =  ps_sflight-QMART.
      call method tree1->add_node
        exporting
              i_relat_node_key = p_relat_key
              i_relationship   = cl_gui_column_tree=>relat_last_child
              is_outtab_line   = ps_sflight
              i_node_text      = l_node_text
              it_item_layout   = lt_item_layout
           importing
              e_new_node_key = p_node_key.
    endform.                               " add_complete_line
    *&      Form  register_events
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form register_events.
      data: lt_events type cntl_simple_events,
            l_event type cntl_simple_event.
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      append L_EVENT to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      append L_EVENT to lt_events.
    * set Handler
      data: l_event_receiver type ref to tree_event_receiver.
      create object l_event_receiver.
      set handler l_event_receiver->on_doubleclick for tree1.
      call method tree1->set_registered_events
          exporting
            events = lt_events
          exceptions
            cntl_error                = 1
            cntl_system_error         = 2
            illegal_event_combination = 3.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    endform.                               " register_events
    *&      Form  change_toolbar
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form change_toolbar.
    * get toolbar control
      call method tree1->get_toolbar_object
              importing
                  er_toolbar = mr_toolbar.
      check not mr_toolbar is initial.
    * add seperator to toolbar
      call method mr_toolbar->add_button
              exporting
                  fcode     = ''
                  icon      = ''
                  butn_type = cntb_btype_sep
                  text      = ''
                  quickinfo = 'This is a Seperator'.            "#EC NOTEXT
    * add Standard Button to toolbar (for Delete Subtree)
      call method mr_toolbar->add_button
              exporting
                  fcode     = 'DELETE'
                  icon      = '@18@'
                  butn_type = cntb_btype_button
                  text      = ''
                  quickinfo = 'Delete subtree'.                 "#EC NOTEXT
    * add Dropdown Button to toolbar (for Insert Line)
      call method mr_toolbar->add_button
              exporting
                  fcode     = 'INSERT_LC'
                  icon      = '@17@'
                  butn_type = cntb_btype_dropdown
                  text      = ''
                  quickinfo = 'Insert Line'.                    "#EC NOTEXT
    endform.                               " change_toolbar
    *&      Form  init_tree
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_tree.
    * create fieldcatalog for structure sflight
      perform build_fieldcatalog.
    * create container for alv-tree
      data: l_tree_container_name(30) type c,
            l_custom_container type ref to cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
      if sy-batch is initial.
        create object l_custom_container
          exporting
                container_name = l_tree_container_name
          exceptions
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
        if sy-subrc <> 0.
          message x208(00) with 'ERROR'.                        "#EC NOTEXT
        endif.
      endif.
    * create tree control
      create object tree1
        exporting
            parent              = l_custom_container
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
            item_selection      = 'X'
            no_html_header      = ''
            no_toolbar          = ''
        exceptions
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    * create Hierarchy-header
      data l_hierarchy_header type treev_hhdr.
      perform build_hierarchy_header changing l_hierarchy_header.
    * create info-table for html-header
      data: lt_list_commentary type slis_t_listheader,
            l_logo             type sdydo_value.
      perform build_comment using
                     lt_list_commentary
                     l_logo.
    * repid for saving variants
      data: ls_variant type disvariant.
      ls_variant-report = sy-repid.
    * create emty tree-control
      call method tree1->set_table_for_first_display
         exporting
                   I_STRUCTURE_NAME     = 'ZQMCOMP'
                   is_hierarchy_header  = l_hierarchy_header
                   it_list_commentary   = lt_list_commentary
    *               i_logo               = l_logo
                   i_background_id      = 'ALV_BACKGROUND'
                   i_save               = 'A'
                   is_variant            = ls_variant
         changing
                   it_outtab            = gt_sflight "table must be emty !!
                  it_fieldcatalog      = gt_fieldcatalog.
    * create hierarchy
      perform create_hierarchy.
    * add own functioncodes to the toolbar
      perform change_toolbar.
    * register events
      perform register_events.
    * adjust column_width
      call method tree1->COLUMN_OPTIMIZE.
    ENDFORM.                    " init_tree

    Hi,
    to do so, you need to declare those fields in the form CREATE_HIERARCHY.
    For example, to add FLDATE node, you should do:
        ON CHANGE OF LS_SFLIGHT-CARRID.
          PERFORM ADD_CARRID_LINE USING    LS_SFLIGHT
                                  CHANGING L_CARRID_KEY.
        ENDON.
        ON CHANGE OF LS_SFLIGHT-CONNID.
          PERFORM ADD_CONNID_LINE USING    LS_SFLIGHT
                                           L_CARRID_KEY
                                  CHANGING L_CONNID_KEY.
        ENDON.
        ON CHANGE OF LS_SFLIGHT-FLDATE.
          PERFORM ADD_FLDATE_LINE USING    LS_SFLIGHT
                                           L_CONNID_KEY
                                  CHANGING L_FLDATE_KEY.
        ENDON.
        ON CHANGE OF LS_SFLIGHT-PRICE.
          PERFORM ADD_PRICE_LINE USING     LS_SFLIGHT
                                           L_FLDATE_KEY
                                  CHANGING L_PRICE_KEY.
        ENDON.
    and then create the new FORMS PERFORM ADD_PRICE_LINE and
    PERFORM ADD_FLDATE_LINE  by copy of the existent
    PERFORM ADD_CONNID_LINE and change the  L_NODE_TEXT in the form.
    I suposed you are new to ALV's, so i have a sugestion for you.
    Instead of  CL_GUI_ALV_TREE try to use some examples of CL_GUI_ALV_TREE_SIMPLE. It's much more simple to understand and to work with. For example Report BCALV_TREE_SIMPLE_DEMO.
    In this case, to add more nodes to the the you just need to add 3 lines of code in
    perform build_sort_table.
    Regards,

  • My Ipod just stopped working, the screen got black and now I can't open it. I have tried to charge it but it doens't work.

    My Ipod touch 5 just stopped working. The screen got black and now I can't use it or start it.
    I have tried to charge it but it doens't start and when I tried to connect it with my computer it didn't work either.
    I saw that you could hold down the "home" button and the "power" button at the same time but my home button doens't work so I can't do that.
    Is there any other way I can fix it or do I have to go to an apple store? 

    Try:
    Turn on without Home/Power Button

  • TS1702 My 3G iphone only loads few apps since I updated and the camera doen't work anymore, what now. Tried to reset to original settings and now it won't load apps, even old ones.

    My 3G iphone only loads few apps since I updated and the camera doen't work anymore, what now. Tried to reset to original settings and now it won't load apps, even old ones.

    What model iPod do you have? If yo have a 2G iPod. many developers when they updated their apps to support iOS 5 and 6 dropped compatibility for iOS 4.2.1 and earlier.

  • SKY go app but doens't work. There is a problem with iOs 6. What I can do

    I have an iPad I tried to use SKY go app but doens't work. There is a problem with iOs 6. What I can do

    The App says that there is not internet connection, even if I'm connected.

  • WiFi ON/OFF button Doen't Work, the IPod doesn't show the on/off button in the Settings- General - WiFi

    After My IPod Touch 4th Geneartion was broken I had to fix the screen, which cost me a lot, after a perfect restore through the ITunes I went to connect to my IPod to the WiFi network then the WiFi ON/OFF button Doen't Work, the IPod doesn't show the on/off button in the Settings-> General -> WiFi.
    And another problem I encountered during this operation was that the Games I downloaded through the ITunes doesn't work, when I click on the icon ( Game Icon) it starts an then closes in a few seconds

    See:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    One user reported that placing the iPod in the freezer fixed the problem. A trick that works frequently with iPhones:
    Settings > AirPlane Mode ON, Do Not Disturb ON
    Power down and wait 5-10 minutes
    Power up
    Settings > AirPlane Mode OFF, Do Not Disturb OFF
    If not successful, an appointment at the Genius Bar of an Apple store is usually in order.
    Apple Retail Store - Genius Bar
    Apple wil not help since yo took the iPod apart
    Try taking  it apart and look for a disconnected antenna.
    Installing iPod Touch 4th Generation Wi-Fi Antenna - iFixit

  • My keyboard doens't work correctly when I push numbers it appears symbols and all the letters are not good

    My keyboard doens't work correctly when I push numbers it appears symbols and all the letters are not good

    I suspect someone or something in your house may have changed a keyboard preference. Try System Preferences - Keyboard - Keyboard tab  - uncheck Use all F1......

  • GPS doen't work (Nokia 5230)

    I bought this phone mainly because it's big screen and GPS.
    But it just doen't work. At all.
    I left only GPS connection (A-GPS, Network etc. - are off).
    In Satellites-Status is finds sometimes up to 5 satellites with gray bars. (as I understand it means weak signal) and then nothing happens.
    Last night I went to railway station, which is high. The sky was absolutely clear with stars.
    No high buildings around. I holded the phone in the center (not to cover the antenne).
    And nothing happened. Only 4-5 gray bars maximum. Even after 10 minutes.
    I'm thinking about sending it back.
    Another problem - is one of the most stupidest programs I've ever seen - OVI-Suit.
    Absolutely illogical, insanely slow and fulled with mistakes.
    (The only program which is worse is Corel Draw Painter).
    And please, tell me someone, why the Options for GPS are in the Menu-> Applications-> My Position-> Options,
    but the Maps themselfs are in Menu-> Maps?
    I've heard just yesterday, that Nokia looses its market share very fast.
    And somehow I understand why.

    Hi DexterStJock
    If you are not going to utilize the Assisted GPS feature and rely solely on Integrated GPS you can expect initial positional fix to take a considerable time to acquire but subsequent lock-on will be much more rapid. If you haven't yet got a satellite lock-on don't expect a new location to be better as you could be anywhere in the world as far as it is concerned. Unfortunately GPS antenna size within a mobile device has to be compromised due to space limitations and unfair to compare with car sat nav unit.
    You are correct that "Positioning methods" are found in Menu > Applications > Location but this is independent of OVI Maps as other applications can utilize it's features.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • CTRL + F for folders doen't work in CS5

    Hi,
    When I used my CS 3 Dreamweaver, I could click in the folder list on a folder an pressd CTRL + F so I could search a word in this folder and all subfolder.
    But since I upgraded to CS 5 it doen's work anymore.
    I alway have to set the folder manually.
    Thanks for help
    pw

    It's a known issue. Hopefully, it will be fixed in an updater (if there is one) or the next version.

  • TS3871 I've tried this but it doen't work.

    I've tried this but it doen't work. I can't open the domain file. When i try iWeb opens but with no content! Please help. [email protected]

    Even with your detailed description of what "this" is we're only guessing at what your problem is.  Therefore try this guess fix:
    In Lion and Mountain Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    You can download an already compiled version with this link: iWeb Switch Domain.
    Just launch the application, find and select the domain file you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    OT

  • Dynamic Portal Page does not show but called procedure behind it works

    Hi I run into a bug that I try to solve unsuccessfully for 2,3 weeks. Here is the problem. I have portal dynamic page that execute a PL/SQL procedure to delete and insert data into a remote app table. When I compile and execute the procedure in Toad it does not give me any error or warning. But when I execute this procedure in my dynamic page the page does not show up but I check the results and data does delete and insert. So my procedure works behind the scene but the page does not display. As I look into detail of my code I found out that when I rem out the insert statement my page does show up and delete the data but when I put back the insert statement my page does not show up and data insert to the table. Here is my code structure of my procedure in plain words. I have a procedure that have a cursor for loop that
    check if a certain condition exists if it is then it will delete data from the remote app table then insert a select statement data from 2 joins tables. Any one have run into similar situations like this and have any idea, please help. Thank you all.

    The scripts for this should have shown as:

  • Sorting for the procedure is not working

    can you help why the sorting is not working here.I am running the below procedure to sort asc and desc and when I do sort in descending order by a different column it gives me a different rows sorted in desc order. what i
    want the proecdure to do it to sort the recordset in asc and desc order without changing the selected rows
    SQL>  exec trnsportitems.gettrnsportitems(1,10,'itemnumber desc', :n, :c);
    PL/SQL procedure successfully completed.
    SQL> print c;
    ITEMNUMBER              R IDESCR                                   IDESCRL                                                      IUNI IS I ITEM
    2011.601/00002          1 TUNNEL CONSTRUCTION LAYOUT STAKING       TUNNEL CONSTRUCTION LAYOUT STAKING                           LS   0
    2011.601/00003          2 CONSTRUCTION SURVEYING                   CONSTRUCTION SURVEYING                                       LS   05 N 2011601/00003
    2011.601/00010          3 VIBRATION MONITORING                     VIBRATION MONITORING                                         LS   05 N 2011601/00010
    2011.601/00020          4 REVISED BRIDGE PLANS                     REVISED BRIDGE PLANS                                         LS   05 N 2011601/00020
    2011.601/00040          5 DESIGN                                   DESIGN                                                       LS   05 N 2011601/00040
    2011.601/00050          6 DESIGN AND CONSTRUCT                     DESIGN AND CONSTRUCT                                         LS   05 N 2011601/00050
    2011.601/08010          7 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08010
    2011.601/08011          8 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08011
    2011.601/08012          9 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08012
    2011.601/08013         10 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601
    10 rows selected.
    SQL>
    SQL>  exec trnsportitems.gettrnsportitems(1,10,'idescr DESC', :n, :c);
    PL/SQL procedure successfully completed.
    SQL> print c;
    ITEMNUMBER              R IDESCR                                   IDESCRL                                                      IUNI IS I ITEM
    2563.613/00040          1 YELLOW TUBE DELINEATORS                  YELLOW TUBE DELINEATORS                                      UDAY 05 N 2563613/00040
    2563.602/00100          2 YELLOW TUBE DELINEATOR                   YELLOW TUBE DELINEATOR                                       EACH 05 N 2563602/00100
    2565.602/00940          3 YELLOW LED INDICATION                    YELLOW LED INDICATION                                        EACH 05 N 2565602/00940
    2502.602/00040          4 YARD DRAIN                               YARD DRAIN                                                   EACH 05 N 2502602/00040
    2411.601/00030          5 WYE STRUCTURE                            WYE STRUCTURE                                                LS   05 N 2411601/00030
    2557.603/00041          6 WOVEN WIRE FENCE                         WOVEN WIRE FENCE                                             L F  05 N 2557603/00041
    2557.603/00043          7 WOVEN WIRE                               WOVEN WIRE                                                   L F  05 N 2557603/00043
    2563.613/00615          8 WORK ZONE SPEED LIMIT SIGN               WORK ZONE SPEED LIMIT SIGN                                   UDAY 05 N 2563613/00
    2563.613/00610          9 WORK ZONE SPEED LIMIT                    WORK ZONE SPEED LIMIT                                        UDAY 05 N 2563613/00610
    2557.603/00035         10 WOODEN FENCE                             WOODEN FENCE                                                 L F  05 N 2557603/00035
    10 rows selected.

    Hi,
    user13258760 wrote:
    can you help why the sorting is not working here.I am running the below procedure to sort asc and desc and when I do sort in descending order by a different column it gives me a different rows sorted in desc order. what i
    want the proecdure to do it to sort the recordset in asc and desc order without changing the selected rowsAs it is written now, the argument insortexp has nothing to do with the order of the rows. It is used only in computing column r, and column r is used only in the WHERE clause.
    Are you really saying you don't want a WHERE clause at all in the main query: that you always want the cursor to contain all rows from itemlist that meet the 3 hard-coded conditions:
    ...                     WHERE item  '2999509/00001'     -- Did you mean != here?
                              AND iobselet = 'N'
                              AND ispecyr = '05'?
    If so, change the main query WHERE clause:
    WHERE r BETWEEN instartrowindex AND inendrowindexinto an ORDER BY clause:
    ORDER BY  rBy the way, you might want to make insortexp case-insensitive.
    In your example, you're calling the procedure with all small letters in insortexp:
    user13258760 wrote:
    SQL> exec trnsportitems.gettrnsportitems(1,10,'itemnumber desc', :n, :c);but the output is coming in ASC ending order:
    ...                           ORDER BY
                                     DECODE (insortexp, 'itemnumber ASC', item) ASC,
                                     DECODE (insortexp, 'itemnumber DESC', item) DESC,     -- capital 'DESC' won't match small 'desc'
                                     DECODE (insortexp, 'idescr ASC', idescr) ASC,
                                     DECODE (insortexp, 'idescr DESC', idescr) DESC,
                                     DECODE (insortexp, 'idescrl ASC', idescrl) ASC,
                                     DECODE (insortexp, 'idescrl DESC', idescrl) DESC,
                                     DECODE (insortexp, 'iunits ASC', iunits) ASC,
                                     DECODE (insortexp, 'iunits DESC', iunits) DESC,
                                     DECODE (insortexp, 'ispecyr ASC', ispecyr) ASC,
                                     DECODE (insortexp, 'ispecyr DESC', ispecyr) DESc,
                                   SUBSTR (item, 1, 4) || '.' || SUBSTR (item, 5)          -- This is the only non-NULL ORDER BY expression     Why not declare a local variable:
    sortexp      VARCHAR2 (20) := LOWER (insortexp);and use that variable instead of the raw argument in the query:
    ...                              DECODE (sortexp, 'itemnumber asc',  item) ASC,
                                     DECODE (sortexp, 'itemnumber desc', item) DESC, ...Also, this site doesn't like to display the &lt;&gt; operator, even inside \ tags.  When posting here, always use the other inequality operator, !=
    Edited by: Frank Kulash on Jun 15, 2010 3:25 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • APEX_UTIL.EDIT_USER Procedure do not work correctly in APEX 4.0.2.00.07

    Hi,
    I created user in Apex system without privileges.
    Next I want to provision privileges using APEX_UTIL.EDIT_USER Procedure.
    But when I try to set p_developer_roles param to ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL in web interface of apex I see the next values: User is workspace administrator - yes; User is a developer - yes; other privilege attributes are NO! When I login I can access to Application Builder but not to SQL Workshop.
    In short if i try to provision any developers privileges changes not appearing in web interface, but also i can access to Application Builder if I have that privilege. When I provision SQL:MONITOR:DATA_LOADER privilege I also see:
    User is workspace administrator - no; User is a developer - yes; other privilege attributes are NO and I can't access to SQL Workshop!
    APEX_UTIL.CREATE_USER Procedure with same values for p_developer_privs param work fine...
    Help me to resolve this issue.

    Please, help

  • PR release procedure no longer working-error MEPO 822

    I've raised a message previously regarding PR release problem. Now i've found something that need expert helps to clarify on this.
    Situation :
    One of my client(ABC) implemented release procedure for PR which is not assign to value limit. It is by document type. They had 2 document types; NB and RNB.
      NB = NOT subject to release
      RNB = SUBJECT to release.
    So when they :
    create a PR with document type RNB - it will goes for approval.
    create a PR with document type NB - it will not go to approval.
    It was working fine until after they created a new document type which copied from NB, called ZTP.
      ZTP = NOT subject to release.
    They did not touch anything on PR release configuration. However, the release has no longer working. Means, when they create PR with document type RNB, it will NOT go for approval as it suppose to. I've check in configuration, all are fine.
    Findings:
    I've created a PR, and go to ME45N to release it but system prompt me an error message
    "Purchase requisition 10000066 cannot be released". I check on the message data,  the error coming from MEPO, message number 822.
    So i check in OSS and found a note which is similar to this case.
    Note 939371 - Overall release PR using ME54N gives error MEPO 822
    Link : https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=939371#Text
    But my question is,is it also applied to ME51N and without external application as per my client's case?
    Please anyone help.
    Thanks.

    Hi guys!
    Wants to share something. I had a problem to release my PR. When i want to release PR via ME54N, system give me error message "Purchase requisition 10000066 cannot be released". When i checked message data, it is coming from MEPO Messafe 822. So i asked SAP, they said this one is caused by different issue. Here's the reply from SAP.
    Here's the reply from SAP :
    Purchase requisition 10000066 cannot be released
    Message no. MEPO822
    Now click the other requisition button and let say
    choose Purchase requisition 10000068,
    Execute ME54N again:
    Purchase requisition 10000068 cannot be released
    Message no. MEPO822
    Comment/explanation:
    The log incidence seems not having problem with release
    strategy as it was ok but it was the last PR was called
    everytime ME54N was called. This same as it works in enjoy
    transaction ME21N/ME22N or ME51N/ME52N.
    For example, When using ME21n or ME22n to create or change PO,
    after saving the PO. There are 2 ways to exit the transaction,
    1, enter another T-code or use /n to exit directly.
    2, use 'F3' or the 'green tick' to exit ME21n (or ME22n)
    Then you can access ME23n to see the difference.
    For the 1st way, ME23n won't display the last PO created in ME21n
    For the 2nd way, ME23n will display the last PO just created!!!
    Please see attached consulting note 595627 that explains a new
    functionality as of release 470:
    Due to performance problem, a decision had to be taken about the way to
    use transactions. If you leave transaction ME21N/ME22N via the
    exit button (F3), the expected PO will be displayed next time you use
    these transactions. But if you quit abruptly (/nXXX) the PO number
    won't be saved for the next transaction ME2?N.
    As SAP note is the official document to explain system behavior,
    this document is provided by SAP developement to explain this system
    behavior to customers.
    In your case, you had used ME54N and this was same as you use ME53N.
    The last PO always display. You may try to view Purchase requisition
    with release strategy, for example Release group R1, Rel. strategy
    R1, then after this execute transaction ME54N again, the message
    MEPO822 will not be there anymore.
    Hope this will help you guys if you're having the same problem in future.
    Thanks,
    Crystal.

  • Master-Detail with 2 blocks based in stored procedure doesn't work.

    Hi. I'm Oscar and I'm new for here.
    I have a problem that i can't find the correct answer to solve it.
    Well. I've created a form with 2 blocks. Both of them have the Query Data Source Type Property to "Procedure", and both procedures on database returns one ref cursor of a record type each one.
    BLOCK BL_COMPETICIONES --> query data source: p_get_competiciones (p_Cursor is cursor of record (CODIGO NUMBER,
    NOMBRE VARCHAR2(50),
    SETCRICKETSN VARCHAR2(1),
    SET01SN VARCHAR2(1),
    FECHAINICIO DATE,
    FECHAFIN DATE).
    On triggers (on-lock, on-insert, on-delete and on-update) I have the call to the corresponding stored procedure to lock, insert, delete or update.
    Well, when i've only this block in form, the form works correctly.
    But when I added a second block (which is suppossed to be a detailed data from the first one), and after I've assigned the query procedure and created the relation between both blocks, then run the form and try to execute query on first block, returning records correctly, but then, when execution goes to the program unit "query_master_details", the sentence "execute query" doesn't do anything (and the cursor is in the detailed block), so detailed block continues to be without records.
    I don't know how to solve this. Someone can help me, please?. Thanks.
    Edited by: user5067020 on 09-abr-2009 16:38

    It could be that there is something screwy with LV, but given that it uses standard interfaces for comm with the DBMS, I would not expect that. A much more realistic possibility is that the toolkit is mucking things up. (A fairly common occurrence.)
    Try bypassing the toolbox -- which you don't really need anyway -- an talk directly to the ActiveX or .net interface.
    Also, what DBMS? What drivers are you using?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for