Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

refreshing a document (REST) with a date sapVariable

Hello,

we are trying to refresh a document (set prompts) that contains a date sapVariable but get back a "(400) Bad Request.":

In the document are two parameters (one datetime and one LOV) - the datetime parameter is causing the "Bad Request" behavior.

The WebI is a 4.1SP2 system.

response to/biprws/raylight/v1/documents/.../parameters (GET):

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

  <parameters>

  <parameter dpId="DP4" type="sapVariable" optional="false">

  <id>0</id>

  <technicalName>ZBXKDT</technicalName>

  <name>Key Due Date</name>

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

  <info cardinality="Single">

  <previous><value>2015-01-20T01:00:00.000+01:00</value></previous>

  </info>

  <values>

  <value>2015-01-20T01:00:00.000+01:00</value>

  </values>

  </answer>

  </parameter>

- <parameter dpId="DP4" type="sapVariable" optional="false">

  ... other parameter that works

  </parameter>

  </parameters>

I try to set the parameter with the following XML. the type="sapVariable" is not documented in the REST API docs, I tried it without type but it did not work either.

<parameters>

     <parameter optional="false" type="sapVariable">

          <id>0</id>

          <answer type="DateTime"><values><value id="1">2015-01-20T01:00:00.000+01:00</value></values></answer>

     </parameter>

     <parameter optional="false" type="sapVariable">

          <id>1</id>

          <answer type="Text"><values><value id="1">M Bags Steti</value></values></answer>

     </parameter>

</parameters>

I can't see any error in my request nevertheless i do get the "Bad Request" response.

Has anybody an idea what i could change to get that working?

Best regards,

Rainer

Tags:
Former Member
Former Member replied

Hello,

the response content is:

<error>

    <error_code>102</error_code>

    <message>Illegal argument (Invalid answers. System "FW3": "ERROR BRAIN (629): Specify a value for variable Company Code (Multiple Values)

  MSGV1: Company Code (Multiple Values)&#13;

".)</message>

</error>

That seems to indicate that it is the other parameter that is not working. I will investigate that - and come back if I have any issues.

Thank for the help - the tip that even with an HTTP 400 error there is a content associated was very helpfull.

Best regards,

Rainer

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question