Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all 6745 articles
Browse latest View live

Error in Upgrade SAP HANA to Revision 74 from Revision 58

$
0
0

Hello Experts,

 

I have tried to upgrade my HANA Bw system from Revision 58 to Revision 74 and ended with warnings. Appreciate if any one can suggest me on how to solve this issue.

 

Warning :- SAP HANA database upgrade finished with warning, because of failed deployment of HANA content and it suggested me to check the SAP note 1795885. But the note says can ignore this warning.

 

Importing the delivery units is the last step in both installation and upgrade. If this fails your system will still be up and running.

Unless you are using HANA XS features fixing the import issues is not mandatory.

If you are using the system to develop or run HANA XS applications, try to solve these issues by repeating the import of the affected delivery units.

If the repeated import also returns with errors, further steps must be taken, depending on the nature of the errors.

 

 

Part of error msg :--

00:53:34.995 - INFO:       Output line 187: sap/hana/admin/ds/SAP_HANA_ADMIN.xsodata: code 40136: Unknown object name "sap.hana.admin.ds::COMPONENT_ALLOCATOR_HISTORY".

00:53:34.995 - INFO:       Output line 188: ACTIVATION ERROR: object: "SAP_HANA_ADMIN.xsodata", package: "sap.hana.admin.ds", timestamp: 2014-04-25 00:53:34.7220000

00:53:34.995 - INFO:       Output line 189: sap/hana/admin/ds/SAP_HANA_ADMIN.xsodata: code 40136: Unknown object name "sap.hana.admin.ds::MEMORY_OVERVIEW".

00:53:34.995 - INFO:       Output line 190: ACTIVATION ERROR: object: "SAP_HANA_ADMIN.xsodata", package: "sap.hana.admin.ds", timestamp: 2014-04-25 00:53:34.7220000

00:53:34.995 - INFO:       Output line 191: sap/hana/admin/ds/SAP_HANA_ADMIN.xsodata: code 40136: Unknown object name "sap.hana.admin.ds::SYS_TIMESTAMP".

00:53:34.995 - INFO:       Output line 192: ACTIVATION SUMMARY, timestamp: 2014-04-25 00:53:34.8940000

00:53:34.995 - INFO:       Output line 193: Finished activation phase. Starting regeneration phase now.

00:53:34.995 - INFO:       Program terminated with exit code 1

00:53:34.996 - ERR :     Error importing delivery units: regi returned exit code '1'

00:53:35.015 - INFO:   ---------------------------------------------------------

00:53:35.015 - INFO:   END: Importing delivery units  start: 00:50:48.993 duration: 00:02:46.022

00:53:35.015 - INFO:   ---------------------------------------------------------

00:53:34.996 - ERR :   Cannot import delivery unit /sapmnt/DBD/global/hdb/auto_content/ZHANA_ADMIN.tgz

00:53:35.050 - INFO:   Messages from trace files

00:53:35.040 - INFO:     indexserver_alert_hananode01.trc: [18899]{201601}[33/40477160] 2014-04-25 00:51:13.326168 e SERVER_TRACE     TRexApiSearch.cpp(19493) : invalid attribute requested _SYS_RT:_UIS_APPSITESen _CV0x7f21aaed02e0

 

 

 

Regds,

Kranthi.M

 


SAP HANA Expert Script in BW Transformation

$
0
0

Dear All,

 

Please can anyone share some resource (as well as the sample codes) around Hana Expert Script in BW Transformation (Trx Code: RSA1).

 

Many thanks,

Sen

Creating column with previous month

$
0
0

I have this model with year-month (attributes) in the rows and KPIs (measures) in the columns. A simple tabular display of the content thereby obviously shows the KPI-values / month (and other attributes).

 

What is missing - and which I cannot figure how to do - is how to create columns showing the KPI-values / previous month (i.e. month - 1). To clarify the result would thereby look like this:

                              Sales     Prev Sales

January 2014          100          160

February 2014         105          100

March 2014              110          105

...       

 

I figure it must actually be pretty easy using restricted and/or calculated columns, but just cannot figure out how to do it (maybe I ate too much for x-mas). I much appreciate hints.

