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

Re: Sending Automatic Emails from sap hana

$
0
0

Hi Meenakshi,

 

I am "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

 

 

 

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;

 

 

Thanks

 

Varathan A


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

Re: Unable to open Dashboard for "Memory and Resource Utilization"

$
0
0

I facing exactly the same issue and have checked all what Vijay has done.

I have the system user privilege having admin access working on SP7 . All the tabs are working except the Open dashboard one which shows the same error message of resource not found. Would be helpful if we have any solution.

 

Thanks

Ashwini

Re: where to download sap hana client

Re: failure in connecting hana studio with hana server

$
0
0

Hi Ann,

 

Are you using AWS ?.. If yes check if your instance is on.

 

Verify your hostname & instance no. as well..

 

-Avinash

Re: getMetaData is not a function problem

$
0
0

Hi Alin,

 

Looks like your query is not prepared correctly and while executing it fails to store data in resultset (rs).. i.e the cstmt.execute() statement is failing..

 

I tried an example and it worked for me..

 

var id = $.request.parameters.get("id");

var emp_id,name;

var dConn = $.db.getConnection();

try{

var sql = "SELECT * FROM \"AVIR11\".\"EMPLOYEE\""

   +" WHERE ID = ? ";

var pstms = dConn.prepareStatement(sql);

pstms.setInteger(1,parseInt(id));

 

var rs = pstms.executeQuery();

var metadata = rs.getMetaData();

while ( rs.next())

{

  emp_id = rs.getInteger(1);

  name = rs.getString(2);

}

var output = {

  "id":emp_id,

  "name":name,

  "metadata":metadata

};

dConn.close();

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

}

catch(e)

{

    $.response.setBody(e.message);

}

 

-Avinash

Re: SQL Analytic Privilege

$
0
0

Lars Breddemann,Monissha AgilThomas Jung

 

Do we have any solution for this. We are also having same issue where we just changed analytic privilege to 'SQL Analytic Privilege' and the data preview throwing error as 'Insufficient Privilege'.

 

The same thing has been tried with SYSTEM user however the issue remains same.

 

Are we missing any privileges?

 

Regards,

Venkat N.

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?

Re: Using Gmail To Send Email in HANA XSJS

$
0
0

I tried with gmail and office365 but was not able to send mail

Re: Procedure in Calculation View

$
0
0

Hello Hariharan,

 

as the error message says, it is not possible to use a write procedure within a calculation view, because a calculation view is intended to read data. So within a calculation view you have no chance to write data.

 

What is the goal you wanna reach? Would it be possible just do it with procedure? Why a calc. view is necessary?

 

Best Regards,

Florian

Re: Workaround to call procedure within trigger.

$
0
0

Hi,

 

why don't go for trigger itself instead of calling procedure from the trigger.

it will work and suitable for your requirement.

let me know if u need sample code or any other help.

 

cheers,

Akash.

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.

Re: Workaround to call procedure within trigger.

$
0
0

Hi,

 

Have you defined primary keys in your respective tables?

 

Br

Sumeet

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

$
0
0

Hi ,

 

I think its already discussed, You can achieve with the help of triggers.

 

I will try to replicate in my own system with large no of records.

 

Can you please tell me how your base table looks like?

 

Br

Sumeet


Re: CE functions!!!!

$
0
0

Hi Sandeep,

 

this is a more indirect answer to your questions: you should not use CE functions anymore as discussed in the blog post Calculation Engine (CE) Functions - Rest in Peace | SCN.

If you are using scripted calcualtion views you should go for plain SQL as you can always achieve the same result without need to switch to CE functions

 

Hope that helps.

 

BR

Christian

Re: couldn't connect to hanatrial.ondemand.com

$
0
0

I am having the same issue.  I have Eclipse Mars.   I have downloaded the Java Web.  Which version of SAP HANA Cloud Connector do I need  -- Window or Windows (Developer).  For SAP JVM, there are three versions for Windows, which one do I download?

Thanks.

Sandy

Re: couldn't connect to hanatrial.ondemand.com

$
0
0

Hello Sandy,

 

what is your goal? To connect only via Eclipse to HCP or do you wanna also use the console client and/or develop Java Applications? In the first case, just the cloud tools from the repository are necessary I posted in my first answer (you have to install them via the "Add Software" mechanism in Eclipse).

In case you wanna use e.g. the Console Client or develop Java Applications you need the Java SDKs (as you mentioned e.g. Java Web). But that is the second step after the intalling the cloud tools.

 

The SAP HANA Cloud Connector is only necessary in case you wanna connect something from your OnPremise Landscape (e.g. an OData service from an ABAP backend). It is not necessary for the connection of Eclipse to the HCP.

 

Regarding the SAP JVM you can download the version you wanna use. By default I would use the newest version, but because of some pre-conditions regarding your system or applications you wanna develop a lower version could be necessary.

 

At the moment instead of Mars I would still use Luna, cause not all tools (like the HANA Tools) are released yet for mars. So if you wanna e.g. also use HANA specific features of the HANA instance in the HCP, it is not officially supported for Mars. Check the overview on page SAP Development Tools for Eclipse for the current status and updates.

 

Best Regards,

Florian

Re: HANA XS and UI5 integration issue

$
0
0

Hello Sajith,

 

what code is contained in your index.html file within your XS project. Does it contain also some UI elements? What do you wanna reach with that index.html? Did you check the browsers error console for any hints?

 

Best Regards,

Florian

Re: Using Gmail To Send Email in HANA XSJS

$
0
0

Hello Pinaki,

 

port 25 for smtp.gmail.com is not supported anymore. You have to use 465 for SSL or 587 for TLS.

 

For both cases you have to change also Transport Security Setting from "None" to "SSL/TLS".

Depending on your account setup the trust store configuration can be necessary too.

 

What also has to be checked is, if your HANA system can connect on network level to the SMTP server (maybe e.g. some firewall settings do not allow that).

 

If your system is behind a proxy, you also have to specify the proxy information in the HANA SMTP configuration.

 

Best Regards,

Florian

Viewing all 9165 articles
Browse latest View live