Ansicht
Dokumentation
ABENABAP_SUBROUTINES - ABAP SUBROUTINES
rdisp/max_wprun_time - Maximum work process run time Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
Subroutines
Before the introduction of ABAP Objects, subroutines were mainly used for the local modularization of an ABAP program, however, they can also be called externally. Their functions are implemented between the statements FORM and ENDFORM. A subroutine is declared immediately when implemented.
Subroutines should no longer be created in new programs for the following reasons:
- The parameter interface has clear weaknesses when compared with the parameter interface of methods, such as:
- Positional parameters instead of keyword parameters
- No real input parameters in pass by reference
- Typing is only optional
- No optional parameters
- Every subroutine belongs implicitly to the public interface of its program, which is generally not desired.
- Calling subroutines externally is critical with respect to the assignment of the compilation unit to a program group in the internal session. This assignment cannot generally be defined statically.
In those places where subroutines cannot yet be replaced by methods (PERFORM ON COMMIT$|ROLLBACK, GENERATE SUBROUTINE POOL), they should be used purely as wrappers for method calls and must not contain any other functional code.
Note
The syntax allows the definition of a subroutine to be split between a declaration part and an implementation part using the statements FORM ... DEFINITION and FORM ... IMPLEMENTATION, but this is not supported by all tools and should be avoided.
TXBHW - Original Tax Base Amount in Local Currency Addresses (Business Address Services)
This documentation is copyright by SAP AG.
Length: 2684 Date: 20240424 Time: 102919 sap01-206 ( 38 ms )