06-29-2007 11:43 AM
can any one send a small note on optional keyword in abap-oops.its urgentplz
06-29-2007 11:48 AM
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