Delete Itab within Loop at ITAB ?

Hi,
Help needed to remove this delete from within the loop.
{code
Loop at itab where <condition>.
<statements>
delete itab index sy-tabix.
Exit.
Endloop.
{code}
The functionality of the code should not be affected.
Useful help would be awarded

Hi,
Instead of deleting data from itab use another internal table of same type (itab1) and append it. Use itab1 data for further processing.
check below logic...
{code
Loop at itab1 into wa_itab1 where <condition>.
<statements>
if <condition>
append wa_itab1 to itab2.
exit.
endif.
Endloop.
refresh itab1.
itab1[] = itab2[].
{code}
regards,
N M Poojari.

Similar Messages

  • Error in loop at itab in ECC 6.0

    hi,
    in ECC 6.0, in an abap proxy class i have a loop statement as follows:
    LOOP AT tablename.
        sdfsdf
        sfsfsf
        s
        fsf
    ENDLOOP.
    and i get the error, At "Loop At itab" one of the additions into/assigning or transporting no fields is required in OO context !! what does that mean ? in my abap proxy class can't i use the loop at statement's simplest form ?
    whats the solution ?

    Sure you can, you just have to use an explicit workarea and use the INTO.
    Types: begin of ttab,
                fld1 type c,
               fld2 type c,
              end of ttab.
    data: itab type table of ttab.
    data: wa like line of itab.
    Loop at itab INTO wa.
    * Now the row is stord in WA, do what you need to here.
    endloop.
    YOu can NOT use internal tables with header lines in the OO context.
    Regards,
    Rich Heilman

  • On change of statement not working within loop

    Hi all,
    I am using on change of statement within a loop of an internal table. I am refreshing and clearing the header of internal table every time the program enters the loop. But the program is not executing the code within the on change of statement every first time the program enters the loop.
    Please help me to solve this issue
    Thanks,
    Rajan

    Hi,
    Please check the following code. On change is working correctly.
    You have to sort the internal table on the basis of field you have use further for 'ON CHANGE OF'.
    TYPES : BEGIN OF y_itab ,
           number  type i ,
           END OF y_itab.
    DATA: itab TYPE STANDARD TABLE OF y_itab.
    data : e_itab LIKE LINE OF itab.
    e_itab-number = '112'.
    append e_itab to itab.
    e_itab-number = '112'.
    append e_itab to itab.
    e_itab-number = '110'.
    append e_itab to itab.
    e_itab-number = '110'.
    append e_itab to itab.
    e_itab-number = '111'.
    append e_itab to itab.
    e_itab-number = '111'.
    append e_itab to itab.
    e_itab-number = '3'.
    append e_itab to itab.
    LOOP AT itab INTO e_itab.
    on change of e_itab-number.
    write :/ e_itab-number .
    endon.
    ENDLOOP.
    Only on the first occurence of number,
    code inside 'ON CHANGE OF' .... 'ENDON' will be executed.

  • Problem in select  statment & loop of itab.

    Hi all,
          I am having on ITAB1  for, ex which is having five line items or more  .
    iam also using select statment SINGLE statment for 7 times ,to select values for
    different data base  table.
    for ex,
    loop at itab.
       1---> SELECT SINGLE Z_CTRY_ORIG INTO LS_PSHDESN-Z_CTRY_ORIG FROM ZLE_PART_MST
      WHERE                           WERKS        = ITAB1-LGNUM
      AND                                 MATNR        = ITAB1-MATNR .
    2---
    3---
    4---
    endloop
    i want to remove from the loop statment  and i have to select  the datas ..
    can any one sugesset some possible ways....
    regards
    veera

    hi,
    Solution:
    Never use select single in loop at itab!! for that :
    Solution 1:
    say ur main table is ITAB and rferring  this u want to select data from other tables.
    SELECT SINGLE Z_CTRY_ORIG INTO LS_PSHDESN-Z_CTRY_ORIG FROM ZLE_PART_MST
    into table itab2
    FOR ALL ENTRIES IN ITAB
    WHERE WERKS = ITAB-LGNUM
    AND MATNR = ITAB-MATNR.
    With this what will hapeen , u will get all records in itab2 which u can update itab1(master) using loop.
    solution 2:
    Instead of all this use JOINs in select statement properly and u can fetch data in one shot this will reduce database load as well as abap load ( More than 3 joins in SELECT stmt  are not recommeded but can be used)
    I believe this is perfect solution if and only if u are giving joins on KEY fields only.  Same is applied for wherer clause.
    Hope this will help u, if not revert.
    Jogdand M B

  • Commit - Within Loop

    Hello All,
    I am stuck up with ABAP Dump - DBIF_RSQL_ERROR.
    In my code i am fetching data from database tables ZOMLT and ZOMLG. The main objective being delete the orphan entries
    available in ZOMLT. (ZOMLT and ZOMLG have 5 primary keys in common)
    Step 1 : Based on conditions i have retrieved data from ZOMLT.
    Step 2 : Retrieved data from ZOMLG and placed them into i_ZOMLT and i_ZOMLG internal tables respectively.
    The total records that are selected are for ZOMLT - *38838 and for ZOMLG - 10622.
    I have declared a variable of size 6 as a counter to get the total number of records in internal table, that is the reason
    why the * (So, the reords fetched cross the 6 digits).
    Step 3 : Then i am looping at i_ZOMLT and reading i_ZOMLG.
    If the records available in ZOMLT does not match with the record present in ZOMLT i build the Orphan internal table (IF
    SY-SUBRC NE 0 then build Orphan itab).
    The total records in the Orphan tab is *17594, this is the place i get the ABAP/4 processor: DBIF_RSQL_SQL_ERROR - no more
    locks available.
    Once the Prohan table is populated i use the mass delete statement DELETE ZOMLT client specified from ITAB ORPHAN_TAB.
    Would be great if your views/suggestions are provided on how to retrieve a smaller data from ZOMLT and ZOMLG and delete the
    entries and then proceed for further data.
    Regards,
    - PSK

    Hi Sravan,
    From your message I understood that the error is due to some issue with locking. Possible reasons for this could be;
    Do not have sufficient table space
    Size of the rollback segment
    If you can send me the shortdump, I can give more specific answer.
    Instead of populating all the orphan records in the itab and then delete from ZOMLT, as soon as the orphan itab is filled with 10,000 records, delete from ZOMLT and do a commit work.
    Thanks
    Vinod

  • Skip error record within loop

    Hi all,
       How to skip error records within loop.
    Regards,
    bala

    Hi krithika,
    1. we can use this logic
    2. Loop at itab.
      check field1 = 'wrong value'
      check field3 = 'wrong value'
      *--- OTHER GOOD CODE
      ENDLOOP.
    regards,
    amit m.

  • How to Edit names within Loop Library

    I've edited a MIDI Apple Loop from Jam Packs and saved it as an MIDI Apple Loop in the library.
    What I typed in as a name for the file is not what appeared in the loop library?
    1. Why did the text alter from I typed?
    2. How can I edite the name in the within loop library.
    3. How do I delete apple loops I've created from the apple loop library?
    Thank you
    - I did look in the manual and within the user help in Logic, but could find nothing. I know I must be looking under the wrong 'key word' search.
    What can I say!
    Message was edited by: StyleSupport

    StyleSupport wrote:
    1. Why did the text alter from I typed?
    You must select the green loop in the Arrange and go to Region menu "Add loop to the library" something like that or drag and drop the region to the Library in the Media dock.
    This way a new dialog will show( see the picture below ) where you need to fill new "unique" name or to add some user (sub name), choose the group etc.
    2. How can I edite the name in the within loop library.
    3. How do I delete apple loops I've created from the apple loop library?
    You "user" green loop is stored to ...user/Library/Audio/Apple Loops/User Loops.
    Browse to this dir and edit or delete the loop.
    You "user" green loop is stored to ...user/Library/Audio/Apple Loops/User Loops.
    Browse to this dir ( you will find a folder labeled as "Single" or something like that open it ) and edit or delete the loop in question.
    !http://img42.imageshack.us/img42/508/greenloops.gif!
    !http://img59.imageshack.us/img59/4967/aglogo45.gif! [www.audiogrocery.com|http://www.audiogrocery.com]

  • My itunes won't update. It's looking for 10.6.0.40. Last time it tried to update, I downloaded the msi to my desktop and I deleted it within the last six months. Now I can't uninstall or update.

    The last time my iTunes couldn't update. I used support from Itunes and downloaded it my desktop. My mistake. Because without thinking, I deleted it within the last six months from my desktop, without thinking I'd need it later. For the past month I've needed to update my Itunes and it can't find the msi. Now, my Ipad, my kids' ipod touches and my iphone can't update. Especially the ipod touches, iphone and work ipad have already updated to the OS6. And, now they won't work with this outdated iTunes. Help.

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • HT1338 My mail will not delete. When I move it to trash and then delete it within a few minutes it has all bounced back in again.  Checked my preference settings and all seems to be in order. Any ideas how to resolve this frustrating problem?

    My mail will not delete. When I move it to trash and then delete it, within a few minutes it has all bounced back in again.  Checked my preference settings and all seems to be in order. Any ideas how to resolve this frustrating problem?

    That sounds like a compatibility issue with an add-on that you have installed, as reported by a number of users in both Firefox 22 and Firefox 23 over the last couple of months. If you would provide a listing of your installed extensions ''(as you were prompted to do when creating this thread)'' maybe one of us can advise you which extension is the mot likely culprit. You will need to re-install Firefox 23 to do further diagnostic testing.
    As far as the compatibility of Firefox 23 and Win XP SP3, Mozilla has verified they are compatible and not one user ''(including me on two separate PC's)'' has reported a problem with compatibility.

  • Trap error within loop and process next record

    Hi,
    I am processing each record inside a loop. Now if any exception occurs processing with a single record within loop I want to continue with the next record with proper error message in the log.
    How to achieve the above scenario? Shall I create a savepoint and whenever any error occurs inside the loop I will rollback to that savepoint. Once it is done shall it process the next record automatically?
    Thanks in advance for your reply.
    Thanks,
    Mrinmoy

    Relational databases are about sets.
    They are not about files and records
    Processing records in a loop will make your code slow, and you should avoid using this strategy.
    That said
    Simply enclose the code in it's own begin end block.
    beginn
    <your code>
    exception
    when <your exception> then
    <process the exception not reraising it>
    end;
    No savepoints required.
    Sybrand Bakker
    Senior Oracle DBA

  • NUMBERS: How do I delete pages within a sheet?

    Using NUMBERS:  HOW DO I DELETE PAGES WITHIN A 'SHEET' ?

    You may want to try posting this question over in the Numbers forum, here.

  • How do you delete folders within collections in mini bridge?

    How do you delete folders within collections in mini bridge?

    his chapter on Mini Bridge where he talks about organizing your photos getting rid of some and making a folder or file sorry not certain of the terminology under Collections in mini bridge to acess your "keepers" perse.
    Not familiar with this book but if Scott is talking about using mini bridge for sorting images he is way out of line. Mini Bridge (to my opinion next to useless since they screwed it up for CS6 but that is another discussion) should be seen as a shortcut to Bridge itself when working in Photoshop on complex tasks of image or album compilation and prevent you from switching back and forward between the two applications while working on a project.
    Unfortunately some people thought that it might be useful to add more functions to it and now users start believing they don't need bridge itself for this.
    Please use Bridge itself for sorting etc and also try to get hold of a copy of 'Real World Camera Raw' written by Bruce Fraser and Jeff Schewe. They have an edition for about all CS versions and this book will let you know how to really use the power of Bridge and Adobe Camera Raw

  • Can we put subroutines within loops?

    q]     Can we put subroutines within loops?- i mean not the PERFORM Statement  but the FORMENDFORM statement

    Hi
    If your question means .. calling Performs within Loops ?
    Then its possible..
    LOOP.
    PERFORM P1. ( THIS IS OK )
    ENDLOOP.
    But this is not correct..
    LOOP.
    FORM P1.
    ENDFORM.
    ENDLOOP.
    Thanks
    Hope it Helps.
    Praveen

  • BSP Tableview error when trying to bind an itab within an itab

    Hello dear forum members,
    I got a requirement to dynamically generate tableviews and bind them to a model's attribute (an itab 'model->gt_prd_grps' which holds the actual internal table to display as tableview 'model->gt_prd_grps-prods_table' within it). Below code would give you a correct picture.
    BSP View code:
    LOOP AT model->gt_prd_grps INTO ls_prd_grps.
            lv_idx = sy-tabix.
            CONCATENATE 'ProductsList_' ls_prd_grps-prod_group INTO lv_tableid.
            CONCATENATE '//model/' 'gt_prd_grps[' lv_idx '].prods_table' INTO lv_bind_str.
            CREATE OBJECT lr_tableview.
            lr_tableview->id            = lv_tableid.
            lr_tableview->headertext    = ls_prd_grps-prod_grp_desc.
            lr_tableview->_table        = lv_bind_str.
            lr_tableview->headerVisible = 'true'.
            lr_tableview->footerVisible = 'true'.
            lr_tableview->filter        = 'SERVER'.
            lr_tableview->design        = 'alternating'.
            lr_tableview->sort            = 'SERVER'.
            lr_tableview->fillUpEmptyRows = 'false'.
            lr_tableview->selectionMode   = 'NONE'.
            lr_tableview->iterator        = lo_prdctschtb_iter.
            lr_tableview->emptyTableText  = 'No Products available.'.
            tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).   %>
      <%    lv_col_count_default = 1. lv_row_count_default = lv_row_count_default + 1.   %>
      <htmlb:gridLayoutCell columnIndex = "<%= lv_col_count_default %>"
                            rowIndex    = "<%= lv_row_count_default %>"
                            colSpan     = "3" >
                            <%= tableview_str %>
    </htmlb:gridLayoutCell>
    <% ENDLOOP. %>
    I am encountering dump while trying to run the above BSP view and the error says "BSP exception: No structure component with the name "PRODS_TABLE[1].PRODUCT_ID" exists"
    Actually the user would select from the tableview via a 'select' column which would be rendered as checkbox and the MVC binding would greatly reduce the effort of manually transferring the user selections to the respective model table(s).
    Please suggest if the above way is possible and if so how to overcome the exception i am facing OR do i have to manually capture the tableview selection via CL_HTMLB_MANAGER=>GET_DATA.
    Huge thanks in advance,
    Ram

    Hi Raja,
    I am getting the dump as soon as the view is called. The tableview to be displayed is indeed the nested table only and the user can select the records via the 'checkbok' column in the tableview.
    Also, when i debugged, the dump occurs exactly at the below point:
    tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).
    Regards,
    Ram
    Edited by: Ram Mohan Venkatraman on Mar 11, 2010 12:12 PM

  • Loop at itab in a Smarform problem

    Hi Guys,
    Right now i'm developing my first OO program that calls a Smartform, but I'm having the following issue.
    I call a method exporting the internal table that i want to pass to the SF, but when i want to make a loop statement in the SF I get a dump. I asked some friends and they told me that right now is obsolete the table statement, so i declare in the SF in the importing tab and then declare it in the exporting part of the FM that calls the SF.
    Now when i try to activate the SF i guet the following error: "You may only read from table "IT_GRID1". - reading.".
    so my question is, how can i declare my itab in order to be able to add a loop statement?.
    Regards,
    Eric

    Hi Subramanian,
    At first I did what you suggest, but for a reason that I can`t explain, when the loop begins I always get a dump. The only way that i could make the dump disappear was by replacing the name of the parameter that I receive from the method for the original table.
    Example:
    " I call the method in the main method.
           lcl_reporte_auditoria=>llamar_sf( EXPORTING
                                                               table = it_sf ).
      METHOD llamar_sf.
    *   Llamar al Formulario
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZQM_RPT_AUDITORIA_LLANTA_VERDE'
          IMPORTING
            fm_name            = fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
    *¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*
    * CONFIGURO LOS OPARAMETROS DE SALIDA PARA Q NO APAREZACA       *
    * LA CAJA DE DIALOGO DE LA IMPRESION                            *
        wa_ssfctrlop-device     = 'PRINTER'.
        wa_ssfctrlop-langu      = sy-langu.
        wa_ssfctrlop-replangu1  = sy-langu.
        wa_ssfctrlop-replangu2  = sy-langu.
        wa_ssfctrlop-replangu3  = sy-langu.
        wa_ssfctrlop-no_dialog  = 'X'.      "SIN DIALOGO
        wa_ssfctrlop-preview    = 'X'.      "VISTA PREVIA
        wa_ssfcompop-tddest     = 'LOCL'.   "LOCAL AL PC
        wa_ssfcompop-tdimmed    = 'X'.      "IMPRESION IMEDIATA
        CALL FUNCTION fm_name
          EXPORTING
            control_parameters = wa_ssfctrlop
            output_options     = wa_ssfcompop
            user_settings      = ''
          TABLES
            it_grid1               = table
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
      ENDMETHOD.                    "llamar_sf
    In this case I get a dump as soon as the SF reach the loop statement. If I change the
    TABLES
    it_grid1 = table
    for
    TABLES
    it_grid1 = it_sf
    The dump doesn't appear anymore.
    The dump says: MOVE_TO_LIT_NOTALLOWED_NODATA
    Assignment error: Overwriting a protected field.
    At that moment a friend told me that the table statement was obsolete in OO programing, and encourage me to change it for a exporting parameter. This is the reason why i'm doing it, please anyone tell me is that affirmation is correct. Otherwise, could someone explain me why i'm getting that error when i export the table that i'm receiving in the method call.
    Regards,
    Eric
    Message was edited by:
            Eric Hernandez Pardo

Maybe you are looking for

  • HT204074 How do you delete a song off your ipad that is not listed on the itunes song list?

    Some songs came already loaded with my new ipad air that I hate and want to delete but can't locate the directory where they reside.  I downloaded a file manager app but it only had the option to add new folders, not access the one's already on the i

  • Saved presets don't save all

    I have a Lexmark C510N color laser. I set up 2 presets, one for color and one for black and white printing (in the Color tab). The latter setting does not stick from one print job to the next. I found that if I switch to the color and then back to th

  • Control actual GI date using BAPI_OUTB_DELIVERY_CONFIRM_DEC

    Hi Guys:              I am using BAPI_OUTB_DELIVERY_CONFIRM_DEC to perform PGI against delivery order automaticlly.              But I find this BAPI can't specify the actual GI date,and SAP just default current date as GI date.              Is there

  • Frontiernet specific email problems with Snow Leopard

    I've been seeing so many confusing and conflicting comments about receiving and sending email via Snow Leopard while using Frontier. My question is: Are there still people on Frontier with these problems?

  • JAX RPC extension: Problem with document/literal and MyType[]

    Hi, I have installed the JAX RPC extension and want to generate a stub from my WSDL file. The WSDL describes a document/literal binding. Problem: A webservice server method like: public wineshop.model.common.SimpleProducer[] getSimpleProducerList() t