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

HANA NCLOB > UTF8 or UTF16?

$
0
0

Hey Lars Breddemann

 

Following your responses on this thread (https://scn.sap.com/thread/3290466) I wondered if you know what encoding HANA is using for storing data inside an NCLOB, UTF8 or UTF16? I would assume the latter, however did not found any written proof in the documentation so far, I only read "unicode", which both is IMHO.

 

Thanks & Best,

Martin


Introducing hands-on video tutorials for XS Advanced

$
0
0

Hi,

 

You already heard about SAP HANA extended application services (XS) advanced model and how it represents an evolution of the application server architecture within SAP HANA by building upon the strengths (and expanding the scope) of XS classic model?

 

You've likely already read the excellent blogs about this exciting new capability posted recently by Thomas Jung?

 

So you're now itching to get started and "have a play" with XS Advanced - but aren't quite sure where to start?

 

As you probably know, the SAP HANA Academy produce hands-on video tutorials for all things HANA (as well as HCP and sometimes beyond).


I'd like to introduce our first playlist to cover XS Advanced. With almost two hours of content, the tutorials cover everything from a chalkboard overview of the new architecture, to downloading and installing the developer client tools, to writing and deploying example XS Advanced applications. The series covers SAP HANA Deployment Infrastructure (HDI), user authentication, and how to develop and deploy server side business logic using xsjs as well as creating OData services.

 

Here are direct links to all of the videos published so far:



Alternatively, here's the main playlist on YouTube: SAP HANA Academy - XS Advanced


The code samples used in the videos are available here: https://github.com/saphanaacademy/XSA


Finally, if you're interested in other stuff that's new in HANA for SPS 11 check out the following playlist: SAP HANA Academy - What's New in SPS 11


Your feedback is most welcome – below, tweet me @pmugglestone or mailto:HanaAcademy@sap.com.


Have fun,


Philip

Retrieve data from calling stored procedure using "EXEC" command

$
0
0

Hi,

 

    I am trying to execute the stored procedure dynamically using EXEC command inside another procedure. Here my doubt is how to retrieve the result after dynamic call of procedure. Please help me on how to retrieve the result of stored procedure.

 

Here "SYSTEM"."ZPERIOD_TEST" is temporary global table.

 

 

CREATE PROCEDURE test_procedure(out lt_data1 tt_data )

  LANGUAGE SQLSCRIPT

  SQL SECURITY INVOKER

  DEFAULT SCHEMA SYSTEM AS  

BEGIN

/*****************************

  Write your procedure logic

*****************************/

      declare lv_sql nvarchar( 1000);

     

          lv_sql := 'CALL "_SYS_BIC"."Example.First_work/test_period"( lt_data )';

    

          EXEC :LV_SQL;

    

     LV_SQL := 'INSERT INTO "SYSTEM"."ZPERIOD_TEST" SELECT * FROM :lt_data';

     EXEC :LV_SQL;

    

     lt_data1 = select * from "SYSTEM"."ZPERIOD_TEST";

    

END;

 

i got below error when calling above procedure

 

Could not execute 'call "_SYS_BIC"."Example.First_work/test_procedure"( lt_data1 => ? )' in 326 ms 61 µs .

SAP DBTech JDBC: [1281]: wrong number or types of parameters in call:  [1281] "_SYS_BIC"."Example.First_work/test_procedure": line 23 col 11 (at pos 963): [1281] (range 3) wrong number or types of parameters in call exception: wrong number or types of parameters in call: Physical table is not allowed in OUT table variable position: LT_DATA: line 1 col 51 (at pos 50)

 

Thanks,

Venkatesh

How to achieve Parallelism in Stored Procedures

$
0
0

Dear All,

 

We have a case where we need to validate some business rules which will be passed dynamically as parameters by the HANA XS Server. We are planning to write a stored procedure to perform the rule validations. There are about 15 rules and each rule need to be validated for an Product,store combination which on an average will have 400,000 records. We would like to use the parallel processing capabilities of HANA and would like to know how to achieve it. I have read in some earlier posts that using cursors and looping through each record will not yield parallelism.

 

Also please let me know if we can call procedures in Parallel from the XS server to achieve this.

 

Regards,

Kishore

Transform table data into json or xml format in SAP HANA SQL Script

$
0
0

Hi All,

 

         I have requirement of converting table data into json or xml format using SQL Script. If it is possible please paste the sample code.

 

 

Thanks,
Venkatesh

Met error when trying to use $.db.ResultSet to convert decimal array returned by SQL query

$
0
0

Hi,

 

I met a issue when trying to create my own XS app. Basically, the app tries to do some SQL query and convert returned results to JSON, and one column of returned table from SQL query is "decimal array", I tried to call one of the functions from class $.db.ResultSet to extract data in that decimal array, but it seems like all functions could not do the work.

 

XS engine log says:

InternalError: dberror(getNString): 592 - not supported type conversion: at ResultSet' Convert() (line 45 position 1 in /testload1/tatest.xsjs)

 

getNString is the function I called and I also tried all other functions in ResultSet class.

 

The SQL statement in my app called a SQL function "TM_GET_RELATED_DOCUMENTS" and several of returned columns are "decimal array". Please find this function's document here:

SAP HANA SQL and System Views Reference - SAP Library

 

I put code I wrote here:

var con = this.connection.prepareStatement( "SELECT * FROM TM_GET_RELATED_DOCUMENTS( DOCUMENT ' sap' LANGUAGE 'EN' MIME TYPE 'text/plain' SEARCH \"FILECONTENT\" FROM \"SYSTEM\".\"TATEST\" RETURN PRINCIPAL COMPONENTS 3 CORRELATION TOP 5 ) ");
con.execute();
var list = [];
var result = con.getResultSet();
while(result.next())
{     list.push({     rank : result.getNString(1),     total_term_count : result.getNString(2),     correlatetions : result.getNString(3) //Error happens here      // more properties..     });
}        return list;

 

Does any of you guys know anything about "decimal array" data type and how to extract it by XS APIs or other javascript code?

How to make unique value

$
0
0

hi,

 

I have the following issue, i have a measure wich must to be agreggate, but just in one case must to be the same independent of the dimension. for example:

 

 

must to be 1 always whatever it is include the dimension(CC or CL) or not

Screenshot_1.pngScreenshot_2.png

 

Thanks

XS engine hangs out on "network read"

$
0
0

Hi,

 

 

I've developped a sap ui5 project on top of xs engine in order to browse our data.

Everything working fine on HANA SP7.

 

 

 

But sometimes, when i'm trying to get data with xs js script or when i'm refreshing the model, the xs engine server hangs out.

In the Performance tab in hana studio, i can see that the current thread is blocked with the status "Network Read"

 

 

 

Have you heard about this issue ?

Can it be fixed ?

 

 

Regards


Diffence between c_hanaimp151 and c_hanaimp141 certifications

$
0
0

Hi Expects ,

 

 

Can anyone explain me what is the difference  between the c_hanaimp151 and c_hanaimp141.

I am planning to attempt Associate certification in SAP HANA . Do i need to choose anyone of these two ?

Or they have  any validity ?

 

 

Thanks

Is it possible to do POST (insert) on HANA using oData service from XS?

$
0
0

Hi Experts,

Can we do POST/PUT/DELETE on HANA using oData (XS engine)?

If Yes, can you please share some sample?

 

Regards

Rohith

SFDC lightning connect with HANA

$
0
0

Hello,

 

  Does any one know how SAP HANA OData services works with SFDC lightning connector.  I don't have any luck to find information related to this.

 

Thanks

Mohan

BODS for SAP HANA

$
0
0

HI All,

 

is there any videos available or any document available for using BODS with SAP HANA.

 

can someone help me out please.

How can I get the number of week (of quarter) in a Date in sap hana modeling?

$
0
0

Hi,

 

I need to calculate number of week of quarter for a given date in sap hana graphical modeling.

for example: the given input is year - 2015 quarter - Q2 and I have a column in my cal. view as 20.08.2015.

 

Now I should a get the week number of quarter Q2 of year 2015 for 20.08.2015 is : 8.

 

Can anyone suggest me the logic to be implemented to calculate the above logic.

 

Thanks in advance.

 

Regards,

Ramana SBLSV.

SAP HANA Live Authorization Assistant does not found package

$
0
0

Hi all,

 

I want to create an Analytic Privilege with the help of the SAP HANA Live Authorization Assistant. I installed the assistant correctly and generated AnalyticsMetaData for my view. However, after I clicked on AnalyticsAuthorization-> Generate Analytic Privileges and I want to select a Package to store analytic privileges it says "no packages found". When I click on change it still says no packages found.

 

APScreenshot.png

However, if I select the View I want to create an AP for and click through the dialogs it creates the user-specific role for that AP, but does not create the AP and throws the following error: Folder does not exist

 

AP ERROR.png

 

I also replicated the following tables: UST12, USRBF2, AGR_1016 and I also have the roles. SYS REPO user has SQL Execute privilege REPOSITORY_REST with Grantable to others option selected. My user also has import/export privileges and granted roles: AnalyticalAuthorizationAdministrator, AnalyticalAuthorizationDeveloper


It would be amazing if somebody could help out.


Thanks and best regards,


Manuel

SPLASH - providing valuable feedback

$
0
0

In this blog post, I wanted to share my experience with using the SPLASH tool, specifically how to create a Study. The reason I wanted to share this is because in the several projects I have worked on this year as well as in others in the past, I have had live demo sessions which are effective, however, I believe that SPLASH Survey's would have saved me some time in development prior to the demo itself. A few times in the demos, the feedback we received was minor but crucial to the UAT. Further, I think that if I had used a tool such as Splash prior to the demo, I would have been at a better place and saved a few days of development for those minor, cosmetic things that usually the Business is not content with but require more iterations from the developers to tweak.

 

First of all, It is important to know that BUILD and SPLASH are currently not for GA - I had to create a beta account at https://www.experiencesplash.com/splashapp/ and provide my information in order to receive access to the beta version of the tool. I am very impressed with what is there so far!

 

Once I created an account and acknowledge the confirmation email, I was able to start on my first SPLASH project. I selected the Study (Survey) because as I mentioned before, It is something we (developers) have to on every project and get feedback from business. It does not matter which technology it is or even what field you come from. Getting feedback is a very important and fundamental step on successful project deliveries.

 

here are the steps to create a survey and send out the link for users to provide feedback.

1) create project

createProject.JPG

2) create survey

createSurvey.JPG

3) provide title for survey

