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

Dynamic insert statement to update cross schema tables

$
0
0

Can any one help me to write a dynamic  INSERT statement in AMDP  method.

Requirement is ,  I have to update the cross schema table  from another  system.

 

I have to Update Z-Table in BW system  .

I created a method in CAR system and  run the program to update a table in BW  system.

 

INSERT INTO SAPSD1.ZTABLE    select * from :ITAB;

 

This is updating  in BW related Ztable  from  CAR system .  SAPSD1  is  BW  dev  schema.  To work  this  same  statement in BW  qa and PRD I have written like below.

 

LV_SQL  := 'INSERT INTO'  ||:IV_TABLE||    ' select * from :ITAB';

EXEC LV_SQL;

 

There is no syntactical error  in method , but  when I execute the program from CAR system I am getting  error  :  SQL Code 257.

 

NOTE   :     IV_TABLE.        will  have the  value  :  SAPSC1.ZTABLE ( when the program execute  from  CAR DEV)

                                                                                 SAPSQ1.ZTABLE  ( When the program execute from CAR QA )

                                                                                 SAPSP1.ZTABLE ( When the program execute from CAR Prod).

Can anyone help me to solve this ?


Doubt regarding SAP HANA-ABAP

$
0
0

Hi Experts,

Can anybody guide what will happen to skills like BDCs, BAPIs, workflows, Smartforms,screen exits,user exits,customer exits,BADIs etc on migration to S4-HANA.

Will these skills be obsolete?Kindly guide.

 

 

Thanks,

SD

hi

Not able to open any ABAP programs in SAP Hana Studio

$
0
0

Hi,

 

An error has occurred. See error log for more details.

Method getSourceFile, argument project: the argument has an illegal value: null

 

Not able to open any programs - Updated all in Juno /Luno please help me out.

 

Capture.PNG

Create CDS view using HANA live view

$
0
0

I was working on couple of LIVE views (ex. "_SYS_BIC"."sap.hba.ecc/WorkCenterCapacity"). I converted this into external view and while trying to consume it in CDS view it's showing an generic error ( ‘An error occurred while creating view <ZXXXX> in the database.’).

 

Few more scenarios I tried:

1. While using DDIC view in CDS, it's working.

2. While converting customized HANA view to external view, I can consume the same external view to CDS without any error.

3. Even encapsulating Live view into HANA view and using that converted ext view to CDS- throwing same generic error.

 

Not sure what is the special about those external view converted from LIVE view directly or indirectly.

 

Any suggestion/comment will be really appropriated.

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.

ABAP Correction for HANA compliance

$
0
0

Hello,

I have to manually correct ABAP code for HANA compliance for 'Analysis of WHERE condition for SELECT'.

Here in the below code I have to add WHERE clause, please suggest how to find out that what can be added with the Where clause.

Actually the code is a part of a program, and I don't know how that program is working.

CODE:

SELECT * INTO TABLE lt_hfm FROM Ztf_hfm.

 

Plz ask if any clarification is needed.

 

Regards,

AMAN

What does "Currently you can only define one CDS entity per DDL source." really mean?

$
0
0

Hello HANA gurus

 

What does Currently you can only define one CDS entity per DDL source. really mean?

Can we not create more than one CDS view for a corresponding DDIC table?


Please explain. Thanks.

Meera


How to convert a timestamp to date/time in CDS View?

$
0
0

Dear experts,

 

I would like to convert a timestamp to a date and time within a CDS view.

This is what I tried to do:

 

Cast (Cast(<timestamp> as abap.dec(8,0)) as abap.dats) as <date>

 

I also thought about first converting the timestamp into a plain numerical character, then using substring and then casting it to abap.dats. Then its giving me an error that says: "dec can't be converted into numc".

 

The above written code also throws an error - "function not allowed/ no cast within a cast".

It is quite nasty not being able to write a cast within a cast - how else am i supposed to achieve a date here?

 

I am looking forward to have your answers!

 

Thanks and BR

Anja

Create CDS view using HANA live

$
0
0

I was working on couple of LIVE views (ex."_SYS_BIC"."sap.hba.ecc/WorkCenterCapacity"). I converted this into external view and while trying to consume it in CDS view it's showing an generic error ( ‘An error occurred while creating view <ZXXXX> in the database.’).

 

