on 04-10-2015 8:57 AM
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?
hello Kristof,
Your remark makes sense: we would need to discuss about that internally.
Regards,
eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anthony,
Just FYI, I've also noticed that when you have 2 BEx variables, and you only define 1 of them as a prompt (using the BEx variable window in the Webi Query Panel), the REST SDK will still report all of BEx variables as prompts, instead of the 1 variable that was checked as prompt.
(this happens in BI 4.1 SP4 Patch 4)
In the query panel:
REST SDK output for GET /biprws/raylight/v1/documents/{docid}/parameters?lovInfo=false :
{
"parameters": {
"parameter": [
{
"@dpId": "DP0",
"@type": "sapVariable",
"@optional": "false",
"id": 0,
"technicalName": "ZMXXXX",
"name": "XXXXX",
"answer": {
"@type": "Text",
"@constrained": "true",
"info": {
"@cardinality": "Multiple",
"lov": {
"@refreshable": "true",
"@hierarchical": "true",
"id": "UNIVERSELOV_DS0.:M:STR:ZMXXXX"
}
}
}
},
{
"@dpId": "DP0",
"@type": "sapVariable",
"@optional": "false",
"id": 1,
"technicalName": "ZYYYYYY",
"name": "YYYYYYYY",
"answer": {
"@type": "Text",
"@constrained": "true",
"info": {
"@cardinality": "Multiple",
"lov": {
"@refreshable": "true",
"@hierarchical": "true",
"id": "UNIVERSELOV_DS0.:M:STR:ZYYYYYY"
}
}
}
}
]
}
}
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.