Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all 6412 articles
Browse latest View live

Is it possible to insert/update data into a HANA view through xsjs?

$
0
0

I have successfully exposed a flat HANA table through xsjs and I am able to delete and update records.

 

My question is, would it be possible on top of a view? (such as analytical view)


ECC HANA Upgrade - Pre migration activities on BW side

$
0
0

What list of activities are to be performed in BW side before ECC goes for HANA upgrade? Other than the normal BW queue clearing which happens during normal upgrade?

How to call a Hana Calculation View from HDB Procedure

$
0
0

Hi,

   I am implementing a hdb procedure which internally calls a Calculation view by passing a set of parameters.

One of these parameters is a variable .. defined in the procedure itself.

 

Can someone guide me on how I can call a calculation view (by passing variable parameters) from a hdb procedure.

 

 

Any help is highly appreciated.

 

 

 

Thank You.

Alekhya

$session.getUsername() works, but $.session.samlUserInfo return empty {}

$
0
0

Dear HANA developers,

 

I'm trying to get the e-mail address of the logged in user, but unfortunately the $.session.samlUserInfo is empty, so no $.session.samlUserInfo.mail for me $session.getUsername() works without a problem.

 

In the XS-admin tool I've checked SAML as the authentication method and SAPID as the identity provider.

 

What am I doing wrong?

 

Thank you,

 

Steffen

Unable to read ST_GEOMETRY Data type data from XSJS service

$
0
0

Hello,

 

I've written a xsjs service to read a table which has a column with data type ST_GEOMETRY.  While the service fetches data for rest of the fields from the table, a field with data type ST_GEOMETRY gives incorrect data as follows:

 

\u0001\u0001\u0000\u0000\u0000B`åÐ\"7d@{\u0014®GášL@"

 

Following is the code I've written:

 

"

 

var pstmt = null,

        conn;

 

 

    conn = $.db.getConnection("service1.xsjsservice::anonymous");

 

try {

    var Query = 'select * from "USER1"."TABLE1"';

    var read = conn.prepareStatement(Query);

        var rs = read.executeQuery();

     

        var resp_body = {};

        while (rs.next())

        {

           resp_body += rs.getString(1) + "\t" + rs.getString(2)+ "\t"+ rs.getString(3) ;

        }

   

        $.response.status = $.net.http.OK;

        $.response.setBody(JSON.stringify(resp_body));

        $.response.headers.set('access-control-allow-origin','*');

        $.response.contentType = 'text/json';

        return;

    }

  catch (e) {

        $.response.status = $.net.http.INTERNAL_SERVER_ERROR;

        $.response.contentType = "Data Read/html";

 

"

It produces the following result:

 

"[object Object]111\t2015-09-18 05:47:18\t\u0001\u0001\u0000\u0000\u0000B`åÐ\"7d@{\u0014®GášL@"

 

The table has following fields:

ID, Date, Location.

 

Here, column 3 gives location and hence I used rs.getString(3) to fetch location.  I tried with integer data type to fetch data but that gave error.  Also, I couldn't find relevant data type for ST_GEOMETRY in xsjs to read from table through a xsjs service.

 

Kindly help me to resolve this.

 

with Regards,

Antony Jerald.

Using Gmail To Send Email in HANA XSJS

$
0
0

Hi Experts ,

 

I am trying to send mail from HANA using gmail's smtp settings but not able to figure it out.

I have gone through the following  blogs but could not find much help.

How to send email from sap hana xs server using javascript

SAP HANA SPS 09: New Developer Features; New Core XSJS APIs

https://scn.sap.com/thread/3738248

 

Following is the smtp server settings:

smtp-gmail.PNG

 

Below is the XSJS code

 

//create email from JS Object and send  
var mail = new $.net.Mail({      sender: {address: "*******@gmail.com"},      to: [{ address: "******@gmail.com"}],      subject: "XSJS Email Test",      parts: [ new $.net.Mail.Part({          type: $.net.Mail.Part.TYPE_TEXT,          text: "The body of the mail.",          contentType: "text/plain"      })]  
});  
var returnValue = mail.send();  
var response = "MessageId = " + returnValue.messageId + ", final reply = " + returnValue.finalReply;
$.response.setBody(response);

Usually i am getting the following error

 

Error: error coulnd't establish connection (line 12 position 1 in *******/SEND_MAIL.xsjs)

 

Am I missing any step or something wrongly configured?

 

It would  be great if somebody can help me on this.

Sending Automatic Emails from sap hana