surveyTitle.JPG

4) upload some screenshots - In my case I am using people here but it could be wireframes or actual project screenshots

 

(drag and drop into screen - I have hidden the faces of some people purposely)


photos.JPG

5) once pictures are uploaded, publish - notice that if survey is published, then it cannot be edit.

6) once published, SPLASH will provide a link that can be sent out to access the study or also you can provide email addresses that will receive the survey.

 

 

after receiving the survey, I provided some feedback for some of the pictures, such as the ones below


sam.JPG


thomas.JPG

 

 

 

as seen on these screenshots, I have provided some feedback and also within the feedback you may be able to see the comment as well as the icon (face) to see the mood of the comment.

 

more than just sending out surveys, I believe this tool has more to offer such as advanced feedback prior to finalizing a project, mood feedback based on some of the icons, and most importantly, this tool could be used for more than just SAP projects. I think we have received a great tool to get feedback on reporting, DB artifacts, UIs, etc. This tool is very easy to use and follow for non-technical users as well as if we needed to provide feedback from tech leads into the development team.

 

 

I look forward to hearing from others, how they are using SPLASH and hopefully others can also benefit from this small post.


Bulk Activating CVs

$
0
0

In HANA Studio, I am able to select a bunch of Calculation Views in the System menu, right click and 'Validate'.

