Skip to Content
0

BRF+. Generated code from Single Agents Table

Mar 24 at 06:22 PM

65

avatar image

Hi,

I have two rulesets where the Single Agents Table are equal, but the code generated in the class under the PROCESS_PURE method contains a very slight difference which generates a not correct result.

Here is the piece of code which returns a correct value

IF _V_SUPPL_EKORG EQ abap_true OR EKORG IS NOT INITIAL.

_v_range_low_T = `Z999`.

gv_comparison_test = EKORG.

gv_comparison_val = _v_range_low_T.

translate gv_comparison_test to upper case.

IF gv_comparison_test EQ gv_comparison_val.

_v_cond_buf+2(1) = abap_true.

ELSE.

_v_cond_buf+2(1) = abap_false.

ENDIF.

ELSE.

_v_cond_buf+2(1) = abap_true.

ENDIF.

Here the piece of code which return a not correct value

_v_range_low_T = `Z999`.

gv_comparison_test = EKORG.

gv_comparison_val = _v_range_low_T.

translate gv_comparison_test to upper case.

IF gv_comparison_test EQ gv_comparison_val.

_v_cond_buf+2(1) = abap_true.

ELSE.

_v_cond_buf+2(1) = abap_false.

ENDIF.

The difference is the initial test (IF _V_SUPPL_EKORG EQ abap_true OR EKORG IS NOT INITIAL.) that I don’t understand from which part of the BRF+ application is coming.

I know that I’m asking a sort of reverse engineering, but I don’t know really in which point of BRF+ application this check can derive.

Any hints / sggestions ?

Thanks in advance.

Antonino

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Christian Lechner Moderator SAP Mentor Mar 26 at 01:05 PM
0

Hi Antonio,

indeed hard to say where this comes from.:-)

I would guess that one rules set contains an additional rule that leads to this if-clause. If this is not the case you can check, if there is a generation error by simulating the rulesets in interpretation mode and generation mode. In case the results from interpretation mode and generation mode differ, there is a bug in the code generation of BRFplus and you should open a support ticket to SAP to fix it.

Best regards

Christian

Share
10 |10000 characters needed characters left characters exceeded
Antonino Musciumarra Mar 28 at 11:37 AM
0

Hi Christian,

thanks for your fast answer.

Following your suggestion, I checked the rule sets in interpretation and generation mode: the results appear the same.

Going deeply in my investigation I discovered that the structures of the Single Agents Tables are different in the two environments. I mean that one table has a column named "Optional for Processing" which is missing in the first table (see attachments). How can I add this missing column ?

Best Regards

Antonino


Share
10 |10000 characters needed characters left characters exceeded
Christian Lechner Moderator SAP Mentor Mar 30 at 06:21 AM
0

Hi Antoine,

the "optional for processing" column in the decision table settings is obsolete since NetWever 7.02. It is not accessible/visible in newer systems. The BRFplus API for the decision table expression however still contains that parameter. Nevertheless this parameter shouldn't be evaluated anymore

Are the two systems that are used here having different versions of NetWeaver?

Best regards

Christian

Share
10 |10000 characters needed characters left characters exceeded
Antonino Musciumarra Mar 30 at 08:23 AM
0

Hi Christian,

I was wrong when I wrote "two environments". In reality the configurations are in the same system, but are related to two different Change Request Types.

Thanks for your very useful information about the outdated configuration with column "Optional for processing". To be in the safe line I have to replicate in some way the logic behind the "Optional for processing" column.

Best Regards

Antonino

Share
10 |10000 characters needed characters left characters exceeded