‎2010 Jul 26 2:07 PM
hi guys,
i stuck in an issue where i am getting a processing time out dump while selecting data from a custom database table,i am selecting data using for all entries the table has only 11 fields i have even used the primary index but i am not able to get the output since it gives a processing timeout dump,i even used db_cursor but still not change
REFRESH IT_PA0001[].
SELECT * FROM PA0001 INTO TABLE IT_PA0001
WHERE PERNR IN SO_PERNR AND
SUBTY GE C_SUBTY AND
OBJPS GE C_OBJPS AND
SPRPS GE C_SPRPS AND
ENDDA GE C_ENDDA AND
BEGDA GE C_BEGDA AND
SEQNR GE C_SEQNR AND
BUKRS IN P_BUKRS AND "and added conf_ssinha
WERKS IN SO_PERSA . "conf_ssinha
CHECK SY-SUBRC = 0 .
SORT IT_PA0001 BY PERNR BEGDA DESCENDING.
DELETE ADJACENT DUPLICATES FROM IT_PA0001 COMPARING PERNR.
REFRESH : IT_ZNWC[],IT_ZNWC1[],IT_ZNWC_TMP[].
G_PACKAGE_SIZE = 50000.
IF NOT IT_PA0001[] IS INITIAL.
Using DB Cursor to fetch data in batch.
OPEN CURSOR WITH HOLD DB_CURSOR FOR
Get data from ZSD_MAILDATA table based on input from selection screen.
SELECT *
FROM ZNWC
FOR ALL ENTRIES IN IT_PA0001
WHERE RUNID GE C_RUNID
AND PERNR = IT_PA0001-PERNR
AND SEQNR GE C_SEQNR1
AND WCSTATE IN SO_STATE
AND WCCODE IN SO_WCCOD
AND LGART IN SO_LGART
AND RECNO GE C_RECNO.
DO.
FETCH NEXT CURSOR DB_CURSOR -
its gives processing dump here
INTO CORRESPONDING FIELDS OF TABLE IT_ZNWC
PACKAGE SIZE G_PACKAGE_SIZE.
IF SY-SUBRC NE 0.
CLOSE CURSOR DB_CURSOR.
EXIT.
ENDIF.
APPEND LINES OF IT_ZNWC TO IT_ZNWC_TMP.
ENDDO.
please reply me
shivraj
‎2010 Jul 26 2:25 PM
i even used db_cursor but still not change
Using cursors will not reduce the execution time.
What is the number of entries in IT_PA0001 ?
‎2010 Jul 26 2:39 PM
‎2010 Jul 26 3:15 PM
44K records should execute pretty quickly...what is the approx ratio the SAP table to Z table...1 row in SAP standard to ?? in Z? You are able to select by primary key of the Z table, I hope? Have to second T. Keshav....in these situations, I think open cursor gives us very little if anything that we can't do efficiently with Open SQL SELECT.
Also, note that REFRESH with [ ] isn't the way to write this...REFRESH tablename is, although the REFRESH statement is obsolete, according to the "Official ABAP Programming Guidelines" manual, copyright by SAP Press 2010.
REFRESH is replaced by
CLEAR tablename[].
‎2010 Jul 26 3:23 PM
‎2010 Jul 26 3:51 PM