Hi all,
I'm trying to write a simple method which will use a secondary database connection (new functionality available for AMDP - New in AS ABAP 7.4 SP8 - Use of Secondary Database Connection when calling AMDP Methods).
My sample code is as below:
CLASS Z_CL_JK_AMDP IMPLEMENTATION.
METHOD classify.
me->JK_CLASSIFY_AMDP(
EXPORTING iv_client = sy-mandt
it_bp_id = it_bp_id
connection = 'R/3*KJ1'
IMPORTING et_classification = et_classification
).
ENDMETHOD.
METHOD JK_CLASSIFY_AMDP BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT
USING snwd_bpa.
[some other code]
call "KEANEJ"."JENINSERT"();
ENDMETHOD.
ENDCLASS.
I have verified that the call to the procedure works on the default connection. The secondary database connection KJ1 exists, and the user with which it is associated has permissions on the relevant HANA parts to work (schema permissions, etc). However, the editor (in eclipse) shows an error that the procedure JENINSERT doesn't exist (which it does't on the ABAP system, but does on the DB to which the secondary connection exists).
Additionally, some testing on another ABAP system leads me to believe that there may be some sort of fallback functionality, that perhaps it defaults to the DEFAULT connection if it can't find the secondary connection? If I comment out the procedure call, for example, and run the method above, it runs correctly, although the call out to the KJ1 connection doesn't seem to happen. If I change the name of the connection to something that I am sure is not a connection, the method will still run, which is why I think it may be defaulting to the DEFAULT connection.
Has anyone used the secondary database connection functions? Have I gone wrong somewhere, perhaps in the format of my connection?
Thanks,
Jen