Quantcast
Channel: SCN : Popular Discussions - ABAP for SAP HANA
Viewing all 1246 articles
Browse latest View live

How ADBC connection is benefits by using SAP HANA as secondary database ?

$
0
0

Hi,

 

I have one more important question.


How ADBC connection is benefits by using SAP HANA as secondary database in terms of performance wise for the access of data from HANA database as a secondary database.


I have 2 options and which is better for the good performance for accessing the data-


1 .  In ABAP Reports in the SELECT statements by using CONNECTION (“HDB”) will this improve the
     performance.
      e.g : select * from BSEG into TABLE IT_TAB CONNECTION (“HDB”).

 

 

2. Will Create the Stored procedure in HANA studio and Call
   from ABAP as below by using NATIVE SQL–

     EXEC SQL

      SET CONNECTION (‘HDB’).

     ENDEXEC.

    EXEC SQL.

      EXECUTE PROCEDURE proc (IN    p_in1                       
                             OUT   p_out1   OUT   p_out2 )

   ENDEXEC.


Regards,
Pravin

 

Message was edited by: Jens Weiler Branched from http://scn.sap.com/thread/3498161


How to improve this CDS view performance

$
0
0

Hi Experts,

 

I am using a CDS view with following join conditions.

cds.png

And the where condition is " where  a.kdauf = :p_vbeln  or ( b.kdauf = :p_vbeln and b.werks = :p_werks ) or c.vbeln = :p_vbeln ".

 

Its taking at around 30 secs to execute. Is there any other way to make the cds view to work fast without hampering the functional requirement.

 

Thanks and regards

- Sabarna.

Comparison of application server file against custom table

$
0
0

Hello All,

 

I have a file in application server and I read it line by line. There are predefined fields in the record which should be compared against values maintained in a custom table and if matches then should be updated in a z table. The file is huge and the logic already in place is consuming time and hence we are eying the possibility to do it through amdp. Can someone guide as to how to start with the same?

 

Example:

 

The file data is seperated by ;If the second value in the current record is either a,b,c,d(to be checked against the custom table) and if fourth data in the current record is either 1,2(check the table) then a custom table is to be updated.

 

Thanks,

Prem

How to convert Customized HANA view to CDS View?

$
0
0

Hi,

 

I have created a customized HANA View as per the requirement and fetched in Fiori. Now SAP says all the Calculation views to be converted to CDS Views.

 

  • I got to know the procedure, First we need to convert Customized HANA View to External View and consume external view in CDS. I am very new to CDS  so please someone elaborate how to convert HANA View to external view and how to consume in CDS?

 

 

Thanks in Advance

Nagarjuna


CDS View vs Atribute view

$
0
0

Hello All,

 

I need to know is CDS view and Attribute view are co related and what is the difference between CDS view and Attribute view.

 

Please suggest.

 

LR Reddy.

How to start working on Eclipse using ABAP?

$
0
0

Hi,

 

I need some reference or basic fundamental to start working on Eclipse using ABAP.

Please let me know if anybody can help in this.

Other then ABAP, can CDS consumed by others reporting tools? e.g Bobj, Lumira

$
0
0

Dear Expert,

 

Other then ABAP, can CDS (core data services) consumed by other reporting tools? e.g Bobj, Lumira or HANA modeling join with other hana view. I googled but can't find any.

 

Thank you.

Consumption of ABAP CDS view.

$
0
0

Hi All,

 

Is it possible to consume the ABAP CDS view to other reporting tool i.e. analysis for office, lumira, Dashboard etc.

If yes, Can you please guide how to achieve it.

 

Many thanks in advance.

 

Gaurav


Execute Procedure with i/o parameters from ABAP

$
0
0

Hello,

 

We are using HANA as secondary database and I need to execute HANA Procedures from ABAP.

 

I have created a procedure in HANA with a parameter as input and table as output.

 

I executed it in HANA as

 

CALL "_SYS_BIC"."xxx/RETREIVE_ZHMARA"('MT02',?)

 

and it worked fine.

 

 

but I'm not able to execute it from ABAP.

 

My need is to pass parameter as input and get the result in a internal table.

 

 

Following is my code:-

 

 

 

DATAstmt_ref    TYPE REF TO cl_sql_statement,

        con_ref     TYPE REF TO cl_sql_connection,

        res_ref     TYPE REF TO cl_sql_result_set,

        d_ref       TYPE REF TO data,

        d_ref1      TYPE REF TO data,

        lv_mtart    TYPE zhmara-mtart,

        output      TYPE i.

 

 

 

lv_mtart = 'MT02'.

 

     con_ref = cl_sql_connection=>get_connection( 'ABC' ).

     stmt_ref = con_ref->create_statement( ).

 

GET REFERENCE OF lv_mtart INTO d_ref.

 

         stmt_ref->set_param( data_ref = d_ref

                              inout    = cl_sql_statement=>c_param_in ).

 

        stmt_ref->execute_procedure( proc_name =

                                '"_SYS_BIC"."xxx/RETREIVE_ZHMARA"' ).


 

 

GET REFERENCE OF lt_zhmara INTO d_ref1.

                                           res_ref->set_param_table( d_ref1 ).


* Get the complete result set in the internal table

         output = res_ref->next_package( ).

 

         LOOP AT lt_zhmara INTO ls_zhmara.

           WRITE : /, ls_zhmara-mandt,

                      ls_zhmara-matnr,

                      ls_zhmara-ersda,

                      ls_zhmara-ernam,

                      ls_zhmara-laeda,

                      ls_zhmara-mtart,

                      ls_zhmara-matkl,

                      ls_zhmara-meins.

         ENDLOOP.


 

This works fine till  stmt_ref->execute_procedure   , sy-subrc = 0.

 

but gives a dump later as  'res_ref' is not initialized hence has ZERO value.

 

How can I set this?

 

** set_param_table for output parameter is only available in class cl_sql_result_set  but what should be the reference for its object res_ref??

 

 

Kindly suggest...

Open SQL join using cast function

$
0
0

Hi All,

 

I have to join CDHDR and CDPOS using cast function OBJECTID and kostl field which has different length.Is it possible to cast using join function in New abap open SQL.Please help.Thanks.

How to start working on Eclipse using ABAP?

$
0
0

Hi,

 

I need some reference or basic fundamental to start working on Eclipse using ABAP.

Please let me know if anybody can help in this.

Consuming HANA Stored Procedures from ABAP in One Step

$
0
0

Hello,

 

I recently learned about calling HANA stored procedures from ABAP. As per the instructions, we are supposed to use the WITH OVERVIEW addition while calling the stored procedure. This would result in a name-value table (basically containing the output parameters of the stored procedure) using which as the basis, we need to write subsequent queries in order to get the data that we want. So, broadly speaking that's two main steps - the first where we write code to get the overview table and the second where we query based on the overview table.

 

I wonder if there is a shorter way of calling stored procedures, one that involves just one step where you are able to pass the information about which parameters' data you are looking for so that the single call returns you all the data. Is there such a way? Maybe one that involves NOT using the WITH OVERVIEW addition?

 

Thanks,

Akshat

Consumption of ABAP CDS view.

$
0
0

Hi All,

 

Is it possible to consume the ABAP CDS view to other reporting tool i.e. analysis for office, lumira, Dashboard etc.

If yes, Can you please guide how to achieve it.

 

Many thanks in advance.

 

Gaurav

upgrade Hana Project and Custom Abap program

$
0
0

Hello Gurus,

 

In the next future  I'll probably work in a project where it will been installed the DB  Hana .

I shall have to test all custom FI transactions , do you know what could be the error encountered ?

for example error in select statement and so no .

 

thanks in advance

CDS CURRENCY CONVERSION (ABAP on HANA)

$
0
0

Hi All,

 

I'v tested CDS with currency conversion versus the classical approach with the function module for currency converion on application layer (CONVERT_AMOUNT_TO_CURRENCY). The classical approach seemed to be much faster, so I started testing.

 

Please find attached the objects used for testin:

  • y_cds_test_currconv.txt -> Simple ABAP report with both options
  • Y_CDS_TEST_CURRCONV.txt -> The CDS view

 

I test on a system with AS ABAP 7.4 SP8 + HANA SP 8 and also AS ABAP 7.4 SP8 + HANA SP 9.

 

There's actually an OSS, but the it's refering to Oracle DB and not HANA DB (2067294).

 

Native SQL statment (tracing done with ST05)

 

SETSCHEMA"SAPMDE";

SELECT

   "CARRID",

   "CONNID",

   "FLDATE",

   "SOURCE_PRICE",

   "SOURCE_CURRENCY",

   "TARGET_AMOUNT",

   "TARGET_CURRENCY"

  FROM

    "YTESTCUR" ( "TO_CURRENCY" => 'EUR' ,

                              "EXC_DATE" => '20150427' ) "YTESTCUR"

  WHERE

    "MANDT" = '100'


Result

native_sql.gif

 