The Job Log whirs away 'Running..'  and all of my CVs are validated.

However, try the same thing but selecting 'Activate' instead of  Validate, and I am presented with 'There are no inactive objects....'   which is of course, a complete lie !

 

Anyone else come across this issue ?  Have a solution ?  know if it's a recognised issue ?

 

Many Thanks

"Error when connecting to system" or "Invalid Username or Password" with HANA Studio

$
0
0

If you are getting error message(s) with the HANA Studio (on Cloudshare desktop image) to the HANA DB after you enter the correct username or password:

a. "Error when connecting to system":

     ErrorWhenConnecting.JPG

b. "Invalid Username or Password":

     InvalidUser.JPG

 

The issue seems to be caused by a corrupted secure storage file.

As a workaround, please follow the following steps:

1. Delete your HANA connection on the Navigator tab in HANA Studio, and then close the HANA Studio.

2. Open windows explorer, and navigate to C:\Users\Administrator folder on your Cloudshare desktop.

3. Find the folder ".eclipse" and rename it to "OLD.eclipse":

     eclipse_folder.jpg

4. Open your HANA Studio and set your HANA DB Connection again. You will be prompted to set the password reminder for secure storage file. You can choose "No".

5. After that, the new ".eclipse" folder and the new secure storage file will be recreated.

