Need to Process Large Internal Tables Efficiently

I have two internal tables, T_EKKO(for PO Header data) and T_EKPO(for PO Item data). These tables carry data for 10 PO's with at least 1 line item in each one.
The requirement is to write the following fields on the result screen:
     Line 1: PO Number.-      
Line 2:PO Item, Article Number.
What is the most efficient way to do this?

Hi,
You can use parallel processing techinque..
Ex.
SORT T_EKPO BY EBELN.
DATA: V_TABIX TYPE SYTABIX.
LOOP AT T_EKKO.
  WRITE: / 'PO Number - ', T_EKKO-EBELN.
  READ TABLE T_EKPO TRANSPORTING NO FIELDS
                       WITH KEY EBELN = T_EKKO-EBELN
                       BINARY SEARCH.
  IF SY-SUBRC = 0.
Store the row number.
    V_TABIX = SY-TABIX.
     LOOP AT T_EKPO FROM V_TABIX.
Exit condition.
         IF T_EKPO-EBELN <> T_EKKO-EBELN.
           EXIT.
         ENDIF.
         WRITE: / 'PO item', T_EKPO-EBELP.
     ENDLOOP.
  ENDIF.
ENDLOOP.
Thanks,
Naren

Similar Messages

  • Error "Error in ABAP statement when processing an internal table. table."

    Hello,
    I am facing the error when tried for GR from SRM portal for my shopping cart and for others created shopping cart. The error is
    "Error in ABAP statement when processing an internal table. table."
    I have the central receipient role. Couold any body assist me?
    Thanks,
    Pijush

    Hi Harish,
    Execute the query in RSRT and check whether you have any short dump is in ST22. This would give a clear idea at what might have gone wrong.
    Another thing is to check whether the code for the variable is fine in the user exit.
    Hope this helps.
    Bye
    Dinesh

  • Splitting Large internal tables

    Hi All,
    How to split large internal table into smaller ones of fixed number of lines.
    The total number of lines are not known and is subjected to vary.
    Regards,
    Naba

    I am not sure about your requirements, you try with the below solution
    Itab : contains all entries  let us say 3000
    Itab1 
    itab2
    itab3
    No.of entries to be split based on 3000/n  ( 3000/3)  = 1000
    split_val = 1000
    N_split_from = 1
    N_split_to = 1000
    APPEND LINES OF ITAB1 FROM N_split_from TO N_split TO ITAB1.
    N_split_from = 1 +  split_val
    N_split_to = 1000 + split_val
    APPEND LINES OF ITAB1 FROM N_split_from TO N_split TO ITAB2.
    N_split_from = 1 +  split_val
    N_split_to = 1000 + split_val
    APPEND LINES OF ITAB1 FROM N_split_from TO N_split TO ITAB3.
    Regards
    Sasi

  • How to process very large internal tables and stop time limit

    Hello Experts,
    I am currently having a problem on how to fix a certain report where we process more than 500 thousand
    records in the internal table. I can't think of any solution that can make the below code any faster.
    I just checked in our prod server and the error time limit exceeded stops in the loop statement. Anyway,
    Below is the code. Any input will be appreciated. Thanks guys and take care!
    Get sales document and corresponding line item
      SELECT avbeln bposnr a~auart
             avkorg avtweg a~kunnr
             bmatnr bpstyv b~spart
        FROM vbak AS a
       INNER JOIN vbap AS b
          ON avbeln = bvbeln
       APPENDING TABLE lt_vbap
       WHERE a~auart IN lr_auart
         AND a~vbeln IN s_vbeln
         AND a~vbeln IN s_vbill
         AND a~vbtyp EQ p_vbtyp.
      LOOP AT lt_vbap ASSIGNING <wa_vbap>.
        IF <wa_vbap>-auart EQ 'ZUCI' OR
           <wa_vbap>-auart EQ 'ZURV' OR
           <wa_vbap>-auart EQ 'ZUPR'.
        Check ifa delivery document has been created
          CLEAR wa_vbill.
          SELECT SINGLE vbeln
            FROM vbfa
            INTO wa_vbill
           WHERE vbelv = <wa_vbap>-vbeln
             AND ( ( vbtyp_n EQ 'J' AND vbtyp_v = 'C' )
              OR ( vbtyp_n EQ 'T' AND vbtyp_v = 'H' ) ).
          IF sy-subrc <> 0.
            <wa_vbap>-del_ind = 'X'.
            CONTINUE.
          ELSE.
          Check if within selection parameters
            CLEAR wa_likp.
            READ TABLE lt_likp INTO wa_likp WITH KEY vbeln = wa_vbill.
            IF sy-subrc <> 0.
              SELECT SINGLE *
                FROM likp
                INTO wa_likp
               WHERE vbeln = wa_vbill.
              APPEND wa_likp TO lt_likp.
            ENDIF.
            IF NOT wa_likp-wadat_ist IN s_erdat.
              <wa_vbap>-del_ind = 'X'.
              CONTINUE.
            ENDIF.
          ENDIF.
        ELSE.
      Check if this has already been billed
          CLEAR wa_vbill.
          SELECT SINGLE vbeln
            FROM vbfa
            INTO wa_vbill
           WHERE vbelv = <wa_vbap>-vbeln
             AND ( ( vbtyp_n EQ 'M' AND vbtyp_v = 'C' )
              OR ( vbtyp_n EQ 'O' AND vbtyp_v = 'H' ) ).
          IF sy-subrc <> 0.
            <wa_vbap>-del_ind = 'X'.
            CONTINUE.
          ELSE.
          Check if within selection parameters
            CLEAR wa_vbrk.
            READ TABLE lt_vbrk INTO wa_vbrk WITH KEY vbeln = wa_vbill.
            IF sy-subrc <> 0.
              SELECT SINGLE vbeln fkdat
                FROM vbrk
                INTO wa_vbrk
               WHERE vbeln = wa_vbill.
              APPEND wa_vbrk TO lt_vbrk.
            ENDIF.
            IF NOT wa_vbrk-fkdat IN s_erdat.
              <wa_vbap>-del_ind = 'X'.
              CONTINUE.
            ENDIF.
          ENDIF.
        ENDIF.
      Get Material Type and Division
        IF <wa_vbap>-spart IS NOT INITIAL.
          SELECT SINGLE mtart
            FROM mara
            INTO lv_mtart
           WHERE matnr = <wa_vbap>-matnr.
        ELSE.
          SELECT SINGLE mtart spart
            FROM mara
            INTO (lv_mtart,<wa_vbap>-spart)
           WHERE matnr = <wa_vbap>-matnr.
        ENDIF.
      If material division is same as parameter division
        IF <wa_vbap>-spart = p_spart.
      If material is subsidiary-owned
       IF <wa_vbap>-spart in lr_spart.
        If customer is the same as that of parameter division
          IF <wa_vbap>-kunnr NE lr_kunnr OR <wa_vbap>-auart EQ 'ZUDO' OR <wa_vbap>-auart EQ 'ZUS3'.
          If item is a free good, tag order type as 'ZUPR' to treat
          the item the same way as 'ZUPR'
            IF <wa_vbap>-pstyv = 'TANN' OR
               <wa_vbap>-pstyv = 'ZKNF' OR
               <wa_vbap>-pstyv = 'ZKNN' OR
               <wa_vbap>-pstyv = 'ZFLO' OR
               <wa_vbap>-pstyv = 'ZKBF' OR
               <wa_vbap>-pstyv = 'ZKLN' OR
               <wa_vbap>-pstyv = 'ZREN'.
              lv_auart = <wa_vbap>-auart.
              IF lv_auart EQ 'ZUPR'.
                CLEAR <wa_vbap>-pstyv.
              ENDIF.
              <wa_vbap>-auart = 'ZUPR'.
              CLEAR: lv_mtart.
            ENDIF.
          Set Cost of Goods Sold Account
            <wa_vbap>-cogshkont = '0050000010'.
            CASE <wa_vbap>-auart.
              WHEN 'ZUPR'.
                CASE lv_mtart.
                  WHEN 'ZUL4'.
                    <wa_vbap>-del_ind = 'X'.
                    CONTINUE.
                  WHEN OTHERS.
                  Check if division is defined in mapping table
                    READ TABLE lt_ulsub INTO wa_ulsub
                         WITH KEY spart = <wa_vbap>-spart.
                    IF sy-subrc = 0.
                      <wa_vbap>-kostl = wa_ulsub-kostlp.
                      <wa_vbap>-bukrs = wa_ulsub-bukrsp.
                      <wa_vbap>-type = 'TP'.
                    Set Cost of Goods Sold Account
                      IF lv_auart = 'ZUPR'.
                        <wa_vbap>-cogshkont = '0050000006'.
                      ENDIF.
                    ELSE.
                      <wa_vbap>-del_ind = 'X'.
                      CONTINUE.
                    ENDIF.
                ENDCASE.
              WHEN 'ZUCI' OR 'ZUDO' OR 'ZURD' OR 'ZUS3'.
            Get cost center from header text
                PERFORM get_cost_center USING <wa_vbap>-vbeln
                                     CHANGING <wa_vbap>-kostl.
    *  Change by LGTE 11-02-2006
            Check if Medvale sales
                IF <wa_vbap>-auart EQ 'ZUCI' AND <wa_vbap>-kostl IS INITIAL.
                  <wa_vbap>-del_ind = 'X'.
                  CONTINUE.
            Check if UL Cost Center
                ELSEIF <wa_vbap>-kostl NE gv_ul_kostl.
               IF <wa_vbap>-kostl NE gv_ul_kostl.
    *  End change.
              Get material division and check if subsidiary product
                 SELECT SINGLE spart FROM mara INTO <wa_vbap>-spart
                 WHERE matnr = <wa_vbap>-matnr.
                  READ TABLE lt_ulsub INTO wa_ulsub
                       WITH KEY spart = <wa_vbap>-spart.
                  IF sy-subrc = 0.
                  Get requestor's company code from cost center data
                    SELECT SINGLE bukrs
                      FROM csks
                      INTO <wa_vbap>-bukrs
                     WHERE kokrs =  lc_kokrs
                       AND kostl =  <wa_vbap>-kostl
                       AND datbi GE sy-datum
                       AND datab LE sy-datum.
                    IF sy-subrc = 0.
                    For donations, only include if a subsidiary company is donating
                      IF <wa_vbap>-auart EQ 'ZUDO' OR <wa_vbap>-auart EQ 'ZUS3'.
                        IF NOT <wa_vbap>-kunnr IN lr_kunnrnt.
                          <wa_vbap>-del_ind = 'X'.
                          CONTINUE.
                        ENDIF.
                       CHECK <wa_vbap>-kunnr IN lr_kunnrnt.
                      ENDIF.
                    For ZUCI, if the company code of the costcenter is UL, do not include
                      IF <wa_vbap>-bukrs EQ gc_ul_bukrs.
                        <wa_vbap>-del_ind = 'X'.
                        CONTINUE.
                      ENDIF.
                      IF <wa_vbap>-bukrs = wa_ulsub-bukrsp.
                        <wa_vbap>-type = 'RV'.
                      ELSE.
                        <wa_vbap>-type = 'RV'.
                      ENDIF.
                    ELSE.
                    Check if customer defined in table ZFI_DONATIONS
                      SELECT SINGLE kunnr FROM zfi_donations INTO <wa_vbap>-kostl
                        WHERE kunnr = <wa_vbap>-kostl.
                      IF sy-subrc <> 0.
                        lv_error = 'X'.
                        CONCATENATE 'Cost center/Customer' <wa_vbap>-kostl
                                    'does not exist. Please check Sales Order'
                                    <wa_vbap>-vbeln
                                    INTO lt_disp-message SEPARATED BY space.
                        lt_disp-type = 'E'.
                        <wa_vbap>-del_ind = 'X'.
                        APPEND lt_disp.
                        CONTINUE.
                      ELSE.
                        <wa_vbap>-type = 'RV'.
                      ENDIF.
                    ENDIF.
                  ELSE.
                    <wa_vbap>-del_ind = 'X'.
                    CONTINUE.
                  ENDIF.
                ELSE.
                  <wa_vbap>-del_ind = 'X'.
                  CONTINUE.
                ENDIF.
              WHEN OTHERS.
                <wa_vbap>-del_ind = 'X'.
                CONTINUE.
            ENDCASE.
          ELSE.
            <wa_vbap>-del_ind = 'X'.
            CONTINUE.
          ENDIF.
        ELSE.
          <wa_vbap>-del_ind = 'X'.
          CONTINUE.
        ENDIF.
      Get company code description
        SELECT SINGLE butxt FROM t001 INTO <wa_vbap>-butxt
         WHERE bukrs = <wa_vbap>-bukrs.
        IF sy-subrc <> 0.
          SELECT SINGLE name1 FROM kna1 INTO <wa_vbap>-butxt
           WHERE kunnr = <wa_vbap>-kostl.
        ENDIF.
    Change by LGTE on 11-02-2006
    Get Transaction Type
        CASE <wa_vbap>-auart.
          WHEN 'ZUPR'. "UL Promo/Samples
            IF <wa_vbap>-pstyv = 'TANN' OR
               <wa_vbap>-pstyv = 'ZKNF' OR
               <wa_vbap>-pstyv = 'ZKNN' OR
               <wa_vbap>-pstyv = 'ZFLO' OR
               <wa_vbap>-pstyv = 'ZKBF' OR
               <wa_vbap>-pstyv = 'ZKLN' OR
               <wa_vbap>-pstyv = 'ZREN'.
              <wa_vbap>-ltext = 'Free Goods'.
            ELSE.
              <wa_vbap>-ltext = 'Product Samples'.
            ENDIF.
          WHEN 'ZUDO'. "Donations - R/3
            <wa_vbap>-ltext = 'Donations - R/3'.
          WHEN 'ZUCI'. "Donations - ZUCI
            <wa_vbap>-ltext = 'Donations - ZUCI'.
          WHEN 'ZURD' OR 'ZUS3'. "UL Returns - Donation
            <wa_vbap>-ltext = 'UL Returns - Donation'.
        ENDCASE.
    Get material description
        SELECT SINGLE maktx
          FROM makt
          INTO <wa_vbap>-maktx
         WHERE matnr = <wa_vbap>-matnr
           AND spras = sy-langu.
    Get division from material master
       SELECT SINGLE spart FROM mara INTO <wa_vbap>-spart
        WHERE matnr = <wa_vbap>-matnr.
    Get division description
        SELECT SINGLE vtext
          FROM tspat
          INTO <wa_vbap>-vtext
         WHERE spras = sy-langu
           AND spart = <wa_vbap>-spart.
    Get Valuation Class
        SELECT SINGLE bklas
          FROM mbew
          INTO lv_bklas
         WHERE matnr = <wa_vbap>-matnr.
    Determine G/L of FG Based on Valuation Class
        READ TABLE lt_val_cls INTO wa_val_cls WITH TABLE KEY bklas = lv_bklas.
        <wa_vbap>-fghkont = wa_val_cls-hkont.
    Determine Cost Center of Cogs Account
        READ TABLE lt_ulsub INTO wa_ulsub WITH TABLE KEY spart = <wa_vbap>-spart.
        <wa_vbap>-cogskostl = wa_ulsub-kostlp.

    Hi!
    First of all, don't use SELECT SINGLE inside of LOOP,
    instead  SELECT all relevated rows before LOOP in intertal tables (using FOR ALL ENTRIES) and then use
    READ TABLE WITH KEY BINARY SEARCH.
    it will match faster.
    for example:
    IF NOT lt_vbap[] IS INITIAL.
    SELECT vbeln
    FROM vbfa
    INTO lt_vbill
    FOR ALL ENTRIES IN lt_vbap
    WHERE vbelv = lt_vbap-vbeln.
    ENDIF.
    SORT lt_vbap BY vbeln.
    READ TABLE lt_vbill WITH KEY vbeln = <wa_vbap>-vbeln
    BINARY SEARCH.

  • Need a logic for Internal table processing

    Hi,
    I have a requirement...an internal table contains three fields material no, bin no, and Quantity
    Mat. No    |         Bin No        |              Quantity
    a              |              x1         |                   10
    a              |              x1         |                   10
    a              |              x2         |                   20
    b              |              x3         |                   10 
    c              |              x3         |                   20
    c              |              x4         |                   30
    c              |              x4         |                   40
    In this I need to append the records to new internal table say itab1 where multiple entries exist for some material no like mat no 'a' and 'c'  and
    if the material no. exist only once in the table, it has to be moved to another new internal table say itab2.
    Pls suggest some logic that does not have performance issues.
    Thanks in advance
    Saravana

    Hi there,
    a solution in brief...
    data: wa_itab1_a like itab1,
             wa_itab2_b like itab1,
             lv_tabix       type sytabix.
    sort itab1 by matnr.
    loop at itab1.
      wa_itab1_a = itab1.
      at new matnr.
        lv_tabix = sy-tabix + 1.
        clear wa_itab2_b.
        READ TABLE itab1 into wa_itab2_b
                            INDEX lv_tabix.
        if wa_itab2_b-matnr ne wa_itab1_a-matnr.
          append wa_itab1_a to itab2.
          delete itab1 where matnr = wa_itab1_a-matnr.
        endif.
      endat.
    endloop.
    Regards
    George Zervas
    Edited by: gzervas on Oct 20, 2010 12:08 PM

  • Need to make the internal table structure dynamic

    Hi ,
    I need to upload data from an excel file, the columns in the excel keep on varying
    E.g the number of columns in one excel file can be 10, in the second excel file it can be 15.
    So in order to upload the data into an internal table the structre of internal table needs to be dynamic and change according to the number of fields in the input file .
    Is it possible by using field symbols or is there any other method to do the same
    Thanks.
    Nishant
    Edited by: nishant patel on Sep 17, 2009 10:48 AM

    Hi Nishant,
    According to ur requirement, dynamic internal table can be created like below. But database table name has to passed dynacimally.
        DATA: ftab TYPE STANDARD TABLE OF ddfield,
              ftab_wa TYPE ddfield,
              fcat_itab TYPE lvc_t_fcat,
              fcat_wa TYPE lvc_s_fcat,
              poi_itab TYPE REF TO data.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE.
        CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'
          EXPORTING
            tabname  = p_table  " Pass database table name dynamically
          TABLES
            ddfields = ftab.
        LOOP AT ftab INTO ftab_wa.
          fcat_wa-fieldname = ftab_wa-fieldname.
          fcat_wa-ref_field = ftab_wa-fieldname.
          fcat_wa-ref_table = p_table.
          APPEND fcat_wa TO fcat_itab.
        ENDLOOP.
        CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog           = fcat_itab
          IMPORTING
            ep_table                  = poi_itab
          EXCEPTIONS
            generate_subpool_dir_full = 1
            OTHERS                    = 2.
        ASSIGN poi_itab->* TO <itab>.  " <itab> is dynamic internal table
    Might help u.
    Thanks.
    Edited by: Sap Fan on Sep 17, 2009 1:19 PM

  • Need information on Dynamic internal table

    Hi All,
    I need some information on dynamic internal table.
    I want what are the field names and the values in dynamic internal table.
    Is there any function module, which tells us the field names and values of corresponding fields from a dynamic internal table ?
    Thank you very much in advance.

    Hi,
    Program to display/edit database tables dynamically.
    REPORT  zdyn_table_display.
    PARAMETERS: p_table TYPE tabname OBLIGATORY,
                p_rows  TYPE I.
    * Creation of dynamic internal table
    DATA: lv_dref             TYPE REF TO data.
    FIELD-SYMBOLS: <fs_table> TYPE STANDARD TABLE.
    DATA: lv_table  TYPE  string.
    START-OF-SELECTION.
    * Dynamic internal table.
      CREATE DATA lv_dref       TYPE TABLE OF (p_table).
      ASSIGN lv_dref->* TO <fs_table>.
      IF sy-subrc  EQ 0.
    *    EXIT.
      ENDIF.
    data i type i.
    * Get the data
      SELECT  *
            FROM (p_table)
            UP TO p_rows ROWS
            INTO TABLE <fs_table>.
      CONCATENATE 'Table contents : ' p_table INTO lv_table.
    * display the table control.
      CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
        EXPORTING
          header            = lv_table
          tabname           = p_table
          no_button         = space
        TABLES
          table             = <fs_table>
        EXCEPTIONS
          no_more_tables    = 1
          too_many_fields   = 2
          nametab_not_valid = 3
          handle_not_valid  = 4
          OTHERS            = 5.
      IF sy-subrc  EQ 0.
        EXIT.
      ENDIF.
    Getting internal table definition 
    Try this...
    DATA : l_descr_ref TYPE REF TO cl_abap_structdescr.
    l_descr_ref ?= cl_abap_typedescr=>describe_by_data( itab ).
    Now l_descr_ref->components holds the entire list of fields in itab.
    Thanks & Regards,
    ShreeMohan

  • Need help reading an internal table

    Howdy,
    I have an internal table (itab_knvh) that contains all the entries from table KNVH for a specified sales area.
    Now I have another internal table (itab_kunnr) that contains all the customers that I need data for.
    How can I read all the entries from itab_knvh where the 'date from' value (datab) is greater than today's date?
    At the moment I have:
    <b>  LOOP AT itab_kunnr.
        <i>READ TABLE itab_knvh WITH KEY kunnr = itab_kunnr-kunnr.</i>
        IF sy-subrc = 0.
          IF itab_knvh-datab GE p_validh.
            WRITE:/ itab_kunnr.
          ENDIF.
        ENDIF.
      ENDLOOP.</b>
    but I don't think this will work if more than one customer entry exists in itab_knvh.
    So is there a way of writing:
    READ TABLE itab_knvh WITH KEY kunnr = itab_kunnr-kunnr
                                  datab GE sy-datum.
    Any ideas???

    Hi Steve,
    If you have written <i>exactly</i> the same SELECT statement as you have posted here, then it is in error.
    Try this one out, instead.
    select single hkunnr
                  datab
                  hzuor 
             from knvh
             into (itab_hier_output-old_kunnr,
                   itab_hier_output-old_datab,
                   itab_hier_output-old_hzuor)
            where kunnr = itab_kunnr-kunnr
              and datbi = itab_hier_output-new_datab.
    Regards,
    Anand Mandalika.

  • Processing two internal tables

    hi
    i have two internal tables
    itab1  with feilds  partner, vbeln. cmgst ( SO status)
    itab2  - vbeln, posnr(item no ), kwmeng(qunatity) , cmpre ( credit price )
    now i need to get the sum of  (cmpre * kwmeng) for each partner and SO status combination into another internal table itab3.
    so itab3 will have partner, cmgst (so status ) , total amount
    is it possible to achieve this with out using loop inside a loop.
    thanks

    Hi Sudhakar,
    Check below code sample. Change it according to ur need.
    DATA: BEGIN OF itab1 OCCURS 0,
          partner TYPE string,
          vbeln TYPE vbeln,
          cmgst TYPE cmgst,
          END OF itab1,
          wa1 LIKE itab1.
    DATA: BEGIN OF itab2 OCCURS 0,
          vbeln TYPE vbeln,
          posnr TYPE posnr,
          kwmeng TYPE kwmeng,
          cmpre TYPE cmpre,
          END OF itab2,
          wa2 LIKE itab2.
    DATA: BEGIN OF itab3 OCCURS 0,
          partner TYPE string,
          cmgst TYPE cmgst,
          amt TYPE p DECIMALS 2,
          END OF itab3,
          wa3 LIKE itab3.
    wa1-partner = 'Test1'. wa1-vbeln   = '0000000001'. wa1-cmgst   = 'X'.
    APPEND wa1 TO itab1. CLEAR wa1.
    wa1-partner = 'Test2'. wa1-vbeln   = '0000000002'. wa1-cmgst   = 'X'.
    APPEND wa1 TO itab1. CLEAR wa1.
    wa2-vbeln  = '0000000001'. wa2-posnr  = '000001'. wa2-kwmeng = 10. wa2-cmpre  = 100.
    APPEND wa2 TO itab2. CLEAR wa2.
    wa2-vbeln  = '0000000002'. wa2-posnr  = '000002'. wa2-kwmeng = 20. wa2-cmpre  = 200.
    APPEND wa2 TO itab2. CLEAR wa2.
    LOOP AT itab1 INTO wa1.
      READ TABLE itab2 INTO wa2 WITH KEY vbeln = wa1-vbeln.
      IF sy-subrc = 0.
        wa3-partner = wa1-partner.
        wa3-cmgst   = wa1-cmgst.
        wa3-amt     = wa2-kwmeng * wa2-cmpre.
        APPEND wa3 TO itab3.
        CLEAR wa3.
      ENDIF.
    ENDLOOP.
    Thanks,

  • Processing on internal tables?

    tell me plzz one line definition of each?
    1)append
    2)insert
    3)modify
    4)sort
    5)read
    6)collect
    7)editior call
    8)clear
    9)refresh
    10)free
    11)delete

    <b>APPEND:</b> Appends a new line to the end of the internal table.After the APPEND, the system field SY-TABIX contains the index
    of the last line in the table.
    <b>INSERT</b>:Adds new records to a database table
    <b>MODIFY:</b>Inserts new lines or updates existing lines in a database table
    The entries in the internal table are sorted in ascending order
    using the key from the table  definition .
    <b>READ:</b>Reads an entry from an DS:ABEN.ITAB>internal table, using
    either its key or its index.
    <b>COLLECT:</b>COLLECT allows you to create unique or summarized datasets. The system first tries to find a table entry corresponding to the table key . The key values are taken either from the header line of the internal table itab, or from the explicitly-specified work area wa.  All components that are not part of the key
    must be have numeric types If the system finds an entry, the numeric fields that are not part of the table key are added to the sum total of the existing entries. If it does not find an entry, the system creates a new entry instead.
    <b>EDITOR-CALL:</b> Displays the internal table itab in an editor similiar to the
    ABAP Editor. You can then use normal editor functions to make changes.
    Changes to the table contents are only adopted if you save before leaving the editor.
    <b><b>CLEAR:</b>  Resets the contents of header line of internal table to its initial value.
    <b>REFRESH:</b>The internal table itab is reset to its initial state, i.e. all
    table entries are deleted.
    <b>FREE:</b> FREE f has the same effect as CLEAR f, namely that a Data
    object f is reset to the initial value corresponding to its type. Unlike CLEAR,
    FREE also releases any resources taken up by the data object f. This can be important with internal tables , structures containing tables, and table work areas
    After FREE f, the data object f can be re-addressed at any time. The only condition is that you may need to re-allocate resources to the object.
    DELETE:</b>Deletes one or more lines from an internal table.If you delete lines within a LOOP ... ENDLOOP block, the deletion affects subsequent loop passes.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Need help to find internal table.

    hello friends,
    i am working on a smart form i am given a transaction code, vf03 and a custom program and a custom function module,
    i tried to use /h to do the debugging through vf03, but i could not understand where the control was going it was all roaming inthe standard code,
    what all i need to do is to reach the internal table in the smartform, and do some modifications.
    now how do i reach the internal table.
    thank you.

    if you know smartform print program,then use se38 transaction-> use smart form print program and keep break point here.
    Now run VF03 transaction and see it
    Thanks
    Seshu

  • Splitting a large internal table.......

    Hi all,
    i want to split an internal table of say 1,00,000 entries into 10 internal tables having 10,000 each....
    is there a way to move say first 20,000 entries from one internal table to another...based on index...
    Thanks in advance,,,
    Best Regards,
    Sushil.

    for example <itab>this holds  100 records.
    itab1[] = itab[]
    delete itab1 from 10 to 100.
    itab2[] = itab[] 
    delete itab2 from 20 to 100     
    delete itab2 from 1 to 10                   
    itab3[] = itab[]
    goes on
    itab4[] = itab[]
    itab5[] = itab[]
    itab6[] = itab[]
    itab7[] = itab[]
    itab9[] = itab[]
    Edited by: Anbu B on Jun 6, 2008 1:56 PM
    Edited by: Anbu B on Jun 6, 2008 2:12 PM
    this will help u lot...........
    Reward IF.................
    Regards
    Anbu
    Edited by: Anbu B on Jun 6, 2008 2:12 PM

  • APDs with large internal tables

    Hi Everyone!
    I have a problem with APDs where we use several ABAP routine within. When exploding the data to the lowest level we get 10 million lines and there is not enough space to transfer the data between the different ABAP routine. There isn't space enough to extend the internal tables.
    We have tried to have several APDs and several transactional ODSs but it will still not work.
    Does anyone has an idea how we could solve this issue ?
    Thanks a lot in advance.
    Björn

    Hi Ronen!
    Sounds like you run out of physical memory and swapping started. If parameters are still the same (allowed memory per session...), then higher system resource requirements of the new release might be the reason of less space for the sessions.
    Check the memory situation (ST02?), maybe a serialization of the big programs can give them enough memory to perform in the old way.
    Regards,
    Christian

  • Need help in reading internal table data

    Hi All,
    I have two internal tables, it_cdhdr and it_cdpos. Data as follows:
    it_cdhdr:
    Objectclass     ObjectId          Changenr         Udate      Change_ind
    EINKBELEG    4500057161    0003273002    20131129    U
    EINKBELEG    4500057161    0003273001    20131129    U
    EINKBELEG    4500057161    0003272995    20131129    U
    EINKBELEG    4500057161    0003178904    20131030    U
    EINKBELEG    4500057161    0003178903    20131030    U
    it_cdpos
    Objectclas       ObjectId          Changenr      Tabname   Fname Value_new Value_old
    EINKBELEG    4500057161    0003178903    EKKO    FRGKE         A                B
    EINKBELEG    4500057161    0003178903    EKKO    FRGZU          X
    EINKBELEG    4500057161    0003178903    EKKO    PROCSTAT    05                03
    EINKBELEG    4500057161    0003178903    EKKO    RLWRT       800.00            0.00
    EINKBELEG    4500057161    0003178904    EKET    MENGE      1000.000         800.000
    EINKBELEG    4500057161    0003178904    EKKN    MENGE       500.000          400.000
    EINKBELEG    4500057161    0003178904    EKKN    NETWR            500.00        400.00
    EINKBELEG    4500057161    0003178904    EKKO    FRGKE          B                 A
    EINKBELEG    4500057161    0003178904    EKKO    FRGZU          X
    EINKBELEG    4500057161    0003178904    EKKO    PROCSTAT    03                 05
    EINKBELEG    4500057161    0003178904    EKKO    RLWRT       1000.00              800.00
    EINKBELEG    4500057161    0003178904    EKPO    BRTWR       1000.00            800.00
    EINKBELEG    4500057161    0003178904    EKPO    MENGE      1000.000           800.000
    EINKBELEG    4500057161    0003178904    EKPO    NETWR      1000.00            800.00
    EINKBELEG    4500057161    0003272995    EKKO    FRGKE        A                       B
    EINKBELEG    4500057161    0003272995    EKKO    FRGZU        X
    EINKBELEG    4500057161    0003272995    EKKO    PROCSTAT    05    03
    EINKBELEG    4500057161    0003273001    EKET    MENGE          2000.000          1000.000
    EINKBELEG    4500057161    0003273001    EKKN    MENGE          1000.000           500.000
    EINKBELEG    4500057161    0003273001    EKKN    NETWR           1000.00            500.00
    EINKBELEG    4500057161    0003273001    EKKO    FRGKE    B    A
    EINKBELEG    4500057161    0003273001    EKKO    FRGZU        X
    EINKBELEG    4500057161    0003273001    EKKO    PROCSTAT    03    05
    EINKBELEG    4500057161    0003273001    EKKO    RLWRT             2000.00             1000.00
    EINKBELEG    4500057161    0003273001    EKPO    AEDAT    20131129    20131030
    EINKBELEG    4500057161    0003273001    EKPO    BRTWR           2000.00           1000.00
    EINKBELEG    4500057161    0003273001    EKPO    MENGE          2000.000          1000.000
    EINKBELEG    4500057161    0003273001    EKPO    NETWR           2000.00           1000.00
    EINKBELEG    4500057161    0003273002    EKKO    FRGKE    A    B
    EINKBELEG    4500057161    0003273002    EKKO    FRGZU    X
    EINKBELEG    4500057161    0003273002    EKKO    PROCSTAT    05    03
    As per requirement, the main focus is on Changes to EKKN and EKPO tables and I have to get the latest changes.
    If you observe in above it_cdpos internal table data, it has two records,
    EINKBELEG    4500057161    0003178904    EKKN    NETWR            500.00        400.00
    EINKBELEG    4500057161    0003178904    EKPO    NETWR      1000.00            800.00
    EINKBELEG    4500057161    0003273001    EKKN    NETWR           1000.00            500.00
    EINKBELEG    4500057161    0003273001    EKPO    NETWR           2000.00           1000.00
    Now I have read only the latest changenr data. Say 0003273001 , in this case.
    My question is how do I know, the latest changenr has EKKN table changes, if you look at it_cdpos data above, the latest one is 0003273002, which doesnt have EKKN changes.
    Kindly let me know how to read latest EKKN or EKPO data from IT_CDPOS table.
    Thanks in advance,
    Rgs,
    Priya

    Hi Priya ,
    I guess your requirement is to find the latest change number ,that has got change in both ekkn and ekkpo .
    1- Sort it_cdhdr descending .
    Loop at it_chdr into w_cdhdr
      read table it_cdpos into w_cdpos with key changenr = w_cdhdr Tabname = ekkn .
       if sy-subrc=0 .
         read table it_cdpos into w_cdpos with key changenr = w_cdhdr Tabname = ekkpo .
           if sy-subrc=0 .
            "use convenient  way to return change number (using varaiable)"
             exit .
           endif .
       endif.
      endloop .
    By this way change number send will be the latest having both ekkn and ekkpo . If what i assumed is wrong ,then sorry for that . 

  • Need more storage - larger internal drive, or external drive?

    Good day...here's a little background before I head into my question.
    I have a mid-2010 Macbook Pro with a 320 GB hard drive.  I have an 2 GB WD External Hard drive...I've partitioned 500 GB that I use for my Time Machine backups and use the remaining 1.5 TB to store additional files, mainly music and video files.  I rarely keep it plugged in to my MBP....I'll plug it in to do the odd Time Machine backup every couple of weeks, but that's about it.  I like taking the MBP to the living room to use and the idea of having to plug and unplug an external hard drive several times a day is something I've decided not to do.  Additionally, I access most of my photos/music/video through my Apple TV to play them on my TV/receiver.  I also have no need to use the cloud as I don't require access to my media files when I'm out of the house.
    My internal hard drive has been filling up over the last year and as it has, I've been dumping video files to my external hard drive.  If I need them again, I'll simply transfer the odd one back to my MBP and add it back to the Itunes library.  However, even with the odd purging, my internal drive is now filling up, mainly due to photos and videos of the little kids.  The time has come, I need to do something.
    I know that I have the option to store my Itunes library on an external drive (and this would quickly fix my storage issue as about half the 320 GB of space is my Itunes library), but I've been hesitate to do so.  I do have an Airport Extreme Base Station downstairs and a PC Desktop as well.  In reviewing these forums, I understand that I can transfer my Itunes library to my external hard drive, connect it right to the AEBS and access my Itunes files on my MBP from there.  However, as I buy new music/videos from Itunes or add other media files to my Itunes on my MBP, would they automatically transfer to the Itunes library on my External, or would I have to add them each time?  Is it still pretty seamless to transition to having my itunes library on an external hard drive without a lengthy list of things that you have to "put up with"?
    In an effort to resist too much change, I've been thinking about simply replacing my 320 GB internal drive with a 1 TB internal drive so that I can keep things pretty much as they are...keep the Itunes library on my MBP and continue using the 2 TB external for backups and some additional storage space.
    So, with that, I'm curious to hear any feedback on how to approach this...am I complicating things, are there any suggestions on how I could be organizing things way better?  And finally, is your advice to increase the internal hard drive, or should I quit overthinking this and just move the ituens library to an external hard drive?
    Thanks!
    Lee

    large external HD 
    A computer should never be considered a data storage device, only a data creation/ sending/ manipulation device.
    All mega-storage should be a "grab and dash" item to store in a fire vault etc.  Easily unhooked from a main computer capable of lightning strike, failure,  easy erasure, etc.
    And never ever rely on one backup ever. Recipe for disaster.
    There are currently only 3 HD manufacturers, WD, Seagate, and Hitachi/Toshiba (recently acquired by WD).
    No such thing as a "windows" Hard Drive either, .....only a Win formatted HD.  A HD is a HD ... whatever it says or is formatted in when you buy it,... you can format it for Mac OSX extended journaled.
    All personal conjecture aside, Hitachi/Toshiba are the best 2.5" HD, same used by Apple inside the Macbook Pro
    ..... also those running literally 1000s of HD in server farms agree on this.
    That being said, WD are not recommended as an internal HD for a Mac.
    Most reliable 3.5" class HD are Seagate
    The LaCie drives carried in the Apple stores contain 3.5" Seagate HD
    Most reliable 2.5" class HD are HItachi/Toshiba (same as used by Apple in the macbook Pro).
    MUCH empirical data (and my own as well) says that Western Digital are the worst
    WD has some compatibility issues with Mac.
    Best bang for the buck in external 2.5" HD, is the Toshiba Canvio Basics     HDTB120XK3CA   2 Terabytes 2.5" External Hard Drive
    I have 4 of these tiny 2TB drives, ....theyre highly rated, and phenomenal 
    Currently theyre $120
    http://www.amazon.com/Toshiba-Canvio-Basics-Portable-HDTB120XK3CA/dp/B00ARJD56K
    People running server farms and see 1000s of HD, and failures will all tell you the same, in 3.5" class, get a Seagate, and DONT get a WD.
    7 out of 10 HD failures have NOTHING to do with the HD.......if a HD fails (and they all fail) , its usually first 3 months or less
    7 out of those 10 failures AFTER 3 months is NOT a bad HD, but a cheap/junk SATA connector and circuitry which connects the external HD to your computer.
    Seagate large BACKUP HD 3.5" had gotten, for a while a bad reputation, but it had nothing to do with the HD, rather the cheap SATA connector interface that it was plugged into in the external casing.

