Regarding Cursor

Hi everyone,
     We are using oracle database 10g in windows 2003 platform.
We have two databases named A and B, and created a link from A to B. I have created a SP in Database A as follows,
Code for DB link:
create public database link a_2_blink
connect to gadmin identified by gadmin using 'netservicename';
Procedure:
create or replace procedure test_proc
as
cursor a_cur is
select a.owner "OWNER",a.table_name "TABLE_NAME"
from dba_tables a
where a.owner in ('SCOTT')
and exists
(select owner,table_name
from dba_tables@a_2_blink b
where b.owner=a.owner
and b.table_name=a.table_name
and b.owner in('SCOTT'))
order by a.owner,a.table_name;
begin
for a_rec in a_cur loop
dbms_output.put_line(a_rec.table_name);
end loop;
end;
While compiling the Sp produce the error as follows,
4/5 PL/SQL: SQL Statement ignored
5/10 PL/SQL: ORA-00942: table or view does not exist
16/9 PL/SQL: Statement ignored
16/30 PLS-00364: loop index variable 'A_REC' use is invalid
What's wrong with this query..,can anyone guide me..?
Regards,
Jai.

Could be permissions. Is gadmin granted proper rights to select dba_tables?
Or it could be that the grants are given via a role - then the grant might not work in a procedure.
Try if you can do the select statement directly instead of as a cursor in a procedure.
If you can do it directly and it fails in a procedure, then the reason is that grants via a role is not working in the procedure.
Then you will have to grant the proper permissions directly to gadmin, not via a role.

