Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: HANA CLOUD PLATFORM

$
0
0

Hi Florian,

 

 

Your docs are very helpful, Thanks for the docs and your patience. I have created xsjs and xshttpdest files. I tried to run the xsjs file , When I run the file Instead of pulling the data from json api, it is importing as '?' and 'undefined' into the tables which I have created in modeler perspective.

 

Version : Web based developemnt workbench of Productive Landscape.

 

Below is the xsjs file:

 

===================

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

if (id === null) { 

  $.response.setContentType = "text/plain";

  $.response.addBody("id is null!") ;

  } 

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

  if (status === null) { 

  $.response.setContentType="text/plain";

  $.response.addBody("status is null!");

  }

  var output = {}; 

  output.data = []; 

  var conn = $.db.getConnection();

conn.prepareStatement("SET SCHEMA \"sxxxxxxxxx\"").execute(); 

conn.prepareStatement("INSERT INTO \"TABLE \" values('" + id + "','" + status + "')").execute();

conn.commit(); 

  var record = []; 

  record.push(id); 

  record.push(status); 

  output.data.push(record); 

  $.response.contentType = "application/json";  

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

 

=================

 

xshttpdest file is created as per your document. Are there any changes to be made in this code to work . Could you please help me out.

 

I have also one more question,

 

Could you please provide me information on the statement $.request.

 

 

Thanks in Advance,

 

Vinni


Viewing all articles
Browse latest Browse all 9052

Trending Articles



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