Maybe you are looking for

  • SNP - Planning Book/Data View not showing up in /SAPAPO/SNP94

    Hi All: I created a planning Book out of a custom SNP planning area. While I could see the Planning Book in the list of Planning Book in the /SAPAPO/SDP94 - Interactive Supply Network Planning (all Books)   I could not see the custom planning book in

  • ASO Partial clear in Essbase v 9.2.0

    Can anyone let me know how to clear partial data from an Aggregate storage database in Essbase v9.2.0? We are trying to clear some data in our dbase and don't want to clear out all the data. Thank you in Advance, Dan

  • Embedding Flash with a holding page to start

    I have an embedded .flv file on my webpage with a controllable skin. This is not started automatically. I want to add a holding image on the flash player to be displayed when the page opens and then when the user chooses to play the video they then v

  • Scientific Notation when Downloading Reports

    When downloading reports from a web template, in either Excel or CSV, some values are getting converted to scientific notation in the downloaded file. I am wondering if there is a setting which prevents any data to be converted to scientific notation

  • WCF certification query

    Hi there, I wanted to ask whether the following material is still applicable to prepare for Exam 70-513: MCTS Self-Paced Training Kit (Exam 70-503): Microsoft® .NET Framework 3.5-Windows® Communication Foundation Is there a reason why this hasn't bee