0% found this document useful (0 votes)
116 views

SAP AMDP Notes & Interview Questions

Uploaded by

sapoabap.sundar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

SAP AMDP Notes & Interview Questions

Uploaded by

sapoabap.sundar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

AMDP Notes & Interview Questions.

Q) What is AMDP?
ABAP Managed Database Procedures (AMDP) is a framework in SAP HANA
that allows developers to write database procedures in ABAP. AMDPs are
implemented in ABAP class methods, called AMDP methods, which contain
SQLScript code. AMDP - ABAP Managed Database Procedures, is a procedure, we can write
code inside AMDP by using SQLSCRIPT which is a database language same as SQL script.

 AMDPs can be created in an eclipse-based development environment, such as


ABAP Development Tools.
 AMDPs can't be edited in SAP GUI (Class Builder). However, you can view code
within the AMDP methods in SAP GUI mode.
 AMDPs can be used to read, process, and modify data from the database layer.
 AMDPs allow you to call one function inside another, which helps in returning
multiple results set on complex logic.

Q) What is the use of IF_AMDP_MARKER_HDB in AMDP?


Ans) The interface IF_AMDP_MARKER_HDB is used to define a class as an ABAP
Managed Database Procedure (AMDP) class in SAP:

 Purpose
The interface allows the implementation of AMDP methods, which are ABAP
methods that call a SAP HANA database procedure from within a global ABAP
class.
 How to use
The interface is specified in the declaration part of an AMDP class. For
example,
CLASS cl_some_amdp_class DEFINITION PUBLIC FINAL CREATE PUBLIC.PUBLIC
SECTION. "Specifying the interface is mandatory INTERFACES
if_amdp_marker_hdb. ... ENDCLASS .
 What it indicates
The suffix "HDB" indicates that the AMDP method of the AMDP class can be
implemented in the SAP HANA database.
 What it enables
The interface gives the class the power to use SQL script code in the
implementation of a class.

2) What are the Methods Of AMDP?


Ans) There are two types of AMDP methods: 1-AMDP Procedure Implementation and
2-AMDP Function Implementation. The AMDP method for AMDP procedure
implementation must be flagged with addition- BY DATABASE PROCEDURE & AMDP
method for AMDP Function Implementation must be flagged with addition- BY
DATABASE FUNCTION.

3) Why AMDP methods are static?


As AMDP methods do not access any of the instance inttributes from the class, it makes
sense to use static methods as then creating object is not needed to call the methods.

4) Some Characteristics Of AMDP


Note: 1) An AMDP method cannot be empty.
2) We cannot call FM in AMDP: Coz we use SQL Script syntax. This is
communicated to the system by the addition BY DATABASE PROCEDURE FOR HDB
LANGUAGE SQLSCRIPT .ABAP Coding cannot be executed on HANA DB level.
3) An AMDP class can only be edited in ADT (Eclipse). Client will not be handled
automatically like in open SQL. When accessing client-specific database tables or views
in an AMDP method, the required client ID must be selected explicitly. Therefore, the
parameter interface of an AMDP method must usually contain an input parameter for
the client ID, and this must be used in a WHERE condition.

5) How to Handle Exceptions in AMDP?


Ans) The exceptions are all in the category CX_DYNAMIC_CHECK and must be
declared explicitly using RAISING in the definition of an AMDP procedure
implementation to be handleable when this method is called.

Under what circumstances we will use AMDP?


3) What are the advantages of using AMDP?
4)

You might also like