2006 Dec 29 8:39 AM
Hi,
For extracting data with a function module using the API interface for SAP BW, it is generally recommended to modify the template RSAX_BIW_GET_DATA_SIMPLE.
This template makes use of a CURSOR and the exception
RAISE NO_MORE_DATA to ensure that the API will not call the FM forever.
In my development team, an ABAPer has created a FM that contains object-oriented programming, namely classes and methods.
I cannot figure out how to make use of RAISE NO_MORE_DATA to stop the extraction in this scenario.
Any help would be most welcome.
Laurent Querella
the select statements and open cursor / fetch next cursor would have been used in the method of the class used in your FM . you may need to raise this exception from the method or return some parameter from this method and based on that raise it in your FM
Regards
Raja
2006 Dec 29 9:00 AM
Hi
That excpetion should be triggered after closing the CURSOR
Max
2006 Dec 29 9:10 AM
Hi,
This is not the point!
The standard method (BW-API) makes use of a cursor to fetch data from SAP R/3 tables/structures. The abovementioned exception is raised after the cursor is closed. The cursor is closed when the extraction retrieve no more data.
In my current development, I cannot use a cursor (can I?) because the ABAPer has used classes and methods to fetch data.
All the data are extracted in one and the same step.
If I raise the exception (without using a cursor) then the FM does not extract any record.
If I do not raise it, the FM works fine in OLTP but when triggered by BW, the FM runs forever...
LQ
2007 Jan 03 7:26 AM
the select statements and open cursor / fetch next cursor would have been used in the method of the class used in your FM . you may need to raise this exception from the method or return some parameter from this method and based on that raise it in your FM
Regards
Raja
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |