Skip to Content

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

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?

Tags:
Former Member
replied

hi Kristof...  (and Anthony )

Maybe it should be moved to a new discussion, but... the fix regarding the SAP variables not set as prompts, is done now, and should be available starting 4.1 SP5 Patch 7.

Regards,

eric

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question