Skip to Content
Former Member
Nov 27, 2009 at 10:58 AM

BRFplus: Problem updating values in an internal table in a loop expression



I'm looking into the loop expression type of BRFplus and I have come across a problem updating an internal table, I'm trying to create and populate the table using a loop, here is the functionality I'm trying to achieve:

In a rule set create an internal MONTH_TBL table containing 12 rows of two columns: MONTH_NUM containing values 1 through 12 and MONTH_VAL containing an amount (initially 0,00 EUR in all 12 rows).

After initializing the table traverse through SFLIGHT table and for each row add PRICE from the table to MONTH_VAL in the row of MONTH_TBL corresponding to the month of FLDATE field in SFLIGHT.

The initialization of MONTH_TBL works as intended, as does the traversal of and retrieval of values from SFLIGHT. The problem however is the update of the internal table MONTH_TBL (defined as result data object for the function). I don't get an error, but the tables does not get updated, and I cannot seem to find out what the problem is. I would have attached an XML extract of the function + ruleset for information, but it dosen't seem like that is possible, I could e-mail it on request (for SAP employees with access to system QU5 the function is LOOP_TEST in application Z_KLAUS_TEST).

I hope that this is sufficient information to understand the issue that I'm dealing with.

best regards

Klaus Stenbæk, KMD