SERIAL Data Type

$
0
0

Hi all,

what is the Hana way of creating SERIAL data types? One can create a sequence, but it cannot afaict be specified as the default value of a column, and I see no equivalent of Oracle's SYS_GUID. Do I have to use a trigger? I would like to import a CSV file into a table that has a serial column.

 

-- Micha

XSJS Batch Post for OData

$
0
0

Hello,

 

I'm currently working with B1 Version for HANA and try to do a post to the OData Service Layer of Business One from XSJS of Hana. So far it works for regular, single entity Post e.g.:

 

/**

* Logon to B1SL

*/

var b1slDestination = $.net.http.readDestination("test.Connector.imex", "b1sl");

var client = new $.net.http.Client();

var request = new $.net.http.Request($.net.http.POST, "/Login");

request.setBody('{"CompanyDB": "SBODEMODE", "UserName": "manager", "Password": "1234"}');

 

var response = client.request(request, b1slDestination).getResponse();

 

var logonObject = JSON.parse(response.body.asString());

var sessionId = logonObject.SessionId;

 

So, above I issue a POST to the Login of the Business One Service Layer of a demo DB from 9.1; I can then do queries against it just fine, like doing a single insert.

 

When I however want to issue an Batch-Post I suddenly hit a wall. Code is similar to this (note: I stripped down this to just 1 operation till it works), e.g.:

 

/**

* Batch Test

*/

var batchId = "batch_36522ad7";

var changesetId = "changeset_1a5324";

var batchRequest = new $.net.http.Request($.net.http.POST, "/$batch");

batchRequest.contentType = "multipart/mixed; boundary="+ batchId  +" ";

batchRequest.cookies.set('B1SESSION', sessionId);

 

 

 

 

var b2 = "--batch_36522ad7 \r\n" +

    "Content-Type: multipart/mixed; boundary=changeset_1a53241  \r\n" +

    " \r\n" +

    "--changeset_1a53241  \r\n" +

    "Content-Type: application/http  \r\n" +

    "Content-Transfer-Encoding: binary  \r\n" +

    "POST /b1s/v1/Banks HTTP/1.1  \r\n" +

    "Content-Type: application/json  \r\n" +

    "Content-Length:22  \r\n" +

    " \r\n" +

    '{"BankCode": "900001"} ' + "\r\n" +

    " \r\n" +

    "--changeset_1a53241--  \r\n" +

    " \r\n" +

    "--batch_36522ad7-- ";

 

 

batchRequest.setBody(b2);

 

var response = client.request(batchRequest, b1slDestination).getResponse();

 

Instead of any useful things I allways get:

 

{

  "error" : {
  "code" : -1000,
  "message" : {
  "lang" : "en-us",
  "value" : "Incomplete Batch Request Body!"
  }
  }
}

 

The above code should instead insert a simple Banks - entity into Business One via the Odata Service Layer. The code it produces fits the OData spec and it works if I poste the exact same data via Chrome/ Postman e.g.:

 

POST: /b1s/v1/$batch

Header: Content-Type: multipart/mixed; boundary=batch_36522ad7

 

 

--batch_36522ad7

Content-Type: multipart/mixed; boundary=changeset_1a53241

 

--changeset_1a53241

Content-Type: application/http

Content-Transfer-Encoding: binary

 

POST /b1s/v1/Banks HTTP/1.1

Content-Type: application/json

Content-Length:22

 

 

{"BankCode": "9000010"}

 

 

--changeset_1a53241--

 

 

--batch_36522ad7--

 

the result then is:

 

--batchresponse_0f32bc7e-92a1-11e4-8000-0050562b029a

Content-Type:multipart/mixed;boundary=changesetresponse_0f32bd50-92a1-11e4-8000-0050562b029a

 

--changesetresponse_0f32bd50-92a1-11e4-8000-0050562b029a

Content-Type:application/http

Content-Transfer-Encoding:binary

 

HTTP/1.1 201 Created

Content-Type:application/json;odata=minimalmetadata;charset=utf-8

