Skip to Content
0

AMDP call issue

Mar 03, 2017 at 06:00 PM

213

avatar image

Hi,

I have an AMDP as below which im calling in my ABAP program

class ZCL_GET_MATERIAL definition
  public
  final
  create public .
public section.


INTERFACES if_amdp_marker_hdb.
types:begin of ty_mat,
      matnr type matnr,
      mtart type mtart,
      maktx type maktx,
      end of ty_mat.
types:tt_mat type standard table of ty_mat.


methods get_material
importing
value(ip_matnr) type matnr
exporting
value(it_matnr) type tT_mat.
protected section.
private section.
ENDCLASS.


CLASS ZCL_GET_MATERIAL IMPLEMENTATION.
method get_material by database procedure for HDB language sqlscript OPTIONS read-only.
IT_MATNR = SELECT A.MATNR, A.MTART, B.MAKTX FROM "CLF01"."MARA" AS A INNER JOIN "CLF01"."MAKT"
AS B ON A.MATNR = B.MATNR WHERE A.MATNR = :IP_MATNR;


endmethod.
ENDCLASS.

while calling it im getting below dump. A snippet of ABAP dump is as below. All i can see is that it is searching for SYBASE DB and im not sure why.

Short Text

The database procedure is not suitable for the current database system.

What happened?

Error in the ABAP application program. The current ABAP program "ZCL_GET_MATERIAL==============CP" had to be terminated because it found a statement that could not be executed.

What can I do?

Note which actions and entries caused the error to occur. Consult your SAP administrator. Using transaction ST22 for ABAP dump analysis, you can view, manage, and retain termination messages for longer periods. Using Transaction ST22 for ABAP Dump Analysis, you can look at and manage termination messages, and you can also keep them for a long time.

Error analysis

An exception has occurred which is explained in more detail below. The exception is assigned to class 'CX_AMDP_WRONG_DBSYS' and was not caught in procedure "GET_MATERIAL" "(METHOD)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated this exception, the current program was terminated. The reason for the exception is:

Database procedure ZCL_GET_MATERIAL=>GET_MATERIAL is not defined for use with database system "SYBASE" and therefore cannot be called in this context. The list of supported database systems can be found in the database procedure's introductory METHOD statement. Database connection used: " "

Could anybody please advise why it is looking for SYBASE DB or how could get rid of this dump.

just for information, im using HANA (SPS12) studio and AS ABAP 7.5 SP2 from AWS.

Thank you

10 |10000 characters needed characters left characters exceeded

Are you sure, that your ABAP system uses a HANA DB as database system. Just using HANA Studio with the ADT tools installed, does not mean that you can create AMDPs.

Regards,
Florian

0

well thats what i bought. also, i established a connection in DBACOCKPIT as SAP HANA DB with same credentials (port and host) and its showing successful connectivity. What more i could see in that. could you please let me know.

Thanks

0

Is the connection to HANA the only DB connection or is it a secondary connection beside a connection to a Sybase DB?

0

that sounds the reason. It seems HDB is as secondary. is there any workaround there? i mean can we make system consider HDB as primary DB. please advise.

0

Im going through this link which seems helpful in connecting AMDP with HANA DB as secondary. This seems little old post so im hoping if any new feature available to achieve same. could you please let me know your comments if any.

SCN

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Keller
Mar 04, 2017 at 07:54 AM
2

AMDP only works on a HANA DB that is the standard DB of an AS ABAP. It does not work over secondary connections. For that you have to fallback on do it yourself with ADBC.

Share
10 |10000 characters needed characters left characters exceeded