Change the CDS and replace the CURRENCY_CONVERSOIN by table field PRICE. (to check if the slow performance is cause by the currency conversion function)
cds_change.jpg

Result run native SQL statement:

cds_change_result.jpg

 

I have also run the SAP HANA Plan Visualizer, refer the next screenshots.

 

visualizer1.jpg

 

visualizer2.jpg

visualizer3.jpg

 

It seems to me that the currency conversion has some performance issue. Has anybody experienced the same and maybe found a solution?

 

One final remark: for testing you need to have data in FLIGHT model. (Go to SE38 and run SAPBC_DATA_GENERATOR to generate data)

 

Thanks in advance.

 

Best Regards,

 

Bart


CDS view currency conversion performance

$
0
0

Hi All,

Currency_conversion function in CDS view  terribly decrease performance of the cds  view,  view running in few seconds run for minutes after adding currency_conversion function. I am working on 7.40 SP10 system.

- I could not find any note for the issue for my system's support pack level ( I will open one )

- I tried to select  conversion ratio from tcurr table but it is necessary to subtract gdatu date from 9999999 to get actual date and could not cast gdatu to numeric field to  be able to perform necessary arithmetic operation in cds view. 

- Last solution I have in mind but  trying to avoid  is creating ZCURR table with proper date field instead of gdatu and filling it for the past and recent currency values using a simple program and daily job.


Do you have any other solution for above problem ? I searched the forum but find only one post for the issue which does not suggest any solution 

*** ERROR => Connect to database failed, rc=1, rcSQL=10 SQLERRTEXT : invalid username or password "

$
0
0

Hello,

 

We have SAP SLT system on SAP HANA DB(1.0 SPS 9 revision 93) . It is distributed system.

 

Yesterday while taking restart of system we are unable to connect Db with R3trans -d  RC12.

trans.log is giving error "*** ERROR => Connect to database failed, rc=1, rcSQL=10. SQLERRTEXT : invalid username or password "

 

Kindly help to solve as I am very new to HANA DB.

 

 

trans.log

 

4 ETW000 R3trans version 6.25 (release 742 - 11.02.15 - 14:06:42).

 

4 ETW000 unicode enabled version

 

4 ETW000 ===============================================

 

4 ETW000

 

4 ETW000 date&time   : 03.04.2015 - 05:35:31

 

4 ETW000 control file: <no ctrlfile>

 

4 ETW000 R3trans was called as follows: R3trans -d

 

4 ETW000  trace at level 2 opened for a given file pointer

 

4 ETW000  [     dev trc,00000]  Fri Apr  3 05:35:31 2015                                                 124  0.000124

 

4 ETW000  [     dev trc,00000]  db_con_init called                                                        17  0.000141

 

4 ETW000  [     dev trc,00000]  set_use_ext_con_info(): usage of ssfs switched off (rsdb/ssfs_connect=0)

 

4 ETW000                                                                                                  51  0.000192

 

4 ETW000  [     dev trc,00000]  determine_block_commit: no con_hdl found as blocked for con_name = R/3

 

4 ETW000                                                                                                  19  0.000211

 

4 ETW000  [     dev trc,00000]  create_con (con_name=R/3)                                                 16  0.000227

 

4 ETW000  [     dev trc,00000]  Loading DB library '/usr/sap/SLT/SYS/exe/run/dbhdbslib.so' ...            33  0.000260

 

4 ETW000  [     dev trc,00000]  DlLoadLib() success: dlopen("/usr/sap/SLT/SYS/exe/run/dbhdbslib.so"), hdl 0, count 1, addr 2065de0

 

4 ETW000                                                                                                6278  0.006538

 

4 ETW000  [     dev trc,00000]  Library '/usr/sap/SLT/SYS/exe/run/dbhdbslib.so' loaded                    14  0.006552

 

4 ETW000  [     dev trc,00000]  function DbSlExpFuns loaded from library /usr/sap/SLT/SYS/exe/run/dbhdbslib.so

 

4 ETW000                                                                                                  18  0.006570

 

4 ETW000  [     dev trc,00000]  Version of '/usr/sap/SLT/SYS/exe/run/dbhdbslib.so' is "742.06", patchlevel (0.38)

 

4 ETW000                                                                                                  86  0.006656

 

4 ETW000  [     dev trc,00000]  function dsql_db_init loaded from library /usr/sap/SLT/SYS/exe/run/dbhdbslib.so

 

4 ETW000                                                                                                  16  0.006672

 

