Program times out while looping at internal table with huge records - Needs fine tuning suggestions

Hi,
I am trying to execute a report. It times out while looping at vbap internal table. This internal table has 140000  records and does the validation within this loop and geenrates data for the output. Due to this huge volume, the program times out when executed foreground.
There are no nested loops, so I cannot apply 'Parallel Cursor' here.
Is there any way I can fine tune the program so that it doesn't timeout? Is it possible to apply 'Parallel Processing' . If yes, how?
Thanks,
Pavan

Hi Pavan ,
              ->sort your internal table by all primary key for vbap.
              ->Read a Record from the table (use your condition here)
              ->if record satisfys your where condition ,get that record index .
              ->loop the table from the index (without condition) .
              its like parallel cursor only but for single loop .;-)
              ->use field symbols ,wherever possible .
           if still dump is coming ,contact your basis team .
regards,
Krishna.

Similar Messages

  • Reg - Reading internal table with multiple record in a single field

    Dear Guru's,
                        i want to read a internal table with field having mutilple entries like
    read table READ TABLE LT_T2 INTO LT_T2_WA WITH KEY HKONT IN ( '0001152430', '0001152930', '0001152410' ).
    But it says comma without preceding colon (after READ?).
    please guide me.....
    thanks & Regards,
    Balaji.S

    ya this is inside the loop.
    plz check....
    loop at lt_t2 into lt_t2_wa.
    READ TABLE LT_T2 INTO LT_T2_WA WITH KEY HKONT IN ( '0001152430', '0001152930', '0001152410' ).
    endloop.
    thanks & Regards,
    Balaji.S

  • Read from file to Internal Table With Extra Record

    Hi,
    I'm trying to read file from application server into internal table. Then loop thru the internal table and display.
    My text file only have 2 rows of records. However, when display the internal table, it show the 2 records plus an extra line with 0. May I know where did I do wrong?
    PARAMETERS: p_infile  LIKE rlgrap-filename OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt,
          wa_upload TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT SPACE INTO wa_uploadtxt-name1 wa_uploadtxt-name2 wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload to it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    END-OF-SELECTION.
    loop at it_record INTO wa_record.
      write / wa_record-name1.
      write / wa_record-name2.
      write / wa_record-age.
    Endloop.

    Hi,
    Am attaching the file I used. There's no empty line after the second record.
    After execute, it is showing:
    Joe     Adams     20
         0
    John     Smith     40
         0
    May I know why there's 0, where did i do wrong?
    Thank you.

  • How to fill internal table with no data in debugging mode

    Hi all,
             I modified one existing program.Now I want to test it.I am not given test data.So in the middle of my debugging, I found that one internal table with no data.My problem is how to fill that internal table with few records in that debugging mode just as we change contents in debugging mode.If I want to proceed further means that internal table must have some records.
    Please I dont know how to create test data so I am trying to create values temporarily in debugging mode only.
    Thanks,
    Balaji

    Hi,
    In the debugging do the following..
    Click the Table button..
    Double click on the internal table name..
    Then in the bottom of the screen you will get the buttons like CHANGE, INSERT, APPEND, DELETE..
    Use the APPEND button to insert records to the internal table..
    Thanks,
    Naren

  • Internal table for huge data

    HI,
    I have to populate internal table with huge number of data.
    What type of internal is suitable for this?
    Regards,
    Ram

    Hi ram,
    As long as you do not have any complex read functionalities, or nested loops, it should be fine to use the normal internal table.
    Regards,
    Ravi

  • Internal table with and with out work area.

    Hi all,
    in performance terms which one is better 1) internal table with header line or 2) itab w/o header line and explicit work area for that itab.
    which one is better and how?
    Thanks in advance.
    SAI

    Hai Sai Ram
    Internal Table with header Line Improves the Performence
    1)
    TABLES CUSTOMERS.
    Defining an internal table with header line
    DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
                       WITH HEADER LINE.
    Reading all entries of the database table into the internal table
    SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.
    2)
    Check the following code for the Difference
    REPORT ZWRITEDOC LINE-SIZE 124 NO STANDARD PAGE HEADING.
       TABLES: DD03L, "
               DD04T, "R/3-DD: Textos de los elementos de datos
               DD02T. "R/3-DD: Textos de tablas SAP
    Tabla temporal con las lineas de cada tabla
       DATA: BEGIN OF I_LINEAS OCCURS 100,
                LINEA(80),
             END OF I_LINEAS.
    Tabla con las caracteristicas de la tabla
       DATA: BEGIN OF I_TABLA OCCURS 100,
                CAMPO(12),
                TIPO(4),
                LONG(5) TYPE I,
                REF(20),
                DESCR(40),
             END OF I_TABLA.
       DATA: D_NOMBRE(80),
             D_DESCRIPCION(80).
       DATA :  BEGIN OF SOURCE OCCURS 1000,
            LINE(72),
       END OF SOURCE.
       PARAMETERS: PROGRAM LIKE SY-REPID DEFAULT SY-REPID.
       AT USER-COMMAND.
         CASE SY-UCOMM.
           WHEN 'GRAB'.
             PERFORM GRABAR.
         ENDCASE.
       START-OF-SELECTION.
         SET PF-STATUS  'ZSTATUS1'.
         READ REPORT PROGRAM INTO SOURCE.
         DATA L_GRAB.
         CLEAR L_GRAB.
    LOOP AT SOURCE.
       translate source to upper case.
           IF L_GRAB IS INITIAL.
             D_DESCRIPCION = I_LINEAS-LINEA.
           ENDIF.
           I_LINEAS = SOURCE.
           SEARCH I_LINEAS-LINEA FOR 'BEGIN OF'.
           IF SY-SUBRC = 0.
             SEARCH I_LINEAS-LINEA FOR 'DATA'.
             IF SY-SUBRC = 0.
               L_GRAB = 'X'.
               FREE I_LINEAS.
             ENDIF.
           ENDIF.
           IF L_GRAB = 'X'.
             I_LINEAS = SOURCE.
             APPEND I_LINEAS.
             SEARCH I_LINEAS-LINEA FOR 'END OF'.
             IF SY-SUBRC = 0.
               CLEAR L_GRAB.
               PERFORM PROCESAR_FICHERO.
               PERFORM IMPRIMIR.
               FREE I_LINEAS.
               CLEAR D_DESCRIPCION.
             ENDIF.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'WITH HEADER LINE'.
           IF SY-SUBRC = 0.
             APPEND I_LINEAS.
             PERFORM PROCESAR_FICHERO.
             PERFORM IMPRIMIR.
           ENDIF.
         ENDLOOP.
    *&      Form  GRABAR
          Graba el fichero en c:\temp\p.rtf y lo abre con word.
       FORM GRABAR.
         CALL FUNCTION 'LIST_DOWNLOAD'
             EXPORTING
            LIST_INDEX = SLIST_INDEX_DEFAULT
                  METHOD     = 'RTF'
              EXCEPTIONS
                   OTHERS     = 1.
         CALL FUNCTION 'EXECUTE_WINWORD'
              EXPORTING
                   I_FILE = 'C:\TEMP\P.RTF'
              EXCEPTIONS
                   OTHERS = 1.
       ENDFORM.                               " GRABAR
    *&      Form  PROCESAR_FICHERO
       FORM PROCESAR_FICHERO.
         DATA: L_AUX1(80),
              L_AUX2(80).
         FREE I_TABLA.
         LOOP AT I_LINEAS.
           CLEAR I_TABLA.
       translate i_lineas-linea to upper case.
           SEARCH I_LINEAS-LINEA FOR 'BEGIN OF'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'BEGIN OF' INTO L_AUX1 D_NOMBRE.
             SPLIT D_NOMBRE AT 'OCCURS' INTO D_NOMBRE L_AUX1.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR '('.
           IF SY-SUBRC = 0.
              SPLIT I_LINEAS-LINEA AT '(' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-CAMPO = L_AUX1.
             SPLIT L_AUX2 AT ')' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             IF L_AUX1 CO '0123456789 '.
               I_TABLA-LONG = L_AUX1.
             ENDIF.
             I_TABLA-TIPO = 'CHAR'.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'LIKE'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'LIKE' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-CAMPO = L_AUX1.
               SPLIT L_AUX2 AT ',' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-REF = L_AUX1.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'TYPE'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'TYPE' INTO L_AUX1 L_AUX2.
             IF I_TABLA-CAMPO IS INITIAL.
               CONDENSE L_AUX1.
               I_TABLA-CAMPO = L_AUX1.
             ENDIF.
                 SPLIT L_AUX2 AT ',' INTO L_AUX1 L_AUX2.
            CONDENSE L_AUX1.
             CASE L_AUX1.
               WHEN 'I'.
                 I_TABLA-TIPO = 'INT'.
                 I_TABLA-LONG = 4.
               WHEN 'C'.
                 I_TABLA-TIPO = 'CHAR'.
               WHEN 'N'.
                 I_TABLA-TIPO = 'NUMC'.
               WHEN 'T'.
                 I_TABLA-TIPO = 'TIME'.
                 I_TABLA-LONG = 8.
               WHEN OTHERS.
                 I_TABLA-TIPO = L_AUX1.
             ENDCASE.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR '"'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT '"' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX2.
             I_TABLA-DESCR = L_AUX2.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'INCLUDE STRUCTURE'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'INCLUDE STRUCTURE' INTO L_AUX1 L_AUX2.
             SPLIT L_AUX2 AT '.' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-CAMPO = 'INCLUDE STR'.
             I_TABLA-REF   = L_AUX1.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'WITH HEADER LINE'.
             IF SY-SUBRC = 0.
               IF NOT I_LINEAS-LINEA CA '"'.
                 SPLIT I_LINEAS-LINEA AT 'OCCURS' INTO L_AUX1 L_AUX2.
                 IF SY-SUBRC = 0.
                   SPLIT L_AUX1 AT 'LIKE' INTO L_AUX1 L_AUX2.
                   IF SY-SUBRC = 0.
                     CONDENSE L_AUX2.
                     IF NOT L_AUX2 IS INITIAL.
                       I_TABLA-CAMPO = '...'.
                       I_TABLA-TIPO  = 'TABI'.
                       I_TABLA-REF   = L_AUX2.
                       SELECT SINGLE * FROM DD02T
                        WHERE TABNAME = L_AUX2
                          AND DDLANGUAGE = SY-LANGU.
                       IF SY-SUBRC = 0.
                       I_TABLA-TIPO  = 'TABE'.
                       I_TABLA-DESCR   = DD02T-DDTEXT.
                       ENDIF.
                       IF L_AUX1 CA ':'.
                         SPLIT L_AUX1 AT 'DATA:' INTO L_AUX1 L_AUX2.
                       ELSE.
                         SPLIT L_AUX1 AT 'DATA' INTO L_AUX1 L_AUX2.
                       ENDIF.
                       D_NOMBRE = L_AUX2.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDIF.
             ENDIF.
           IF NOT I_TABLA-CAMPO IS INITIAL.
             APPEND I_TABLA.
           ENDIF.
         ENDLOOP.
         LOOP AT I_TABLA WHERE NOT REF IS INITIAL.
            SPLIT I_TABLA-REF AT '-' INTO L_AUX1 L_AUX2.
           SELECT SINGLE * FROM DD03L
            WHERE TABNAME = L_AUX1
              AND FIELDNAME = L_AUX2.
           IF SY-SUBRC = 0.
             I_TABLA-TIPO = DD03L-DATATYPE.
             I_TABLA-LONG = DD03L-INTLEN.
             IF I_TABLA-DESCR IS INITIAL.
               SELECT SINGLE * FROM DD04T
                WHERE ROLLNAME = DD03L-ROLLNAME
                  AND DDLANGUAGE = SY-LANGU.
               IF SY-SUBRC = 0.
                 I_TABLA-DESCR = DD04T-DDTEXT.
               ENDIF.
             ENDIF.
             MODIFY I_TABLA.
           ENDIF.
         ENDLOOP.
       ENDFORM.                               " PROCESAR_FICHERO
    *&      Form  IMPRIMIR
       FORM IMPRIMIR.
       DATA L_AUX(80).
         FORMAT COLOR COL_NORMAL INTENSIFIED ON.
         ULINE AT 1(80).
         WRITE: / SY-VLINE,
                 (76)     D_NOMBRE CENTERED,
                  SY-VLINE.
         SPLIT D_DESCRIPCION AT '*' INTO L_AUX D_DESCRIPCION.
         WRITE: / SY-VLINE,
                 (76)     D_DESCRIPCION CENTERED,
                  SY-VLINE.
         NEW-LINE.
         ULINE AT 1(80).
         DETAIL.
         FORMAT COLOR OFF.
         WRITE: /
               SY-VLINE,
             (10) 'CAMPO',
               SY-VLINE,
             (4)  'TIPO',
               SY-VLINE,
             (4) 'LONG',
               SY-VLINE,
             (16)  'REFERENCIA',
               SY-VLINE,
             (30)  'DESCRIPCION',
               SY-VLINE.
         NEW-LINE.
         ULINE AT 1(80).
         DETAIL.
         LOOP AT I_TABLA.
           WRITE: /
                 SY-VLINE,
              (10)   I_TABLA-CAMPO,
                 SY-VLINE,
                 I_TABLA-TIPO,
                 SY-VLINE,
              (4)   I_TABLA-LONG,
                 SY-VLINE,
              (16)   I_TABLA-REF,
                 SY-VLINE,
              (30)   I_TABLA-DESCR,
                 SY-VLINE.
         ENDLOOP.
         NEW-LINE.
         ULINE AT 1(80).
         SKIP 2.
       ENDFORM.                               " IMPRIMIR
    Thanks & regards
    Sreeni

  • Internal table with out header line

    Hi friends,
    Can u send me code for internal table with out header line : how to declare ,how to populate data and how to access the data
    Regards,
    vijay

    Hi Vijay
    There are several ways to declare an internal table without header line:
    A) You can define a type table
    TYPES: BEGIN OF TY_ITAB OCCURS 0,
            INCLUDE STRUCTURE ZTABLE.
    TYPES: END   OF TY_ITAB.
    and then your intrnal table:
    DATA: ITAB TYPE TY_ITAB.
    B) DATA: ITAB TYPE/LIKE STANDARD TABLE OF ZTABLE.
    C) DATA: ITAB TYPE/LIKE ZTABLE OCCURS 0.
    All these ways create a STANDARD TABLE
    You can create other types of internal table, for example SORTED TABLE or HASHED TABLE.
    These kinds of table can allow to improve the performance because they use different rules to read the data.
    When it wants to manage a table without header line, it need a work area, it has to have the same structure of table.
    DATA: WA LIKE ZTABLE.
    DATA: T_ZTABLE LIKE STANDARD TABLE OF ZTABLE.
    A) To insert the record:
    If you use INTO TABLE option you don't need workarea
    SELECT * FROM ZTABLE INTO TABLE T_ZTABLE
                                      WHERE FIELD1 = 'Z001'
                                        AND FIELD2 = '2006'.
    but if you want to append a single record:
    SELECT * FROM ZTABLE INTO wa WHERE FIELD1 = 'Z001'
                                   AND FIELD2 = '2006'.
    APPEND WA TO T_ZTABLE.
    ENDSELECT.
    Now you need workarea.
    B) To read data: you need always a workarea:
    LOOP AT T_ZTABLE INTO WA WHERE ....
      WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDIF.
    Anyway if you want to know only if a record exists, you can use the TRANSPORTING NO FIELDS option, in this case it doesn't need a workarea.
    READ T_ZTABLE WITH KEY FIELD3 = '0000000001'
                                      TRANSPORTING NO FIELDS.
    IF SY-SUBRC = 0.
    WRITE 'OK'.
    ENDIF.
    C) To update the data: it always needs a workarea
    LOOP AT T_ZTABLE INTO WA WHERE FIELD3 = '0000000001'.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA INDEX SY-TABIX
    ENDIF.
    AT the end you can use the internal table to update database:
    MODIFY/UPDATE/INSERT ZTABLE FROM T_ZTABLE.
    See Help online for key words DATA, you can find out more details.
    Max
    Message was edited by: max bianchi

  • Runtime error:ABAP program lines are longer than the internal table

    Hi all,
    Below is the code I have written,when Iam running it Iam getting
    'ABAP program lines are longer than the internal table' runtime error.How can I resolve it.
    REPORT  ZTEST1  NO STANDARD PAGE HEADING LINE-SIZE 255.
    TABLES:MARC,CDHDR,CDPOS.
    TYPE-POOLS:SLIS.
    DATA:HEADER TYPE SLIS_T_FIELDCAT_ALV,
         WA TYPE SLIS_FIELDCAT_ALV,
         LAYOUT TYPE SLIS_LAYOUT_ALV.
    TYPES:BEGIN OF MARC_TY,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            EKGRP LIKE MARC-EKGRP,
            MINBE LIKE MARC-MINBE,
            EISBE LIKE MARC-EISBE,
            MABST LIKE MARC-MABST,
           END OF MARC_TY.
    TYPES:BEGIN OF MATNR1_TY,
            MATNR1 LIKE CDHDR-OBJECTID,
          END OF MATNR1_TY.
    TYPES:BEGIN OF CDHDR_TY,
             OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
             OBJECTID   LIKE CDHDR-OBJECTID,
             CHANGENR   LIKE CDHDR-CHANGENR,
             USERNAME   LIKE CDHDR-USERNAME,
             UDATE      LIKE CDHDR-UDATE,
            END OF CDHDR_TY.
    TYPES:BEGIN OF CDPOS_TY,
             OBJECTCLAS LIKE CDPOS-OBJECTCLAS,
             OBJECTID   LIKE CDPOS-OBJECTID,
             CHANGENR   LIKE CDPOS-CHANGENR,
             TABNAME    LIKE CDPOS-TABNAME,
             FNAME      LIKE CDPOS-FNAME,
             CHNGIND    LIKE CDPOS-CHNGIND,
             VALUE_NEW  LIKE CDPOS-VALUE_NEW,
             VALUE_OLD  LIKE CDPOS-VALUE_OLD,
            END OF CDPOS_TY.
    **************TABLE TYPES********************************************
    TYPES: MARC_TAB   TYPE TABLE OF MARC_TY,
           MATNR1_TAB TYPE TABLE OF MATNR1_TY,
           CDHDR_TAB  TYPE TABLE OF CDHDR_TY,
           CDPOS_TAB  TYPE TABLE OF CDPOS_TY.
    *******************INTERNAL TABLES************************************
    DATA:MARC_ITAB   TYPE MARC_TAB,
         MATNR1_ITAB TYPE MATNR1_TAB,
         CDHDR_ITAB  TYPE CDHDR_TAB,
         CDPOS_ITAB  TYPE CDPOS_TAB.
    ****************WORK AREAS********************************************
    DATA:MARC_WA   TYPE MARC_TY,
         MATNR1_WA TYPE MATNR1_TY,
         CDHDR_WA  TYPE CDHDR_TY,
         CDPOS_WA  TYPE CDPOS_TY.
    *******************SELECTION-SCREEN***********************************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
      PARAMETERS:PLANT LIKE MARC-WERKS.
      SELECT-OPTIONS:MATERIAL FOR MARC-MATNR.
      SELECT-OPTIONS:DATE FOR CDHDR-UDATE.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
    SELECT MATNR
            WERKS
            EKGRP
            MINBE
            EISBE
            MABST
            FROM MARC INTO TABLE MARC_ITAB
            WHERE MATNR IN MATERIAL
            AND WERKS = PLANT.
      CHECK MARC_ITAB[] IS NOT INITIAL.
      LOOP AT MARC_ITAB INTO MARC_WA.
       MATNR1_WA-MATNR1 = MARC_WA-MATNR.
       APPEND MATNR1_WA TO MATNR1_ITAB.
       CLEAR MATNR1_WA.
    ENDLOOP.
    CHECK MATNR1_ITAB[] IS NOT INITIAL.
    SELECT OBJECTCLAS
            OBJECTID
            CHANGENR
            USERNAME
            UDATE
            FROM CDHDR INTO TABLE CDHDR_ITAB
            FOR ALL ENTRIES IN MATNR1_ITAB
            WHERE OBJECTCLAS = 'MATERIAL'
            AND OBJECTID = MATNR1_ITAB-MATNR1
            AND UDATE IN DATE.
    CHECK CDHDR_ITAB[] IS NOT INITIAL.
    SORT CDHDR_ITAB[]  DESCENDING BY OBJECTID  CHANGENR.
    DELETE ADJACENT DUPLICATES FROM CDHDR_ITAB[] COMPARING OBJECTID.
    SELECT OBJECTCLAS
           OBJECTID
           CHANGENR
           TABNAME
           FNAME
           CHNGIND
           VALUE_NEW
           VALUE_OLD
           FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
           FOR ALL ENTRIES IN CDHDR_ITAB
           WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
           AND OBJECTID = CDHDR_ITAB-OBJECTID
           AND CHANGENR = CDHDR_ITAB-CHANGENR
           AND TABNAME  = 'MARC'
           AND FNAME    IN ('MINBE','EISBE','MABST','LVORM')
           AND CHNGIND  = 'U'.
    CHECK CDPOS_ITAB[] IS NOT INITIAL.
    *LOOP AT CDPOS_ITAB INTO CDPOS_WA.
    WRITE: / CDPOS_WA-OBJECTCLAS,
             CDPOS_WA-OBJECTID,
             CDPOS_WA-CHANGENR,
             CDPOS_WA-TABNAME,
             CDPOS_WA-FNAME,
             CDPOS_WA-CHNGIND,
             CDPOS_WA-VALUE_NEW,
             CDPOS_WA-VALUE_OLD.
    *ENDLOOP.
    WA-SELTEXT_L = 'OBJECTCLAS'.
    WA-COL_POS   = '1'.
    WA-FIELDNAME = 'OBJECTCLAS'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '15'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'OBJECTID'.
    WA-COL_POS   = '2'.
    WA-FIELDNAME = 'OBJECTID'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '20'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'CHANGENR'.
    WA-COL_POS   = '3'.
    WA-FIELDNAME = 'CHANGENR'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '8'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'TABNAME'.
    WA-COL_POS   = '4'.
    WA-FIELDNAME = 'TABNAME'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '5'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'FNAME'.
    WA-COL_POS   = '5'.
    WA-FIELDNAME = 'FNAME'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '7'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'CHANGING'.
    WA-COL_POS   = '6'.
    WA-FIELDNAME = 'CHANGING'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '1'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'VALUE_NEW'.
    WA-COL_POS   = '7'.
    WA-FIELDNAME = 'VALUE_NEW'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '5'.
    APPEND WA TO HEADER.
    CLEAR WA.
    WA-SELTEXT_L = 'VALUE_OLD'.
    WA-COL_POS   = '8'.
    WA-FIELDNAME = 'VALUE_OLD'.
    WA-TABNAME   = 'CDPOS_ITAB'.
    WA-OUTPUTLEN = '5'.
    APPEND WA TO HEADER.
    CLEAR WA.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
        I_PROGRAM_NAME               = SY-REPID
        I_INTERNAL_TABNAME           = 'CDPOS_ITAB'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_INCLNAME                   = SY-REPID
      CHANGING
        CT_FIELDCAT                  = HEADER[]
    EXCEPTIONS
    IF SY-SUBRC <> 0.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM                = SY-REPID
        IT_FIELDCAT                       = HEADER[]
      TABLES
        T_OUTTAB                          = CDPOS_ITAB[]
    IF SY-SUBRC <> 0.
    ENDIF.

    Your select querry on MARC is not matching with MARC_TY.
    The field in the MARC table and MARC_TY should be same.
    and also, when you are making select querry on CDPOS table
    with all entries.
    When ever you are using all entries select statement, you should check whether the internal table is having value.
    you should check
    if CDPOS_IT[] is not initial.
    SELECT OBJECTCLAS
    OBJECTID
    CHANGENR
    TABNAME
    FNAME
    CHNGIND
    VALUE_NEW
    VALUE_OLD
    FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
    FOR ALL ENTRIES IN CDHDR_ITAB
    WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
    AND OBJECTID = CDHDR_ITAB-OBJECTID
    AND CHANGENR = CDHDR_ITAB-CHANGENR
    AND TABNAME = 'MARC'
    AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
    AND CHNGIND = 'U'.
    endif.
    Regards
    Madhan D

  • Error "Screen output are too small" when looping through internal table!

    Hello All:
         I have a huge internal table with some 79000 records and while looping through them and doing some other processing inside the loop, I am getting an error "Screen output are too small"! Could someone please help mw how to fix this issue? I can send the all the code if anyone wants to look at the code. Thanks in advance and rewards are assured.
    Mithun

    Hi,
    Check this
    new-page print off.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    destination = v_dest
    IMPORTING
    out_parameters = params
    valid = valid.
    * params-linct = '58'.
    * params-linsz = '170'.
    * params-paart = 'X_58_170'.
    * params-prtxt = v_spool_text.
    * params-primm = 'X'.
    * params-prrel = 'X'.
    NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
    After the call fm GET_PRINT_PARAMETERS params internal table contains all the values for generating spool.
    aRs

  • Avoiding performance issue due to loop within loop on internal tables

    Hi Experts,
                    I have a requirement where in i want to check whether each of the programs stored in one internal table are called from any of the programs stored in another internal table. In this case i am looping on two internal tables (Loop within a loop) which is causing a major performance issue. Program is running very very slow.
    Can any one advise how to resolve this performance issue so that program runs faster.
    Thanks in advance.
    Regards,
    Chetan.

    Forget the parallel cursur stuff, it is much to complicated for general usage and helps nearly nothing. I will publish a blog in the next days where this is shown in detail.
    Loop on loop is no problem if the inner table is a hashed or sorted table.
    If it must be a standard table, then you must make a bit more effort and faciliate a binary search (read binary search / loop from index exit)
    see here the exact coding Measurements on internal tables: Reads and Loops:
    /people/siegfried.boes/blog/2007/09/12/runtimes-of-reads-and-loops-on-internal-tables
    And don't forget, the other table must not be sorted, the loop reaches anyway every line. The parallel cursor requires both tables to be sorted. The additional sort
    consumes nearly the whole advantage of the parallel cursor compared to the simple but good loop in loop solutions.
    Siegfried

  • SSO - session time out while navigating across applications

    Hi,
    Problem statement
    Handling session time out while navigating across applications involving SSO
    Current approach
    Application 1
    1. Create session1.
    2. URL rewrite the sesssion ID1 into the link refering to App2.
    Application 2
    1. Create session2
    2. Get the session Id of App1.
    3. send the session ID of App1 in the header
    4. Invalidate the session2
    Application 1
    Get the ID from request and invoke getSession.
    I'm having a very large session timeout at App1.
    Is there a better approach. Ex: Having global session which is shared across multiple
    webapplications.

    "madhav" <[email protected]> wrote:
    >
    Hi,
    Problem statement
    Handling session time out while navigating across applications involving
    SSO
    Current approach
    Application 1
    1. Create session1.
    2. URL rewrite the sesssion ID1 into the link refering to App2.
    Application 2
    1. Create session2
    2. Get the session Id of App1.
    3. send the session ID of App1 in the header
    4. Invalidate the session2
    Application 1
    Get the ID from request and invoke getSession.
    I'm having a very large session timeout at App1.
    Is there a better approach. Ex: Having global session which is shared
    across multiple
    webapplications.
    I have similiar problems in my system. What do you do if the session 1 times out
    during ongoing operations in App 2 ?
    Thanks
    Kejuan

  • WHEN DO U NEED CREATE AN INTERNAL TABLE WITH HEADERLINE AND WITH OUT HEADER

    HI
    EXPERTS CAN U HELP ME FOR THIS

    Hi,
    PLEASE CHECK OUT THE LINK BELOW FOR INTERNAL TABLE WITH HEADER LINE IT MIGHT HELP YOU
    http://sap.mis.cmich.edu/sap-abap/abap04/sld012.htm
    PLEASE CHECK OUT THE LINK BELOW FOR INTERNAL TABLE WITHOUT HEADER LINE IT MIGHT HELP YOU
    http://sap.mis.cmich.edu/sap-abap/abap04/sld013.htm
    DIFFERENCES BEWTEEN WORK AREA AND HEADER LINE PLEASE CHECK OUT THE LINK BELOW IT MIGHT HELP YOU
    http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm
    *************please reward points if the information is helpful to you***********

  • While Starting oacleAS time out while waiting for a managed process start

    Hello Friends,
    While starting the Oracle Application server, through OPMN command as well as from the services I am getting following error.
    opmnctl: starting opmn and all managed processes...
    ================================================================================
    opmn id=hydcgwsgess02:6200
    0 of 1 processes started.
    ias-instance id=GenPro.hydcgwsgess02.ind.ge.ad
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ias-component/process-type/process-set:
    OC4J/home/default_group/
    Error
    --> Process (index=1,uid=461249245,pid=12988)
    time out while waiting for a managed process to start
    Log:
    D:\product\10.1.3\OracleAS_1\opmn\logs\OC4J~home~default_group~1
    ========================================================
    couldn't figure out what is the basic problem...
    Normally when ever I make any changes in Oracle Sensor Edge Server, I used to get this error..
    I have installed the Oracle Apps Server in Windows enviroment...
    I will be very happy if some body can help me resolve the issue...
    Regards
    Nasim

    i got the same error but in my case, I used HTTPDispatcher and found that the URL parameter was invalid, so I changed it in the edgeserver.xml and restart, it's ok for me.
    Edited by: blackwaterpark on Oct 29, 2008 2:21 PM

  • OacleAS time out while waiting for a managed process start

    Hello Friends,
    While starting the Oracle Application server, through OPMN command as well as from the services I am getting following error.
    opmnctl: starting opmn and all managed processes...
    ================================================================================
    opmn id=hydcgwsgess02:6200
    0 of 1 processes started.
    ias-instance id=GenPro.hydcgwsgess02.ind.ge.ad
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ias-component/process-type/process-set:
    OC4J/home/default_group/
    Error
    --> Process (index=1,uid=461249245,pid=12988)
    time out while waiting for a managed process to start
    Log:
    D:\product\10.1.3\OracleAS_1\opmn\logs\OC4J~home~default_group~1
    ========================================================
    couldn't figure out what is the basic problem...
    Normally when ever I make any changes in Oracle Sensor Edge Server, I used to get this error..
    I have installed the Oracle Apps Server in Windows enviroment...
    I will be very happy if some body can help me resolve the issue...
    Regards
    Nasim

    Can't tell you what's wrong with just this much of information. Take a look at this log file (as reported in the error message):
    D:\product\10.1.3\OracleAS_1\opmn\logs\OC4J~home~default_group~1
    And also:
    D:\product\10.1.3\OracleAS_1\j2ee\home\log\home_default_group_1\server.log
    These two log files will give you bit more information to help diagnose the issue.
    Thanks
    Shail

  • Time out while waiting for the managed process to start

    Hi All,
    Im getting the below error,when i try to start all managed processes.
    Its taking too much time to execute "opmnctl startall "command and it will give the below error.
    opmnctl: starting opmn and all managed processes...
    ================================================================================
    opmn id=inkolv1lp01:6201
    0 of 3 processes started.
    ias-instance id=retek101202.inkolv1lp01
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server
    Error
    --> Process (pid=401608)
    time out while waiting for a managed process to start
    Log:
    /retek/product/app_server/101202/OracleFRM_13/opmn/logs/HTTP_Server~1
    ias-component/process-type/process-set:
    WebCache/WebCache/WebCache
    Error
    --> Process (pid=319598)
    time out while waiting for a managed process to start
    Log:
    /retek/product/app_server/101202/OracleFRM_13/opmn/logs/WebCache~WebCache~1
    ias-component/process-type/process-set:
    WebCache/WebCacheAdmin/WebCacheAdmin
    Error
    --> Process (pid=397550)
    time out while waiting for a managed process to start
    Log:
    /retek/product/app_server/101202/OracleFRM_13/opmn/logs/WebCache~WebCacheAdmin~1
    Im in between some work ,please help to resolve the isue

    Hi,
    I checked the log files and i think it has some errors.I dint get exactly what does it mean.
    Web Cache ($ORACLE_HOME/webcache/logs :
    - event_log contains
    [18/Apr/2012:11:16:26 -0500] [notification 9612] [ecid: -] OracleAS Web Cache 10g (10.1.2), Build 10.1.2.0.2 050802
    [18/Apr/2012:11:16:26 -0500] [notification 9403] [ecid: -] Maximum number of file/socket descriptors set to 900.
    [18/Apr/2012:11:16:26 -0500] [notification 9612] [ecid: -] OracleAS Web Cache 10g (10.1.2), Build 10.1.2.0.2 050802
    [18/Apr/2012:11:16:26 -0500] [notification 9403] [ecid: -] Maximum number of file/socket descriptors set to 900.
    [18/Apr/2012:11:16:31 -0500] [notification 13002] [ecid: -] Maximum allowed incoming connections are 700
    [18/Apr/2012:11:16:31 -0500] [notification 13002] [ecid: -] Maximum allowed incoming connections are 700
    [18/Apr/2012:11:17:01 -0500] [warning 11917] [ecid: -] SSL wallet Origin Server Wallet file /etc/ORACLE/WALLETS/oret13/ewallet.p12 does not exist.
    [18/Apr/2012:11:17:01 -0500] [warning 11917] [ecid: -] SSL wallet Origin Server Wallet file /etc/ORACLE/WALLETS/oret13/ewallet.der does not exist.
    [18/Apr/2012:11:17:01 -0500] [warning 11919] [ecid: -] The SSL wallet autologin file /etc/ORACLE/WALLETS/oret13/cwallet.sso does not exist. Wallet does not appear to be
    autologin wallet.
    [18/Apr/2012:11:17:01 -0500] [warning 11921] [ecid: -] The origin server wallet did not open. Operating without wallet for backend. Only Diffie-Hellman anonymous connec
    tions supported to origin servers.
    [18/Apr/2012:11:17:01 -0500] [warning 11922] [ecid: -] Origin Server Wallet wallet fails to open at location /etc/ORACLE/WALLETS/oret13, NZE-28759, as user oret13
    [18/Apr/2012:11:17:01 -0500] [warning 11917] [ecid: -] SSL wallet Origin Server Wallet file /etc/ORACLE/WALLETS/oret13/ewallet.p12 does not exist.
    [18/Apr/2012:11:17:01 -0500] [warning 11917] [ecid: -] SSL wallet Origin Server Wallet file /etc/ORACLE/WALLETS/oret13/ewallet.der does not exist.
    [18/Apr/2012:11:17:01 -0500] [warning 11919] [ecid: -] The SSL wallet autologin file /etc/ORACLE/WALLETS/oret13/cwallet.sso does not exist. Wallet does not appear to be
    autologin wallet.
    2)Oracle HTTP Server ($ORACLE_HOME/Apache/Apache/logs has these details
    access_log.1307016000 mod_oc4j.753776.shm.sem
    access_log.1307059200 mod_oc4j.815188.shm.mem
    access_log.1307102400 mod_oc4j.815188.shm.sem
    access_log.1307145600 mod_oc4j.843922.shm.mem
    access_log.1307361600 mod_oc4j.843922.shm.sem
    access_log.1307404800 mod_oc4j.872618.shm.mem
    access_log.1307448000 mod_oc4j.872618.shm.sem
    access_log.1307491200 mod_oc4j.872692.shm.mem
    access_log.1307534400 mod_oc4j.872692.shm.sem
    access_log.1307577600 oracle

Maybe you are looking for