It seems like either the structure of I_VBAP is not in sync with the fields in your select query ( may be the structure I_VBAP 7 fields in Select query are different ) or may be the ZFields used are not moved properly in the Preproduction Server ...

Well, looks like a TIME_OUT dump due to the fact that either I_VBAK table is loo large.

Run your program as a batch job to avoid TIME_OUT dump.

And your initial select from VBAK is most probably not optimal. Remove all DELETE statements from your ABAP code and put all conditions into the WHERE clause of the SELECT. This may significantly improve your program.

How is your internal table declared? is it defined with workarea or not?

Before the select statement,

if not i_vbak is initial. " if the internal table is declared with OCCURS n statement the this statement will check for only workarea not the internal table.

The select statement must be executing in some LOOP and ENDLOOP., Just check the background job which you executed for any message "message i038." displayed in background job? with the use of statement LEAVE TO LIST-PROCESSING in START-OF-SELECTION, the program will execute the remaining code with out going to selection screen.

To be honest....I can't really explain what is going on in the back ground...

But try a program if you would please; I've .....

When not all the fields of the primary key are available in a select statement when I've passed blank ranges so as to imitate a full key index, the execution times have been reduced by at least a third. Now this is based on solely the time to execute a Select statement. I used GET RUNTIME FIELD for measuring the time.

If timeout is coming due to large number of records to be fetched then you can try Cursor concept to fetch data from database server to fetch data with some packet size. When you use a cursor to read data, you decouple the process from the SELECT statement.

> If timeout is coming due to large number of records to be fetched then you can try Cursor concept to fetch data from database server to fetch data with some packet size. When you use a cursor to read data, you decouple the process from the SELECT statement.

Internal table has some memory space available and if records in in huge numbers then you will get DUMP. By checking VBELN from VBAP should not give dump. Also if your VBAK table has extra/not-required data then delete those entries before selecting from VBAP table.