Amdp Interview Questions

How many types of AMDP methods exists?

There are two types AMDP methods,

  • AMDP Procedures which are implemented with addition BY_DATABASE_PROCEDURE and
  • AMDP Function which is implements with addition BY_DATABASE_FUNCTION
  • Question #12: How ABAP CDS controls Access with DCL(Data Control Language)?

    SAP ABAP HANA Core Data Services(CDS) uses syntax Define Role for access condition. This role management arrangement can further utilizes PFCG based role access. Example:

    And CDS view is as follows:

    ABAP Managed Database Procedure (AMDP) (Top-Down Approach)

    The solution for the problem faced in Bottom-Up approach is provided by ABAP Managed Database Procedure (AMDP).

    This Top-Down approach enables developers to create a managed whole life-cycle of HANA procedure in ABAP Development Environment.The AMDP is implemented as a method of a global class which is marked with specific interfaces called as AMDP class.

    In corresponding to AMDP class, the HANA based SQL class is created at the first call of the method.

    1 Can we enhance AMDP standard methods?

    No, AMDP method does not support implicit enhancement options.

    If your database does not support AMDP what are the alternatives?

    In database system which does not support AMDP, we can use Open SQL or Native SQL to implement the same functionality.

    1 Are CHANGING parameters are pass by value (or) pass by reference?

    The parameters must be declared using VALUE for pass by value. Pass by reference is not permitted.

    What is ABAP Managed Database Procedure?

    ABAP Managed Database Procedure (AMDP) is a class-based framework for managing and calling database procedures (or) stored procedures in ABAP.

    Question #11: What are the best practices which developers should keep in mind while using ABAP Core Data Services (CDS)?

    SAP ABAP HANA Core Data Services(CDS) are foundation of new ABAP. It uses code push down technique and data virtualization for data fetching from much faster HANA database.

    Some of best practices are as below:

  • Use latest innovations in CDS after ABAP 7.50. They help to reduce ABAP code logic and conditions on application layer. CDS executes at Database layer hence makes the application faster.
  • Publishes oData services on the fly
  • CDS can be consumed directly by Fiori reports effortlessly. This feature should be used as and when required instead of providing conventional reporting solutions to customers(e.g. ALV).
  • Analytics out of box
  • 1 Does AMDP function implementations support exception handling?

    No exceptions can be declared for AMDP function implementations.

    Question #15: ABAP CDS syntax rules:

    2. Yes, Slash can be used to start name of CDS also

    3. No, .15 is not a valid literal. Alternatively 0.15 can be used

    4. There are 3 ways to make comment in CDS code:

  • Two slashes //
  • Two hyphens —
  • /* ……….. */
  • 5. “Select” is correct however “selecT” is a syntax error

    Which one you choose AMDP or Open SQL? If the task can be achieved by both.

    If the task can be achieved by both it is recommended to use Open SQL or ABAP CDS.

    What is an AMDP Class?

    A global class which contains marker tag interface IF_AMDP_MARKER_XXX, where XXX means database like IF_AMDP_MARKER_HDB for SAP HANA database.

    Also Read: Introduction to ABAP Managed Database Procedure.

    Question #14: Which between ABAP CDS entity and CDS view should be used to query CDS in ABAP program?

    If ABAP Core Data Services(CDS) needs to be consumed in SELECT statement, always CDS Entity(here TEST_CDS_PFCG) should be used.

    Example of AMDP Class Definition

    PUBLIC SECTION. INTERFACES IF_AMDP_MARKER_HDB. //Marker Interface for HANA DB//

    METHODS process //Only ABAP code is possible// IMPORTING it_param TYPE type1 EXPORTING et_param TYPE type2.

    METHODS execute //SQLScript or ABAP code both are possible// IMPORTING VALUE(it_param) TYPE type1 EXPORTING VALUE(et_param) TYPE type2. //specific parameter interface required// CHANGING VALUE(ch_param) TYPE type3

    ABAP ON HANA Interview Q & A | 12 | AMDP Interview Questions and Answer | Stored Procedure| SQL Sc

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *