0% found this document useful (0 votes)
34 views5 pages

What Is AMDP - ? - ABAP Managed Database Procedure-4

AMDP (ABAP Managed Database Procedures) is a framework for managing and calling database procedures and user-defined functions in ABAP. It only supports HANA databases and can only be created or changed using the ADT tool. There are two types of AMDPs - procedures and user-defined functions. Procedures can have import, export, and changing parameters but no return parameter. Functions accept import parameters and return a single result. Database procedures allow read and write access while functions are for read-only access.

Uploaded by

Gurudath PV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

What Is AMDP - ? - ABAP Managed Database Procedure-4

AMDP (ABAP Managed Database Procedures) is a framework for managing and calling database procedures and user-defined functions in ABAP. It only supports HANA databases and can only be created or changed using the ADT tool. There are two types of AMDPs - procedures and user-defined functions. Procedures can have import, export, and changing parameters but no return parameter. Functions accept import parameters and return a single result. Database procedures allow read and write access while functions are for read-only access.

Uploaded by

Gurudath PV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

WHAT IS AMDP (ABAP MANAGED DATABASE

PROCEDURE)?

✓ Framework used to manage and call database procedure and database functions (User
defined function ) in abap.
✓ Only support for Hana database, Can only create or change using ADT tool(eclipse).
✓ Client handling is necessary while using AMDP.
✓ Types of AMDP,
1. AMDP Procedures.
2. AMDP User Defined Function (UDF).
i. Table Functions,
ii. Scalar Functions,
iii. CDS Functions.

AMDP

↓ ↓
Database procedures AMDP Functions

↓ ↓
Table Function Scalar Function.

AMDP Procedures AMDP User Defined Function (UDF)

1.It can have import, Export and 1.UDF'S accept multiple input parameter and return
changing parameters but cannot have exactly one result which is mandatory,Every
return parameter,Every parameter is parameter is pass by value.
pass by value.

2.we can call this using CALL 2.it can be directly use in select read position.
STATEMENT . Eg.: Call proc (...)

3.Read + write (Insert,Update,select) 3.only for read operation (Select)

4.Exception handling is possible. 4..Exception handling is not possible.

✓ Sharing an examples in next slide.

Document by : Aashish Firake.


Linkedin: https://www.linkedin.com/in/aashish-firake-619721192/
1. Database procedure(Only has import,export and changing parameters).

✓ Here I updated the username of sales order by passing sales order number as import parameter,
And taken before and after data as export parameter.

✓ Calling method in program.

✓ Output

Document by : Aashish Firake.


Linkedin: https://www.linkedin.com/in/aashish-firake-619721192/
---------------------------------------------------------------------------------------------------------------------------------------
2. Function’s in AMDP(Only has import and return(mandatory) parameters).

i. Table function -> Here we are getting sales order by passing document type, But we can’t call
this function directly in Report, but we can call this in database procedure as shown in next pic.

✓ Using database procedure we are getting data from table function.

Document by : Aashish Firake.


Linkedin: https://www.linkedin.com/in/aashish-firake-619721192/
✓ Report for calling method.
Here we could have called ‘GET_SALESORDER_TABLE_FUC’ but it will throw dump - illegal function
calling, That’s why we use database procedure to call table functions.

---------------------------------------------------------------------------------------------------------------------------------------

ii. Scalar functions -> Scalar Function is an interesting topic, We can call this function directly in
report while reading data through select query in where condition.It will return scalar value.

✓ Here we will get customer having highest net value in single order.

Document by : Aashish Firake.


Linkedin: https://www.linkedin.com/in/aashish-firake-619721192/
✓ Report for calling method.

Document by : Aashish Firake.


Linkedin: https://www.linkedin.com/in/aashish-firake-619721192/

You might also like