on 12-24-2023 7:16 PM
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.
I can't practice AMDP with SAP Developer Edition 7.52 SP04 because the database is SYBASE not HANA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes , For AMDP Hana database is mandatory .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.