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

Re: Accessing data cubes from Excel

$
0
0

It's difficult to help you without having more information.  For example what do you mean by everything messes up exactly?  Is it aggregating numbers that you did not expect to aggregate for example?  Screenshots of studio preview vs excel preview could also help.

 

-Patrick


Re: How to catch 403 Forbidden Error and show a popup message?

$
0
0

Any more suggestions here?? It will be really appreciable..

Is the Update and Delete working in XSODATA CRUD SP6 or above?

$
0
0

Hi All,

 

I have been experimenting with the web-based development workbench for SAP Hana based on the following and the youtube video of Thomas Jung:

 

"Develop Your First SAP HANA Native Application

on SAP HANA Platform Using the SAP HANA

Web-based Development Workbench

Version 1.1 | March 2014 | Bertram Ganz, Jens Glander | SAP AG"

 

I then wanted to extend it to try the "Update" and "Deletion" extension of the XSODATA.

 

Thus, my data model:

 

namespace dev.devuser00.perslist.data;

@Schema: 'devuser00_perslist'

context mymodel {

type SString: String(60);

@Catalog.tableType: #COLUMN

Entity person {

key ID: String(10); // element modifier 'key' defines that ID is primary key

FIRSTNAME: SString;

LASTNAME: SString;

};

 

context procedures{

    type pers {

        ID: String(10);

        FIRSTNAME: SString;

        LASTNAME: SString;

    };

 

    type persNames {

        FIRSTNAME: SString;

        LASTNAME: SString;

    };

 

    type errors {

        HTTP_STATUS_CODE : Integer;

        ERROR_MESSAGE : String(100);

        DETAIL : String(100);

        };

    };

 

 

};

 

My XSODATA: person.xsodata

 

service {

"dev.devuser00.perslist.data::mymodel.person" as "Persons"

create using "dev.devuser00.perslist.procedures::createPerson";

update using "dev.devuser00.perslist.procedures::updatePerson"

delete using "dev.devuser00.perslist.procedures::deletePerson";

          }

 

The service is not activated because of the update procedure (Even when bypassing the update, the delete does not work):

Error while activating:

Invalid procedure or parameter list in procedure "dev.devuser00.perslist.procedures::updatePerson".


Here is the update procedure:


PROCEDURE

    "devuser00_perslist"."dev.devuser00.perslist.procedures::updatePerson" (

        IN intab "devuser00_perslist"."dev.devuser00.perslist.data::mymodel.procedures.persNames",

        OUT outtab "devuser00_perslist"."dev.devuser00.perslist.data::mymodel.procedures.errors"

    )

    LANGUAGE SQLSCRIPT

    SQL SECURITY INVOKER

    DEFAULT SCHEMA "devuser00_perslist"

    --READS SQL DATA AS

    AS

begin

 

 

declare lv_firstname string;

declare lv_lastname string;

 

 

select FIRSTNAME, LASTNAME into lv_firstname, lv_lastname from :intab;

 

 

if :lv_lastname = '' then

    outtab = select 500 as http_status_code,

        'Invalid last name ' || lv_firstname as error_message,

            'No Way! Last name field must not be empty' as detail from dummy;

else

    update "dev.devuser00.perslist.data::mymodel.person"

        set FIRSTNAME = lv_firstname, LASTNAME = lv_lastname

        where LASTNAME = lv_lastname;

end if;

 

 

end;

 

I have also attached the perslist.controller.js, the perslist.view.js and the index.html.

 

I am in SP 7.

 

Can anyone plase have any clue ?

 

Many thanks in advance.

Re: Is the Update and Delete working in XSODATA CRUD SP6 or above?

$
0
0

Off hand I don't think the interface on the update procedure is right. If I remember right, you have to have the table structure on the in and out parameter. However if you are on SPS07 I would really recommend XSJS exits instead of SQLScript ones. They were new in SPS07.  Generally the XSJS exits are better suited to the kinds of processing you would do in XSODATA exits. Plus the interface is more flexible than procedure exits. Even if I do my transactionality in procedures, I still just call those from XSJS exits in XSODATA.

Re: Calc view - input parameter

$
0
0

Hello Experts,

 

Is there a way to pass the parameter value in runtime to the same scenario above ?

 

Thanks

Re: XSJS service for Parameterised Hana View

Re: SAP HANA scripted view  vs stored procedure

$
0
0

Hmmm really strange behavior this 30min/3min difference.

 

Take a look on _sys_bic schema, procedure and you may find your script view with name posfixed with "/proc" and execute it.

 

Give a try on running the runtime procedure created if it finish in 30min or 3min.

Maybe this can add more light on this scenario.

 

In what revision you are running? Do you have a chance to test in another revision? It's a new one ?

 

