on 05-18-2015 10:52 AM
Hi All,
I need to know if the following requirement can be catered using BRFPlus or not. Trying to check the feasibility from last few days
1.Need to retrieve the 3 fields for one key field from a database table,
Key Field | Field1 | Field 2 | Field 3 |
1 | 2 | 5 | AA |
1 | 3 | 6 | BB |
1 | 4 | 7 | CC |
Table 1
Now need to fetch the highest priority field value from Field 3 and the priority table is as follows
Field 3 | Priority |
AA | 1 |
BB | 2 |
CC | 3 |
Table 2
Now considering that AA is having the highest priority , it should be fetched from table 1.
Can it be catered using BRFPlus at all?
Thanks in advacne
Hi,
in general you can use the DB lookup expression to fetch the data from the DB.
Concerning the second part of your question: it depends on how you determine the priority. Is this a field in the DB or is this determined within rules? Some more info would be appreciated
Cheers Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
ok now I understand your requirement completly: then I would determine the relevant priorities based on a decision table in multiple match mode that returns the Field -priority combinations as result columns which will result in a table.
In the next step you can use this table in order to determine the relevant entries you have to fetch from the database. I would guess that for some fields not all entries according to your priority might be available e. g. a prio 1 field (AA) might be missing in the database. So you have to iterate really all entries in the result table from your decision table. This is quite cumbersome using the DB lookup and might lead to an performance issue as you have to do several selects in sequence. Hence, I would propose that you solve the requirement by using a procedure call and implement the selection logic itself in ABAP (class or function module). As Input parameter to that call you hand over the table with the priorities and as output of the call you return the desired data entry.
Cheers Christian
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.