Few more scenarios I tried:

1. While using DDIC view in CDS, it's working.

2. While converting customized HANA view to external view, I can consume the same external view to CDS without any error.

3. Even encapsulating Live view into HANA view and using that converted ext view to CDS- throwing same generic error.

 

Not sure what is the special about those external view converted from LIVE view directly or indirectly.

 

Any suggestion/comment will be really appropriated.

CDS View - consuming HANA artifact (calculation view generated by BW)

$
0
0

Hi,

 

Can I consume a calculation view in a CDS view like below? If not, how should I then do it?

 

@AbapCatalog.sqlViewName: 'Z_Cds_Test_12345'

@EndUserText.label: 'CDS View on generated view for NCTT2000'

define view Z_Cds_Test_Nctt2000_Gen_View as select from "_SYS_BIC"."system-local.bw.bw2hana/NCTT2000" {

    CALMONTH,

    AMOUNT   

}

 

At least when I try I get an error:

Description Resource Path Location Type

Table _SYS_BIC does not exist or is not active Z_CDS_TEST_NCTT2000_GEN_VIEW (ABAP DDL Source) [D32] Z_CDS_TEST_NCTT2000_GEN_VIEW Unknown ABAP Syntax Check Problem

 

 

Thanks in advance, kr

Torben

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.

ABAP Basic Tutorials for sap HANA

$
0
0

Hi,

 

Can anyone provide me the Basic  link or documents for ABAP ON SAP HANA.

 

Regards,

ujjwal kumar

debugging AMDP authorization

$
0
0

Hello,

 

I've read some topic on SDN to figure out how to debug, what privileges should I have,
Based on authorization team I have proper roles. also following action were done:

 

grant debug on schema <SCHEMA> to <USER>

grant select on schema <SCHEMA> to <USER>

grant attach debugger to <USER>


Still I have:

"You are not authorized to attach to a connection that belongs to this HANA user"


Thank You

Regards,

Tomek

Required Documents for Sap Abap with HANA

$
0
0

Hi Guys,

 

I have 5 Years of experience in Sap Abap,I want to learn Sap Abap with HANA, can anyone help me where I can start to learn or Share pdf/documents to start working on it.

 

Thanks,

K V Kishore


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...

Call HANA Procedure via AMDP

$
0
0

Hi,

I wrote a procedure on HANA and i want to call via AMDP. As i saw from examples, developers generally writing the content of the procedure here but i wnt to call pre-written HANAprocedure via here.

Is it possible ?

 

My scenario is like that;

 

CLASS ZBPC_AMDP_TEST IMPLEMENTATION.  METHOD RUN_PACKAGE BY DATABASE PROCEDURE FOR HDB                        LANGUAGE SQLSCRIPT.
call Z_SP_TEST(:IN_A, :IN_B, :IN_C, ET_DATA  )  with overview;                         ENDMETHOD.
ENDCLASS.

I dont want to put all my select statement here and also it doesnt support local temporary tables.

Is there a way ?

*** 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

HANA secondary database connections are exhausted.

$
0
0

Hi All,

 

 

 

We are running BW application on HANA 85.02.

 

 

 

Some background job failed with  DBIF_RSQL_INVALID_RSQL dump. It showing The rescources for further secondary database connections are exhausted.

 

 

 

Please help us where to check secondary database connections details.

 

 

 

 

 

Regards,

MK

Create CDS view using HANA live

$
0
0

I was working on couple of LIVE views (ex."_SYS_BIC"."sap.hba.ecc/WorkCenterCapacity"). I converted this into external view and while trying to consume it in CDS view it's showing an generic error ( ‘An error occurred while creating view <ZXXXX> in the database.’).

 

Few more scenarios I tried:

1. While using DDIC view in CDS, it's working.

2. While converting customized HANA view to external view, I can consume the same external view to CDS without any error.

3. Even encapsulating Live view into HANA view and using that converted ext view to CDS- throwing same generic error.

 

Not sure what is the special about those external view converted from LIVE view directly or indirectly.

 

Any suggestion/comment will be really appropriated.

Viewing all 1246 articles
Browse latest View live


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