0:00 hello and welcome everyone to our on Hana com for Hana course so in this part we are going to start one of the most important topics of abap or and very popular which is your amdp amdp very very important let's see this amdp part so let's start with the introduction of our amdp introduction part of our amdp what is amdp so amdp stands for amdp stands for
0:51 abap managed database procedure amdp stand for abap managed database procedure what is amdp amdp is a method of a standard class amdp is nothing but if you have to Simply Define it normally what will be your answer that amdp is a method of standard ABAB class created from sc24 so what this method is going to do this amdp method will have the SQL script code SQL script
1:37 code written inside it first thing written inside it so how does this amdp actually works so when you call this method when we call it call it for the first time when we call this amdp method for the first time what happens a procedure gets created a procedure gets created in Hana in the corresponding schema in the corresponding ABAB schema so a corresponding procedure gets created
2:25 inside our ABAB schema so if you go and check if you remember if we go and check so we have seen let me just open sap system system yeah just open your SCP system log in and if you go and check the system and status you will find the schema of your ABAB this is my schema so in this abap schema sap Hana DB inside this abap schema when I will call this method a procedure will be created inside this schema okay so what is how does this
3:13 amdp works so an amdp M DP was or it works on M amdp works on top down approach so top down approach first thing it was introduced after 7.4 version of ACP 7.4 version so if you are using a version earlier than that you will not be able to use this amdp feature in your system so it works on topown approach right now using amdp
3:59 using amdp there is no need there is no need to connect with the Hana server there is no need to connect with the Hana server all the changes are by default can be done can be done by default by default from the application server only it can can be done by default from the application server only okay now amdb was introduced after the version 7.4 so what is amdp amdp is a is the replacement
4:46 technology replacement technology for database procedure procedure Proxes amdp is the replacement technology for the database procedure proxies okay also we will get detailed runtime error by using exception handling we can do the exception handling and we will be able to get the detail runtime error if we are facing any kind of error we'll get the detail errors okay also it Well
5:32 integrates it Well integrates with the ABAB system so this amdp well integrates with the ABAB system amdp stands for ABAB database sorry abap manage database procedure it is a method of a standard abap class which we will see in detail in the Practical implementation part but this amdp method will have the SQL script code written inside it and when you are going to call it for the first time a by default procedure will be created in Hana for the corresponding B schema now a very important interview question here a very important vbi
6:18 question vbi question here the question is question is can we create AMD P can we create amdp if the database is not Hana is it possible for me to create amdp if the database is not Hana the answer of it is no we can only create the amdp method or amdp if database is Hana high performance analytic Appliance high performance
7:04 analytical Appliance we have seen it in detail in the previous sessions right okay now discuss some more thing about this so why do we need amdp second thing aab managed database database procedure ABAB managed database procedure why do we need that right all of them we are going to see it AAP managed database procedure so why do we need it so the basic idea the basic idea of
7:51 amdp is to manage sap Hana procedures manage ispana procedures and their life cycle and their life cycles inside the ABAB server every property of Hana directly in the ABAB server itself right so what you see is to allow native consumption to allow native consumption of sapana features sap Hana features within the abap layer within the abap
8:38 layer the sap Hana database the sap Hana database procedure language procedure language SQL script SQL script has been integrated has been integrated into the ABAB stack it has been integrated into the abap stack so to allow native conception of saana features within your application layer that is abap application layer the SAA database procedure language which is your SQL script it has been integrated into the ABAB script into the abap stack and now what you see here is
9:25 amdp is implemented is implemented in AAP emdp is implemented inap class methods socalled amdp methods socalled amdp methods so you must be really good at objectoriented programming concept so if you are not good at U app you will not be able to implement this amdp methods here okay so amdp is implemented in a b class method socalled emdp methods what it does that serves as a container that serves as a container for the SQL script code SQL script
10:16 code so it is implemented in AAP class method and serves as a container for the SQL script code this particular thing what you see is this approach offers many significant advantages many significant advantages what are they let's see them so it enables it enables it enables the shipment of amdp the shipment of amdp in the same way as in the same way as any other ABAB development object first
11:03 thing ABAB development object so in the same way that you develop any of the Bap in the same way you will develop your amdp also the second thing what you are going to see it allows us to implement the Sip Corrections it allows to implement the Sip Corrections for amdp just like it is possible for aab classes for aab classes so this is the beauty of your emdp it allows us to implement the Sip Corrections for am DPS just like it is possible for aab classes
11:48 also okay now you can also check your AC system if you want you can go here and in this product version you can simply pleas check your SF system it has been logged out let me relog in it again so I will do the relogin go for system and status and in the product version we can clearly see here it is greater than 7.4 my current version is 7.58 so I can easily use it right so this system will support the amdp also okay now what is a amdp class so
12:35 amdp class amdp class what is a amdp class whenever you are going to create a amdp class an amdp class must Implement must Implement an interface and the the name of the interface is if amdp marker hdb if amdp marker hdp this is the actual interface which must be implemented so an amdp class must Implement an interface if amdp marker
13:20 hdb so here if you go and check in se24 there is a interface if amdp marker hdp here marker interface for database procedure this is the interface which is implemented by any of your amdp class okay this amdp class amdp class can contain both the amdp and methods as well as non amdp methods it can contain both the amdp
14:09 methods as well as non amdp methods now what is non amdp method so what is non amdp method and what is amdp Method normal class methods normal class methods of any class is your non amdp method is your non non amdp method okay for example this is how a normal CL method has been implemented method method name and Method this is your normal non amdp method or you can say normal method and what is your amdp
14:54 method so amdp method what is your amdp method so amdp methods methods contains some mandatory declaration so it contains some declarations which we must follow and what are these declarations what are these declarations so method again method name me third name and Method and here what you are going to see by database
15:41 procedure database procedure for your database type so database type okay the type of your database language SQL script options language SQL script options read only and using the dictionary artifacts dictionary artifacts arti facts using the dictionary artifacts
16:28 that you have right then business logic which will be your SQL script coding right so your amdp method contains some declaration your database type whatever database in our case it should be hdb it will be hdb here you can go and check system status it is H DB which I am going to use here so amdp method contains some declaration which we will see their features in detail all these declaration and non amdp methods are normal class methods right so amdp class must
17:15 implement this particular interface and it can contain both the amdp and non amdp methods now some very important note before implementing our amdp class uh very uh very important note so it will be my fourth point right amdp fourth first thing is emdp class can only be created can only be created by using
18:03 EDT which is ABAB development tool it simply means you can only create it either in Hana Studio or in Eclipse right so it can only be created in using Ed tool ABAB development tool then second property is we cannot create amdp class we cannot create amdp class from sc24 transaction code which you do for creating any normal Global classes right so we cannot create amdp class from sc24 transaction code neither we can make any changes from sc24 for any existing amdp
18:52 class what we can do is we can only view we can only view the AMD class from sc24 once it is created created in h Studio once it is created in Hana studio right so once we call the amdp method what will happen once we call the amdp method database procedure procedure gets created
19:37 automatically created automatically in Hana database server it will be created automatically in Hana database server so this is the introduction of your amdp amdp stands for abap database manag procedure it is a method of standard class right and and this method will have the SQL script code inside it right and when you are going to call it a corresponding procedure will be created in your abap schema which you can see in your Hana model development part right this amdp completely works on top down approach right top down approach that is top to down then it was introduced after
20:23 7.4 version you can see and this amdp can only be created in your Hana database if your database is not Hana this amdp cannot be created your amdp class must implement this if amdp marker hdb interface and you cannot create any amdp class from sc24 neither you can make any changes however you can view your amdp class from sc24 okay so in the next session we will see the implementation part of amdp so thank you very much for watching the video