cancel
Showing results for 
Search instead for 
Did you mean: 

BRF+. Generated code from Single Agents Table

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

christianlechne
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

christianlechne
Active Contributor
0 Kudos

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