Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Call HANA Orion API from ABAP

$
0
0

Some months ago Thomas Jungintroduced the REST API for the SAP HANA Repository. I've implemented a client in ABAP that uses the REST API, it includes a simple GUI that lets you edit files on the HANA server.

 

editor.png

 

Clicking save will call the API and the code is saved on HANA.

 

web.png

 

I'll not recommend using the ABAP editor for XSJS development, as it is just a simple text editor that doesn't know about javascript.

 

The following example shows how a file can be created from ABAP using the API,

 

DATA(lo_factory) = NEW zcl_orion_factory( iv_url      = p_url

                                          iv_user     = p_user

                                          iv_password = p_passw ).

DATA(lo_file) = lo_factory->file( ).

lo_file->file_create( iv_path = 'foobar/'

                      iv_name = 'asdf.txt' ) ##NO_TEXT.

lo_file->file_update( iv_path = 'foobar/asdf.txt'

                      iv_data = 'Hello' ) ##NO_TEXT.

 

The code doesn't work with HCP, I haven't had any luck getting past the SAML authentication from ABAP.

 

 

larshp/abapOrion · GitHub


Viewing all articles
Browse latest Browse all 943

Trending Articles



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