4 ETW000  [     dev trc,00000]  function dbdd_exp_funs loaded from library /usr/sap/SLT/SYS/exe/run/dbhdbslib.so

 

4 ETW000                                                                                                  34  0.006706

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    23  0.006729

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=-1,command=39,arg_p=(nil))                       13  0.006742

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    16  0.006758

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=-1,command=10,arg_p=7fff553bba30)                12  0.006770

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    11  0.006781

 

4 ETW000  [     dev trc,00000]  New connection 0 created                                                  10  0.006791

 

4 ETW000  [     dev trc,00000]  0: name = R/3, con_id = -000000001, state = DISCONNECTED, tx = NO , bc = NO , oc = 000, hc = NO , perm = YES, reco = NO , info = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog =

 

4 ETW000                                                                                                  27  0.006818

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=-1,command=10,arg_p=1896960)                     19  0.006837

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    11  0.006848

 

4 ETW000  [     dev trc,00000]  db_con_connect (con_name=R/3)                                             10  0.006858

 

4 ETW000  [     dev trc,00000]  determine_block_commit: no con_hdl found as blocked for con_name = R/3

 

4 ETW000                                                                                                  20  0.006878

 

4 ETW000  [     dev trc,00000]  find_con_by_name found the following connection:                          10  0.006888

 

4 ETW000  [     dev trc,00000]  0: name = R/3, con_id = 000000000, state = DISCONNECTED, tx = NO , bc = NO , oc = 000, hc = NO , perm = YES, reco = NO , info = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog =

 

4 ETW000                                                                                                  19  0.006907

 

4 ETW000  [     dev trc,00000]  { DbSlHDBConnect(con_info_p=(nil))                                        37  0.006944

 

4 ETW000  [     dev trc,00000]  DBHDBSLIB : version 742.06, patch 0.038 (Make PL 0.100)                   18  0.006962

 

4 ETW000  [     dev trc,00000]  HDB shared library (dbhdbslib) patchlevels (last 10)                      17  0.006979

 

4 ETW000  [     dev trc,00000]    (0.038) Close all result sets (note 2124493)                            12  0.006991

 

4 ETW000  [     dev trc,00000]    (0.038) Initialization of deferred LOB writing for ZDO changed (note 2106186)

 

4 ETW000                                                                                                  17  0.007008

 

4 ETW000  [     dev trc,00000]    (0.032) DBSL supports deferred lob writing with HANA SP9 (note 2106186)

 

4 ETW000                                                                                                  21  0.007029

 

4 ETW000  [     dev trc,00000]    (0.031) Read last SQL message after the connection is closed (note 2104804)

 

4 ETW000                                                                                                  20  0.007049

 

4 ETW000  [     dev trc,00000]    (0.031) Check Enable_Select_Into_Scalar_UDF before the ALTER call (note 2105480)

 

4 ETW000                                                                                                  31  0.007080

 

4 ETW000  [     dev trc,00000]    (0.029) Certain SAP applications hang for several minutes (note 888312)

 

4 ETW000                                                                                                  21  0.007101

 

4 ETW000  [     dev trc,00000]    (0.029) Structure DBSL_CA initialized (note 2094457)                    15  0.007116

 

4 ETW000  [     dev trc,00000]    (0.027) Data aging for the service connection (note 2090613)            23  0.007139

 

4 ETW000  [     dev trc,00000]    (0.026) Use prepared statements for R3szchk (note 1952609)              14  0.007153

 

4 ETW000  [     dev trc,00000]    (0.025) Use bulk fetch on a result set of a procedure call (note 2082661)

 

4 ETW000                                                                                                  20  0.007173

 

4 ETW000  [     dev trc,00000]                                                                             9  0.007182

 

4 ETW000  [     dev trc,00000]   -> init()                                                                19  0.007201

 

4 ETW000  [     dev trc,00000]    STATEMENT_CACHE_SIZE = 1000                                             40  0.007241

 

4 ETW000  [     dev trc,00000]   -> init()                                                               866  0.008107

 

4 ETW000  [     dev trc,00000]   -> loadClientRuntime()                                                   20  0.008127

 

4 ETW000  [     dev trc,00000]  Loading SQLDBC client runtime ...                                         11  0.008138

 

4 ETW000  [     dev trc,00000]  SQLDBC Module  : /usr/sap/SLT/hdbclient/libSQLDBCHDB.so                 8256  0.016394

 

4 ETW000  [     dev trc,00000]  SQLDBC Runtime : libSQLDBCHDB 1.00.82.00 Build 0394270-1510               59  0.016453

 

4 ETW000  [     dev trc,00000]  SQLDBC client runtime is 1.00.82.00.0394270                               31  0.016484

 

4 ETW000  [     dev trc,00000]   -> quiesceConnection()                                                   14  0.016498

 

4 ETW000  [     dev trc,00000]   -> getNewConnection()                                                    12  0.016510

 

4 ETW000  [     dev trc,00000]   <- getNewConnection(con_hdl=0)                                           66  0.016576

 

4 ETW000  [     dev trc,00000]   -> checkEnvironment(con_hdl=0)                                           20  0.016596

 

4 ETW000  [     dev trc,00000]   -> connect(con_info_p=(nil))                                             31  0.016627

 

4 ETW000  [     dev trc,00000]  Try to connect via secure store (DEFAULT) on connection 0 ...             43  0.016670

 

4 ETW000  [dbhdbsql.cpp,00000]  *** ERROR => Connect to database failed, rc=1, rcSQL=10                 7276  0.023946

 

4 ETW000  [     dev trc,00000]  SQLCODE    : 10                                                           26  0.023972

 

4 ETW000  [     dev trc,00000]  SQLERRTEXT : invalid username or password                                 13  0.023985

 

4 ETW000  [     dev trc,00000]   -> SetSdbDbslCA(errcode=10)                                              16  0.024001

 

4 ETW000  [     dev trc,00000]   -> freeConnection(con_hdl=0)                                             19  0.024020

 

4 ETW000  [     dev trc,00000]     close all opened locators of connection 0                              13  0.024033

 

4 ETW000  [     dev trc,00000]  } DbSlHDBConnect(rc=99)                                                   45  0.024078

 

