cancel
Showing results for 
Search instead for 
Did you mean: 

How to transform messages using BRF+ ?

markteichmann
Product and Topic Expert
Product and Topic Expert
0 Kudos

It has been some years since I used BRF+ last time. Maybe you can give a quick advice on how to build a simple BFR+ function that should follow this logic:

  • get a message with structure BAPIRET2 as an input
  • if the message is found in a decision table its type should be changed to 'E', remaining message is returned without a change
  • if the message is not found it should be returned without a change

Using only a decision table I cannot alter the message. Should my function use a rule that somehow uses the decision table? Or which artefacts do I need to get the desired result?

Accepted Solutions (1)

Accepted Solutions (1)

Patrick_Gans
Participant
0 Kudos

Hi Mark,

Couple ideas.

1. Create a singular Rule within a Ruleset that does pretty much what you said. The Rule would look like:

  • If (MessageFound)
  • Then Assign Value to Context (Type = 'E')
  • Else (blank)

MessageFound could be an Expression of type Boolean. That expression would use the lookup table to do a 'contains' operation on your decision table.

or

2. Create a new variable typed to the message output. Have your decision table set that variable in the ruleset. Then you can create a rule that says if variable is E then change the message type to E, else do nothing.

Hope that helps!

Patrick

Answers (0)