Ansicht
Dokumentation

ABENTYPING_RETURN_VALUES - TYPING RETURN VALUES

ABENTYPING_RETURN_VALUES - TYPING RETURN VALUES

Vendor Master (General Section)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Return Values of Functional Methods

The return value of a functional method is always completely typed and is always passed by value. An actual parameter can be appended to the return value as follows:

If a functional method is used in an operation position, the return value is used like a data object whose data type is determined with an exception by the complete typing of the return value (a type-compliant actual parameter is implicitly bound to it). Checking of this typing is not necessary (or is always successful). An error always occurs, however, if the typing of the return value is not compatible with the operand type.
If the return value of a functional method is bound as an actual parameter to a generically typed formal parameter of type p, the method inherits the decimal places of the return value but not its length. In this case the formal parameter is given a length of 16.
If an actual parameter is specified explicitly after RECEIVING, it does not have to comply with the general typing rules for typing the formal parameter. Instead, it is enough if the formal parameter can be converted to the actual parameter in accordance with the conversion rules.

If an exception is raised when the return value is assigned to a formal parameter or when it is used as an operand, it cannot always be handled, but cause a runtime error, depending on the operand position.

Notes

  • If reference variables are returned using RECEIVING, an upcast is possible but a downcast is not.
  • The special rule that a generic formal parameter of type p gets the length of 16 when a functional method is passed does not apply to the other generic types any, data, simple, or numeric.





rdisp/max_wprun_time - Maximum work process run time   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 2810 Date: 20240329 Time: 112920     sap01-206 ( 49 ms )