Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module for SAP BW - conflict object-oriented & cursor

Former Member
0 Likes
475

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

3 REPLIES 3
Read only

Former Member
0 Likes
447

Hi

That excpetion should be triggered after closing the CURSOR

Max

Read only

0 Likes
447

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

Read only

0 Likes
447

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