Skip to Content
Sep 04, 2013 at 06:28 PM

Generic Datasource on FM : Time out


Hello Gurus

I have created a function module to create a datasource. It is a delta enable datasource where the data is being fetched from VBAP table.

The issue I am facing is as follows.

When I running the datasource for more number of records around 475171 records, the system is getting timed out.

The logic is as follows.

I am using OPEN CURSOR and FETCH to get the data from VBAP table.

But, after that, I need to do more processing on the data which I get from the table int_vbap. I need to loop in all the records from VBAP and then, there is funtion module which I need to call inside the loop which gives multiple records for each record in int_vbap, which I need to loop again in side the loop.

LOOP AT int_vbap INTO wa_vbap.


input : wa_vbap-matnr


output = int_feature.

LOOP AT int_feature INTO wa_feature.

APPEND to int_output.



The above is the sample code. The FM inside the loop has several other FMs which are called internally which have some SELECT Statements.

Is there any method to make the code effecient so that it doesnot go to timeout.

Any pointers would be of great help.