Regards, Fernando Da Rós

How to include HANA tables into package and delivery unit

$
0
0

Hi Experts,

 

How can I include HANA tables into a package, so that I can assign it to delivery unit together with data models and download to local PC?

(Include tables and data models in one package and download to local by delivery unit)

 

Thanks!


Re: How to include HANA tables into package and delivery unit

$
0
0

Hi Carlos,

 

you can create your tables within a SAP HANA Native Development project (XS project) using hdbtable files or with Core Data Services (hdbdd; since SP5). The project and the files are assigned to packages of course.

 

For more information please have a look to the Developer Guide (http://help.sap.com/hana/SAP_HANA_Developer_Guide_en.pdf):

- Chapter 4.1 (regarding CDS)

- Chapter 4.2 (regarding hdbtable)

- Chapter 3.3 (regarding XS projects)

 

Just for information: On https://open.sap.com at the moment the course "Next Steps in Software Development on SAP HANA" is running. The units of week 1 and week 2 are very helpful regarding your questions.

 

Best regards,

Florian

OpenSAP: Schema created on project tab view not appearing in system tab view

$
0
0

Hello All,

 

I am following the Introduction to Software Development on SAP HANA course and at the stage of creating Database Schemas and Tables.

However once I create the .hdbschema file in my project, then commit and activate it does not appear in the system drop down.

 

I have refreshed and closed dow hana studio but still not appearing. Screen shots attached.

Please advise.

 

also ay offline copies of the code syntax to be used throughout would be appreciated, bearing in mind:

- Using my companies HANA box so cannot access the images

- I cannot seem to access the sap.box to retrieve them from there

 

Thanks for any help

Re: Procedure failed and need guidance to optimize.

$
0
0

Also what REV are you on?  We've had memory allocation issues that were resolved with upgrade.  Most recently with REV80 indexserver issues were causing the memory allocation errors and we were advised to upgrade to REV82.

Re: OpenSAP: Schema created on project tab view not appearing in system tab view

$
0
0

Have you also done the steps to create the role and grant it to yourself?  When you first create a schema via HDBSCHEMA, your user doesn't have authorization to it yet.

get host name and instance number from hana trial database

$
0
0

Hi, I have a Hana trial account, you can see in the attached image.

 

Im configuring SAP Hana Studio to connect with my Hana trial database but I don't know how to get the hostname and instance number of my database.

 

Thank you for any help.

Re: How to connect to hana via python using the hdbuserstore key ?

Maintain Comments for columns of tables using CDS

$
0
0

Hi,

 

We have created our tables with CDS framework using .hdbdd file.

But we are unable to figure out how to maintain comments for the columns of the table and also for the reusable types.

Please let me know in case you know the solution to maintain comments.

 

Regards,

Nitin Suvarna


Re: Transformation -> Class XXX contains stored procedures which cannot be changed in SAP GUI

$
0
0

Hello William,

 

we had the same issue with BW 7.40 SP08. By implementing the SAP note 2082585. We can now continue developing with HANA expert script.

 

You're welcome!

Re: Dynamic Parameters using SQL Script in a Calculation View

$
0
0

Hi Ravi,

 

 

I am trying to create the same scenario as you mentioned...see my code below.

 

 

I want to get the range from the sales org in my script model.

 

select t2."BILL_VBELN","BILL_FKDAT","BILL_KVGR1_1","BILL_FIL_PROFORMA_INV","BILL_KUNRG","BILL_KTGRD_1","BILL_VKORG_VBRK","BILL_INCO1","BILL_INCO2","BILL_PRCTR","BILL_POSNR","ROUTE",t2."BILL_AUPOS","GET_DAYS","BILL_DATE_FY","BILL_DATE_FP","CA_BILL_REP_NETWR_COMP_CURR","CA_BILL_REP_WAVWR_COMP_CURR",t2."NEW_DEL_DATE"


"_SYS_BIC"."pk-sample.productmanagement/CV_REVENUE_RECOG_CUTOFF_PVP"


as t1



INNERJOIN



select"BILL_VBELN", "BILL_AUPOS"MAX("NEW_DEL_DATE") AS"NEW_DEL_DATE"from"_SYS_BIC"."pk-sample.productmanagement/CV_REVENUE_RECOG_CUTOFF_PVP"


"BILL_VKORG_VBRK"between (placeholder."$$BILL_VKORG_VBRK$$" => :SALESORG_START) and (placeholder."$$BILL_VKORG_VBRK$$" => :SALESORG_END)


by"BILL_VBELN" , "BILL_AUPOS") as t2



(t1."BILL_VBELN" = t2."BILL_VBELN"AND t1."BILL_AUPOS" = t2."BILL_AUPOS");


;

 

 

