Consuming HANA views using ABAP
Hi Experts,
We have ABAP reports in ECC which is taking very long time to process it. So we decided to push down the complex logic to HANA where ever it is taking long time to fetch data.
We have standalone HANA System. So can we use HANA as secondary database??? If yes, how can i consume HANA views in ABAP reports??
Can some one guide me.
Thanks in advance.
Best Regards,
Krishna.
Hi Sundar,
Thanks a lot for your valuable inputs.
You need to access the native HANA artefacts (like HANA information views) from your ABAP system using native SQL and ADBC in case HANA is not the primary DB.
- If i want to pass values to the views can we use HANA input parameters in this case as a PLACE HOLDER in Native SQL??? else do i need to create a procedure for it???
Basically ABAP team is optimized the code but still we are hitting with performance. So we want to utilize existing HANA databse as secondary db to push down the complex logic to HANA.
Best Regards,
Krishna
Similar Messages
-
Hi,
I have created one attribute view and activated successfully but while I am creating database proxy and importing it in ABAP , its giving me below error.
BR
SumeetHi,
These are the names I got ( below screenshot).My user ID is BEST by which I have logged it into ABAP which is not coming in this list. I have one more question here. I have just debugged my report and I can see my select query is getting failed. How can i find out the reasob for the same. i am not worried about the window information but it must show output. below is the query which is getting failed.
select * from ztest_attr up to 10 rows
into corresponding fields of table lt_test.
BR
Sumeet -
Hello,
We are migrating a report from ABAP to HANA due to performance reasons. We have created various views for data selection and aggregation.
My query is how to consume these views created, via External view Or Native Sql(ADBC) which is better option in terms of performance optimization.Hi Jitendra,
I think this question is touched/commented on in http://scn.sap.com/message/15268054#15268054, right?
Cheers,
Jasmin -
How to Figure Type of HANA View in ABAP?
Hi,
Is there a way in ABAP to find out (by looking up some table or calling an FM/method) the type of a HANA view? I have an ABAP system that has a HANA database. Views of different types (calculation, attribute, analytic) have been created in HANA. In my ABAP code, I have the name of the view from which I want to find out the type of the view. Any ideas?
Thanks,
AkshatHi Kumar,
why would you need to know at all?
Anyways, you would have to know the name of the corresponding HANA entity. That is displayed when you open the external view in the ABAP Development Tools in Eclipse.
Additionally, you would have to know to which HANA Transport Container the HANA view belongs, have a look at the HTC (in the ABAP Development Tools in Eclipse). There are two tabs "Overview" and "Content". On the "Content" tab, you can find a list including package, name, and the type information you are looking for.
Cheers,
Jasmin -
CREATE VIEW in ABAP (Open SQL or Native SQL)
Hi all you experts!
I want to create a VIEW in ABAP. I have created Table Views using ABAP Dictionary (in transaction SE11), I don't have any problem with them.
But, what I need is to create a dynamic view, I mean, a view that can be created/replaced (or modified) at runtime. Is this possible with SAP Open SQL, I don't think so... that is why I tried to created using native SQL but it is not working.
Here is the code:
EXEC SQL.
CREATE VIEW [ZMXRFIV_GLPCA]
AS SELECT
T1.GL_SIRID,
T1.POPER,
T1.RBUKRS,
T1.RPRCTR,
T1.RACCT,
T1.HSL
FROM
GLPCA T1
INNER JOIN
SKA1 T2
ON
T1.RACCT = T2.SAKNR
WHERE
T1.RVERS = '000'
AND T1.RYEAR = '2008'
AND T1.KOKRS = 'PI01'
AND T2.KTOPL = 'PI00'
AND T2.XBILK <> 'X'.
ENDEXEC.
I have tried using quotes (") for the view name, parenthesis and even using only the name but this make no difference.
Do any of you experts have any idea?
PS: After creating the view I need to do a SELECT INTO TABLE to that view and finally delete this view and continue working with the data on the internal table.Hi ,
oh yes it is an object (well, how the database should handle it in any context if it wasn't)
i.e. for ORACLE you would have several thousands of them:
select count(*) from dba_objects where object_type ='VIEW'
If you avoid some kind of foreground processing (i.e. pull the data over the network) and handle the processing inside the database it can improve somehow performance a little (i.e. using the retieved rows of the view to stuff into a database table directly). But his may not always possible...
bye
yk -
Using ABAP FM in hana enviroment
Hi Experts,
I am quite beginner to HANA,while reading about the process of creating procedures(ABAP) in HANA,this comes in my mind that can we call FM of abap in hana procedures?If we can, then BAPI's can also be called in hana procedures?Hi Pankaj,
HANA modelling (use of HANA views or Stored procedures) was primarily introduced to push the code down from Application layer to HANa d/b layer and in turn to reduce the load on the Application server.
Typical use cases for ABAP on HANA would be any ABAP program/report has any data intensive calculations and has Performance issues while handling huge amounts of data (few tables may run into Million records). Within these programs, one can identify hot spots (that typically take a very long time for execution) by using SAP Tools and model this part of code through Code push down by creating HANA artifacts - HANA views or Stored procedures and consume these back in the original ABAP program. This will improve performance of the ABAP program to a great extent.
Hence it does not make sense to have the possibility of calling Function Modules or BAPIs (coded in ABAP) in hana procedures, and hence it is technically not feasible to do so. Alternately , you can create the logic of the FM and/or BAPI if required in the HANA artifacts itself, depending on the business requirement.
Regards,
Suma -
HANA views call in ABAP ECC 6.0 via secondary connection
Dear Folks,
We have created views in HANA, same views we need to call it in ABAP ECC 6.0(Netweaver 7.3) i.e. via secondary database connection.
So,
1.Is it possible to call HANA vies in ABAP ECC 6.0?
2.Is there any version limitations? or will work fine on ECC 6.0
3. If yes can you give me sample code of abap to access hana as secondary database
Note : I have gone through Mr. Thomas Jung thread.
Regards,
AmolHi Amol,
so, ADBC is available in your system, but you have to make sure that the correct DBSL library for HANA (HDB) is available in your system. You can then just check if you can correctly communicate with the report ADBC_TEST_CONNECTION (using the secondary connection maintained in table DBCON) to your HANA database.
You may have a look at the example on how to select from an external view in report ADBC_QUERY (which selects from a DB table), by using a secondary DB connection to your HANA DB and using the HANA view instead of a DDIC table.
Of course in ADBC you have to take care about the correct type mapping (as you cannot use a DDIC type for definition of your internal table into which you select).
Best,
Jasmin
BTW: One word of precaution, the tasks you try to accomplish is rather cumbersome. We definitively recommend to use a more recent release (e.g. NetWeaver 7.4 SP5 or beyond), however, I think that's not your decision, right? -
Error in consuming webservices using ABAP
Dear Gurus,
I am trying to consume webservices using ABAP. We dont have XI installed and no java instance installed.
I created a customer proxy through SE80 and generated a proxy class by giving a WSDL link and also defined logical port. Traditionally followed the steps. But while testing webservices , I get a ICF error.
The error is as follows:
SOAP : 1:023 SRT : Processing error in internet communication framework ("ICF error when recieving the response ICM_HTTP_CONNECTION_FAILED)
Please let me know the cause of this error and solution to be provided.
I also tried to call the method from an abap program, But I get CX_AI_SYSTEM_FAULT exception.
Awaiting your replies.
Thanks in advance for your support and valuable time.
Thanks
GurushanthiHi Gurushanthi,
It could one of several problems, examples:
- A firewall setting
- http communication out disabled by Basis team or
- The logical port wasn't configured correctly.
Try the suggestions in this thread to narrow down the reason (particularly the telnet test from the server):
[Re: Error testing external web service ICM_HTTP_CONNECTION_FAILED;
Regards, Trevor -
How use a proxy consumer web service in ABAP Program with local interface
I generate a proxy class based on a WSDL file.
I want to use this class in an abap programm without a connection but using XML files in local.
I see with the class CL_PROXY_LOCAL_ADAPTER that it is possible to execute without connection but for use this, it's necessary to use the method REGISTER.
This method have two parameters : Class Name and Interface Name.
Class name is the name of my proxy class, but I don't know how to find the interface name.
I think that a local interface is needed to generate but I don't know how to generate in interface with entries in SPROXSIG table ?
Could you help me ?Check out the following links to see if it meets your needs.. Has examples to call a ABAP proxy (that consumes a webservice) from ABAP program...
http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm (webservices ->webservices toolset -> examples)
http://help.sap.com/saphelp_dm40/helpdata/en/1a/b69d427cab0831e10000000a1550b0/frameset.htm -
Web Service consumer using ABAP-PROXY
Hello,
I want to test Web Service consumer using ABAP-PROXY . So I do what is explain in the weblog :
[http://wiki.sdn.sap.com/wiki/display/Snippets/WebServiceconsumerusingABAP-PROXY]
But when I execute the programm, the message : 'No valid source context supplied'.
But, proxy and port are ok and activate.
Can you help me.
Thanks.Hi Jitesh,
Thanks for the link. I checked but did not find helpful info there.
I have managed to make it work yesterday. Two issues were identified.
1. The namespace in the WSDL file imported into ESR as an external definition. I need to create the same namespace in ESR before importing the WSDL and then import the WSDL into that namespace.
2. The authentication method. The authentication method in the IIS configuration of the .NET web service has to be set to Basic Authentication. Then I set logical port of the consumer proxy in the OSAMANAGER to use Basic Authentication also. So far only the Basic Authentication works in my test scenario.
I am closing this question.
Regards,
Jiannan -
Pros & Cons for consuming web services in ABAP using ABAP PROXY
Hi,
Other then performence is there any other disadvantages like security,etc for consuming web services in ABAP using ABAP proxy?
I really appreciate if some one provide the more details(Pros & Cons ) regarding cosuming web services and I also want to know is there any other way to consume web services in ABAP.
Thanks.<i> is there any other way to consume web services in ABAP</i>
you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
Regards
Raja -
Creating Logic and modeling for SAP BW datasource in SAP HANA views and SLT
Hi to all,
I have small question.
We have BW system and SAP ECC as source system and to get data from SAP ECC source system we are using SAP ECC Standard data source.
Now we required to, create modeling in SAP HANA by use of HANA View and get data from SAP ECC source table via SLT.
So we can replicate same modeling,as we done in SAP BW system.
But my question is that, as SAP ECC standard data source hit multiple table and do run-time calculation, before sending to SAP BI.
How we can derives such calculation and logic, in our HANA studio, because as we know in SLT data transformation can be done in limited way also
in view we can not drive such logic via SQL script ?.
Is there any way we can do such modeling and logic in SAP HANA ?
or
is there any standard document for this type of case, which we can use ?
Note: We don't want to use SAP DS or DXC for data loading to HANA, as we want it in more real time.
Regards
Pavneet RanaThanks for reply,
As SLT is based on ABAP, so we can write complex logic in it.
But if we talk about SAP ECC standard data source, they have complex logic, based on multiple table.
So we need to write code from scratch in SLT to derive same result. but it will be huge time consuming , and required good ABAP skills, also it will lead to bug in code.
Also it will reduce the real time performance of SLT, due to complex logic.
Second option is procedure via SQL script, which is again huge effort in term if logic and can lead to error/bug in logic.
Does we have any other way or architecture to do this is very simple way, with high performance and less error issue.
Regards
Pavneet Rana -
How to Call HANA Procedure in ABAP
Hi Everyone,
I am new to ABAP
I have created a procedure in HANA that accepts two input parameters and outputs a table
I am using HANA as a Secondary Database
How can I call this procedure in my ABAP program?
Regards,
VivekHi Vivek,
depends on how you would like to call it :-)
1. Use native SQL to call the procedure (see report ADBC_DEMO_PROC_CALLS_HDB; available in any system with a minimum NetWeaver release 7.40 SP5).
2. Create a DB Procedure Proxy and call the DB Procedure Proxy (Tutorial: How to consume SAP HANA Procedures in ABAP; only "directly" available if HANA is the primary DB underlying your system, for secondary DB system see discussion Execute Procedure with input parameters as table from ABAP).
3. (Method of choice available as of NetWeaver 7.4 SP5): Create an ABAP managed DB procedure (instead of the native HANA procedure) as described in ABAP Managed Database Procedures - Introduction
Cheers,
Jasmin -
Creating a long text using ABAP code.. fm SAVE_TEXT
When you create an order via IW31 one of the options is to click on the text button and create a long text. I am basically trying to mimic this action from within my ABAP code.
The text id details are as follows:
Text Name 500000015000046 which is (5000000 + order number)
Language EN
Text ID KOPF Order header text
Text Object AUFK Order text
If i manually create the text within the transaction i am then able to view and update it via function modules READ_TEXT and SAVE_TEXT. But if the text has not already been created READ_TEXT obviously returns nothing as it does not exist and SAVE_TEXT does not seem to created it!
Anyone know how i would go about creating this text using ABAP code?
Hope this make a bit of sense
Thanks in advance
MartI have implemented the code as i think it should be. See below, can any see what is wrong. If i add init_text it makes no difference and adding the commit_text just makes it hang
DATA: IT_TEXTS type standard table of TLINE,
wa_texts like line of it_texts,
wa_txtheader type THEAD.
wa_txtheader-TDID = 'KOPF'.
wa_txtheader-TDSPRAS = 'EN'.
wa_txtheader-TDNAME = '500000015000056'.
wa_txtheader-TDOBJECT = 'AUFK'.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = wa_txtheader
INSERT = 'X'
SAVEMODE_DIRECT = ' '
OWNER_SPECIFIED = 'X'
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = IT_TEXTS
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Authorization Issue while Data Preview from HANA View
Hi Experts,
We are using BW on HANA. We have created DSOs (info provider) in BW and generated HANA views from there. We have also created analysis authorizations in BW for authorization relevant characteristics. In HANA, we are able to go to the generated analytic view and preview the data from it successfully.
Now I have created a test user and assigned a custom role with below authorizations to this user in HANA:
- bw2hana/../REPORTING role (this role is automatically created by activation of DSO in BW).
- Roles MODELING, MONITORING, CONTENT_ADMIN, USER.
- Multiple system privileges although not needed, like REPO.EXPORT, REPO.IMPORT, etc.
- Analytic Privilege _SYS_BI_CP_ALL
- Package Privilege: REPO.READ for all required packages (tried with ROOT package also).
In BW system also, the test user has analysis authorizations providing access to the relevant info objects.
But when I am trying to preview data for HANA view, I am getting attached error (also listed below):
"Cannot get the data provider outline
SAP DBTech JDBC: [2048]: Column store error: Search table error: [2950] user is not authorized"
I tried to trace the situation is HANA and got below details in 2 trace files:
indexserver_alert_saphana.trc:
[6433]{416977}[66/-1] 2014-10-14 00:59:27.541187 e CalcEngine ceAuthorizationCheck.cpp(02365) : AuthorizationCheckHandler::addAPsToSearchObject: Error during converting SqlAPs to Query entries
indexserver_saphana.31003.075.trc
[6433]{416977}[66/-1] 2014-10-14 00:59:27.541197 i TraceContext TraceContext.cpp(00702) : UserName=TEST_SSO, ApplicationUserName=<<computer name >>, ApplicationName=HDBStudio, ApplicationSource=csns.modeler.datapreview.providers.ResultSetDelegationDataProvider.<init>(ResultSetDelegationDataProvider.java:118);csns.modeler.actions.DataPreviewDelegationAction.getDataProvider(DataPreviewDelegationAction.java:278);csns.modeler.actions.DataPreviewDelegationAction.run(DataPreviewDelegationAction.java:242);csns.modeler.actions.DataPreviewDelegationAction.run(DataPreviewDelegationAction.java:127);csns.modeler.command.handlers.DataPreviewHandler.execute(DataPreviewHandler.java:53);org.eclipse.core.commands
[6433]{416977}[66/-1] 2014-10-14 00:59:27.541187 e CalcEngine ceAuthorizationCheck.cpp(02365) : AuthorizationCheckHandler::addAPsToSearchObject: Error during converting SqlAPs to Query entries
Do you know what this "Error during converting SqlAPs to Query entries" actually means"? How can we resolve this issue? The authorization is working properly for our user ids. But we need to provide restricted access for business users so trying to create test user and custom role.
Thanks
Nitesh GuptaHi Pinaki and Prabhith,
Yes, my issue was resolved. Sorry, missed to updated here.
I was just a beginer for BW on HANA Security at that time and didn't know many small things. The solution was pretty simple.
Whenever you assign analysis authorizations to a user in BW, you also need to generate corresponding HANA authorization. This is done through tcode RS2HANA_CHECK tcode. This tcode converts BW analysis authorizations into HANA analysis authorizations and assign to the HANA user. You can see generated HANA authorization table RS2HANA_AUTH_STR in both BW and HANA.
Once the HANA authorizations are successfully generated for a user, he should be able to see data from Views.
Let me know if this solves issues. Then I will close this thread.
Thanks
Maybe you are looking for
-
After experiencing some issues with 2.6.38 and my Intel video card (external monitor support). I decided to go back to 2.6.37 for the time being. I went into my /var/cache/pacman/pkg and typed in: pacman -U kernel26-2.6.37-6-x86_64.pkg.tar.xz kernel2
-
WSUS process is still running/ hanging up
I made an inexperienced mistake. Things that I have done include: I have changed synchronization to manual from Auto. I went to automatic approvals and unchecked WSUS updates to automatically approve updates for the WSUS product itself. I went to Upd
-
Why can't I open multiple occurrances of Firefox anymore?
I am no longer able to open multiple iterations of Firefox. I used to be able to open as many as I wanted == This happened == Every time Firefox opened == Yesterday - May 10, 2010
-
Folio Builder Articles Update broken?
I cannot get Article Update to work since updating the Folio Builder panel. The file seems to compile and upload. But after the upload a gray spinner appears next to the article in the panel list, and I'm unable to access it. I've let it run for 20-3
-
i got a replacement macbook about a month ago. 2.4 ghz proccessor 250 gb hard drive 2gb ram etc ie the standard black model (ye, apple were being generous) when i got it and started it up, it seemed ok, not amazing just ok, after an hour or two of us