6. Close and re-open your HANA Studio, to verify that the workaround fixed the connection issue.

 

Regards,

Ferry

Return Messages to SAP UI5 using XSODATA Services

$
0
0

Hi Experts,

We have created a user registration screen and are using ODATA services to post the entry in HANA. In case, the email entered by user already exists in the database we would like to send back a message to UI stating "Email Already Exists". While debugging the message is available in browser console but we are not to able to capture it from ERROR CALL BACK Function.

 

SERVICES:


service {

 

    "ABC_PE.TABLES::DM_CUSTOMER_REG" as "REGN"  

  

//    key generate local "ID"

    create using "ABC_PE.Procedure_Demo2::User_Regn"

    update forbidden

    delete forbidden;

}

 

PROCEDURE:


CREATE PROCEDURE "ABC"."ABC_PE.Procedure_Demo2::User_Regn" (IN ip "ABC"."ABC_PE.TABLES::DM_CUSTOMER_REG",

                                                         OUT op "ABC"."ABC_PE.STRUCTURE::error" )

    LANGUAGE SQLSCRIPT

    SQL SECURITY INVOKER AS

--    DEFAULT SCHEMA "IEVCS"

--    READS SQL DATA AS

      

    ls_UserName             VARCHAR(60);

    ls_Email             VARCHAR(60);

    ls_Password             VARCHAR(60);

    ls_SecurityQuestion  VARCHAR(100);

    ls_Answer             VARCHAR(100);

    ls_Regn_Date         DATE;

    ls_ConfirmEmail         VARCHAR(60);  

    ls_ConfirmPassword     VARCHAR(60);

    ls_FirstName         VARCHAR(60);

    ls_LastName             VARCHAR(60);

    ls_AddressLine1         VARCHAR(60);

    ls_AddressLine2         VARCHAR(60);  

    ls_City                 VARCHAR(60);

    ls_Province             VARCHAR(60);

    ls_PostalCode         VARCHAR(60);

    ls_MobilePhone         VARCHAR(60);

    ls_WorkPhone         VARCHAR(60);

    ls_VIN                 VARCHAR(20);

    ls_DRParticipant     VARCHAR(10);

    ls_CarModel             VARCHAR(15);

    chk_email             VARCHAR(60);

    COUNTER                 VARCHAR(2);

      

BEGIN

/*****************************

    Write your procedure logic

*****************************/

chk_email := 123;

SELECT "UserName",

        "Email",

        "Password",

        "SecurityQuestion",

        "Answer",

        "Regn_Date",

        "ConfirmEmail",

        "ConfirmPassword",

        "FirstName",

        "LastName",

        "AddressLine1",

        "AddressLine2",

        "City",

        "Province",

        "PostalCode",

        "MobilePhone",

        "WorkPhone",

        "VIN",

        "DRParticipant",

        "CarModel"

INTO      ls_UserName,

        ls_Email,

        ls_Password,

        ls_SecurityQuestion,

        ls_Answer,

        ls_Regn_Date,

        ls_ConfirmEmail,  

        ls_ConfirmPassword,

        ls_FirstName,

        ls_LastName,

        ls_AddressLine1,

        ls_AddressLine2,  

        ls_City,

        ls_Province,

        ls_PostalCode,

        ls_MobilePhone,

        ls_WorkPhone,

        ls_VIN,

        ls_DRParticipant,

        ls_CarModel

