ASSIGNING addition  used in the LOOP statement

Hello Guys ,
I have a problem about at new  and at end statements, basically I want to use them in a loop with  assigning  like this :
loop at ti_itab assigning <wa_itab>.
    at new of kunnr.
    endat.
    at end of xref1.
    endat.
endloop.
xref1 and kunnr are fields of my table itab , this is the correct form of do this ?  I don´t know why the at  statements are doing  control breaks for every single   register in my table ( even when both have the same value of the previous register ) , could you give me an example please. should i use  at new of <wa_itab>-kunnr it doesnt work either ?
thank you very much,.

Hi José,
Click on below link:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm
BR
Dep

Similar Messages

  • Can't download additional content in the loops section in Logic pro x, what's the solution?

    Can't download some of the additional contents from the loops in Logic Pro x, whenever I download additional contents it takes it's time to download but then when I quit Logic and start it again, the loops still can't be selected, they aren't getting downloaded, what's the solution ?

    Just click loops , on the top of the panel click loops, and select "reindex all loops".
    http://support.apple.com/kb/HT5894

  • Performance tuning the loop statement

    Hi,
    I have the following requirement.
    I have an internal table IT_TEST1 which has values
    Column1
    A
    B
    C
    D
    consider a second internal table IT_TEST2. It'll have values like as follows:..I need to know which are the entries in column1 that have more than one entry in column 2 without looping through this internal table..Kindly suggest..
    Column1 column2
    A            VAL1
    B            VAL1
    B            VAL2
    C            VAL1
    C            VAL2
    D            VAL1
    D            VAL2
    D            VAL3
    This has caused very big performance issue for it is

    Hi,
    I have faced a similar problem and the following strategy has saved a lot of processing time
    the following code may serve your pupose
    if you are using IT_TEST2 for further processing please use IT_TEST3
    otherwise use IT_TEST2 instead of IT_TEST3 in the code below......'
    *************************CODE SAMPLE************************************
    data : IT_TEST3 like IT_TEST2.  "declare internal table same as IT_TEST2
      IT_TEST3[] = IT_TEST2[]. 
        "Pass contents if IT_TEST2 is used for further processing
    Sort IT_TEST1 by column1 .  "Sort
    Sort IT_TEST3 by column1 .  "Sort
       loop at IT_TEST1.
               read table IT_TEST3
                    with key column1 = IT_TEST1-column1.
                     if sy-subrc = 0.
                          describle table IT_TEST3 lines n.
                              if lines > 1.
                                 "Multiple entries
                               else.
                                 "Single entry
                              endif.
                     endif.
      "Perform all operations on IT_TEST3
        DELETE IT_TEST3 WHERE  column1 = IT_TEST1-column1.
    "Delete the entry in IT_TEST3 already processed with the key of IT_TEST1
    "Next time you do the read entries for the previous and all predecessor loops
    will not be there'
    "As you go down the loop performance increases
    endloop.
    Regards
    Byju

  • Error message in the loop statement

    Hi Experts:
                    In my ABAP program,
                    In the loop of internal table,when match some condition,the system give error message, or go on.
                    Now,if the internal table has ten records,  three records match some condition,the others need
                           process going on.
                    But in my program,if finds error record,giving error message,can't process other records.
                    I want it can not only show error message,but also process other records.
                    Pls give me some advice,tks!

    Hi,
    Message type E is error type and it will terminate your program.
    So either we can declare the message type E as information message or status or we can add a varaible flag which can be set on error.
    So that it would not terminate the program.
    Example :
    Loop at inttable1.
    if condition for error
    flag = 'X'.
    continue.
    endif.
    endloop.
    Outside the loop.
    if flag = 'X'.
    message in other internal table with details.
    endif
    Hope this helps.
    Thanks,

  • Using & in the SQL statements

    Hi,
    I have a big sql file which contains a lot of insert statements and one of the columns which contains customer details the value can be 'Mr & Mrs xxx'. when i am running this from SQl*PLUS whenever the insert statement with a value like this comes up i am being prompted to enter a value for Mrs ... Can i set any parameter in Sql*plus so that sql*plus ignores the & and inserts the record.
    Thanks in advance

    Since scan seems obsolete in 10gR2, work with :<br>
    set define off<br>
    <br>
    Nicolas.<br>
    <br>
    James has already answered, sorry.<br>
    Message was edited by: <br>
    N. Gasparotto

  • Assigning additional resource after the start of a task

    Hi, I'm new to MS Project so please be gentle with me.
    My scenario is this:
    I have 2 tasks, task 1 = 8 weeks, task 2 = 4 weeks
    I have resource 1 assigned to task 1
    I have resource 2 assigned to task 2
    I want to be able to assign resource 2 to task 1 once task 2 is complete effectively reducing the time taken for task 1 to 6 weeks - can anyone explain how I do this please? I am using Project 2010.
    Thank you.

    CTQPVZTH --
    Welcome to the fast-paced world of Microsoft Project, my friend.  No one is going to beat on your for being a newbie!  :)
    Assuming you have already assigned resource 1 to Task 1 and resource 2 to Task 2 at a Units value of 100% on each task, here is how to do what you seek:
    Apply the Gantt Chart view.
    Right-click anywhere in the Gantt Chart pane and select the Show Split item on the shortcut menu.
    In the Gantt Chart pane, select the Task 1 task.
    In the Task Form pane, select the resource 2 resource below the resource 1 resource.
    For the resource 2 resource, enter a Units value of 100% and then click the OK button in the Task Form pane.
    In the Task Form pane, change the Work value to 240h for resource 1 and to 80h for resource 2, and then click the OK button.  This should reduce the Duration value to 6w.
    That is the simple way to do what you want to do.  Hope this helps.
    Dale A. Howard [MVP]

  • How to unlock my Samsung S3 for use outside the United States?

    Good day. I'm in Colombia and bought a team of your company on ebay, but I can not use in my country. Could you send me a code or useful instructions how to do with cellular networks here

    Hey
    I understand you’d like to use an AT&T locked device on another network! I can help you with that!
    You can request an unlock for your device by visiting http://att.com/deviceunlock/ and reviewing the requirements. If you are eligible per the requirements, continue on to the unlock form and submit your personal and device information. Upon submitting, you will receive an email from which you must confirm your request within 24 hours. Your unlock request will then be processed within 2 business days, at which point we will email you with our decision!
    I hope this helps!
    Charise

  • A method for passing in the system date to either a substitution variable or directly into a calc script for use on the fix statement

    Does anyone have an idea of how to pass in the server system date into a calc script or into a substitution variable so that I can fully automate my calc script to only calculate the current day? Thanks very much for any assistance on this.

    unsure why cannot att bat<BR>below is raw code meant to insert into .bat file<BR>================================================<BR><BR>code starts below this line<BR>================================================<BR>:: <BR>:: pls ensure essbase server up and running <BR>:: batch file to upd subs var <BR>:: insert correct values below<BR>:: <BR>:: substitution variables set up in cube: curryr, lastyr <BR>:: substitution variables set up in cube: currmth, prevmth ... <BR>::<BR><BR>:: setting of local env vars<BR>setlocal<BR>::<BR><BR>:: setting of job control vars<BR>set svr=<< insert value here >><BR>set uid=<< insert value here >><BR>set pwd=<< insert value here >><BR>::<BR><BR>:: setting of date and time vars<BR>for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (<BR>set dayofweek=%%i<BR>set day=%%k<BR>set month=%%j<BR>set year=%%l<BR>set datestamp=%%l_%%j_%%k<BR>)<BR>for /F "tokens=1-2 delims=: " %%i in ('time /t') do (<BR>set hour=%%i<BR>set minute=%%j<BR>set timestamp=%%i_%%j<BR>)<BR>::<BR><BR>:: setting year vars<BR>set /a curryr=%year%<BR>set /a lastyr=(%year% - 1)<BR>::<BR><BR>:: setting paths and files<BR>set destpath=<< insert path here >><BR>set errpath=<< insert path here >><BR>set errfiles=%errpath%\*.err<BR>set errfiledir=%errpath%\%datestamp%_%timestamp%_err.dir<BR>set errfile=%destpath%\%datestamp%_%timestamp%_err.err<BR>set logfile=%destpath%\%datestamp%_%timeStamp%_log.log<BR>set upd_var_file=%destpath%\upd_var.txt<BR>::<BR><BR>:: initial housekeeping<BR>if exist %errfile% del %errfile%<BR>if exist %logfile% del %logfile%<BR>if exist %upd_var_file% del %upd_var_file%<BR>if exist %errfiledir% del %errfiledir%<BR>::<BR><BR>:: start all<BR>echo. >> %logfile%<BR>echo rem &0 >> %logfile%<BR>echo. >> %logfile%<BR>echo rem --- start all --- >> %logfile%<BR>date/t >> %logfile%<BR>time/t >> %logfile%<BR><BR>:: dates<BR>echo rem --- dates --- >> %logfile%<BR>echo Curr Year = %curryr% >> %logfile%<BR>echo Last Year = %lastyr% >> %logfile%<BR><BR>:: gen temp txt to upd subs vars<BR>echo rem --- upd subs vars start --- >> %logfile%<BR>echo. >> %upd_var_file%<BR>echo. >> %upd_var_file%<BR>echo login "%svr%" "%uid%" "%pwd%"; >> %upd_var_file%<BR>if %month% == 01 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Dec"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Nov"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>if %month% == 02 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jan"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR> echo updatevariable "CurrYr" "%svr%" "" "" "FY%curryr%"; >> %upd_var_file%<BR> echo updatevariable "NextYr" "%svr%" "" "" "FY%nextyr%"; >> %upd_var_file%<BR> echo updatevariable "NextY2" "%svr%" "" "" "FY%nexty2%"; >> %upd_var_file%<BR> echo updatevariable "LastYr" "%svr%" "" "" "FY%lastyr%"; >> %upd_var_file%<BR> echo updatevariable "LastY2" "%svr%" "" "" "FY%lasty2%"; >> %upd_var_file%<BR> echo updatevariable "LastY3" "%svr%" "" "" "FY%lasty3%"; >> %upd_var_file%<BR> echo updatevariable "PrevYr" "%svr%" "" "" "FY%lastyr%"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Dec"; >> %upd_var_file%<BR>)<BR>if %month% == 03 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Feb"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jan"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR> echo updatevariable "PrevYr" "%svr%" "" "" "FY%curryr%"; >> %upd_var_file%<BR>)<BR>if %month% == 04 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Mar"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Feb"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR>)<BR>if %month% == 05 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Apr"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Mar"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 06 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "May"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Apr"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 07 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jun"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "May"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 08 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jul"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jun"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 09 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Aug"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jul"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 10 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Sep"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Aug"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 11 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Oct"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Sep"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>if %month% == 12 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Nov"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Oct"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>echo. >> %upd_var_file%<BR>echo exit; >> %upd_var_file%<BR><BR>:: run temp txt to upd subs vars <BR>esscmd %upd_var_file%<BR>echo rem --- update subs vars end --- >> %logfile%<BR> date/t >> %logfile%<BR> time/t >> %logfile%<BR><BR>:: end all<BR>echo rem --- end all --- >> %logfile%<BR> date/t >> %logfile%<BR> time/t >> %logfile%<BR><BR>: end_all<BR>endlocal<BR><BR>===============================<BR>

  • What is the use of at new statement?

    What is the use of at new statement?

    Hi,
    AT - itab
    Syntax
    LOOP AT itab result ...
      [AT FIRST.
       ENDAT.]
        [AT NEW comp1.
         ENDAT.
           [AT NEW comp2.
           ENDAT.
           AT END OF comp2.
           ENDAT.]
         AT END OF comp1.
         ENDAT.]
      [AT LAST.
      ENDAT.]
    ENDLOOP.
    Extras:
    1. ...  FIRST
    2. ... |{END OF} compi
    3. ...  LAST
    Effect
    The statement block of a LOOP loop can contain control structures for control level processing. The respective control statement is AT. The statements AT and ENDAT define statement blocks that are executed at control breaks, that is, when the control structure is changed. The additions to the AT statements determine the control break at which their statement blocks are executed. Within these statement blocks, the statement SUM can be specified to add together the numeric components of a control level. For the output behavior result, the same applies as for LOOP AT.
    The prerequisite for control level processing is that the internal table is sorted in exactly the same sequence as the component of its line type - that is, first in accordance with the first component, then in accordance with the second component, and so on. The line structure and the corresponding sorting sequence gives a group structure of the content of the internal table, whose levels can be evaluated using AT statements. The AT- ENDAT control structures must be aligned one after the other, in accordance with the group structure.
    The statement blocks within the AT- ENDAT control structures are listed if an appropriate control break is made in the current table line. Statements in the LOOP- ENDLOOP control structure that are not executed within an AT- ENDAT control structure are executed in each pass of the loop.
    In order that control level processing is carried out properly, the following rules must be observed:
    After LOOP, a restricting condition cond can only be specified if this selects a consecutive line block of the internal table. Otherwise, the behavior of control level processing is undefined.
    The internal table cannot be modified within the LOOP loop.
    A work area wa specified in the LOOP statement after the addition INTO must be compatible with the line type of the table.
    The content of a work area wa specified after the addition INTO in the LOOP statement must not be modified.
    If the INTO addition is used in the LOOP statement to assign the content of the current line to a work area wa, its content is changed upon entry into the AT-ENDAT control structure as follows:
    The components of the current control key remain unchanged.
    All components with a character-type, flat data type to the right of the current control key are set to character "*" in every position.
    All the other components to the right of the current control key are set to their initial value.
    When the AT-ENDAT control structure is exited, the content of the current table line is assigned to the entire work area wa.
    Addition 1
    ... FIRST
    Effect
    The control level is defined by the first line of the internal table. The control break takes place when this line is read.
    Note
    In the group level AT FIRST, the current group key contains no components and all character-type components of the work area wa are filled with "*" and all remaining components are set to their initial value.
    Addition 2
    ... |{END OF} compi/>
    Effect
    : Control levels are defined by the beginning or end of a group of lines with the same content in the component compi (where i = 1, 2, and so on) and in the components to the left of compi. The control breaks take place when the content of the component compi or another component to the left of compi changes.
    The compi components can be specified as described in Specification of Components, with the limitation that access to object attributes is not possible here.
    Note
    If the INTO or ASSIGNING additions are used in the LOOP statement, a field symbol can be entered after AT |{END OF} outside classes, to which the corresponding component of the work area wa or the field symbol <fs> is assigned. This form of dynamic component specification is obsolete and has been replaced by specification in the format (name).
    Addition 3
    ... LAST
    Effect
    : The control level is defined by the last line of the internal table. The control break takes place when this line is read.
    Note
    In the group level AT LAST, the current group key contains no components and all character-type components of the work area wa are filled with "*" and all remaining components are set to their initial value.
    Regards,
    Prashant

  • Delete internal table rows without using loop statement

    i have an internal table which consists of 100 records.
    i need to keep only first 5 records.
    without using the loop statement i need to delete the rest of the records. how can we achieve this result.
    i.e.  delete itab1 where  "recordno"  > 5.
    regards.
    ZG

    Hi,
    Delete itab [FROM idx1] [TO idx2] {Where (log_exp)]
    To delete several lines at once, you have to specify at least one of the additions FROM, TO, or WHERE. You can only use the additions FROM and TO with standard tables and sorted tables.
    Delete itab [FROM idx1]
    If you specify FROM, all the table rows from the table index idx1 onwards are included.
    Delete itab [TO idx2]
    If you specify TO, all the table rows from the table index idx2 onwards are included.
    PARAMETERS: p_carrid TYPE sflight-carrid,
                p_connid TYPE sflight-connid.
    DATA: BEGIN OF seats,
            fldate    TYPE sflight-fldate,
            seatsocc  TYPE sflight-seatsocc,
            seatsmax  TYPE sflight-seatsmax,
            seatsfree TYPE sflight-seatsocc,
          END OF seats.
    DATA seats_tab LIKE STANDARD TABLE OF seats.
    SELECT fldate seatsocc seatsmax
           FROM sflight
           INTO TABLE seats_tab
           WHERE carrid = p_carrid AND
                 connid = p_connid.
    LOOP AT seats_tab INTO seats.
      seats-seatsfree = seats-seatsmax - seats-seatsocc.
      MODIFY seats_tab INDEX sy-tabix FROM seats.
    ENDLOOP.
    ENDLOOP.
    SORT seats_tab BY seatsfree DESCENDING.
    DELETE seats_tab FROM 5.
    Thanks & Regards,
    ShreeMohan
    Edited by: ShreeMohan Pugalia on Jul 21, 2009 4:28 PM

  • My mother buy one ipod for me,and now she give to me. Can i  replace an ipod for an iphone locked to use only of United States? I'm from Brazil and i go to United States(Orlando) in November to live there some time.can i change the ipod to iphone so you c

    My mother buy one ipod for me,and now she give to me.
    Can i  replace an ipod for an iphone locked to use only of United States?
    I'm from Brazil and i go to United States(Orlando) in November to live there some time.can i change the ipod to iphone so you can use in the United States.

    No.
    There are no trade ins at all.
    You would ahve to buy a new iphone if you want one.

  • How to compare two fields from the same table in the select statement

    Hi, friends
    I try to compare tow fields from the same table, but no result,
    For example, this
    data: cptotchek tyep i.
    select count(*) into cptotchek
    from aufk where erdat = aufk-idat2 .
    The result is  cptotchek = 0, but there are the records in aufk , where,  aufk-erdat = aufk-idat2.
    Please, help me, i don't use the loop statement for optimize my program.
    Regards

    Hi  ,
           it will not return  any value   when you are using   column of same table 
           such as Date Field   , Because  while Using Aggregate Function  it will not check with self column
    .      For that you have to take data in one internal table and then you can work on it  .
         And if you are worried about Performance  it will not affect  , untill you are selecting only required data  .
    you can try this way  .
    data: cptotchek type i.
    types : begin of  w_aufk.
            include structure aufk  .
          types : end of  w_aufk .
    data : it_aufk type standard table of w_aufk with header line  .
    select * into corresponding fields of table it_aufk
    from aufk  .
    loop at it_aufk .
    if it_aufk-erdat  = it_aufk-idat2 .
    write : / it_aufk-erdat , it_aufk-idat2 .
    else .
    delete it_aufk .
    endif  .
    endloop.
    Regards
    Deepak.

  • Regarding LOOP Statement in ABAP

    Hi,
    I have small question regarding <b>LOOP ..... ENDLOOP</b> statement against <b>SY-SUBRC</b> Check.
    I have a loop as below:
    <b> LOOP AT i_vbap WHERE vbeln = i_vbak-vbeln.
        Some Code
        ENDLOOP.
        IF sy-subrc <> 0.
          APPEND i_sdata.
          CLEAR i_sdata.
        ENDIF.</b>
    Is the above <b>Code/Syntax</b> is correct one.
    Can we use <b>SY-SUBRC</b> Check against <b>LOOP ...  ENDLOOP</b> statement.
    Is this the right way of writing the code as per standards.
    Can anybody give sujjestions regarding the same.
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    Hi Prasad,
    Yes, you could use sy-subrc after the endloop. For example:
    loop at itab1 where kunnr = itab2-kunnr.
    some conditions...
    endloop.
    if sy-subrc = 0.
    write: 'Success!'.
    else.
    leave program.
    endif.
    if you press F1 while highlighting the LOOP statement here are the meaning of sy-subrc in loop...endloop.
    SY-SUBRC = 0:
    At least one loop pass was processed.
    SY-SUBRC = 4:
    The loop was not processed because the table contains no entries or no entries satisfied the conditions.
    Regards!

  • How to tune the Insert statement?

    Hi ,
    I am using 10.2.0.4.0 version of oracle.
         i am having one insert statement , which comes almost all the time in the TOP of my AWR elapsed time section.
         And its somewhat similar to as below.
    Query:
    INSERT INTO a (InvoicePK, CheckPK)
    SELECT DISTINCT ih.InvoicePK, cd.CheckPK
    FROM at,
    cd,
    ih,
    rd
    WHERE at.AttachmentPK = :1
    AND cd.CheckPK = at.CheckPK
    AND at.AttachmentPK = rd.AttachPK
    AND ih.PAYPK = cd.PAYEEPAYPK
    AND ih.PayerNS = cd.PayerNS
    AND ih.PayerPayId = cd.PayerPayId
    AND ih.UpperInvoiceNum = rd.UPPERINVNUM
    AND ih.InvoiceStatusCD NOT IN ('REJ', 'DNY');
    Below is the plan for the 'Select ' statement i.e. used in the insert statement.
    Execution Plan:
    Plan hash value: 2232002808
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 193 | 9 (23)| 00:00:01 | | |
    | 1 | HASH UNIQUE | | 1 | 193 | 9 (23)| 00:00:01 | | |
    |* 2 | HASH JOIN | | 1 | 193 | 8 (13)| 00:00:01 | | |
    | 3 | NESTED LOOPS | | 10 | 1740 | 4 (0)| 00:00:01 | | |
    | 4 | NESTED LOOPS | | 1 | 85 | 3 (0)| 00:00:01 | | |
    | 5 | TABLE ACCESS BY INDEX ROWID | at | 1 | 16 | 2 (0)| 00:00:01 | | |
    |* 6 | INDEX UNIQUE SCAN | atpk1 | 1 | | 1 (0)| 00:00:01 | | |
    | 7 | TABLE ACCESS BY INDEX ROWID | cd | 7359K| 484M| 1 (0)| 00:00:01 | | |
    |* 8 | INDEX UNIQUE SCAN | cdpk1 | 1 | | 1 (0)| 00:00:01 | | |
    |* 9 | TABLE ACCESS BY GLOBAL INDEX ROWID| ih | 10 | 890 | 2 (0)| 00:00:01 | ROWID | ROWID |
    |* 10 | INDEX RANGE SCAN | IH_PAYPK_PAYERNS_PAYID | 5 | | 1 (0)| 00:00:01 | | |
    | 11 | TABLE ACCESS BY INDEX ROWID | rd | 9 | 171 | 3 (0)| 00:00:01 | | |
    |* 12 | INDEX RANGE SCAN | IDX_rd | 9 | | 2 (0)| 00:00:01 | | |
    Predicate Information (identified by operation id):
    2 - access("IH"."UPPERINVOICENUM"="RD"."UPPERINVNUM")
    6 - access("AT"."ATTACHMENTPK"=7794833983)
    8 - access("CD"."CHECKPK"="AT"."CHECKPK")
    9 - filter("IH"."INVOICESTATUSCD"<>'REJ' AND "IH"."INVOICESTATUSCD"<>'DNY')
    10 - access("IH"."PAYPK"="CD"."PAYEEPAYPK" AND "IH"."PAYERNS"="CD"."PAYERNS" AND "IH"."PAYERPAYID"="CD"."PAYERPAYID")
    12 - access("RD"."ATTACHPK"=7794833983)
    Statistics
    1 recursive calls
    0 db block gets
    71 consistent gets
    0 physical reads
    0 redo size
    316 bytes sent via SQL*Net to client
    240 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    3 rows processed
    The 'select' Statement executes with in seconds resulting 3 distinct records, but the insert statement takes ~20sec(Elaps time per execution
    as shown in AWR report) for one time execution, so what must be the reason , and how should i proceed to resolve this performance issue?

    You can do as follows:
    - Enable trace
    - execute the insert statement
    - use tkprof (and put the results here) to see where's its taking long
    Also, while insert is being executed, what are the wait events you see ?
    I dont think there is problem with plan.

  • Select options and loop statement

    Dear forum,
    I have the scenario where i need to restrict the loop from the select-options.
    in the select-options, user enter currency.
    then in the loop i need to loop base on the currency user enter.
    may i know what steps should i use for the loop as loop cannot support where.
    thanks

    HI Gengis
    I have the scenario where i need to restrict the loop from the select-options.
    in the select-options, user enter currency.
    then in the loop i need to loop base on the currency user enter.
    may i know what steps should i use for the loop as loop cannot support where.
    as per your requirement.
    you have some data in your internal table also you have a select-options to input values.
    on the basis of the values in your select option you want to fetch the values from your internal table. right???
    then there should be a field like your select option in your internal table.
    select-option: s_matnr for mara-matnr.
    let assume you have an internal table with matnr and other fields also and your select-options is for mara-matnr.
    then you need to select the values in your internal table according to the values in your select-options like below.
    SELECT MATNR field1 field2........ from dbtable into table itab where matnr = s_matnr.
    the above code will give you the values matching the values in your select-options.
    you need not to apply loop becasue you already have only those values for which yo u have found records in the DBTABLE.
    in case you want to apply loop on an internal table on the basis of s_matnr's values, then you can write.
    in this scenario you need to define 2 internal table one with already fethced values and another in which we will fetch the values according to select-options.
    loop at itab into wa_itab.
    read table itab1 into wa_itab1 where matnr = wa_itab-matnr.
    write statement........
    endloop.
    before that youwill have to fetch values in itab according to s_matnr.
    I hope this will clear your query.
    Thanks
    Lalit Gupta.

Maybe you are looking for

  • Lost control of desktop, and the hard drive is creating aliases on it's own

    I am unable to save to my desktop, or move the one remaining (hard drive) icon around on my desktop. I have double checked the organization settings, and there are set to none. I have run the user permissions repair via disc utilities, and cleared th

  • IMac G5 (iSight) kernel panics

    I'm having continuous kernel panics with my iMac G5. I unplugged all external drives/accessories. I removed additional RAM. I zapped the PRAM. I rebooted with different disks (all crash sooner or later -- often sooner). I ran Techtool pro (in target

  • Volume on ipod touch not working properly

    my ipod touch volume icon on my screen display won't go away.  i cannot adjust the volume to high or low. i already reset it to factory setting but unfortunately did not fix my problem.

  • What types of Interface Errors lead to Input/Output Drops/Discards?

    Hi All, I was wondering if anyone knows if all of the following errors would lead to packet drops/discards. Runts Giants Framing Errors Overrun Errors Abort Errors Also, are there any types of interface errors that don't lead to packet drops/discards

  • FROM CLAUSE as datasource

    HI All, I am trying to create a block that base on FROM CLAUSE as datasource. But I need to reference several control block items as the criteria of the select statement. But when I execute the query, the system keep saying that 'Invalid column name'