cancel
Showing results for 
Search instead for 
Did you mean: 

table_max_number

Former Member
0 Kudos

Hi experts,

On BRF Plus i m using a function with an input parameter articles of type table with 1 field height ( of type number).

The function has to return the max height of the entered articles.

I m using the formule : max_height = table_max_number( articles , articles-height).

By simulating the function i m getting the following error :

Error occurred during the processing of Formula 'GET_MAX_HIGHT'

Fatal error in formula expression: ID A1342E9FC2691EE1AD945071A51B4CA1; token FU TABLE_MAX_NUMBER

Some idea how to solve this ?

I m using number type for simplicity.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Still not working, still getting the same error

Former Member
0 Kudos

Solution : table_max_number( articles , 'HEIGHT') -> The word  'HEIGHT' has to be inserted as a STRING

carsten_ziegler
Active Contributor
0 Kudos

Do you know the expression type table operation?

This may be a more elegant solution.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Try this formula instead:

table_max_number( articles , 'TABLE_LINE')

I'll provide a longer explanation in a couple of hours when I have a little more spare time.

Regards

Glen

Former Member
0 Kudos

Hi

I believe that you may have inserted a reference to the column itself by clicking on it in the Context panel. Is that right?

As you can see from help in the screenshot below, the second parameter in the TABLE_MAX_NUMBER formula function is actually "column name" ie. a string value.

If your table was built using a structure then you would put the name of one of the structure fields into that parameter as a string.

     TABLE_MAX_NUMBER( articles, 'FIELDNAME')

If your table was built without a structure, just an element, then the table doesn't have a structure as is equivalent to this in ABAP:

     DATA articles TYPE TABLE OF some_data_element.

In this case you don't have any columns so you refer to the whole table line via the inbuilt TABLE_LINE keyword, again as a string.

     TABLE_MAX_NUMBER( articles, 'TABLE_LINE')

Hope this helps

Regards

Glen