Skip to Content
Former Member
May 15, 2008 at 12:27 PM

BW/ABAP- Function module is called infinitely by Datasource Extractor.


Hi All,

A quick ABAP question related to Function Modules and BW data source extractors.

I’ve written a function module to select data from a database and simply output the data as a table. I then created a text Datasource using transaction rso2 and set it to Extraction by Function Module.

When I test this using transaction rsa6, I can manipulate the number of calls to my function module using the Display Extra Calls field.

However, when I test this using transaction rsa1, my function module seems to be called infinite times. So, the number of records being retrieved is increasing exponentially and finally ends with a dump.

My question: Do I need to include something in my code such that the Function Module by itself will only be called once?

Or is there some configuration for the Datasource that will limit my function module call to once only.

Tried so far

• Introducing a static variable in the function module that exits as soon as the value is greater than 1.

o Is there another way out?