Skip to Content

SAP Design Studio 1.1 does not have the ability to directly post/update BW or HANA tables other than calling a URL. Since Design Studio is a dashboard tool, I don’t expect it to have update capabilities (other than for Integrated Planning scenarios – which I expect to be offered soon).

In this blog, I showcase a simple demo to display HANA data and a mechanism to update the data back using HANA XSJS.

I have used EFASHION model and in particular the ARTICLE_LOOKUP table. Using the application, I display a list of Articles and their Sale Price. By selecting the record, the Sale Price can be updated.

Here is the table structure:

/wp-content/uploads/2013/06/1_237302.jpg

Since Design Studio can use only HANA analytic and calculation views, I built a simple analytic view on this ARTICLE_LOOKUP table.

/wp-content/uploads/2013/06/3_237303.jpg

In my DS application I added this analytic view as a datasource and bound a crosstab to it as shown below.

/wp-content/uploads/2013/06/7_237304.jpg

On selecting an Article in the crosstab list, update panel is made visible.

/wp-content/uploads/2013/06/8_237305.jpg

A new Sale Price is entered and when the Update button is clicked, following script is triggered.

/wp-content/uploads/2013/06/10_237306.jpg

The new Sale Price along with the Article ID is passed as GET parameters to a HANA XSJS URL.

Following is the Code in the XSJS hosted on HANA server.

/wp-content/uploads/2013/06/2_237307.jpg

To keep the demo simple, I have not added any data validation. I use the posted URL values as input to a Procedure Call. Alternatively, I could have embedded the Update SQL directly in the XSJS file instead of calling the procedure.

Following is the Procedure code that uses the passed input parameters to update the ARTICLE_LOOKUP table.

/wp-content/uploads/2013/06/6_237308.jpg

As an example, here are the prior and post update values of one such record

/wp-content/uploads/2013/06/4_237318.jpg

/wp-content/uploads/2013/06/5_237322.jpg

Since this update is done externally using a URL call, Design Studio application does not have a way to know the result of the URL call output.

So I have to manually refresh the application to show the updated data. If SAP provides a wait function, we could have reloaded the datasource after a certain interval.

Here is the update data shown on the crosstab

/wp-content/uploads/2013/06/9_237329.jpg

Being a reporting tool, Design Studio, at least at this stage does not appear to be suited for complex data manipulation. SAP HANA XS development will be the more appropriate solution. Again, these are my personal views.

Thanks.

To report this post you need to login first.

13 Comments

You must be Logged on to comment or reply to a post.

  1. Makoto Sugishita

    I think this blog post could be just a quick example to show anoter possiblity of Design Studio, but we would need to be a bit more careful about the the actual implementation.

    In general, it would not be recommended to use HTTP GET to update data.

    One reason is that we cannot use SSL encryption for the URL parameters.

    Anoter reason is that there could be the risk of XSRF.

    http://en.wikipedia.org/wiki/Cross-site_request_forgery

    HANA XS has the capability to prevent XSRF but it would not be helpful for the data update with HTTP GET.

    We would need to implement another API to call HTTP POST as a part of standard product in future if this requirement is common one.

    (0) 
    1. Murali Balreddy Post author

      Makoto,

      This was a simple demo to show interaction with SAP HANA.

      With DS 1.1, we only have the option to call a URL. We don’t have a way to submit form for POST request. If you know of any way to POST a request, let me know. It will be helpful.

      Thanks.

      (0) 
      1. Makoto Sugishita

        Hi Murali,

        As you said, it is totally not possible to make a HTTP POST request with the Design Studio as of now.

        If you really need to update the data on HANA, it is highly recommended to create another screen with HANA XS and make a request with HTTP POST using XHR or so.

        And if the SDK of Design Studio become publicly available, it could be used for such scenario as well.

        It would be good to think about multipe possbilities but we would need to be careful about some kind of security risk as well.

        Regards,

        Makoto

        (0) 
  2. deepa m

    hi Murali,

    Thanks for the blog.The information provided in the blog helped me to resolve the issue that i was facing from many days.But I have a small doubt.

    Here you have used only the integer values.I have a requirement where the user will key in the values(data type is varchar) in the design studio and those changes will be reflected in the hana studio.

    This logic works if the string data is entered in the single quotes ,else it is thowing the error.

    But I want the values to be entered without quotes.

    please help me to resolve this

    Thanks,

    Deepa

    (0) 

Leave a Reply