FROM    :ip    ;

 

SELECT COUNT("Email")

INTO    COUNTER

FROM   "ABC"."ABC_PE.TABLES::DM_CUSTOMER_REG"

WHERE  "Email" = :ls_email;

 

 

IF COUNTER <> 0 THEN                   

        SELECT "Email"

        INTO    chk_email

        FROM   "ABC"."ABC_PE.TABLES::DM_CUSTOMER_REG"

        WHERE  "Email" = :ls_email;

 

END IF;

 

 

 

 

 

        IF :ls_email = :chk_email  THEN

            op    = select  401                                  as http_status_code,

                           'email already in use'                 as error_message,      // This message is seen in browser console

                            ''           as detail

                     from dummy;       

          

      

        ELSE

 

             INSERT INTO "ABC"."ABC_PE.TABLES::DM_CUSTOMER_REG"

             VALUES                                           ("IEVCS"."CUSTOMERID".nextval,ls_UserName,ls_Email,ls_Password,ls_SecurityQuestion,ls_Answer,current_date,ls_ConfirmEmail,  

                    ls_ConfirmPassword, ls_FirstName, ls_LastName, ls_AddressLine1, ls_AddressLine2, ls_City, ls_Province, ls_PostalCode,

                    ls_MobilePhone, ls_WorkPhone,ls_VIN,

                    ls_DRParticipant,

                    ls_CarModel);

                                  

        END IF;      

      

END;

 

SAPUI5 ERROR CALL BACK AND SUCCESS CALL BACK


Function a (oEntry){

 

odataModel.create("/REGN", oEntry, null, that.successMsg, that.errorMsg);

 

},

   successMsg: function(evt) {

sap.ui.commons.MessageBox.alert("Resigtration successful");

var router = sap.ui.core.UIComponent.getRouterFor(this);

router.navTo("Login",null,false);

    },

    errorMsg: function(evt) {

var c = evt.responce.statusCode;

var d  = evt.responce.statusText;

 

        sap.ui.commons.MessageBox.alert("Resigtration failed");

    },


For Console Error Please find the attached screen shot.

How to capture the error message "email already exists" from errorMsg call back function ?


Thanks

Madhusudan

ngdbc.jar redistribution

$
0
0

The ngdbc.jar driver file is free to download (with the HANA eclipse plugin).

Is it possible to redistribute it with own software and make it available for download on another server than SAP?

For example some database browsers like DBeaver permit to download jdbc drivers for many RDBMSs from their own servers.

installComponent with sidadm user is not implemented

$
0
0

Hi Guys,



 

I am unable to install SAP HANA server on redhat 6.5 Operating System due to below error



 

13:09:22.660 - ERR :   Installation failed

13:09:22.573 - INFO:   Installing components...

13:09:22.582 - ERR :   installComponent with sidadm user is not implemented

13:09:22.586 - INFO:   Installing SAP HANA Database failed

13:09:37.630 - INFO:   Summary of critical errors

13:09:22.660 - ERR :     Installation failed

13:09:22.582 - ERR :       installComponent with sidadm user is not implemented

13:09:22.582 - ERR :     installComponent with sidadm user is not implemented


-----------------------------------------------------------------------------------------------------------------------------


bash-4.1# ./hdblcmgui

No protocol specified

11:44:52 AM: Error: Unable to initialize GTK+, is DISPLAY set properly?

SAP HANA Installer Runtime Error:

perl compilation error (loading LCM::Gui::App::LCMGuiApp):

cannot load wxWidgets properly: cannot open display

BEGIN failed--compilation aborted at SDB/Install/App/Gui.pm line 6.

BEGIN failed--compilation aborted at LCM/Gui/App/LCMGuiApp.pm line 6.

 

 

please help above two errors.





Thans,

Ramesh P

Viewing all 6745 articles
Browse latest View live


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