$
0
0

Hi All

 

I was working on sending emails from SAP hana. If we are sending emails from outlook account, do we have to do any configuration in our outlook account ?

Because I am unable to see the mails in my outlook account.

 

1. Sending mail from outlook to gmail(or any other) account - Working

2. Sending mail from outlook to outlook account - not working

3. Sending mail from gmail to outlook account - not working

 

SMTP configuration in HANA-XS Admin tool is also done. Here is the screenshot of the same

smtp.PNG

 

Screen shot the .xsjs file, used to send mails

 

smtp2.PNG

 

So, When I access this .xsjs file from ui5 using ajax call, I am getting a success message. Also, When I debug in chrome I am getting the response message. The following is the screen shot of the same.

smtp3.PNG

But I am not able to see the emails. I got the above response when I tried to send an email from gmail account to my outlook account.

Any suggestions on where I am going wrong ?

 

Thanks in advance

 

Meenakshi

Unable to send email from sap hana using XSDS

$
0
0

Hi Team,

 

I am getting this "error coulnd't establish connection" error when i am trying to send the mail.

 

Could please help me to resolve issue?

 

Here I have attached the snapshots

 

 

Code 1:

var mail = new $.net.Mail({

        sender: {address: "varathan.cs@gmail.com"},

        to: [{ address: "varathan.cs@gmail.com"}],

        subject: "XSJS Email Test",

        parts: [ new $.net.Mail.Part({

        type: $.net.Mail.Part.TYPE_TEXT,

        text: "The body of the mail.",

        contentType: "text/plain"

        })]

        });

        var returnValue = mail.send();

        var response = "MessageId = " + returnValue.messageId +

        ", final reply = " + returnValue.finalReply;

 

 

Code 2:

var smtpConnection = new $.net.SMTPConnection();

    responseBody+="3"+smtpConnection;

    var toAddress=[{address : "varathan.cs@gmail.com"}];

 

        var mail = new $.net.Mail({

            sender : {

                address : "varathan.cs@gmail.com"

            },

            to : toAddress,

            subject : subject,

            parts : [ new $.net.Mail.Part({

                type : $.net.Mail.Part.TYPE_TEXT,

                text : body,

                contentType : "text/plain"

            }) ]

        });

        responseBody+="4";

        var returnValue = smtpConnection.send(mail);

 

Thanks

 

Varathan A


SYS query to show all Filters in all views

$
0
0

This query works great to show me all filters on all columns for Attribute views and Analytical views, but does not show me any rows for calculated views that have filters inside of their projections.  Is there a way to do that?


Note: I filtered out the PATH* because those are not directly inside of the views themselves, but in a depended view.

 

SELECT "SCHEMA_NAME", "VIEW_NAME", "JOIN_CONSTRAINT_NAME", "CONSTRAINT_TYPE", "LOCATION", "TABLE_SCHEMA_NAME", "TABLE_NAME", "COLUMN_NAME", "OPERATOR", "VALUE"

FROM "SYS"."CS_JOIN_CONSTRAINTS"

WHERE

(

"VIEW_NAME" LIKE 'MYSCHEMA%' AND "JOIN_CONSTRAINT_NAME" NOT LIKE 'PATH_%')

Unable to open Dashboard for "Memory and Resource Utilization"

$
0
0

Hi ALL,

 

 

 

When i tried to see a dashboard for "memory overview and resource utilization", I could see only an error like "404- page not found" for this what need to be done ?

 

I need all your valuable suggestions...err1.JPG

 

after all my research i made some changes for xsengine.ini file by adding( developer and developer mode) not sure is it the way...

in some note 1978195 - XS Web Application shows only a blank page asked to add

 

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="UTF-8">

code in sap-ui-core.js but here i could see only

 

jQuery.sap.declare("sap.ui.core.Core");jQuery.sap.require("jquery.sap.dom");jQuery.sap.require("jquery.sap.events");jQuery.sap.require("jquery.sap.mobile");jQuery.sap.require("jquery.sap.properties");jQuery.sap.require("jquery.sap.resources");jQuery.sap.require("jquery.sap.script");jQuery.sap.require("sap.ui.Global");jQuery.sap.require("sap.ui.base.EventProvider");jQuery.sap.require("sap.ui.base.DataType");jQuery.sap.require("sap.ui.core.Configuration");jQuery.sap.require("sap.ui.core.ElementMetadata");jQuery.sap.require("sap.ui.core.Element");jQuery.sap.require("sap.ui.core.Control");jQuery.sap.require("sap.ui.core.FocusHandler");jQuery.sap.require("sap.ui.core.ResizeHandler");jQuery.sap.require("sap.ui.core.RenderManager");jQuery.sap.require("sap.ui.core.UIArea");jQuery.sap.require("sap.ui.core.ThemeCheck");jQuery.sap.require("sap.ui.core.Component");.....

 