I am getting syntax error

 

 

Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "=>": line 10 col 68 (at pos 944)nSet Schema DDL statement: set schema "SYSTEM"nType DDL: create type

 

 

Please let me know how to get the range in the script model on the sales org field..

 

thanks a lot in advance...

 

What is the correct way for calling odata?

$
0
0

Hi all,


I wrote some code and it is working fine. But i think and i believe that i should change my code because of the security issues.


In this program, I'm calling odata with js but the problem is everybody can see my odata link when i call it from javascript and they can easily do what they want. Because of that I'm thinking to do it with another way but how?

 



Here is my javascript file:

____________vertical_sample.js_____________________________________________

var uri = "service.xsodata"; // local proxy for cross-domain access 

// create OData model from URL 

var o = new sap.ui.model.odata.ODataModel(uri, true);  

o.read("/myView?$select=DAY,QUANTITY&$format=json", null, null, true, fSuccess, null); 

 

//var oModel = new sap.ui.model.json.JSONModel(o.results);

function fSuccess(oEvent){  

   var oModel = new sap.ui.model.json.JSONModel(oEvent);   

 

    // A Dataset defines how the model data is mapped to the chart

    var oDataset = new sap.viz.ui5.data.FlattenedDataset({

        // a Bar Chart requires exactly one dimension (x-axis)

        dimensions : [ {

            axis : 1, // must be one for the x-axis, 2 for y-axis

            name : 'DAY',

            value : "{DAY}"

        }

        ],

        // it can show multiple measures, each results in a new set of bars in a new color

        measures : [

        // measure 1

        {

            name : 'QUANTITY', // 'name' is used as label in the Legend

            value : '{QUANTITY}'// 'value' defines the binding for the displayed value  

        } ],

        // 'data' is used to bind the whole data collection that is to be displayed in the chart

        data : {

            path : "/results"

        }

    });

 

    // create a VizContainer

    var oVizContainer = new sap.viz.ui5.VizContainer({

        'uiConfig' : {

           'layout' : 'vertical',

            'enableMorphing' : false

        },

        'width': '100%',

        //'height': '100%'

    });

 

    // attach the model to the chart and display it

    oVizContainer.setVizData(oDataset)

    oVizContainer.setModel(oModel);

 

    // set feeds

    var aobjHour = new sap.viz.ui5.vizcontainer.common.feeds.AnalysisObject({

        uid : dimension,

        name : 'DAY',

        type : "Dimension"

    }), aobjQuantity = new sap.viz.ui5.vizcontainer.common.feeds.AnalysisObject({

        uid : "QUANTITY",

        name : "QUANTITY",

        type : "Measure"

    });

    var feedPrimaryValues = new sap.viz.ui5.vizcontainer.common.feeds.FeedItem({

        uid : "primaryValues",

        type : "Measure",

        values : [ aobjQuantity ]

    }), feedAxisLabels = new sap.viz.ui5.vizcontainer.common.feeds.FeedItem({

        uid : "axisLabels",

        type : "Dimension",

        values : [ aobjHour ]

    });

 

    oVizContainer.addFeed(feedPrimaryValues);

    oVizContainer.addFeed(feedAxisLabels);

 

//   oVizContainer.addAnalysisObjectsForPicker(aobjHour);

//   oVizContainer.addAnalysisObjectsForPicker(aobjQuantity);

   

 

   

    // attach event listener for feedschange

    oVizContainer.attachEvent('feedsChanged', function(e) {

        // You could add your own logic to handle feedsChanged to set new dataset to vizContainer.

        // Reset current data for demo purpose.

        oVizContainer.setVizData(new sap.viz.ui5.data.FlattenedDataset({

            dimensions : [ {

                axis : 1,

                name : 'DAY',

                value : "{DAY}"

            }], measures : [ {

                name : 'QUANTITY',

                value : '{QUANTITY}'

            } ], data : {

                path : "/results"

            }

        }));

        oVizContainer.setModel(oModel);

    });

  

    oVizContainer.placeAt("vertical_sample");

};

})();

Re: How to hide sidebar from VizContainer?

$
0
0

So there is no way to hide it in VizContainer?

I looked also to VizCharts but its graph seems not good as VizContainer's.

Re: Maintain Comments for columns of tables using CDS

$
0
0

Hi,

 

The only comment options which i could find in Developer Guide to include in .hdbdd file was:

In-line comment

End-of-line comment

Complete-line comment

Multi-line comment

 

These don't help, as the comments we want to include are the description for the Columns and we want these to be visible when the table is opened in Modeler. Hence decided to move back to .hdbtable

 

Hope in future some option is provided.

 

Regards,

Nitin Suvarna

Viewing all 9165 articles
Browse latest View live


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