Skip to Content
0

Design Studio 1.6 : Merge Prompt puzzle

Nov 02, 2016 at 04:47 PM

315

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Martin Rapp Nov 02, 2016 at 08:56 PM
0

Hello Sourav Roy

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

HTH

Martin Rapp

Share
10 |10000 characters needed characters left characters exceeded
Martin Pankraz Nov 03, 2016 at 08:39 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Sumit Dubey Nov 03, 2016 at 04:59 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded