Transcript for:
Lecture on AMDP Table and Scalar Functions

hello everyone welcome to sap technology till now we discussed about the amdp processors and the amdp table functions which create we created for the series table functions but we know as I already explained in my previous video in the amdp framework manages the database processors and the database functions from the above itself amdp procedure many is the database procedure but amdp functions manage the database functions but amdp functions there are two type of amdp functions because and the database also there are two types of the functions are there one is the scalar functions and second is a table tabular functions the in same way in a web also we have the two type of the table functions one is the a one two type of functions one is the mdp table functions second is the amdp scalar functions amdp table functions further categorize in two part one which we create for the CDs table functions and another which we can call in inside the another amdp processor or amdp function so today we will talk about the amdp table functions for IMDb methods and second we will talk about amdp scalar functions because we already discussed amdp procedures and CDs table functions in my older videos if you don't know you can watch out those videos first we will talk about the amdp table functions for the amdp method so amdp table functions it's a name itself say that we can return a table it's the same way Studio stable functions also return one table always this table functions the amdp table functions also return the table functions but the in the Declaration part there will be different it's a declaration of the imdp table functions which we which we are creating we will be not using four CDs table function instead of we are we will be giving the importing and the returning parameter one one most important thing this kind of function which we are creating with the returning parameter we which returned value is type of the table this we can't call directly in a web if you try to call what will happen what will happen I will show you in the this video second thing it should have obviously if it's a table functions it should have always returning value and we go we can't have any changing or output parameter for amdp this kind of mdp table functions and these are always read only we can't update data in the database or change data in the database we just can read this is the basics about that the most important thing about the MD these kind of mdp table functions that we can't directly call this kind of table functions in our a web program report but we can call this table functions inside another amdp functions or amdp processor second is the amdp scalar functions so return values in him entry Elementary what is the elementary data type the return value is always Elementary data type but is Elementary data type I also give you the definition so you can understand the elementary data type data type is of fixed or variable length it can be fixed length and variable length that is neither structure it can't be a structure it can't be a table type or it can't be a reference type in particular built in a web types are the elementary what what is mean built in a web type the web types uh built in a website like the BEC decimal float normal f i integer 8 integer 4 this numerical data by P S you can see all our these are the built in a web type so these kind of the this kind of the data types which we have used for that particular value return value for the typing data type those only we can use otherwise uh we can't use other table type or structure type in the type of returning and importing parameter obviously it's a function so we can always have one return parameter that should be also Elementary and we can have the input parameter also obviously we can't have the changing and exporting parameter same way because it is a function it will always return one value if you have some changing and exporting parameter you should always use mdp processor not the mdp function and what else I have written in amdp scalar function can be called in a web like a regular method and can be used as a functional method and function method called means we can call inside the amdp and we can call uh this kind of scalar function in the report as well it's not like the table function which we can't call in report but these kind of functions we can call in the reporter as well how to call this kind of function that also will show in my practical video so let's jump into the system we'll see this both kind of functions how it will behave in a back to understand the different type of amdps I have created this class zcl different type amdp in this class we will create normal amdp processor amdp processor like amdp table function amdp scalar function all maybe I add some CDs table function as well so indeed it depends again on the time uh first we will attract the purpose of this class I want to explain you how the amdp table function and the how amdp scalar functions work in the map and amdp processors and amdp CDs table function which we already discussed my in my previous videos I will try to add those as well but just let's set let's start I didn't do much in this till lamp just to save the time what I did I created two types this time I have used the light model in this we have two table one is the ask scar table I just want to show you some data in scar table scar table having all the detail of that flight what is the carrier ID and what is the carrier name the company name what currency it deal with and what is the URL for that particular company these all are the different different uh Airlines companies are there for those companies we have detail in scar table and one another table we have spli which will give you the the detail of the flight you might know already adjust what is the carrier ID or which carrier ID what is the connection ID where to where it is going what time it is going from where which city it is going to which city it is going what time it is departure time arrival time everything information it is we are having this is about the flight model so I first I am getting the data from the scar table and spli table and in second table I got the some more information about the SPF Li based on the first requirement I will tell you what what is exactly we want so first I will create the simple table function amdp table function to get this detail I want to get the carrier ID I want to get the detail of flight what is the connection ID what is where it is carrying from and which city it is going to since the carrier name we don't have in the SPF Li type table so we will join the scar table and we will try to get this data from the two data so let me create the simple amdp table function so so amdp table function so for that let me create one class method no data so I want to import always import one variable as I always import class methods name you have to give first get start underscore SPF fli fli underscore I just want to make sure give some meaningful names of what we are doing what we are creating the table function same function this is table function we are creating not the normal procedure we are creating so one tables function we saw in the CDs table function which we are when we create that type of table functions we have to write four CDs table function like that we have to write something uh Force 3DS table function we have to use uh the syntax but in this case we are not creating for the CDs table function we are creating the table function is like a a normal table function which will return a table in this way we are having we will be having the importing parameter also and exporting parameter also for the table function they that will be CDs table function that will be derived from the CDs table function itself uh so in this CDs table function is it will be derived from the CDs itself CDs entity itself but in this case we don't have any CDs entity we will be independently creating the mdp table function so we will be importing so we have how to use value operator because we have to pass by value I want to get first mandate and this type should be cemented mndt and value operator and this fill I want to get what else I want to get the I think connection ID carrier ID I want to get so this particular field I want to get a carrier ID the zoom that I can get the face the data for which carrier ID you want to air ID and that should be type of uh Care ID that is correct and I want to export some value exporting in this case what I want to export in this case I want to export the the stable DT control C uh i t IET Ctrl V I can do and this time let me give some meaningful name this ET and this would type of control with the stable type I want to get this much data and I want to read sign mandate not something else and c e r r i d c e r r i d correct to what it is saying here ID c a r r i d i can use the table name also SP fli this c-a-r-r-i-d so now it is telling I hope it will tell the implementation is missing simple you have to click on control one create the implementation for this particular method so this is the table function not the procedure so we have to write by database not processor we have to write the function and by database function for another for hdb and which language is a SQL script it came automatically okay so since it is a table function so we have as we I already explained table function always return the table so return table so we have to return something so before returning we have to get something so get the data select uh I want to get I want to use two table I know so you can use using SPF Li any scar these two table I want to use so I want to get the data from the some from the scar table I want to get the area ID so S C A in short form I can use Dot area ID c-a-r-i-d and from other field what I want to get so these uh carrier name sorry Control Alt shift a let me copy this all the things I want to get this detail Ctrl C and you can copy alt shift a you want to copy the vertically in Eclipse you have to do alticey then you have to select and again you want to paste vertically Ctrl v u it will be pressed vertically but you have to make sure that the name you should have some uh enough his face over here a little safety again I have to do and I I should have enough space then I'll just shift a and you I want to paste vertically it pressed it vertically I'll just shift a again I have to click then it will come it will select now in the horizontally instead of vertically this is Advantage so I want to get the data from this other data I want to get from the SPF Li so I can write SP in sorter SP Dot elia's name I will give SP Dot and SP Dot and this will be start then SC I can use in the sorter form and is is I don't want to write because I'm using directly the names uh comma set separated lists from which table you want to select from uh car table or I can select from spli and then join so from spr SP fli is SC is SP and inner join No it should be available I can use inner sewing always it will be available in a join with s is scar table car is a SC and on which condition you want to join you have to always give your mandate that's a very mandate uh SC Dot mandate should be equal to insert equal to SP Dot mandate and one another field which we we want to equate that is a carrier ID which SC Dot if you do control space you will get the help area ID equal to SP Dot here also you will get again help carrier ID so I got these four fields and what I want to do else I got this data from this table I have I have to I can use order by order by to sort the data cone ID from if you want if you want to sort that is fine if you don't want to sort that is also fine see control V Ctrl C control so I have sorted so it will say the return is missing or one more thing since it is a table function it should be read only we have to write the option as well options read only either you can write here or you can write here as well amdp options and what it is telling contain the database function which means cannot be defined using a exporting so this is again one important thing since it is the table function it should be returning not exporting so that's a very important thing it should be returning and uh since it is the table function if it is processor we can use exporting but in this case it's a table function it should return only one value that table should be this one and again options read only what I was telling you can give those options here also uh amdp options some options and you can use read only here as well if you use here no need to give here you will not get error so that's a Yoto is where to use okay that I have already explained how to use amdp options and one how to pass the CDs underscore client at the database level in my previous videos if you don't know you can watch out those videos okay and uh what else error we are getting return is missing I think so so we have to return this value return and then no error except F1 I can do control F3 I scored the data I sorted uh I did the inner sewing I based on this one and I got the Theta now what I will do I will create a program I'll I will try to pull directly the stable function in my program as I told you we can't call but if you call what will happen that we will see let me create one new program so for creating new program you have to right click over here your package where you want to create a new a web program other repository object and you can write program I want to create and a web program you have to select you have to give the appropriate name Z underscore uh different I can use diff type amdp like that I can give some names I can copy same as a description click on next button and select appropriate TR and finish it up it will create the normal a web program let me minimize it let me open this program parallelly so I have already one simple uh template created so I usually use this template whenever I you do the demo programs it's basically what it is doing we have one startups one local class demo inside that we have one main method and that is static man method which we are calling directly in the startup selection so whatever we do here so basically we have to write call that will be called from our program so what I want to do now so always first thing you have to make sure whenever you are pulling the mdp you have to make sure that your database support amdp or not that I don't want to explain again and again that I have already showed you how to validate the database your database support amdp or not in this directly I will try to call this particular get a scar spli table so what I will do since it is a public method and I have activated this one Ctrl F3 and I will directly confirm this class Ctrl C and Ctrl V control space control space I will do shift enter I will do I will be able to call the I I have to pass one more thing I did I think I didn't pass here where condition we have to pass the where as well so otherwise the data will be not filtered we will get all the data from the system that we don't model that that we don't want obviously so what I will do I will pass here uh so as the mandates field should be uh selected so as C dot mandate would equal to our importing parameter IV mended and second condition because I want to get the data from the current client and area ID should be should equal to control space carrier ID which we are passing from so this is the wear condition we have to apply and we are returning this will return always one table we are returning this table let me activate again Ctrl F3 here it will know the first let me pass the assignment date let me do little bit here and there so you can see properly all the data PSI mandate M and DT area ID we have to pass I will pass directly here some constant you can get from the selection screen you uh if you want or you can get uh you can use CL demo class to get the data that I don't want to do I just want wanted you can get from the selection screen if you want to pass as a variable that also you can create like this also you can do data data LV LV underscore layer ID type uh SP a here ID value default value I have passed a and I can use this directly Ctrl C instead of using the constant control V to get the data Ctrl shift greater than I can do again data and I can get it out and I can display this data CL underscore demo uh demo underscore output control space I can do output and I can display the table which I got we'll see until we since it is the table function one more the left F1 I can write this way also and I can write uh there is a function how we call the functional method uh there is a different different way directly we can get that is another we can get directly in the value and just pass those two value in the comma separated list like that function call we do we can do functional method we call those things this is this is also functional method only same way also we can call because it's receiving some value except F1 let me activate but the thing is that let me put a it will not trigger this one I know I'm I already know because we can't go directly CDs table function in our other program even there is we are not getting directly any error over here and one more thing I want to tell for the table functions you can't raise try cage block also there is no exception handling for the functions only the exception handling done for the processors not for the functions if you use strike age and the CX amdp error class is there which is used for the imdp related exception if you want to kiss the MD amdp related exceptions but in this case if I do if I do try and try also that will not work because for for the functions there is no amdp related exceptions are not there only the for the processors there are let me do Ctrl F3 and let me do Ctrl F3 it got activated let me do F9 I will get dumped if you want to see the dump in the web app environment you can do f8 instead of F9 so in this case it will open one GUI session and there it will get fell in that case we will see the dump instead of the the eclipse environment Eclipse environment whenever we get the dump there one small pop-up come at the right corner it came previously behind the my video might be you were not able to see you have to just click on that and you will see that dump and in this case if I did f8 now 0 new UI session will open and it will try to execute the program but again we will get the dump I know I just want to show you the dump in the this one again we go to the dump uh thus telling that call method amdp function call illegal we can't call the amdp table functions directly from the above this is the functional description or we don't have any try catch or all this is a programming error we can say we can't handle this kind of things using the try case of error also so what to do I want to call this particular method simple what you have to do make this method is a private method can I do like this Ctrl 1 uh make the scale private you can see Mac get scale SP apply table function for the function private so I instead of the public method accepted to the private method now you can see and this private method so I don't want to call this function from the program but I can call this function in another amdp processor or function so let me create one another uh normally we have called now we are calling create a program and call inside the processor this table function so I wrote wrote already what all are the point needs to be explained so I tried to call in the program we got the dump and now we call this particular particular function using another mdp processor so same thing most of the things are same Ctrl C I can say and the method name I have to change uh instead of the table function table processor I can write procedure I can write table is not required and instead of returning this time it should be exporting because returning will not support the processor this is again one thing I have already explained in the theory sessions previous session I just we are doing all the Practical things we are saying one by one it will say I want to get this one this one and I want to return this one the other things will intact let me create the implementation control one Aid implementation for this particular so we got the implementation what I have to do this time again by database procedure let me remove unnecessary space we can see lot of things together so I want to get the scar what I want to get by database this time functions not functions procedure I want to create for Hana database I want to create and for language will be the SQL script obviously language will be SQL script and this time what we can do we can we have to use this time using instead of using that uh Ctrl C Ctrl V instead of using those tables I I want to call this particular method of this particular class inside my method so this is the using we have to use let me decrease this one little bit this is not required as of now you can see so you know and now it will tell there is implementation machine there can't be empty body since it is a table function we can't directly call like a call statement let me try to call with the call statement first what will happen we will see since it is SQL script it should give some syntax error call Ctrl V and uh to convert in the upper case we have to use Ctrl shift X and let me do control space we are getting help shift enter I will do uh this method will be called in this case if I want to use like a map in this case what I have to do I have I have to call like this Ctrl V and I have to pass this value and Ctrl C I have to pass this one Ctrl V Ctrl V and because importing and exporting parameters are same like that I have to pull if I want to call with the call statement but I am getting the syntax error what is this error Pole this is the cold this one particular table function control space let me do again give me one second control space control space I will do for the space what is the error oh I can't call like this like that you you he's telling Ctrl Z account call like this and what is the error here incorrect Clause here okay let me remove this one then what is the error it is telling uh it is telling like this the invalid name of function or processor cannot be executed in the call statement as I told you we can call we can't call using this particular function using the call statement so what we have to do is always the table function will be called in the select statement in the SQL script so for that what I have to write instead of polling like this I have to write select I want to select all from from where I want to select I want to select from this uh like this I have to do Ctrl C TRL V I want to select from this one I want to close this one and I think that's it and I want to get this value inside our result that will be Ctrl C TRL V I think now it should work select from this table function I'll just shift a will work here vertically select tap tap tape tape like that way we can do lot of things except F1 I'm getting some error alt shift a uh left F1 I think there is no error let me activate this one Ctrl F3 so this is the way we can call the table function see this is amdp table function inside another processor this is the way we can't call using the whole statement that's a very important thing and now what I will do instead of calling this method now I can't call this method control F if I do Ctrl F3 here and if I try to do Ctrl F3 my program uh it should give some error uh the I can see some problems are there if you open the error log you can see those problems as well this will say definitely that uh this particular method you call now syntax error in the program G different type what is the error I think we are calling the private method that is the reason that is the error it is giving so let me call instead of this private method let me call this Ctrl C and Ctrl V and exporting importing parameter will be same and in this time instead of receiving we are getting importing that's it I think that will work control F3 and let me do F9 to see the result how the result look like F9 so you can see got the data for American Airlines and from New York City do it is going zero zero one seven and zero zero six eight I just want to see the data in the SP fli table also uh filter out on the a cube filter on the a there is only two data only which we got uh the data correctly that means so this is the way if you are calling if you created one table function you can't go directly in the program you have to call in another table function like that if you you are if you but the important thing there that you can use directly in the your select statement that particular uh table function you can see I'm getting select from this particular table function that's a very important I got the data and I displayed I used this table function in this one it's not for the uh this is mainly useful if some database aimed database table functions are there available and you want to consume in your a map that time this is very useful this and those stable function you can't go directly using the call statement and you have to like this you have to use select statement and you have to call those stable functions generally the table function we don't require we directly go and create the processors why we have to create the table functions we have the importing exporting parameter we have created the table function now what for what we will do we will create one the one scalar function so create one scalar temp table function we will get the maximum flight time for that particular Care ID so again I will create one function a method class uh this time method and get Max flight time FL time I can write underscore scalar function scalar functions to see what is the function name and I as I told you for the scalar's function we can have only the elementary type data type for importing and returning board since it is table function we should have returning instead of exporting so importing uh this is valid and these both are valid because both are the type of scalar only not any table type so if you see uh scalar means both are Elementary data type if you go and see what is the Care ID type to do F2 and it will be ultimately character 3 and if you do have to F2 in the Mandate ultimately it is a it is again K3 cln T3 so no issue uh these both are the Elementary data type you can't put some table tabular type or reference type here and if you're exporting again it will not work I have to do returning value what value I want to return uh the returning value will be ET FLT flight FLT Max time Max underscore time this is the thing I have to return this type should be uh spli control space so time should be there here ID cone ID departs at time distance departure time flight time FLT time we have to get what is the flight duration let me write down after LT time so this time I have to get and let me close with this one I have to implement let me do control one paid implementation for this one so it got added and now what I want to do again this is a so again this is table function I I have to create so I have to write down like this by by oh control Z control Z I have to put insert keyword Ctrl Z by database function and for which database I want to create for Hana database I want to create which language you want to use I want to use SQL script language in which table I want to use this time SP fli from this table only I will get the data so this time what will be the select query mine select I want to I want to Max number I want to get the max of right time after the field value field is the again I have to see uh so this is the field FL time FL time and I have to close this one uh this one from where I have to get from SPF Li f l i uh where I want to pass the IV where the Mandate equal to this is same so I have already passed somewhere uh here I have used elia's name I don't want to use mandate equal to IV control space you can do IV mandate Five Points and one more thing I want to use the carrier ID CA control space area ID I want to pass equal to IV underscore carrier ID let me get this value single value only so into I can use into here as well into and I can use Ctrl space and two what is the value I want to get select from this one I want to get into Ctrl C TRL V I think it should work in two years not working control X next time here it will work what is the syntax error now I'm getting I'm getting database function must be read only so we have to put this database options because this is database functions so I have to write options read only now it is working so it's a year we have to write into here so this is again SQL script syntax so a lot of things are new for me as well so we are getting the the data inside this one and this is the maximum data I am getting and one more way we can get I think we can get this value directly here as well Ctrl C let me try that way also uh this and Ctrl shift less than I do how it will work in this time scalar type not allowed here so for the scalar type function you have to use like this one so this again I have tried only but generally we have to use like this only uh if you have a scholar type function you have to get the directly value because you will get always Elementary data type as I told you there will be single value so that is the reason they are using the select statement like this let me do shift up one and Ctrl F3 and like that we can call the uh we can create the scalar function directly now what I will do I will use this scalar what is the use of the creating the scalar functions so if I want to call directly in the a map there is no use I can call not an issue if you want to you call that function uh suppose I want to call like this um Ctrl C Ctrl V and Ctrl space get Max something is there except enter and I can get this one control Ctrl C let me decrease this size so we can see all the things Ctrl V and carrier ID control C Ctrl v data LV Max time something receiving controls of greater than and control Ctrl V 1 Ctrl F3 let me do F9 so you can go to V 361 we have got that is the maximum flight time from all the flight time this is the note use of the scalar functions so if you want to call the scalar function you should not go like this uh what why we create this color function so we can call like a class functional method in the any position in the where condition we can go like for example so I will try to do that one first we will do in the SQL script then we will do in a map as well so what I will do I will create one another processor where I will call this particular scalar function and I will try to consume this scalar function inside the select statement itself so how we can do so that is the reason I have told SQL Square scalar function table function inside the procedure I want to consume so for that I have to create one more method class method uh this time uh so let me copy paste Ctrl C again just I have to rename so most of the same things are same but this time instead of returning I have exporting and this time this type is uh it's not a single value it will be table type so we have somewhere table control C and Ctrl V and the Mandate I want to get obviously I want to change the name I want to get the gate flight detail uh Max flight time by next flight time I want to pass next FL timing like that I can pass I'm passing the Mandate again K3 ID again but this time I want to get only this detail carrier ID cone ID City from City to and flight time so I will use this one ttspfli Ctrl C by Max time so this is again I have to use Ctrl V and it will say this particular has not implemented let me do control 1 and do the sorry control one and do the implementation add implementation for this method and in this implementation what I will do I have to get the data so I have to get the result inside this one where it went too much data is there so this one we are using great flight detail so I want to get this data Ctrl C and I want to get this data so how I want to get uh let me select some of the data I want to get the data from the spli only as select what all are the field I want to select again I can use this one these all the fields I want to select alticeye and copy those fields sorry for p control C alt and come down I want to select from here enter enter enter and these field I want to select Ctrl V alt shift a again I can click ok now it converted to Vertical selection I want to select this build Care ID comma cone ID from ct2 and flight time from which table you want to select I want to select from SPF Li so I have to use first I have to convert this function to the by database processor not function for Hana database and language I want to use SQL script one thing you might have noticed here for the functions it will always SQL script for processors it is giving us option what language you are you want to use actually we can put Al language also that is low level language sap uses to create the database processors that also I have told in my previous videos I okay and not only that thing uh one thing if you are creating for other database in future suppose some other database also support the amdps there also you have to change this also and then language also is for the database and from SPF Li so I have to use using obviously using SP fli and Ctrl C TRL V where I have to use where condition obviously where IV amended equal to IV mended and we have to pass one more condition and this will be the Apple time and this we have to get from the uh this particular method what the name this one method and the class name is this one so it should be like this one Ctrl C and since we are using this function we have to use in using the statement let me increase little bit this one and we have to call this particular Ctrl V hold this particular function control shift X and when we are calling this one we have to pass two things Ctrl space there is something is there help is there IV IV underscore mandate equal to we have to pass this IV underscore mandate C and Ctrl V and second thing uh comma we have to pass the control space IV underscore Care ID we have to pass I think so here ID this should be equal to IBK ID control C TRL V and let me close it out and close this one let me see there is some error I think there should be always syntax error what is the error I am getting this time there is error near equal to sign let me call this one and see how it will be called if I will call normally this particular then I will compare with that one control ship less than so what I will do I will use the call statement call this particular function control C TRL V let me do control space and get the de control shift enter so okay we always use like this that is the error not equal to sign like a back so like that you can get the help and you can do the things Ctrl shift greater than let me do shift F1 okay it is correct now let me do Ctrl F3 now what I am doing I am getting the max time from this particular flight and then I'm getting data let me consume this particular function module uh this particular method also in the web report and show you what data we are getting so for that what I have to do again I have to call this particular processor in the web let me decrease this size and let me call this again this static method only Ctrl C Ctrl V and this time control space I will do get applied by this one and let me pass the Ctrl C TRL V and LV carried Ctrl C Ctrl V and we will do Ctrl sub greater than and data we will get here data i t underscore out or some table you can give Ctrl C inline declaration and we control V and shift F1 Ctrl F3 uh I'm getting some error what it is saying obscure Global same name okay I have already declared so I can idea underscore uh SP Apple I can give SPF Li this is not declared control C control V Ctrl F3 and let me do F9 F9 so I I go to only one entry with the uh where the flight time is 361 you can see if there are multiple entry with this flight time uh I would have got multiple entries uh with that file in this for this this parallel I can see the two entries only let me see some other Airline we have multiple entries or not uh so let me use SQ or remove this filter and based on this one I can see the distinct value so LH is having more entries let me pass I'll let instead of this one let me pass latch here let's shift F1 Lufthansa Ctrl F3 let me do F9 uh still we have one entry only with this flight time flight time always will be that that's not like uh vary so in this case 455 lifetime we have only one slide with this connection ID which it is flying from this one to this one okay so like that we can call the scalar function basically I want to tell how you can call the scalar function in the your SQL script in the same way we can call this scalar function in a map as well now instead of calling directly uh this particular select statement from the through the mdp processor we call this scalar function directly in our select statement in a map select statement instead of in Native SQL so what I will do I will write the select and this Care ID this four field I want to copy uh I'll just shift a again I will use Ctrl C I'll then enter enter Then control V again I will use all shift a little what is this uh I'll accept a control shift I clicked sorry guys I'll accept a and I want to use the Care ID phone ID CT form alt control alticept a Health shift a I think I think uh syntax watch chains flight time this data I want to get from where I want to get from this will be the spline SPF Li this will very simple it's a map only that's the reason uh so where I have to pass here no need to pass the client implicit client handling will happen but we have to pass Care ID Care ID equal to uh I'll be underscore at the rate we have to use LV underscore K rid or what's confident when we write the code in about here in the SQL script we have to do lot of things Apple time because we are habitual and so we and we have to pull this time the method so how to call the like normally we call the functional method now uh in the web app to get this value I can call this value and I can fold the directly the method shift F1 and I can pass sign mandate here and I can pass this LV carrier directly here Ctrl C Ctrl V something else uh let me close this with the dot button set F1 let me see we are getting some error what error we got into close obviously we have to put into close uh I want to get data into 83 data I want to get i t result sometime I will give some different result a tough one control F3 and we will execute uh we will display this data also and display this data also before that let me clear out the console so what I will do uh first I will uh I'm getting some error what is this what it is telling and method is select from table I have to do obviously into table sorry into table now I will not get I know a control alt arrow down button and this first we will write we will get the data from the uh our imdp function a our amdp processor and then we will get our from the normal statement and you will see the the difference before that let me clear out the console I already cleared out let me do Ctrl F3 and let me do F9 I hope this would work yeah we got the same result I did some mistake so I have used the this result I have to display Ctrl V sept F1 let me increase the size you can see the guys so previously I displayed itspli though two time controller three let me do our F9 now this time I should get the same result so still we are getting the same result uh there is no issue with the result uh I so like that we can call the scalar table function scalar table function directly from our app as well so this is the use of the scalar table function we usually call like this not like a normal method we put if we created some scalar function or we call like normal function method functional method how we call this is the way we can use in where condition we can use in having close somewhere we can call and we try to consume those kind of things I know this video was pretty long we have learned about the functions scalar functions and tabular function how to create 2 amdp and we how to consume inside the SQL script as well in the and in the a map as well this I took reference from the one of the demo program and I tried to explain uh these all the things uh I would have shown you directly in the demo program that but it that was not this much interactive that is the reason I did programming and I showed you what all are the things we will get and what all are the issues we will get during we do the code that's very important to show you guys and we finally created the scalar and tabular function and we are consumed as well I hope you liked this video uh before going to next video please click on Thumbs Up Button if you have if you have something to share the knowledge you write it down in comment section and with that thank you and happy life