Application Development 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: 

OPTIONAL

Former Member
0 Kudos

can any one send a small note on optional keyword in abap-oops.its urgentplz

1 REPLY 1

0 Kudos

Hi,

Use OPTIONAL or DEFAULT to define input parameters and input/output parameters as optional parameters, where you can use DEFAULT to specify a replacement parameter def1 def2 .... For an optional parameter, you need not specify an actual parameter in the method call. While a formal parameter with the addition OPTIONAL is initialized according to its type, a formal parameter with addition DEFAULT copies the value and type of the replacement parameter def1 def2 .... As a replacement parameter def1 def2 ..., you can specify any appropriate data object that is visible at this position.

If no actual parameter is specified for a generically typed formal parameter with the OPTIONAL addition at the time of the call, the type of the formal parameter is completed according to fixed rules.

Regards,

Sesh