where to add the given code

 

please show me a direction enable these dashboard...

 

Thank you

vijay

HANA XS and UI5 integration issue

$
0
0

hi ,

 

I am trying to connect hana cloud using eclipse.

I created a XS (xs_proj) project and ui5 (ui_[proj)project and integrated it. Now I am able to see the UI5 project contents under XS project.

...->sample-> ui-> ui_proj-> webcontent-> index.html.

 

 

Issue:

index.html under ui_proj shows the UI element properly but Index.html under XS project is blank when viewed in browser.

All codes are present in index.html.

 

Please help me with this issue.

 

Thanks and Regards,

Sajith

where to download sap hana client

$
0
0

I can not find any link to download sap hana client now.

Can anyone give a link to it?

failure in connecting hana studio with hana server

$
0
0

After I enter the hostname and user name & password for adding system. This error shows up:

 

this system is not reachable, login data could not be considered

getMetaData is not a function problem

$
0
0

Hi everybody,

 

When a call getMetaData() in a xsjs file i receive the following error: getMetaData is not a function.

 

           var rs=cstmt.execute();

          var metadata = rs.getMetaData();

 

Anyone knows how to fix it?

SQL Analytic Privilege

$
0
0

Hi,

 

In the Apply Privilege Property of any Information view (In View Properties Tab), there exists two options

  • Analytic Privilege
  • SQL Analytic Privilege

 

When I select SQL Analytic Privilege and activate the view it gets activated. But when I do Data Preview it throws error.

Could some one explain what does SQL analytic privilege mean?

 

Regards

Monissha


Database Triggers VS Procedures performance for specific column updates in HANA.

$
0
0

hi all,

 

wanted to know that which method between triggers and procedures will be more suitable for below requirement so please share your views:

 

 

Requirement: To capture the specific column update or insert in a table(main table) into another table(log table).

Information to be captured is old value ,new value,username ,date and time of update or insert.

 

 

Important Note:The table is going to be huge table may have approx 10 to 20 million records after one year.

Procedure in Calculation View

$
0
0

Hi

 

 

I have a procedure which will delete the rows from table and insert data from another table.

 

I want to use this procedure in calculation view, i have tried but am getting an error message saying that "CALL for non read only procedure/function is not supported in the READ ONLY procedure/function"

 

How to achieve this? do we have any other option?

CE functions!!!!

$
0
0

Hello Everyone......

 

I am pretty much comfortable with Views in SAP HANA. But the thing that interferes me is whats the point of using CE functions for  Calculation view when we have graphical. That would be great if someone can explain use of CE functions in real time scenarios.

store last value

$
0
0

Hi,

 

I have a calculation view where some of the material standard price is not displaying while taking year/ month in the report.

 

if the user drag year/month, then few rows are showing blank for Standard price. User want to see the last value for those blank cell ( last value ).

 

EX. if Feb month no standard price is there , Jan month standard price ( 100 ) will come for next couple month till new value came.

 

Materialplantmonth yearStandard Price
ABCUSA201501100
ABCUSA201502last value ( 100)
ABCUSA201503last value ( 100)
ABCUSA201504last value (100)
ABCUSA20150540
ABCUSA201506last value
ABCUSA201507last value
ABCUSA20150880
ABCUSA201509last value
ABCUSA20151060
ABCUSA201511last value

 

 

User want  as below:  100 should be display for Feb , Mar ....etc

 

Materialplantmonth yearStandard Price
ABCUSA201501100
ABCUSA201502100
ABCUSA201503100

 

Regards,

Kamruz

Workaround to call procedure within trigger.

$
0
0

Hi everyone,

 

I need to copy data from first table to the second one after new records are inserted in the first one. The code also checks if the records already exists and terminate process if they do. I developed and test the appropriate procedure - everything worked ok, untill I tryed to call this procedure from trigger. As you know it is forbidden in HANA. Therefore I inserted the procedure body in the trigger, however Hana started "crying" for almost each line of code which were compiled fine in the procedure.

 

So, is it any workaround for such situation?

Regards, Evgeny.

Viewing all 6412 articles
Browse latest View live


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