cancel
Showing results for 
Search instead for 
Did you mean: 

DB Look up for all entries in internal table using BRFPLUS

Former Member
0 Kudos

Hi Experts,

I am trying to use DB Look up for all entries in the internal table in BRFPLUS.

I dont want to use Loop expression and call the DB Look up inside the loop as this will degrade the performance.

Is there any way I can do this without having the Procedure Call expression or without looping?

Regards,

Rajiv

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rajiv,

Sorry,

Till today BRF+ doesn't support feature in DB Look Up Expression.

You have to do it using Formula/Procedure Call (both ABAP solution).

regards, Rahul

rdiger_plantiko2
Active Contributor
0 Kudos

General remark: it will probably never be possible to re-implement the full functionality of ABAP's OpenSQL in the form of BRFplus expressions. It should suffice to have the DB lookup as it is right now, providing a kind of 90% solution for database selections.

Yes: building an ABAP method call would be an option for this special problem (belonging to the 10% part), but it questions the solution at all:

If we use BRFplus to call ABAP methods - why not avoid BRFplus and write the ABAP directly?

The answer is, of course, that BRFplus allows to isolate the business rules. This is a big advantage, which will help us separate programming into two levels: A "low-level" ABAP part and a "high-level" rules part, with the ABAP running behind the scenes.

In my opinion, a natural approach would be to proceed in two steps:

1.) Use ABAP to prepare all the data that are needed for the rules processing. 2.) Call the BRFplus function with these data as context parameters.

So the BRFplus rules programming can focus on these business rules themselves, not on how the data are efficiently provided. This question has been handled in step 1 already, before calling BRFplus.

This seems a better design to me than the following:

1.) Call BRFplus function 2.) Inside BRFplus: Call ABAP methods to select the data that are needed as function input.

Former Member
0 Kudos

Hi Experts,

> I am trying to use DB Look up for all entries in the internal table in BRFPLUS.

> I dont want to use Loop expression and call the DB Look up inside the loop as this will degrade the performance.

> Is there any way I can do this without having the Procedure Call expression or without looping?

>

> Regards,

> Rajiv

Dear Rajiv,

Please elaborate your requirement.

Rgds,

Ajay

rdiger_plantiko2
Active Contributor
0 Kudos

Dear Ajay,

Please elaborate your requirement.

I think he means the ABAP construct


select * from ... into ... 
             FOR ALL ENTRIES IN LT_XYZ
            WHERE F1 = LT_XYZ-F1
                AND F2 = LT_XYZ-F2
                ...

From the BRF+ book, I understand that this is not supported.

Would it be a good choice to write a "prepare" step in ABAP, preparing all the necessary data, mapping them to the data objects that are part of the business rules and then passing them to BRF+ via function parameters, instead of selecting the database in the middle of the rule processing itself?