cancel
Showing results for 
Search instead for 
Did you mean: 

AMDP method call error

Sadullah
Participant
0 Kudos

Hey experts,

I checked other answers and can't resolve my issue.

I'm trying this very simple tutorial about AMDP implementation. I'm stuck at method_call_error, getting a short dump.

I created a global class and call its method in an ABAP program. Also I have a transparent table and table type. I tried to fix with adding and removing MANDT. When I debug,

CASE SY-SUBRC.
WHEN 0.
WHEN 1.
* system_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 007 RAISING CNTL_SYSTEM_ERROR.
WHEN 2.
* method_call_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
WHEN 3.
* property_set_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
WHEN 4.
* property_get_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
WHEN 8.
* maximal number of modi reached
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 011 RAISING CNTL_SYSTEM_ERROR.
WHEN OTHERS.
RAISE CNTL_ERROR.
ENDCASE.

I'm getting the 2nd "method_call_error".

REPORT zst_r_amdp_trial.
DATA gt_amdp_trial TYPE zst_tt_amdp_trial.
START-OF-SELECTION.
IF NOT cl_abap_dbfeatures=>use_features(
EXPORTING
requested_features = VALUE #(
( cl_abap_dbfeatures=>call_amdp_method )
( cl_abap_dbfeatures=>amdp_table_function )
)
).
cl_demo_output=>display(
EXPORTING
data = 'SYSTEM DOES NOT SUPPORT AMDP, PLEASE USE ANOTHER WAYS' " Text or Data
).
ELSE.
zst_amdp_tutorial=>get_data_from_dbtable(
EXPORTING
iv_client = sy-mandt
iv_id = 9
iv_fname = 'firstname'
iv_lname = 'lastname'
).
cl_demo_output=>display_data(
EXPORTING
value = gt_amdp_trial
).
ENDIF.
CLASS zst_amdp_tutorial DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_amdp_marker_hdb.
CLASS-METHODS get_data_from_dbtable IMPORTING
VALUE(iv_client) TYPE zst_t_amdp_trial-mandt
VALUE(iv_id) TYPE i
VALUE(iv_fname) TYPE string
VALUE(iv_lname) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zst_amdp_tutorial IMPLEMENTATION.
METHOD get_data_from_dbtable BY DATABASE PROCEDURE
FOR HDB LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY
USING zst_t_amdp_trial.
--create tempvariable
DECLARE lv_test NVARCHAR( 5 );
lv_test := 'TEST_';
et_amdp_trial =
select mandt,
id,
fname,
( :lv_test || fname || lname ) as lname
* lname
from zst_t_amdp_trial.
ENDMETHOD.
ENDCLASS.

Actually am expecting, if my system doesn't support AMDP, I'll get the message which is in IF scope.

I saw a comment "After the first succesful call you shouldn't reach that method in the debugger any more.", but I don't have a conclusion from this info.

I'm running SAP Developer Edition 7.52 NW on a VM. Eclipse and ADT installed and I believe they're working as well.

What should I do? Thanks in advance. Happy New Christmas. Frohe Weihnachten. 😃 I'm sorry for annoying you during these days.

Sandra_Rossi
Active Contributor

Please attach the short dump. Also debug/catch the error to see the exception details.

You are posting code concerning CNDP errors, it means a SAP GUI error, so it's not related to AMDP.

If it's ABAP Trial 7.52 SP01/04 Developer Edition, the database is Sybase, not HANA, so it's normal.

Sadullah
Participant
0 Kudos

So It means I can't practice AMDP with developer edition, right?

My SAP GUI is for Java because I'm using Ubuntu as OS.

SAP teach how not to learn something. I don't have a real system currently because of not working.

OK, this case is closed.

Sandra_Rossi
Active Contributor
0 Kudos

With HANA database: ABAP Platform Trial 1909 Available Now | SAP Blogs

(32 GB RAM / 512 GB SSD highly recommended)

Sadullah
Participant
0 Kudos

16 GB RAM 256 SSD for now, insufficient resources =D

I'll try to get a real sys which is affordable. Thanks for your help, you're great.

Accepted Solutions (1)

Accepted Solutions (1)

Sadullah
Participant
0 Kudos

I can't practice AMDP with SAP Developer Edition 7.52 SP04 because the database is SYBASE not HANA.

Answers (1)

Answers (1)

deepikak1
Explorer
0 Kudos

Yes , For AMDP Hana database is mandatory .