Sei sulla pagina 1di 18

AMDP

Program: ZHA400_AMDP_CLASSIFY_S1_N
AMDP container class : ZCL_HA400_AMDP_CLASSIFY_S1_N
Program: ZHA400D_AMDP_DEMO_CUSTMR_CLSFN
AMDP container class : ZCL_HA400_AMDP_CSTMR_CLSF_N
AMDP can detect 3 types of syntax errors in active or inactive source code:
Database independent syntax errors: Parameters not passed by value, wrong parameter types or cyclic method calls
HANA specific syntax errors: Type mapping checks or wrong default values
SQLScript errors
Handling Parameter
Pass the parameter in from ABAP program to AMDP as exporting parameter (program
ZHA400D_AMDP_DEMO_CUSTMR_CLSFN)

Handling Select-Option (Program ZHA400D_AMDP_DEMO_SELECTOPTION)


Conversion of the selection tables into an SQL WHERE clause using method CL_SHDB_SELTAB=>COMBINE_SELTABS( )
Handling of dynamic WHERE clauses within the AMDP method using the function APPLY_FILTER
http://scn.sap.com/docs/DOC-51790
For Debugging AMDP
ABAP 7.4 SP05
SAP HANA Studio version 1.70
or higher

ABAP user (ABAPDEV on the figure) need usual authorizations on ABAP level
SAP HANA user (HANADEBUG on the figure) need authorizations to
Read the SAP HANA database catalog and the ABAP systems schema
Execute and debug the procedure in question (see SAP note 1942471).
Attach the debugger to sessions of the SAP<SID> user
SAP<SID> user (SAPT85 on the figure) initiates executing the database procedure.
Grants the HANADEBUG user the permission to attach a debugger to SAP<SID> user
sessions and grant permission to execute and debug the procedure
Grant Authorization:
GRANT DEBUG ON SCHEMA "SAPT85" TO HANADEBUG;
GRANT EXECUTE ON SCHEMA "SAPT85" TO HANADEBUG;
GRANT ATTACH DEBUGGER to HANADEBUG;
Corresponding procedure should be already created, i.e., run the ABDP at least once from ABAP stack
Locate the database procedure in the database catalog which belong to ABAP system schema
Open the procedure named exactly like the method in the ABAP system
Set breakpoints as needed
Create a debug configuration for External Session Debugging, using as filter parameters
Start a Debug thread

To begin debugging, start the ABAP application and execute the report which is calling the AMDP
Application execution will stop once the first breakpoint in the database procedure is reached
Go to Debug perspective to check /resume execution
Reference: help.sap.com/abapdocu_740/en/abenamdp_hdb_sqlscript.htm

Potrebbero piacerti anche