Content-Length:395

Location:http://192.168.135.221:50003/b1s/v1/Banks(4315)

 

{

   "odata.metadata" : "http://192.168.135.221:50003/b1s/v1/$metadata#Banks/@Element",

   "BankCode" : "9000010",

   "BankName" : null,

   "AccountforOutgoingChecks" : null,

   "BranchforOutgoingChecks" : null,

   "NextCheckNumber" : null,

   "SwiftNo" : null,

   "IBAN" : null,

   "CountryCode" : "DE",

   "PostOffice" : "tNO",

   "AbsoluteEntry" : "4315",

   "DefaultBankAccountKey" : null

}

--changesetresponse_0f32bd50-92a1-11e4-8000-0050562b029a--

--batchresponse_0f32bc7e-92a1-11e4-8000-0050562b029a--

 

Seeing a now successful insert;

 

So, I'm rather irritated what the difference in the above code is in comparision to the manual issued post. I tried to change the line carriages to different types, but there were no differences at all (so "\n" is as good as "\r\n"); Also I somehow suspect the XSJS  $.net.http.Request.setBody() method to maybe fiddle with the content, but I were unable to trace it any further as even the debugger held nearly no useful info for the Request object as it referes to 2 layers of proto's in the debug perspective;

 

Used Version of HANA is SPS07, B1 9.1 PL02;

 

Any help upon that matter would be reall appreciated.

 

Best Regards,

 

KB

Error while executing Procedure

$
0
0

Hi All

 

I have executed the below procedure. I got the below error. My doubt is why should I used GroupBy clause from Product_Name. If I am not using Group by clause, error is thrown up.

 

 

Create Procedure "Sales-Product"."Sales"

(IN Discount Integer ,

  OUT OUTPUT_TABLE "Sales-Product"."TT-Sales") AS

  BEGIN

  VAR1 = SELECT T1.REGION_NAME,T1.SUB_REGION_NAME,T2.PRODUCT_ID,T2.SALES_AMOUNT

         From "Sales-Product"."REGION" AS T1

           INNER JOIN

              "Sales-Product"."SALES" As T2

         ON T1.REGION_ID = T2.REGION_ID;

  VAR2 = SELECT T1.REGION_NAME,T1.SUB_REGION_NAME,T1.PRODUCT_ID,T1.SALES_AMOUNT,T2.PRODUCT_NAME

         From :VAR1 AS T1

           INNER JOIN

          "Sales-Product"."PRODUCT" AS T2

          ON T1.PRODUCT_ID = T2.PRODUCT_ID;

  OUTPUT_TABLE = SELECT SUM(SALES_AMOUNT) AS SALES_AMOUNT ,

                        PRODUCT_NAME,

                        PRODUCT_ID,

                        REGION_NAME,

                        SUB_REGION_NAME

                 FROM :VAR2;

    END

 

 

Error :

SAP DBTech JDBC: [260] (at 675): invalid column name: The column 'VAR2.PRODUCT_NAME' is invalid in the select list because the GROUP BY clause or an aggregation function does not contain it: line 16 col 25 (at pos 675)

Odata Service for calculation view

$
0
0

Hi Experts,

 

I am trying to create Odata service for one calculation view, which is already available in the HANA Live.

I am getting below error message , when am trying to activate the file.Odata.PNG

 

 

Kindly suggest to eliminate this error.

 

Thanks.

Br,

Ed

Change the length of a Column

$
0
0

Hi All,

 

I have created a table with Product_Name of Length 100 and loaded the data. Now I would like the chage the length to 20. But I am getting the error. Is it like I should drop the column, again add the column with length 20 and load the data again. Is it the only way I can do. Please advise.

 

alter table "Sales-Product"."PRODUCT" alter (PRODUCT_NAME NVARCHAR(20));

 

Error: SAP DBTech JDBC: [7] (at 45): feature not supported: cannot shorten the field length: PRODUCT_NAME: line 1 col 46 (at pos 45)


about xssqlcc

$
0
0

Hi

 

I need to setup a technical user for my XS application. Everything works ok.

 

