Get Example source ABAP code based on a different SAP table
ABAP_AMDP - Database Connections An AMDP method> is always implemented on the standard database>. By default, the call is made using the standard connection>. An optional service connection> can be specified for an AMDP procedure implementation>. To specify the database connection explicitly, an input parameter with the predefined name connection> can be declared for an AMDP procedure implementation. This parameter must be of type DBCON_NAME>>. When the AMDP method is called, the following values can be passed to the parameter to specify the database connection:
When the initial value or the value DEFAULT> is passed, the standard connection is used.
When a name R/3*name> is passed, which consists of the prefix R/3*> (uppercase characters) and a user-defined name 'name' > (case sensitive), a service connection> of this name to the standard database is used. BEGIN_SECTION VERSION 5 OUT The names R/3*AMDP_SYNC> and R/3*AMDP_ADBC> are exceptions. They are used by the AMDP framework itself. END_SECTION VERSION 5 OUT All other names raise an exception.
Latest notes:
The parameter connection> cannot be used to implement the AMDP method.
The input parameter connection> cannot be declared for an AMDP function implementation>. This applies in particular to the parameter list of a CDS table function>.
The parameter connection> cannot be used to specify connections to databases other than the standard database.
Service connections> to the standard database are useful for performing operations in a database LUW> that is independent of the LUW of the standard connection. NON_V5_HINTS
For detailed information about database connections, see database connections>.
The statement CALL DATABASE PROCEDURE>> or ADBC> methods can be used to call database procedures on databases other than the standard database. This involves creating an object of the class CL_SQL_STATEMENT>> while passing an object of the class CL_SQL_CONNECTION>> and using the method EXECUTE_PROCEDURE>>. ABAP_HINT_END
ABAP_EXAMPLE_ABEXA AMDP Method with Specified Service Connection> ABAP_EXAMPLE_END