Similar Messages

  • Help regarding cursor

    Dear Experts,
    I had requirement whenever user click on user input field. It should pop-up mesage.
    Like: in IW51 t-code,when user clicks on PO number,it should throw an pop-up message.
    I need help from you regarding cursor click action. whether it is possible to develop the logic in customer-exit or not?
    Please suggest me your solutions to solve the issue.
    Thanks in advance,
    Bharat.

    Why duplicate thread ??

  • Question Regarding Cursor

    I need to create a Cursor where in the SELECT clause I am using Replace function. The replace value is coming from a variable.
    declare
    cursor csr is select replace(col1,'{DATE}',v_date) from tab1;
    begin
    v_date := fun_get_date();
    for c in csr
    loop
    end loop;
    end;
    can i use variables in select clause?

    Hmm..
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:01.02
    satyaki>
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7521 WARD       SALESMAN        7698 22-FEB-81       1815        500         30 SALESMAN
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1815       1400         30 SALESMAN
          7788 SCOTT      ANALYST         7566 19-APR-87     4791.6                    20 ANALYST
          7839 KING       PRESIDENT            17-NOV-81       7260                    10 PRESIDENT
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
          7876 ADAMS      CLERK           7788 23-MAY-87     159.72                    20 CLERK
          7900 JAMES      CLERK           7698 03-DEC-81     1379.4                    30 CLERK
          7902 FORD       ANALYST         7566 03-DEC-81    5270.76                    20 ANALYST
          7934 MILLER     CLERK           7782 23-JAN-82     1887.6                    10 CLERK
          7566 Smith      Manager         7839 23-JAN-82       1848          0         10 Manager   23-JAN-89
          7698 Glen       Manager         7839 23-JAN-82       1848          0         10 Manager   23-JAN-89
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
             1 boock
    12 rows selected.
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>declare
      2    cursor c1(var in varchar2)
      3    is
      4      select ename,replace(ename,'E',var) mod_ename
      5      from emp;
      6     
      7    r1 c1%rowtype;
      8   
      9    str varchar2(20);
    10  begin
    11   
    12    str:= '&supp';
    13   
    14    for r1 in c1(str)
    15    loop
    16      dbms_output.put_line('Original :'||r1.ename);
    17      dbms_output.put_line('Modified :'||r1.mod_ename);
    18    end loop;
    19  end;
    20  /
    Enter value for supp: T
    old  12:   str:= '&supp';
    new  12:   str:= 'T';
    Original :WARD
    Modified :WARD
    Original :MARTIN
    Modified :MARTIN
    Original :SCOTT
    Modified :SCOTT
    Original :KING
    Modified :KING
    Original :TURNER
    Modified :TURNTR
    Original :ADAMS
    Modified :ADAMS
    Original :JAMES
    Modified :JAMTS
    Original :FORD
    Modified :FORD
    Original :MILLER
    Modified :MILLTR
    Original :Smith
    Modified :Smith
    Original :Glen
    Modified :Glen
    Original :boock
    Modified :boock
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.03
    satyaki>Regards.
    Satyaki De.

  • Doubt regarding CURSORS in PRO*C

    Hi all,
    I have a problem with cursors in proc
    1. Can i declare a cursor and with in it another cursor in proc
    like
    EXEC SQL DECLARE emp_cursor CURSOR FOR
    SELECT ........;
    EXEC SQL OPEN emp_cursor;
    for(;;)
    EXEC SQL FETCH emp_cursor INTO :emp_structure;
    EXEC SQL DECLARE dept_cursor FOR
    SELECT ...............;
    EXEC SQL OPEN dept_cursor;
    for(;;)
    EXEC SQL FETCH dept_cursor INTO :dept_structure;
    EXEC SQL CLOSE dept_cursor;
    EXEC SQL CLOSE emp_cursor;
    2. im getting the following error after getting an result
    ORA-01405: fetched column value is NULL
    though i dont have any null columns.
    please help me in this regard,
    Trinath Somanchi,
    Hyderabad.
    Message was edited by:
    Trinath Somanchi

    Hi all,
    I have a problem with cursors in proc
    1. Can i declare a cursor and with in it another cursor in proc
    like
    EXEC SQL DECLARE emp_cursor CURSOR FOR
    SELECT ........;
    EXEC SQL OPEN emp_cursor;
    for(;;)
    EXEC SQL FETCH emp_cursor INTO :emp_structure;
    EXEC SQL DECLARE dept_cursor FOR
    SELECT ...............;
    EXEC SQL OPEN dept_cursor;
    for(;;)
    EXEC SQL FETCH dept_cursor INTO :dept_structure;
    EXEC SQL CLOSE dept_cursor;
    EXEC SQL CLOSE emp_cursor;
    2. im getting the following error after getting an result
    ORA-01405: fetched column value is NULL
    though i dont have any null columns.
    please help me in this regard,
    Trinath Somanchi,
    Hyderabad.
    Message was edited by:
    Trinath Somanchi

  • Regarding Cursor focus by default

    Hi Experts,
    Please help I need something like this.
    For Example
    Start- All Programs-Accessories---Calculator.
    As we all are aware of the start menu when we click start, it opens but when we keep the cursor over any of the options like All Programs it opens and shows other options related to that.
    Please help me whether it is possible in web dynpro or not.
    Its urgent..
    Regards
    Nutan

    Hi Armin,
    Like in Start--->Programs. In the same way I need to display my records.I am having Two buttons A and B. And if I will keep my mouse over  A somw documents will display in a tree structure with the save button. Similarly with Button B.So ,Please help how to achieve this.
    Regards.
    Nutan

  • Question regarding cursor variables, while using table functions

    Hi,
    I created a procedure and when i'm try'g to call it. now i'm getting this error.
    CREATE OR REPLACE TYPE TAB_EMP_REC IS OBJECT(
    EMP_ID NUMBER(9),
    EMP_NAME VARCHAR2(30));
    CREATE OR REPLACE TYPE T_EMP_TMP IS TABLE OF TAB_EMP_REC ;
    CREATE OR REPLACE PROCEDURE USP_CREATE_DATA(
    p_Input IN NUMBER,
    V_EMP_CUR OUT sys_refcursor) IS
    T_EMp T_EMP_TMP := T_EMP_TMP( );
    BEGIN
    t_emp.extend();
    t_emp(1) := TAB_EMP_REC(p_input, 'jack');
    OPEN V_EMP_CUR FOR SELECT * from TABLE(t_emp);
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR '||SQLERRM);
    END USP_CREATE_DATA;
    calling procedure::
    DECLARE
    type O_RESULT_CUR is ref cursor return TAB_EMP_REC;
    V_EMP_REC TAB_EMP_REC;
    BEGIN
    USP_CREATE_DATA(99, O_RESULT_CUR);
    LOOP
    FETCH O_RESULT_CUR INTO V_EMP_REC;
    EXIT WHEN O_RESULT_CUR%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(V_EMP_REC.EMP_ID);
    END LOOP;
    CLOSE O_RESULT_CUR;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR '||SQLERRM);
    END;
    Now i'm getting an error PLS-00362: invalid cursor return type; 'TAB_EMP_REC' must be a record type.
    My question is i already declared it as a database object. What do i need to do ?
    thank you

    but t_emp(1) := TAB_EMP_REC(p_input, 'jai');
    is correct, since.. i'm passing a record into t_emp(1)(this is the first column in this table)No it is not, since TAB_EMP_REC is just an object, when used as a collection, it can be a VARRAY, a PL/SQL table(associative array), nested table etc. As mentioned in my earlier post, if you want to use a collection of the same structure (with subscript n, as you have done here), then you need to declare a collection of type TAB_EMP_REC.In this case you have already declared a table of type TAB_EMP_REC - +CREATE OR REPLACE TYPE T_EMP_TMP IS TABLE Also, t_emp is of type T_EMP_TMP - T_EMp T_EMP_TMP := T_EMP_TMP( );*
    As for the error you are getting, try changing to -
    t_emp := T_EMP_TMP(TAB_EMP_REC(p_input, 'jai'));*
    Note : Not Tested.

  • Help needed regarding cursor

    Hi,
    I have an SP as follows?
    CREATE OR REPLACE PROCEDURE p_temp (
    in_rc IN VARCHAR2,
    out_table OUT sys_refcursor
    IS
    BEGIN
    OPEN out_table FOR
    SELECT DISTINCT rcs.rc, rcs.description AS rc_description
    FROM ucweb.rcs
    END p_temp;
    I wanted to view the various values of column rc obtained from the cursor in TOAD.
    how should I write my PL/SQL block to view this O/p.
    I had done this few years back, but not remebering now ( did something like fetch cur into ........then cur.rc....somthing like that.......just cant remember)
    Please help me rgdng this
    P.S. ( need the o/p in toad and not sql*plus)
    Regds
    s

    Hi,
    You will have to write a PL/SQL block which will FETCH the cursor contents and then you can print like this.
    BEGIN
    LOOP
    FETCH ref_cur_var INTO var1,var2;
    EXIT WHEN ref_cur_var%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(var1||var2);
    END LOOP;
    END;
    Note: Run this block in toad in PL/SQL window or as a script.
    Regards

  • Cursor Bulk Collect

    Hello All,
    I have a doubt regarding Cursor bulk collect. Both the versions are working fine.
    1st Version:
    DECLARE
      CURSOR c1 IS (SELECT t2 FROM test10);
      TYPE typ_tbl IS TABLE OF c1%rowtype;
      v typ_tbl;
    BEGIN
      OPEN c1; 
        FETCH c1 BULK COLLECT INTO v;
      CLOSE c1;
      FOR i IN v.first..v.last
      LOOP
        DBMS_OUTPUT.PUT_LINE(v(i).t2);
      END LOOP; 
    END;
    2nd version:
    DECLARE
      CURSOR c1 IS (SELECT t2 FROM test10);
      TYPE typ_tbl IS TABLE OF c1%rowtype;
      v typ_tbl;
    BEGIN
      OPEN c1;
      LOOP                                                 --Loop added
        FETCH c1 BULK COLLECT INTO v;
        EXIT WHEN c1%NOTFOUND;
      END LOOP;
      CLOSE c1;
      FOR i IN v.first..v.last
      LOOP
        DBMS_OUTPUT.PUT_LINE(v(i).t2);
      END LOOP; 
    END; Is it necessary to have a loop and exit when cursor notfound statementwhen used with Bulk Collect?
    Edited by: SamFisher on Feb 14, 2012 1:26 PM

    Echoing Tubby, if you do a BULK COLLECT without a LIMIT (unless you are certain that the result set is going to be trivially small), you're doing something wrong. If you code your own loop using explicit cursors, you should always do something like
    OPEN cursor_name;
    LOOP
      FETCH cursor_name
       BULK COLLECT INTO collection_name
       LIMIT some_limit;
      EXIT WHEN collection_name.count = 0;
      <<do something with the collection>>
    END LOOP;
    CLOSE cursor_name;Unless your <<do something>> happens to be doing a FORALL using the collection you just populated, an implicit cursor is going to involve a lot less code (and a lot fewer places where you can potentially create a bug) and isn't going to be noticably slower. The most efficient LIMIT for your bulk collect is generally somewhere between 100 and 1000 so the implicit cursor's limit of 100 is generally pretty close to optimal. You might get marginally more performance by explicitly tuning the LIMIT for your particular process. But once you've eliminated 99% of the time spend on context shifts by letting the implicit cursor fetch in groups of 100, it's relatively unlikely that you're going to see any noticable performance improvements from eliminating the last 1% of context shift time. Since Oracle is going to spend more time managing the collection the larger it gets (particularly depending on how you use the collection), performance starts going down at some point once the LIMIT is too large.
    Justin

  • Qucik Graph Cursor Legend Questions

    Hi all,
    I have a couple of quick questions regarding my graph cursor legend:
    1. Is it possible to move the position of the cursor legend during runtime? I cannot seem to drag it around the graph?
    2. Can I hide/remove the cursor mover? This is not needed and is for this vi as I need to be able to manually drag the cursors only.
    I am accessing the cursor legend during runtime through a right-click and selecting "visable items:.
    Thanks,
    Jack

    Hi please check Using Cursor Legend in this link if it is helpful
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/customizing_graphs_and_charts/
    Sorry i don't know exact answer for questions, But did you try property node of Cursor.
    -To access it, right click the graph indicator in Black Diagram and go to create>>Property Node>>Cursor.
    -Lot of options regarding cursor available there, you can make selected property to write or change the parameter. and check this for help on cursor properties
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/cursor_p/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Lgwr and cursor

    please i appreciate your help for these 2 questions:
    1- can i add more lgwr process like dbwr ? if yes why if no why
    2- regarding cursors: when a session issues a select statement ex:
    select * from hr.employees
    is the employees table blocks are in the buffer cache they are used otherwise the server process copy the blocks
    from the data file into the buffer cache..is that right so far ?
    lets say the same session is updating the employees records , are the same blocks moved to the shared pool to satisfy sharing
    the same blocks with other session, and by then only these data blocks are called a cursor and moved to the shared pool and shared
    by other sessions using cursor_sharing parameter setting
    please clarification is really appreciated
    regards

    Maoro wrote:
    1- can i add more lgwr process like dbwr ? if yes why if no why
    If I remember correctly, there is a metalink note which does talk about adding more slaves to the LGWR. Its indeed correct that you can't add more processes of LGWR to the system. Reason , IMHO,is that LGWR doesn't need to scan a lot of the data. Normally , the redo log buffer is actually having a very tiny size as compared to the other caches that are there in the SGA. In addition to that, the algorithm of log buffer is pushing the data out from this buffer much fastly as compared to other caches, 3seconds is the time out even when there is no other even triggering LGWR to write. So , there is no need actually to go for more than one LGWR. ORacle has done couple of changes in the latches though , in order to to make the working of redo buffer better.
    You may be not knowing but there are other enhancements done in the redo and undo management to make its working better. There is a concept of Private Redo and In Memory Undo from 10g onwards, targeted to make the things less contending for the standard caches.
    2- regarding cursors: when a session issues a select statement ex:select * from hr.employees
    is the employees table blocks are in the buffer cache they are used otherwise the server process copy the blocks
    from the data file into the buffer cache..is that right so far ?
    lets say the same session is updating the employees records , are the same blocks moved to the shared pool to satisfy sharing
    the same blocks with other session, and by then only these data blocks are called a cursor and moved to the shared pool and shared
    by other sessions using cursor_sharing parameter setting
    >
    1s statement is correct.
    Again, this is correct to say that buffer cache's data is not going to be in the shared pool and that' s how the things have been so far.I have given a link above, read that link which does show that Oracle has done some changes probably and now, they may use shared pool's buffers too for the data buffers. I haven't done the research for it but the note is from Tanel Poder and if he says something, its not just like that.
    If you have some other questions about how things work, feel free to post.
    HTH
    Aman....

  • Editing Arabic text in iWeb

    I've entered some Arabic text into iWeb and don't seem to be edit it. Need I say more? It's behaving like a solid block (image perhaps?).
    This is the markup: <p class="paragraph_style_6">                          المكتبة العربية الإسلامية                                  <br /></p>
    And, yes, there are spaces before and after, which I can't get rid of either. Incidentally, or perhaps not, for some reason most of my paragraph styles are "4" but this is "6". It's supposed to be the same as the others, not sure why it's different nor how to change it.

    mustafa.allawati wrote:
    the letters "magically" started joining each other.
    Non-joining Arabic letters normally means you are trying to use a Windows Arabic font.  Instead use one of those that comes with OS X, like Geeza Pro.  It's a completely different problem than the OP's editing difficulty.
    I am curious how easy you find it to edit your Arabic text.  In the past iWeb had such serious bugs regarding cursor action and formatting issues that it was normally advised that people use a different app.

  • What is the best way to match back 3rd party vendor data to our SQL Server Database?

    So we have this 3rd party data that we need to match back to our database. We have determined that the "ID" column that the 3rd party is sending us back data is a concatenated key of our member's SSN, Gender, and CCYYMMDD Birthdate. In 90% of the
    cases, we can match back on this. However, the other 10% we have to try a couple of different ways...using our Member #, using what is called a HFCA #.
    We are talking about 10s and 20s of data here...NOT thousands.
    What is the best way to handle this via SSIS? A SQL Server Stored Procedure to cursor through the 3rd party data or multiple INSERT-SELECT statements trying to marry back the data? My thought process was to cursor through each record, try and match on our
    90% match, and then determine if we have a match or not, and then if we do not, then try our other means. Should I SELECT 1 to see which matching criteria to go with? So in other words, for the first match...
    IF EXISTS(SELECT 1 FROM TableName WHERE ColumnName1 = .....) BEGIN....ELSE...Blah Blah Blah
    or simply continue doing INSERT-SELECTS...
    I guess I am asking about the efficiency of using a cursor within a SQL Server Stored Procedure here.
    Thanks for your review and am hopeful for a reply.

    You are asking a SSIS question but posted in tsql - which is it?  But before you go further, which matching logic should have priority?  Member # or the SSN/gender/birthdate? Note that the priority does not depend on matching success percentage. 
    In other words, you may prefer to match on member # first (even though it has a lower success ratio but a higher confidence ratio), followed by ssn..., followed by whatever. 
    In any case, this sounds much more like a SSIS logic issue.  Your questions regarding cursors and stored procedures seem premature at this point. OTOH it may depend on what you are actually trying to accomplish.  

  • Regarding sy-lilli, Get cursor line

    Hi Folks,
    I'm having some trouble with getting the cursor line in a search help selection.
    This is my code:
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'XBLNR'
                dynpprog        = sy-repid
                dynpnr          = sy-dynnr
                dynprofield     = 'ITAB-FACTURA'
                window_title    = 'Facturas'
                value_org       = 'S'
           TABLES
                value_tab       = itab_bsik_v[]
                return_tab      = return_tab
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc = 0.
      ENDIF.
      GET CURSOR LINE l_linea.
      READ TABLE itab_bsik_v INDEX l_linea.
      DATA: l_stepl LIKE  sy-stepl,
             l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    * Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
           IMPORTING
                povstepl        = l_stepl
           EXCEPTIONS
                stepl_not_found = 0
                OTHERS          = 0.
      l_indx = grid-top_line + l_stepl - 1.
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'ITAB-FACTURA'.
      dynpfields-fieldvalue = itab_bsik_v-xblnr.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'ITAB-BUZEI'.
      dynpfields-fieldvalue = itab_bsik_v-buzei.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
           EXPORTING
                dyname     = sy-repid  "Program name
                dynumb     = sy-dynnr  "Screen number
           TABLES
                dynpfields = dynpfields
           EXCEPTIONS
                OTHERS     = 0.
    The internal table itab_bsik_v is filled with 10 records. So when user clicks on record 5, I would expect that l_linea gets 5 as cursor line, however I'm getting 1 always.
    I tried changing the GET CURSOR LINE by sy-lilli but I'm not understanding really well the sy-lilli variable because when I click the first line of the search help result, I get a 4 as the index, and when I click in the last line I get 13.
    If anyone could help me with this I really appreciate it.
    Thanks for your help.
    Regards,
    Gilberto Li

    Instead of using GET CURSOR LINE why not u use return_tab.
    This int. table should contins data selected ny user during F4 help. I have done few changes in ur code. pl. check whether it works or not.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'XBLNR'
                dynpprog        = sy-repid
                dynpnr          = sy-dynnr
                dynprofield     = 'ITAB-FACTURA'
                window_title    = 'Facturas'
                value_org       = 'S'
           TABLES
                value_tab       = itab_bsik_v[]
                return_tab      = return_tab
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc = 0.
      ENDIF.
    GET CURSOR LINE l_linea.*
    READ TABLE itab_bsik_v INDEX l_linea.*
      read table return_tab into l_wa_return
                      with key fieldname = 'XBLNR'.
      if sy-subrc eq 0.
       l_XBLNR = l_wa_return-fieldval.
      endif.
      read table return_tab into l_wa_return
                      with key fieldname = 'BUZEI'.
      if sy-subrc eq 0.
       l_BUZEI = l_wa_return-fieldval.
      endif.
      DATA: l_stepl LIKE  sy-stepl,
             l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
           IMPORTING
                povstepl        = l_stepl
           EXCEPTIONS
                stepl_not_found = 0
                OTHERS          = 0.
      l_indx = grid-top_line + l_stepl - 1.
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'ITAB-FACTURA'.
      dynpfields-fieldvalue = l_XBLNR. 
       dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'ITAB-BUZEI'.
      dynpfields-fieldvalue =  l_BUZEI.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
           EXPORTING
                dyname     = sy-repid  "Program name
                dynumb     = sy-dynnr  "Screen number
           TABLES
                dynpfields = dynpfields
           EXCEPTIONS
                OTHERS     = 0.

  • Help Regarding File I/O in a procedure using Cursor

    Hi all,
    I am using a procedure, which uses a cursor, in this cursor we do some calculations and then write these calculations in a .csv file using utl_file package.
    We have 2 approaches,
    1. In every loop of cursor calculate and write then and there itself in the .csv file this means that file is open for total execution time of cursor.
    2. In every loop of cursor calculate the values and at end of loop get the accumulated value in temporary variables and write into the file once, rather than in loop.
    Which approach is better? Any visible proofs of which is better approach?
    i. Our database server is a stand alone server.
    ii. The file to be created is on same server.
    iii. Our server is single CPU, single disk server.
    iv. at a time only one user will access the file to write and that too everytime file is created with unique name having timestamp in its name.
    Considering all these points, can you guys pls help me in deciding which is better approach, how and why?
    Thanks in advance,
    Avinash Bhamare.

    Hi,
    Thanks for the link,
    But it is not what i am looking for...
    My doubt is simple and regarding whether we should be doin the I/O operations on any file in a loop or outisde loop.
    Thanks & Regards,
    Avinash.

  • REGARDING position the cursor at the end of the field

    i friends,
    i have a field having length of 20 ,i need to place the cursor at the end of the filed means at the 20 th position the cursor must be there how will i acieve this...plz help me the value which i will pass to this field is may be of character 4 ,5 what ever but the cursor will be always at the 20th position or at the end of the filed plz help me.......

    parameters:pa_str(20) type c default '11111111111111111111' .
    initialization.                   .
    Set cursor field 'PA_STR' offset 20.

Maybe you are looking for

  • HT202929 Is there a way to add a hyperlink to a collection of books or to all books of an author?

    Is there a way to add a hyperlink to a collection of books or to all books of an author? On iPad, a iBook link to iTunes won't work, as it opens iTunes Store instead of iBooks Store. I can't even find a way to copy a link to a search on iBook Store..

  • Picture sizing help

    I need to make a slideshow to show on Flatscreen TVs. I created images in Adobe Illustrator, sized 1920x1080. I uploaded them to FCP, but now FCP is changing the size of my pictures. How to I keep this from happening? I need them to stay exactly how

  • Settings for icloud in outlook for mac

    Up until today my outlook for mac worked just fine with my .me email.  Now it cannot find the server.  I also today got a new license agreement for icloud on my phone and noticed on my phone it is using the icloud smtp server.  Are there new settings

  • Constant crash with managed library on external drive

    I have never had a problem until lion installation. I have been through the basic steps repaired and reconstructed library reinstalled aperture with update repaired disk with utility from lion repaired permissions deleted plist cussed and repented It

  • Using 64 bits over 32 bits. Why?

    I've recently reinstalled my desktop PC, and switched from 32-bits Arch to 64-bits Arch. I've not had many problems (yet), except for a few minor ones, but I am starting to wonder what the advantage of using a 64 bits installation over a 32 bits is?