Now, I want to setup our continuous integration (CI) server when we checkout git code, deploy the code in XS, activate it and run a set of test.

 

My question is how can I associate a user to xssqlcc. Currently, I have to manual go to a /sap/hana/xs/editor, look for my .xssqlcc file and enter the user name and password. This manual setup will not work for our automation script for our CI server.

 

I was reading some discussions and experts are suggesting that we should NOT update the "_SYS_XS"."SQL_CONNECTIONS" table directly.

 

Can you help?

 

Thanks

-D

ALter the datatype of a Table type

$
0
0

Hi All,

 

I am trying to alter the length and datatype in a Table type but I am getting errors. Am I wrong somewhere I have used the same syntax which I use for table alteration. Please help.

 

alter "Sales-Product"."TT-Sales" alter (SALES_AMOUNT DOUBLE,NET_AMOUNT DOUBLE,

             SUB_REGION_NAME VARCHAR(100) , REGION_NAME VARCHAR(100))

 

Error: SAP DBTech JDBC: [257] (at 7): sql syntax error: incorrect syntax near "Sales-Product": line 1 col 7 (at pos 7)

horrible sql execution plan lead to terrible performance

$
0
0

I have a sql running against HANA rev85, in short this SQL joins 2 sub-query and create a result. each sub-query is a standalone aggregation. I expect the sub-query take place first then the join afterwards, so the small amount records are used to do the join, however the SqlViz Plan shows otherwize. It first join the physical table with some filter in place, then the aggregation at last, this lead a bad sql performance up to 1.5 hrs and only output 1.6 million records.

However, if i materialize the sub-query into a physical table at the first, then join it with fact table at last the execution time is only 3 seconds.

 

the sql statement , sql execution plan and viz plan file has been attached.

 

here are some screen shoot and analysis.

 

 

my question is, is there a way to force sql execution plan to execute sub-query first?

 

/*
CREATE COLUMN TABLE ZNMAT888 (CUSTMNO VARCHAR(50), TPFABLITY DECIMAL(20,5),  NPFABLITY DECIMAL(20,5))
INSERT INTO ZNMAT888(
SELECT CUSTMNO, SUM(PFABLITY) AS TPFABLITY,  COUNT(PFABLITY) AS NPFABLITY  FROM ZNMAT004  AS TAB  WHERE TAB.PERIO = '2014007'  AND TAB.ACNTAGE IN ( SELECT ORGANLEAF FROM ZNMAT046 WHERE ORGANTYP = '602' AND ORGANCOD = '0200' )  AND TAB.DATYPE = 'B0'  GROUP BY CUSTMNO  )
*/
SELECT '0200' AS ACNTAGE2 ,  '' AS OPTNAGE2 ,  'FTYZ0000000003' AS FACTORYID ,  'PFABLITY' AS FTYNAM_RL ,  '100' AS FACTORYWET ,  --(CASE SUM(TPFABLITY) WHEN 0 THEN '' ELSE 'PFABLITY'  END) AS FTYNAM_ST,  TAB.KEYVALUE,  MANDT,  '2014007'  AS PERIO ,    'FH_OTHER_GG' AS RULEID ,    TAB.LOBID_MAPRD,    TAB.LOBID_MACUS,  TAB.TAMBOAIAO,TAB.PFABLITY,  TAB.ACNTAGE,TAB.OPTNAGE,  TAB.ABJGTLINES,  TAB.MAKTPRO,  TAB.COBASEDPRO,  TAB.CUSTMNO,  TAB.STAFFNO ,  "GENERALACNT" ,  CASE  SUM(TPFABLITY) WHEN 0 THEN 'X' ELSE '' END AS ZIFNULL,  ROUND(1/SUM(CUSTMNUM)*(CASE SUM(TPFABLITY) WHEN 0 THEN 1/SUM(NPFABLITY)  ELSE SUM(PFABLITY)/SUM(TPFABLITY) END),14) AS ZSCALE  FROM ZNMAT004 AS TAB , --ZNMAT888 AS YINZI3,  ( SELECT COUNT(DISTINCT CUSTMNO) AS CUSTMNUM  FROM ZNMAT004  AS TAB  WHERE TAB.PERIO = '2014007' AND  TAB.ACNTAGE IN ( SELECT ORGANLEAF FROM ZNMAT046 WHERE ORGANTYP = '602' AND ORGANCOD = '0200' )    AND TAB.DATYPE = 'B0' ) AS YINZI,    ( SELECT CUSTMNO, SUM(PFABLITY) AS TPFABLITY,  COUNT(PFABLITY) AS NPFABLITY  FROM ZNMAT004  AS TAB  WHERE TAB.PERIO = '2014007'  AND TAB.ACNTAGE IN ( SELECT ORGANLEAF FROM ZNMAT046 WHERE ORGANTYP = '602' AND ORGANCOD = '0200' )  AND TAB.DATYPE = 'B0'  GROUP BY CUSTMNO  ) AS YINZI3  WHERE  TAB.CUSTMNO = YINZI3.CUSTMNO  AND  TAB.PERIO = '2014007'    AND TAB.ACNTAGE IN ( SELECT ORGANLEAF FROM ZNMAT046 WHERE ORGANTYP = '602' AND ORGANCOD = '0200' )  AND TAB.DATYPE = 'B0'  GROUP BY  MANDT,  KEYVALUE,  TAB.LOBID_MAPRD,  TAB.LOBID_MACUS,  TAB.TAMBOAIAO,  TAB.PFABLITY, TAB.ACNTAGE, TAB.OPTNAGE,  TAB.ABJGTLINES, TAB.MAKTPRO,TAB.COBASEDPRO,TAB.CUSTMNO,  TAB.STAFFNO,  "GENERALACNT"    HAVING ROUND( 1/SUM(CUSTMNUM)*(CASE SUM(TPFABLITY) WHEN 0 THEN 1/SUM(NPFABLITY)    ELSE SUM(PFABLITY)/SUM(TPFABLITY) END),14) > 0

 

