cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update report structure

Former Member
0 Kudos

Hi

I am trying to update report structure using restful web services. But getting error. Details as below:

SAMPLE XML:

<REPORT rId="2" name= "Report 1">

    <PAGE_BODY bId = "21">

        <CELL bId = "211" x= "1000" y="1500">

            <CONTENT>

                ="My First CELL"

            </CONTENT>

        </CELL>

    </PAGE_BODY>

</REPORT>

CODE:

cell = "<REPORT rId=\"2\" name= \"Report 1\"> <PAGE_BODY bId = \"21\"> <CELL bId = \"211\" x= \"1000\" y=\"1500\"><CONTENT>=\"My First CELL\"</CONTENT> </CELL> </PAGE_BODY></REPORT>"

headers2 = {'accept': 'text/xml', 'content-type': 'text/xml', 'X-SAP-LogonToken': logonToken}

updateReportStr = requests.put(url = rayLightUrl + '/documents/15533'  + '/reports/2/specification', data = cell, headers = headers2)

ERROR:

<error>

    <error_code>RWS 00058</error_code>

    <message>Not acceptable, (RWS 00058)</message>

Stack Trace is not helping. Any help is appreciable.

Regards

Anu

Accepted Solutions (1)

Accepted Solutions (1)

eric_festinger
Contributor
0 Kudos

hi Anu,

In a generic way:

<error>

    <error_code>RWS 00058</error_code>

    <message>Not acceptable, (RWS 00058)</message>

</error>

... means that no call exists with the pair (Accept-Type + Content-Type) that you specify.

In your specific case:

  • 'content-type': 'text/xml' is OK as the request type for the report specification
  • 'accept': 'text/xml' is NOT OK as the response type.

(see that section of the documentation: SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Laye...)

Regards,

eric

Former Member
0 Kudos

Hi Eric

Thanks for quick reply. Yes. Its working now when I changed it to application/xml.

Message has changed to below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<success>

    <message>The resource of type 'Report' with identifier '2' has been successf

ully updated.</message>

    <id>2</id>

</success>

But the changes have not reflected in the WebI Report. Currently WebI report has a VTABLE and Chart. I was expecting it to go away and only have 1 cell  with content "My First CELL".

Am I missing something?

eric_festinger
Contributor
0 Kudos

How do you see that the changes are not reflected in the WebI report? With BI Launchpad?

daniel_paulsen
Active Contributor
0 Kudos

Hi Anu,

to save the changes back to the CMS, you need to update the state of the document,

if you do the following:

PUT  .../raylight/v1/documents/<docID>

without any request body, it will save the document with changes

if you use:

PUT .../raylight/v1/documents/<docID>

with the following body:

<document>

   <state>Unused</state>

</document>

It will save the document to the CMS and close it as well.

See this page in the documentation

Dan

Former Member
0 Kudos

This works. I saved document with PUT. Then reopened document in WebI Rich Client and can see new changes.

Cant thank you enough for your timely help.

Answers (0)