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

Setting a default value for a returning variable

former_member333493
Participant
0 Likes
2,758

I have a public static method in my class which returns a variable of type BOOLE_D. Once I save the method parameters, I'm unable to set a default value as that column gets greyed out. Why does this happen? Does it have something to do with returning value automatically being pass-by-value?

1 ACCEPTED SOLUTION
Read only

Former Member
1,524

Default values are only available for "Importing" parameters.

Just assign the default value for "Returning" parameter in the first line of code for your method.

https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapclass-methods_general.htm

Viktor

3 REPLIES 3
Read only

Former Member
1,525

Default values are only available for "Importing" parameters.

Just assign the default value for "Returning" parameter in the first line of code for your method.

https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapclass-methods_general.htm

Viktor

Read only

RobertVit
Active Contributor
0 Likes
1,524

Hi,

if you want a default start your method implementation with

rv_variable = abap_true

for example

Kind regards
Robert
Read only

RobertVit
Active Contributor
0 Likes
1,524

Hi,

if you want a default start your method implementation with

rv_variable = abap_true

for example

Kind regards
Robert