‎2015 Sep 29 4:59 AM
Hello Gurus,
Is it possible to use ABAP Data types in SQL procedure.
Example- like in abap we declare structures and within structure when we define the fields we can define them as type table-field.
In the same way when I define table type in SQL can i use the ABAP data elements.
Example-
CREATE TABLE TYPE i_notification (
Matnr like MARA-MATNR) .
This is obviously not working but is there any workaround for this.
Regards,
Vivek
‎2015 Sep 29 10:33 AM
Hello Amol, Hello Florian,
actually I am converting ECC custom resports into HAna reports using views, but the problem that I am facing is the business Logics inside the reports,
To tackle that, I am planning to convert the ABAP Code into SQL code and using the views and sql code I may be able to achieve the business logic.
Is my approach correct , or is there any easy way of doing it as suggested by Florian- ABAP managed Procedure, I am not sure.If you have information on this kindly help me.
Vivek
‎2015 Sep 29 6:01 AM
Hello Vivek,
the usage of ABAP Data Types (like data elements, structured, table types) is not possible in HANA native artifacts like stored procedures or structured types. In that artifacts primitive types and structured types can be used like described in the documentation (e.g. CREATE TYPE - SAP HANA SQL and System Views Reference - SAP Library or CDS Structured Type Definition - SAP HANA Developer Guide for SAP HANA Studio - SAP Library).
In relation to stored procedures you can use ABAP types in the interface definition of ABAP Managed Database procedures. This is possible because these objects are ABAP managed. When the stored procedures are created on the HANA database (when executed the first time) the ABAP types are converted to the according HANA types.
Best Regards,
Florian
‎2015 Sep 29 10:07 AM
Hi Vivek,
You can not define any ABAP data types inside procedure.
Can you tell us what is ur requirement.
-Amol S
‎2015 Sep 29 10:33 AM
Hello Amol, Hello Florian,
actually I am converting ECC custom resports into HAna reports using views, but the problem that I am facing is the business Logics inside the reports,
To tackle that, I am planning to convert the ABAP Code into SQL code and using the views and sql code I may be able to achieve the business logic.
Is my approach correct , or is there any easy way of doing it as suggested by Florian- ABAP managed Procedure, I am not sure.If you have information on this kindly help me.
Vivek
‎2015 Sep 29 10:43 AM
Hello Vivek,
1. For converting ECC reports into HANA you are creating SQL script that is right approach.
If you wish to consume these views on ABAP layer you need to create external view either ADBC otherwise SQL script view is sufficient.
2. if you want to push you script into HANA layer then AMDP is useful.
One question from my side : After creation of views, where these are consumed? ABAP layer? BO? etc....
-Amol S
‎2015 Sep 29 3:22 PM
Hello Amol,
1) the users will access reports through bobj explorer tool
2) the plan is to scrap the ECC reports hence, code optimisation or consuming views in abap is not an option.
Hence somehow i need to convert these reports to HANA.
Tge biggest challenge is to convert the buisness logic into SQL, moreover how to use function module here in sql. Its not possible to recreate the function module here in HANA STUDIO procedures.
questions:
A)does it means that there is a limitation what views can do
b) is there anyway to consume abap function modules in sql.
‎2015 Sep 29 5:19 PM
Hello Vivek,
Since past 2 years we are working on same kind of scenarios.
1. You must have to convert report logic into SQL, there is no sach a option available to consume existing FM or any other abap functions in SQL.
2. For FM - you need to decode the logic of FM and built data modle/Procedure in SQL.
In our complex report cases.
1. We have created AMDP data modle called inside RFC ZFM and applied data processing logic in ABAP layer and given RFC ZFM to BO team.
-Amol S
‎2015 Sep 30 5:25 AM
Hello Amol,
Got it,
Secondly,( correct me if I am wrong, dont have much idea about AMDP). as you suggested AMDP, i dont think that will be possible as ECC reports will be scrapped , so no scenario of AMDP.
‎2015 Sep 30 7:49 AM
‎2015 Oct 05 8:02 AM
Thanks Amol,
I realized there is no way I can consume the ABAP code in views, hence I need to recreate the complete logic in SQL.
thanks .