Skip to Content
author's profile photo Former Member
Former Member

How do you differentiate between indexed and non-indexed prompts?

Hi,

I'm trying to fill Webi parameters dynamically, using the Webi REST SDK (4.1 SP04). This environment runs on top of SAP BW and uses BICS to connect to the BEx query.

When the prompt is implemented as a BEx variable, the call to GET /biprws/raylight/v1/documents/{docid}/parameters will show @type: sapVariable, which tells me it requires the values to be passed as an ID and (optionally) their description.

Prompts that are defined in the Webi query panel, return @type: prompt. This however doesn't indicate if they need the prompt value IDs or just their plain values.

Example (JSON):

{

"parameters": {

"parameter": [

{

"@dpId": "DP0",

"@type": "prompt",

"@optional": "false",

"id": 2,

"technicalName": "psTestPrompt",

"name": "TestPrompt",

"answer": {

"@type": "Text",

"@constrained": "false",

"info": {

"@cardinality": "Single",

"lov": {

"@refreshable": "false",

"@hierarchical": "false",

"id": "UNIVERSELOV_DS0.DO1a6"

}

}

}

}

]

}

}


In this case, I'll look at the value for @refreshable; if it's true, the prompt requires IDs, if false, just the plain values.

It's only when a prompt does not have an LOV associated with it (disabled in the prompt properties, see screenshot below), I won't have the lov information when retrieving the parameter information and thus won't be able to determine whether to pass value IDs or just plain values.

FYI, replying with prompt value IDs looks something like this:

{

"parameters": {

"parameter": [

{

"id": 2,

"answer": {

"values": {

"value": {

"@id": "000000123456",

"$": "123456"

}

}

}

}

]

}

}

Plain values looks like this:

{

"parameters": {

"parameter": [

{

"id": 2,

"answer": {

"values": {

"value": 123456

}

}

}

]

}

}

In short: how do I determine whether to pass values by ID or just their plain value given the prompt template retrieved through a GET /biprws/raylight/v1/documents/{docid}/parameters call?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Apr 10, 2015 at 08:40 AM

    hello Kristof,

    Your remark makes sense: we would need to discuss about that internally.

    Regards,

    eric

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.