cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

The method ZZGET_NEXT_SUBVIEW_COUNT does not have a RETURNING parameter. It cannot be called in expr

Catherine3
Explorer
0 Likes
1,114

When I activate the code, it shows  The method "ZZGET_NEXT_SUBVIEW_COUNT" does not have a RETURNING parameter. It cannot be called in expressions. The coding as following:

    CALL METHOD uo_model_holder->add
      EXPORTING
        im_screen_view lo_custom_view
        im_position    uo_model_holder->zzget_next_subview_count).

May I know what is wrong with the coding? Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Sandra_Rossi
Active Contributor
0 Likes

This message


The method "ZZGET_NEXT_SUBVIEW_COUNT" does not have a RETURNING parameter. It cannot be called in expressions

means that you are doing a Functional Method Call (Functional Method Call - ABAP Keyword Documentation (sap.com)), e.g. im_position uo_model_holder->zzget_next_subview_count), but you have declared your method without any RETURNING parameter.

Instead of

 

METHODS ZZGET_NEXT_SUBVIEW_COUNT.

 

the solution could be for instance:

 

METHODS ZZGET_NEXT_SUBVIEW_COUNT
  RETURNING VALUE(result) TYPE i.

 

For more information about it, read:

METHODS, RETURNING - ABAP Keyword Documentation (sap.com)

Catherine3
Explorer
0 Likes

Can you show me how is the coding? Thanks in advance.

Dominik_Tylczynski
SAP Champion
SAP Champion
0 Likes
Please don't post comments or additional questions as answers.