SQL execution plan, shows all execution is within Column Engine

sqlplan.gif

 

 

vizplan shows that join happens before aggregation.

vizplan.gif

Error parsing PLV file

$
0
0

When I attempt to validate the performance (F8) in the 'Plan Visualizer' I get following message:

 

Any ideas what is going wrong and what I can do about it?

What's the use of $_SYS_SHADOW_$?

$
0
0

Hi all,

 

I am using datatype shorttext in a SAP HANA columnar table. Getting the corresponding details from M_CS_ALL_COLUMNS shows, that for the column with data type 'shorttext' an additional, internal column $_SYS_SHADOW_<column_name>$ exists (which by the way occupies lots of memory).

What's the purpose of this 'shadow column'? Is it always generated autmatically for shortext data type? Are there other data types which also lead to  'shadow columns'?''

 

Thanks.

Cheers, Stefan

Reg : HANA XS server issue

$
0
0

Hi,

 

We have an XS services which after the revision upgrade are
ending with errors. Sometimes with internal server error, sometimes with 500:
dispatching error and repeatedly if we trigger the same service it works. The
behavior is highly inconsistent. If the request fails, we see that the xsserver crashes.

The error that the service gives is ‘InternalError: dberror(CallableStatement.execute): 598 - failed to execute the external statement: failed to execute  at remote: peer=127.0.0.1:30203: unhandled exception at ptime/session/dist/ExternalStatementExecuter.cc:294’

  The same service works without any issues in our development
landscape whereas in production we see erroneous behavior.

The system is currently running in revision 69.

Could anyone please let me know if you have any information about this?

 

Regards,

Mayank

How to fetch ST_POINTS from table?

$
0
0

Hi,

 

Have created a column in a table, using datatype st_point. And inserted the latitude and longitude values accordingly:

 

create column table Geo (LL_POINT ST_POINT(4326));

insert into Geo values ( new ST_POINT(13.091517,80.2922916));

insert into Geo values (new ST_POINT(13.0831568,80.2827644));

 

Now, how to select a particular latitude and longitude record from the Geo table?

 

