cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Decision table field values

Former Member
0 Kudos

Hi Experts,

My requirement is to update an field value based on another field value in decision table.

Based on object type i want to get mat. num and increment it to 124 and update it back into decision table.

Can you please suggest the way to achieve this.

Thanks

Regards

Nitish Sharma

Accepted Solutions (0)

Answers (1)

Answers (1)

christianlechne
Active Contributor
0 Kudos

Hi Nitish,

if I get your requirement correctly you want to have a dynamically incremented result field in your decision table i.e. each time the row get evaluated as a hit the result value shall be increased by one starting at some user-defined start value. BRFplus does not offer such a functionality out of the box i. e. there is no expression in BRFplus that exactly matches this requirement.

From my point of view, you need ABAP (e. g, via a procedure call expression) in order to fulfill this requirement. The ABAP code has to fetch the next valid value maybe via a number range object.

Nevertheless based on your description, I do no get the point what is the benefit to model this requirement in BRFplus instead of doing it in ABAP.

BR

Christian

Former Member
0 Kudos

Hi Chris,

Thanks for response.

We need to use BRF tables as per client requirement. Yes, you are right we need to use ABAP for that. I got demo report FDT_TUTORIAL_DECN_TABLE. I am getting value of the field from to the abap report. But i am not able to write incremented value back to decision table. I am trying to use set_rows method, but no win.

Can you please suggest any method or code, if you implemented such situation earlier.

Thanks

Regards

Nitish Sharma

kakshat
Advisor
Advisor
0 Kudos

Hi Nitish,

I am wondering why would you want to update the incremented value back in the decision table. Is it because the next time the decision table is called, you want to use the incremented value (something like your own number range)?

I would like to think SET_ROWS should work in this case. By the way, are you calling the SAVE method afterwards?

Regards,

Akshat

christianlechne
Active Contributor
0 Kudos

Hi Nitish,

I am afraid that you are mixing up design-time and runtime a bit:

It is not uncommon to "manipulate" the BRFplus data before you execute the rules (e. g. sort huge decision tables in order to achieve a performance optimized finding of the entries based on some constraints) but during rule execution (run-time) the BRFplus content should not be changed. One problem that might arise is that BRFplus has to re-generate the ABAP code of the rules after you applied the change.

For the correct filing of a decision table, you can take a look at the document - her you have an example how to read a line and how to append a line. In your case instead of appending you just have to change it. The rest of the code should remain the same

BR

Christian