cancel
Showing results for 
Search instead for 
Did you mean: 

Error Scheduling Document with Prompts using REST API - An internal error occurred while calling 'answerPromptsEx' API. (Error: ERR_WIS_30270)

Former Member
0 Kudos

I just started using REST API for executing a web intelligence document with prompts and recieved the following error:

An internal error occurred while calling 'answerPromptsEx' API. (Error: ERR_WIS_30270)


URL:

http://wdwbidev01vm:6405/biprws/raylight/v1/documents/34978/schedules


Headers:

Accept:application/xml

X-SAP-LogonToken:"WDWBIDEV01VM.twia.org:6400@{3&2=44766,U3&2v=WDWBIDEV01VM.twia.org:6400,UP&66=60,U3&68=secEnterprise:pstone,UP&S9=8606,U3&qe=100,U3&vz=h1mTvl_ZAyY8viCiEU6VQ3Mxu9NQy8kPqmMdTLC.Bm8,UP}"

Content-Type:application/xml


Resquest:

<schedule>

     <name>twoprompts</name>

     <format type="webi"/>

     <destination><inbox/></destination>

          <parameters>

  <parameter dpId="DP2" type="prompt" optional="false">

  <id>0</id>

  <technicalName>pmTWIA</technicalName>

  <name>TWIA</name>

  <answer type="Text" constrained="false">

                    <values>

                         <value>16332</value>

                    </values>

  </answer>

  </parameter>

  <parameter dpId="DP2" type="prompt" optional="false">

  <id>1</id>

  <technicalName>psStart</technicalName>

  <name>Start</name>

  <answer type="Date" constrained="false">

  <info cardinality="Single">

  <values>

  <value>10/1/2013</value>

  </values>

  </info>

  </answer>

  </parameter>

  <parameter dpId="DP2" type="prompt" optional="false">

  <id>2</id>

  <technicalName>psEnd</technicalName>

  <name>End</name>

  <answer type="Date" constrained="false">

  <info cardinality="Single">

  <values>

  <value>1/31/2014</value>

  </values>

  </info>

  </answer>

  </parameter>

          </parameters>

</schedule>

Response:

<success>

<message>
The resource of type 'Schedule' with identifier '44778' has been successfully created.

</message>

<id>

44778

</id>

</success>



Error:

Looking at the scheduled instance I see the following error:

An internal error occurred while calling 'answerPromptsEx' API. (Error: ERR_WIS_30270)


Heres the version of SAP i am running:

SAP BusinessObjects Enterprise XI 4.0


I can manually run this through the WEB UI front end with no problems.



When i query to see what the doc params are i get this:



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

<parameters>

<parameter dpId="DP2" type="prompt" optional="false">
<id>
0

</id>

<technicalName>

pmTWIA

</technicalName>

<name>

TWIA

</name>

<answer type="Text" constrained="false">

<info cardinality="Multiple" />

</answer>
</parameter>

<parameter dpId="DP2" type="prompt" optional="false">

<id>
1

</id>

<technicalName>

psStart

</technicalName>

<name>

Start

</name>

<answer type="Date" constrained="false">

<info cardinality="Single" />

</answer>
</parameter>

<parameter dpId="DP2" type="prompt" optional="false">

<id>
2

</id>

<technicalName>

psEnd

</technicalName>

<name>

End

</name>

<answer type="Date" constrained="false">

<info cardinality="Single" />

</answer>
</parameter>
</parameters>


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Perhaps the issue comes from the date format.

To quote [SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Layer] documentation, "The RESTful Web Service SDKs support dateTimedata of the following format: yyyy-mm-ddThh:mm:ss(zzzzzz)".

Former Member
0 Kudos

Erisa,

Earlier i tried to use the datetime format according to the API spec with no success. 

I did figure out what the issue was however.  If I change answer type from 'Date' to 'DateTime' it works.  What is odd is that if i query the parameters of the document the answer type is 'Date'[see my earlier post].

Anyways i was able to make it schedule correctly.

Do you know how to actually download the scheduled document instance?

Thanks,

Sean

Former Member
0 Kudos

Sean,

What do you mean with download the scheduled document instance?

When you schedule the document you provide the destination.

You can also use the OpenDocument web application to open the document instance (with some restrictions) in a browser.

Regards

Former Member
0 Kudos

Erisa,

In the old Java SDK you can actually download the scheduled instance that ran using this method: com.businessobjects.dsws.biplatform.BIPlatform.downloadFile()

So has the idea of destinations replaced programmatic downloading documents entirely?

Thanks,

Sean

Former Member
0 Kudos

Sean,

The downloadFile comes from BusinessObjects Enterprise Web Services Consumer API  and I don't know this SDK but this SDK exists in BI 4, cf.

Regards

Former Member
0 Kudos

Erisa,

Yes that was the sdk that had originally attempted to use.  The problem with it was that it could not successfully schedule a document that contained Data prompts.  See this for more details:

It was suggested that I move to the REST API.  So it looks like I will have to use one of the 4 supported destinations of:inbox,filesystem,email, or FTP.

Let me know if overlooked anything otherwise you can consider this question closed.

Thanks for the help!

Sean

daniel_paulsen
Active Contributor
0 Kudos

Hi Sean,

There's currently no functionality to download a scheduled instance so scheduling to destination is the best option.

One additional possiblility is to schedule to webi format and then export the webi instance to PDF or Excel using the Rest APIs.

Former Member
0 Kudos

Sean,

Now you just have to choose the best destination and work is done

Regards

former_member190767
Active Participant
0 Kudos

The ability to download an document from the BI platform via the REST API is added in BI4.2 SP2.

Kind Regards

Merlijn

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am getting below error message when i am trying to modify the prompt value while scheduling the WEBI report.

Not on correct event type; expected START_ELEMENT, but was END_ELEMENT. (Error: INF ).

Initially report was running fine , now also if i don't select any values(As it is optional prompt) in prompt it's running fine. I run the same report through WEBI rich client then report is running fine and also i am able select the prompt.

I tried to create new prompt in the same query as well as in separate query then error message got changed but still i am not able to select values in the prompt.

An internal error occurred while calling 'answerPromptsEx' API. (Error: ERR_WIS_30270) (Error: INF )

I am using SAP BO 4.1 SP6 .There is no format issue as i am passing country as a parameter.

Regards,

Jage

daniel_paulsen
Active Contributor
0 Kudos

Hi Jage,

I suspect there's an error in the XML / JSON you are passing (eg a leading slash instead of trailing slash in a tag </parameters> instead of <parameters/> or something like that). 

Can you provide the response for the GET listing the parameters as well as the body with the country value you are sending back?

former_member197386
Active Contributor
0 Kudos

I agree with Dan, that looks like a glitch in your XML/JSON payload.

Regards,

Anthony