Warning: include_once(http://erpgenie.com/_borders/topabap.htm) [function.include-once]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/templates/rhuk_solarflare_ii/index.php on line 52

Warning: include_once() [function.include]: Failed opening 'http://erpgenie.com/_borders/topabap.htm' for inclusion (include_path='.:') in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/templates/rhuk_solarflare_ii/index.php on line 52

Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Poll

What area of ABAP are you interested in?
 
Home arrow Tips and Tricks arrow ABAP Reports arrow Accessing data in Packages
Accessing data in Packages PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Tuesday, 13 March 2007
Selectct, delete and Insert Statement described... SELECT Statement
Consider using PACKAGE SIZE in SELECT statement when size of resultant itab is significant in size (e.g. when row width and volume of rows is large). Instead of retrieving all data in one select statement a select loop is executed multiple times providing a data package for each loop.
    
  • Do not use APPENDING TABLE with PACKAGE SIZE.
  • The use of PACKAGE SIZE is not recommended if FOR ALL ENTRIES is being used because FAEI defines it’s own package size

    
    Example:
    
    SELECT VBELN PSTYV VGBEL VGPOS FROM LIPS
           INTO TABLE T_LIPS
           PACKAGE SIZE 10000.
    
      LOOP AT T_LIPS.
        …….
      ENDLOOP.
    ENDSELECT.
    
    In this example 10,000 lines are added to the internal table T_LIPS during each select loop.
    
DELETE Statement
Consider using explicit packet technique in DELETE statement when size of driver itab is significant (e.g. when row width and volume of rows is large).
    Example:
    
    DO.
       IF v_current_index >= v_del_lines.
    
         EXIT.
       ENDIF.
    
       FREE t_temp_par_delete[].
       APPEND LINES OF t_par_delete FROM v_start_index TO v_end_index
                                    TO t_temp_par_delete.
    
       v_current_index = v_current_index + p_delpak.
    
    *  Delete the entries in ztmm_par_agg from the internal table
       DELETE ztmm_par_agg FROM TABLE t_temp_par_delete.
       
       COMMIT WORK.
       
       v_start_index = v_start_index + p_delpak.
       v_end_index = v_start_index + p_delpak - 1.
    ENDDO.

  Insert Statement
Consider using explicit packet technique in INSERT statement when size of driver itab is significant (e.g. when row width and volume of rows is large).
Example:
      DO.
    
    
        IF v_current_index >= v_ins_lines.
          EXIT.
        ENDIF.
    
        FREE t_temp_par_insert[].
    
        APPEND LINES OF rt_par_agg FROM  v_start_index TO v_end_index
           TO    t_temp_par_insert.
    
        v_current_index = v_current_index + p_inspak.
    
    *   Insert the entries into ztmm_par_agg from the internal table
        INSERT ztmm_par_agg FROM TABLE t_temp_par_insert.
        IF sy-subrc = 0.
          COMMIT WORK.
        ELSE.
          MESSAGE e001 WITH 'ZTMM_PAR_AGG'(002).
        ENDIF.
    
        v_start_index = v_start_index + p_inspak.
        v_end_index   = v_start_index + p_inspak - 1 .
    
      ENDDO.               


Related Items:

 
< Prev   Next >

Google Search

Statistics

Contribution Activity
Utilities: 38
Tips and Tricks: 333
Sample Code: 164
Total Contributions: 550

Member Activity
Members: 6244 since 2/1/2007!
New: 0 since yesterday!
Visitors: 1080625
We have 1 guest online

Newest Members

Welcome our newest members:

Google Ads


Warning: include(http://erpgenie.com/_borders/bottom.htm) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/includes/footer.php on line 22

Warning: include() [function.include]: Failed opening 'http://erpgenie.com/_borders/bottom.htm' for inclusion (include_path='.:') in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/includes/footer.php on line 22