Skip to Content
0
Former Member
Jan 30, 2015 at 03:02 PM

Updating Input Control Definition

33 Views

Hi All,

there´s another question ...

I´m trying to udapte the definition of an Inpit Control so to point to a different assignedDataObject.

I succesfully updated the Input Control, at least I got no error message. But when I get the updated Inpt control, it still póints to the previous Data object.

Here the snippet of my code :

// Get the Input Control´s definition

var logoff = new XMLHttpRequest();

var url = 'http://vrt0582.bndes.net:6405/biprws/raylight/v1/documents/5210245/reports/1/inputcontrols/R1.IF0';

logoff.open('GET', url, false);

logoff.setRequestHeader('X-PINGARUNER', 'pingpong');

logoff.setRequestHeader('Content-Type', 'application/xml');

logoff.setRequestHeader('Accept', 'application/xml');

logoff.setRequestHeader('X-SAP-LogonToken', token);

logoff.send();

// replace DP0 fro DP2

var ic = logoff.responseText;

ic = ic.replace('DP0','DP2');

// update the Input Control definition

var logoff = new XMLHttpRequest();

var url = 'http://vrt0582.bndes.net:6405/biprws/raylight/v1/documents/5210245/reports/1/inputcontrols/R1.IF0';

logoff.open('PUT', url, false);

logoff.setRequestHeader('X-PINGARUNER', 'pingpong');

logoff.setRequestHeader('Content-Type', 'application/xml');

logoff.setRequestHeader('Accept', 'application/xml');

logoff.setRequestHeader('X-SAP-LogonToken', token);

logoff.send(ic);

// save the document

var logoff = new XMLHttpRequest();

var url = 'http://vrt0582.bndes.net:6405/biprws/raylight/v1/documents/5210245';

logoff.open('PUT', url, false);

logoff.setRequestHeader('X-PINGARUNER', 'pingpong');

logoff.setRequestHeader('Content-Type', 'application/xml');

logoff.setRequestHeader('Accept', 'application/xml');

logoff.setRequestHeader('X-SAP-LogonToken', token);

logoff.send();

// trying to get the updated Inpuut Conbtrol definition

var logoff = new XMLHttpRequest();

var url = 'http://vrt0582.bndes.net:6405/biprws/raylight/v1/documents/5210245/reports/1/inputcontrols/R1.IF0';

logoff.open('GET', url, false);

logoff.setRequestHeader('X-PINGARUNER', 'pingpong');

logoff.setRequestHeader('Content-Type', 'application/xml');

logoff.setRequestHeader('Accept', 'application/xml');

logoff.setRequestHeader('X-SAP-LogonToken', token);

logoff.send();

Thanks in advance,

Rogerio