Because I can able to fetch the records using:

select LL_POINT.ST_AsWKT()  from schema.Geo;

 

 

But unable to retrive particulare records using below spatial funtions, which gives error

 

select LL_POINT.ST_AsWKT()  from schema.Geo where LL_POINT.ST_Contains( new ST_POINT(13.091517,80.2922916)) ) = 1;


Error:

Could not execute 'select LL_POINT.ST_AsWKT()  from schema.Geo where LL_POINT.ST_Contains( new ...' in 3 ms 323 µs .

SAP DBTech JDBC: [7]: feature not supported: Unsupported function: st_within() on the round earth Spatial Reference System: 4326 at function st_contains()

 

 

 

Thanks in advance!!


Open XS Application with username and password as parameters

$
0
0

Hello Colleagues,

I have an XSJS service like "/xxx/scenarios/xxx/myservice.xsjs/". I am calling this service using jQuery,ajax() in my SAPUI5 based application - that requires HANA Login credentials.

 

Like opening any other browser with user credentials, Is it possible to pass these credentials (username and password) as parameters while calling this application and not open traditional "/sap/hana/xs/formLogin/token.xsjs" to logon dialog ?

 

Something like: "/xxx/scenarios/xxx/myservice.xsjs?username=SYSTEM&pass=qwerty"

 

Regards,

Archana

HANA rev74 create 1GB indexserver log file every 3 minutes.

$
0
0


Dear all,

 

after upgrade of HANA rev69 to rev74 PL03 dedicated for SAP business one, HANA create indexserver log ile what is 1 GB big  every 3 minutes and my LOG volume go full very quickly. My LOG volume is 100 GB only.

 

I have restarted HANA engine and whole SUSE server even - result is the same - every 3 minutes 1 GB log file is creating...

ed_bk01.jpg

 

after one hour:

ed_bk2.jpg

 

listing from HANA Studio:

ed_bk3.jpg

Starange SAP HANA Studio issue while creating a calculated column

$
0
0

Dear Experts,

 

Need you help in overcoming a strange issue that I am facing in SAP HANA studio, while creating a calculated column (as part of currency conversion).  .Studio issue.jpg

As you can see in the screen shot above, the currency field is disabled and I am not able to enter/select the respective currency option and as a result of it I the OK button also disabled. Hence I am not able to proceed any further. Has anyone faced this issue before? Kindly help as I am badly stuck.

 

My Hana Studio Version is 1.80.3 and I am working on SAP HANA developer edition (1.00.80.00.391861 (NewDB100_REL)) on AWS. Any inputs would be greatly appreciated.

 

Regards,

-Prashant.

HANA Modeling: Default client setting in calculation view

$
0
0

Hi,

 

I am a HANA Live calculation reuse view (semantic setting: Data Category= <blank>, Default Client = 'Cross Client', Execute In = 'SQL Engine'), in another calculation view which has semantic settings as Data Category= Cube, Default Client = 'Session Client', Execute In = ''.

 

The data preview of the final calculation view should display the data only for the client that is specified in my user profile (under Security). However, in the output I am getting data for all the clients that are maintained in the database.

 

Any inputs around how this can be corrected?

 

Thanks,

Alston.

Best Approach: Merging Data From BW Infoprovider and HANA view

$
0
0

Hi,

 

In our report we need to merge data from two sources, viz. SAP BW infoprovider & HANA view( View is created on HANA database of ECC server, This ECC on HANA system is used as unified OLAP/OLTP system). Please note that, BW & ECC are on different HANA instances. For reporting we are using BO tools.

 

We have thought of two ways to achieve this data merge:

 

1. Exposing HANA view in BW system via VirtualProvider based on DTP & then having a MultiProvider on both the Infoproviders (BW Infoprovider & VirtualProvider of HANA view). We will create a BEx query on top of it and use it in BO reports.

2. By Creating a MultiSource universe with the two different data sources BW infoprovider & HANA view accordingly. Then creating report using this universe as a source.

 

Please suggest the best approach with reasons.

Viewing all 6745 articles
Browse latest View live


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