‎2016 May 19 8:44 AM
Hello Expert,
Please help me for the below points:
1. Can we loop an internal table inside AMDP method.
2. Can we write delete adjacent duplicate.... inside AMDP method.
3. What all operation we can do inside the AMDP method.
If yes please help me with an example.
Thanks & Best Regards,
Kailash
‎2016 May 19 12:31 PM
1. Can we loop an internal table inside AMDP method.
Better don't do it. Your performance will go down.
2. Can we write delete adjacent duplicate.... inside AMDP method.
itab = select distinct * from :itab;
3. What all operation we can do inside the AMDP method.
Have a look at the SQL Script Reference in http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf
Best Regards, Thomas
‎2016 May 19 12:31 PM
1. Can we loop an internal table inside AMDP method.
Better don't do it. Your performance will go down.
2. Can we write delete adjacent duplicate.... inside AMDP method.
itab = select distinct * from :itab;
3. What all operation we can do inside the AMDP method.
Have a look at the SQL Script Reference in http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf
Best Regards, Thomas
‎2016 May 19 12:57 PM
‎2016 May 19 1:38 PM
Hello Thomas,
My requirement is first i wiil fetch data from table VBRK and VBRP by doing the join operation, then I will keep that data into another table for further use. From the second internal table I will delete the duplicate entry and I will use that internal table to fetch data from other table.
I want to write this type of logic inside the AMDP method.
Thanks & Best Regards,
Kailash
‎2016 May 19 3:04 PM
Try it like this:
first_itab = SELECT .. FROM VBRK JOIN VBRP ... ;
second_itab = SELECT DISTINCT ... FROM :first_itab;
third_itab = SELECT ... FROM OTHERTABLE JOIN :second_itab;
Why do you want to write that logic in AMDP ?
Best Regards, Thomas
‎2016 May 19 3:56 PM
Hello Binod,
If you have concern about performance then you should have to choose AMDP....
But now advanced open SQL also pretty much faster and has compatibility with HDB.
For your case you can go with advanced open SQL over AMDP , since it does not have performance impact is my assumptions...
I guess Thomas has given you best possible answer...
Regards,
-Amol S
‎2016 May 20 7:06 AM
‎2020 Oct 12 4:26 AM
There is a scenario where as I can't avoid loop. I have 2 ways to achieve it. 1st way is writing loop in AMDP. And 2nd way is writing loop in Report. Please let me know which way is better.
‎2020 Oct 12 11:24 AM
selva123
It's probably better to raise your own question rather than hijacking an old one.