Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Receving by Value

Former Member
0 Likes
512

hi

I am developing an ALV grid and developed a sort functionality something like this

data: gr_aggre type ref to cl_salv_aggregations.

gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

now IS_NUMERICAL_AGGREGATION_ON has returning by value.

How do I need to modify the below statement such that it collects the boolean value VALUE returned by the method

gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

straight to the point I need the syntax to collect the returning value from the method...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
478

Hi Grame,

Something like this:?


DATA:
  zlv_aggr_on TYPE abap_bool.


zlv_aggr_on = gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

Regards,

John.

hi

I am developing an ALV grid and developed a sort functionality something like this

data: gr_aggre type ref to cl_salv_aggregations.

gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

now IS_NUMERICAL_AGGREGATION_ON has returning by value.

How do I need to modify the below statement such that it collects the boolean value VALUE returned by the method

gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

straight to the point I need the syntax to collect the returning value from the method...

3 REPLIES 3
Read only

Former Member
0 Likes
479

Hi Grame,

Something like this:?


DATA:
  zlv_aggr_on TYPE abap_bool.


zlv_aggr_on = gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

Regards,

John.

Read only

0 Likes
478

yeah exactly like that..

call method gr_aggre->is_aggregation_allowed exporting columnname = 'PAYMENTSUM'
                                               receiving value = flag .

Read only

Former Member
0 Likes
478

Do you mean a functional method with only one RETURNING parameter? If so just declare a variable of the same type to hold the value being returned.

data: l_var type boolean.

l_var = gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ).

Otherwise you can use it in an IF statement

IF gr_aggre->IS_NUMERICAL_AGGREGATION_ON( ) = '[whatever]'.

  ...

ENDIF.