Skip to Content
avatar image
Former Member

Design Studio 1.6 : Merge Prompt puzzle

Hello Experts ,

I need your expertise to find solution to this problem .

We have 5 BEx queries as Data sources . These Data Sources have 3 prompt variables

The first prompt is merged in all other Data Sources . But Distribution Channel & Division is unmerged at BEx level .

Hence if we keep the prompts unmerged ; I will have to provide answers to 5*2=10 prompts of Distribution Channel & division while Sales Organization does not need to be answered .

I am following this blog post to approach this -https://blogs.sap.com/2015/10/27/design-studio-merged-prompts-and-parallel-processing/

and kept

At 'On Before Prompts Submit' I have added this code as suggested in the blog post -

var Prompts=SALESORDERS.getVariables(); /*returns an array of the prompt variables */

Prompts.forEach(function(element,index) {

CREDITMEMO.setVariableValueExt(element.name, SALESORDERS.getVariableValueText(element.name));

CREDITSUM.setVariableValueExt(element.name, SALESORDERS.getVariableValueText(element.name));

INVGRAPH.setVariableValueExt(element.name, SALESORDERS.getVariableValueText(element.name));

INVTEXT.setVariableValueExt(element.name, SALESORDERS.getVariableValueText(element.name));

});

But while testing I can see even after providing values for first two "Distribution Channel" and "Division" it's asking for the values in (10-2) = 8 more entries . Hence it's obvious the code is not working .

I am suspecting I am doing something really foolish here which I am unable to catch due to lack of experience with Design Studio.

Kindly help me out to merge the prompts properly.

Regards,
Sourav Roy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Nov 02, 2016 at 08:56 PM

    Hello Sourav Roy

    Could you please try to use the script function getVariableValueExt instead of getVariableValueText ?

    HTH

    Martin Rapp

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 08:39 AM

    Hi Sourav,

    getVariables() retrieves all variables, even those which are not input-ready. If you try to assign something to them, your script will crash. You can avoid that by checking the availabld methods of your BEx variables. Also consider Martin's remark above.

    Kind regards

    Martin

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 04:59 PM

    Hi Sourav,

    getVariablesValueExt() would consume all the values irrespective of the how many prompts you have defined in your queries. Martin has suggested it rightly.

    Regards,
    Sumit

    Add comment
    10|10000 characters needed characters exceeded