4 ETW000  [    dblink  ,00000]  ***LOG BY2=>sql error 10     performing CON                               55  0.024133

 

4 ETW000  [    dblink  ,00000]  ***LOG BY0=>invalid username or password                                  14  0.024147

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=0,command=41,arg_p=d774d8)                       41  0.024188

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    25  0.024213

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=0,command=14,arg_p=7fff553b2420)                 14  0.024227

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    11  0.024238

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=0,command=50,arg_p=7fff553b2438)                 12  0.024250

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    14  0.024264

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=0,command=13,arg_p=7fff553b2390)                 28  0.024292

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    13  0.024305

 

4 ETW000  [     dev trc,00000]  { DbSlHDBControl(con_hdl=0,command=52,arg_p=7fff553b23e0)                 12  0.024317

 

4 ETW000  [     dev trc,00000]  } DbSlHDBControl(rc=0)                                                    11  0.024328

 

2EETW169 no connect possible: "DBMS = HDB                              ---  SERVER = '' PORT = ''"

 

4 ETW000  [     dev trc,00000]  release memory of the SIBU buffers                                        67  0.024395

 

4 ETW000  [     dev trc,00000]  release memory of the STATEMENT CACHE                                     13  0.024408

SAP HANA - waste of time to learn or not?

$
0
0

Hello,

 

I have downloaded and installed Netweaver ABAP trial 7.3 some time ago and Im learning ABAP with book ABAP learning course by Karl-Heinz Kuhnhauser.

 

And during my learning Im thinking about my future career path in SAP. I find fastinating SAP HANA platform. Do you think this platform will be really huge in the future and more customers will want this alternative to SAP ERP etc. ?

 

And since ABAP knowledge is not a requirement for learning SAP HANA, what is? I researched it should be other languages such as SQL, SQLScript or javaScript, are there any others?Do you think I should continuing with learning ABAP and concurrently start to learn also other language for SAP HANA?

 

I would be truly grateful for your opinions and advices.

 

Thank you, Tereza

Variable in SQL ABAP Managed Database Procedure

$
0
0

Dear all

 

I have a question regarding the use of a variable in an ABAP Managed Database Procedure.

 

The following method I implemented into a class:

 

Capture.PNG

 

How can I now insert a variable for the string 'YES' ?

 

I tried declaring a constant:

 

Capture.PNG

 

But I cannot use

 

... WHERE a.giftsyesorno = lc_yes;

 

Is there a solution for this problem? I would really like to use variables in the SQL syntax in the method.

 

 

Best regards

 

Thomas Bretonnet

ABAP CDS View: OData service CRUD enabled?

$
0
0

Hello All,

 

Is it possible to make an odata service generated by the abap cds view CRUD enabled?

So can I do an UPDATE, DELETE, CREATE on the odata service?

 

I am reading stuff about BOPF ? Is this the way to go forward?

 

Regards,

Bert

Viewing all 1246 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>