cancel
Showing results for 
Search instead for 
Did you mean: 

Using REST API want to refresh a document where a default value is assigned to a mandatory prompt

Former Member
0 Kudos

Below is the prompt summary for one of my reports. It has a mandatory prompt *Choose Date Type set to a default value Transaction Date. When I try to refresh this document by passing in values for all mandatory prompts for SAP BO - Web Intelligence SDK API I get 400 "Bad Request Error".

*Choose Company = ABC

*Choose Report End Date = 2018-06-04T14:56:23.954+01:00

*Choose Date Type = Transaction Date

Ignoring the prompt(*Choose Date Type) doesn't help either. Any help is greatly appreciated.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The solution is to force the mandatory prompt to be optional this way when the BW query is executed it realises that the prompt you have forced optional cannot be optional as it’s marked mandatory so the query looks for a default value if available and when it finds the default value it assigns it to the prompt and executes the query.

https://archive.sap.com/discussions/thread/2053838

Yes, you can make a prompt that is generated as 'normal' thus mandatory and make it optional from a BO perspective.

(encluose in xml tags <OPTIONAL> </OPTIONAL>)

However, note that if the BW query expects and answer and you did not specifify a default value, it will fail.

Also you will notice the settings 'mandatory on universe' and 'mandatory on class'.

The first one is checked by default when the universe gets generated.

These options tell you whether or not the filter (and thus the prompt in it) is ALWAYS includes in any webi query (mandatory on universe) or when an object from that class (object folder) is used.

If a prompt is really optional, you may want to uncheck it and make the prompt available as filter object for the webi queries that want to use it. If you make the prompt optional, but do not uncheck it, every webI query will have the prompt message, but the user may fill it in or leave it empty.

The other way around is no problem at all, if you want to force the user to always fill the prompt, remove the xml tags <OPTIONAL> </OPTIONAL>. Again you can still make it mandatory in universe or usable as filter object (but then if it is included in a webI report, it HAS to be filled in by the user.

Answers (0)