cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory Bex variables Design Studio 1.2

eddy_declercq
Active Contributor
0 Kudos

Hi,

I'm a bit confused. According to this thread it is not possible to have mandatory Bex variables in DS.

It seems to work for my qry though, but the design is not what I would expect from it and is confusing for the end user. I was wondering how I can set the prompt as a popup like specified in this tutorial and also change the look and feel of it in order to make it more understandable for the end user.

Cheers

Eddy

Accepted Solutions (0)

Answers (3)

Answers (3)

hs1
Participant
0 Kudos

Hi Eddy,

you can, "On Variable Inititializaton" set the BW Variable with Default's.

Application.setVariable (Name, Value);   /// Default

After them you you can open the Variable Screen with "Application.openPromptDialog(400,300);" per Code in "On Startup"

Thats it.

BR Harry

eddy_declercq
Active Contributor
0 Kudos


Hi,

As said, it doesn't seem to matter whether a specify a empty or legit/deafult value for the manadatory field. The fullscreen prompt keeps appearing.

Eddy

Former Member
0 Kudos

Hi Eddy,

I've finished my Howto - please try to follow these steps:

http://scn.sap.com/docs/DOC-52405

There is one restriction - you have to set Defaultvalues to all BW prompts

Unfortunately i faced a bug - this is described in the howto also.

Best regards and hopefully this solved your problem.

Best regards

Manfred

eddy_declercq
Active Contributor
0 Kudos


Sadly enough, I still get a full screen prompt. I treid both setVariableValueExt and setVariableValue

Former Member
0 Kudos

Hi Eddy,

Which DS version do you use ?

In my case it is DS 1.2 without any Patches.

If you run your BEx Query in the Web - are all mandatory prompts filled with default values ?

There is a properties on the application called "Force prompts on startup". Can you check if this is set to false on your application ?

Best regards

Manfred

IngoH
Active Contributor
0 Kudos

Hello Manfred,

setting default values for mandatory prompts is not necessary

regards

Ingo Hilgefort, SAP

Former Member
0 Kudos

Hi Ingo,

When some of the mandatory variables miss default values i am getting prompted. If all of them have defaultvalues everything works without an initial prompt.

I also tried it with "load data in script" but then i get a strange error that my Prompt-IDs are not recognized anymore (even when i get them with content assist

Perhabs it is only for a specific version ?!?

Did you get it to work with mandatory prompts without defaultvalues.

I agree with you that it should be not necessary !

Best regards

Manfred

IngoH
Active Contributor
0 Kudos

Hello Manfred,

which is the correct behavior.

if you have a mandatory prompt and no value has been submitted you will get prompted >> mandatory.

if you have a default value configured and do not submit any other value then the default is being used as an initial value.

if you have a mandatory prompt you need to send in a value using the scripting in case there is no default value.

and all of the described here does already work in 1.2

regards

Ingo Hilgefort

eddy_declercq
Active Contributor
0 Kudos

So in order to prevent the standard full screen prompt, I should...

IngoH
Active Contributor
0 Kudos

Hi,

use the scripting and configure the values that you want to pass to the variables

Ingo

eddy_declercq
Active Contributor
0 Kudos

It may seem obvious for you as the expert but confusing to me. Can you give some example pls?

Former Member
0 Kudos


Hi Ingo,

No doubt that it works - Eddy just asked why he is getting prompted and he wants to get rid of the initial prompt screen.

The thing that i don't get why i receive in error if i tell my datasource in the properties to be not handled automatically ("Load in script = true"). There should be no difference if the source is getting handled via script or not.

If i get errormessage depending on this setting i don't get the reason.

Passing a variable value should be independent from that decision.

IngoH
Active Contributor
0 Kudos

Hi Eddy,

the syntax on how to pass variables to the underlying BEx query is well documented as part of the product documentation for Design Studio.

regards

Ingo Hilgefort, SAP

eddy_declercq
Active Contributor
0 Kudos

I finally found what I did wrong. The formatting of my initial date was incorrect and I overlooked it thinking that my error was somewhere else

Having said this, I want to put the current date as default, but it seems that

APPLICATION.getInfo() isn't allowed in On Variable Initialization

What are the alternatives in order to achieve this?

Former Member
0 Kudos

Hi Eddy,

Sorry for my late response. Nice that you got it working !

I think i can help you with your problem - hopefully

You can use APPLICATION.getInfo.dateNow BUT this will bring you the date in location specific format. and i am pretty sure your BW-prompt is assuming something in the format YYYYMM or some other thing.

Therefore i would suggest to use the

APPLICATION.getInfo().dateNowInternalFormat

Which will bring you the current date in the format YYYYMMDD - what is one step further in the right direction.

I assume that your particular prompt does not have exactly this format, BUT you can use the  CONVERT object and its substr function to fullfill your goal.

I assume your prompt needs the format MM.YYYY then you need to set this as your value

Convert.subString(APPLICATION.getInfo().dateNowInternalFormat, 4, 6) + " " + Convert.subString(APPLICATION.getInfo().dateNowInternalFormat, 0, 4)

That's it - now you have the actual month and year and eventually the actual day passed to your prompt.

I hope this solved your second problem.

Best regards

Manfred


TammyPowlas
Active Contributor
0 Kudos

As to your second question - my guess is the confusing part is the initial prompt of the required BEx query variable

I don't see a way except to turn off the mandatory variables, fill them with a default, and then using the APPLICATION.openPromptDialog feature to do what you want.

Former Member
0 Kudos

Hi,

If you don't want to see the initial prompt screen with the mandatory variables you can define global variables in Design Studio for your mandatory prompts. Then you can fill those variables with the opendocument syntax and attach in this way default values - or define default values in the onStartup Routine when you read the global variables.

After that you should be able to open a popup like in the tutorial and therefore let the user decide which prompts to use.

If you need help with this method i try to post a How-To

Best regards

Manfred

eddy_declercq
Active Contributor
0 Kudos

A how to guide would be very nice indeed. Many thanks in advance.

Btw is there a way to customize the look and feel of the popup, like language, the prompt texts, preventing the user needing the user to use the back, etc. ?

Former Member
0 Kudos

Hi Eddy,

I get back to this thread by next week with a link to a howto guide.

You can try to change the look of the popup by providing a css file that changes the default, but you have no chance to change teh language or the behaviour of it

The language should be dependant of the setting in the BI Launchpad


eddy_declercq
Active Contributor
0 Kudos

A pity that all this can't be changed . I'm running in local mode and everything is in English, independant from the browser language or my standard language of the user defined in BW.

The end result will be SSO anyway, so the end user will never see a BI launch pad.

Former Member
0 Kudos


If you are running in local mode you have to connect somehow to the BW System.

If you are in local mode you get a popup that asks you for client, username, password and Language. If you leave the language blank you get the default.

If you work against the BI Platform the OLAP connection can handle the language information ?!

bharathsap
Employee
Employee
0 Kudos

Hello Eddy,

Could you try the following?

On Variable Initialization

APPLICATION.setVariableValue("Variable_Name", "");  --> This sets an empty value for Variable. Since Mandatory Variable needs a value to be set and without which you can't get rid of the initial prompt screen.

On Startup

APPLICATION.openPromptDialog(500, 500); --> This opens the prompt dialog and now you can choose the variable values.

For more information about these events and the process flow refer

Regards,

Bharath

eddy_declercq
Active Contributor
0 Kudos

Hi,

Just tried it out, but I'm still getting the full screen prompt It doesn't seem to matter whether a specify a empty or legit value for the manadatory field.

The other smaller prompt does show afterwards.

I don't get any systax errors though.

Eddy

TammyPowlas
Active Contributor
0 Kudos

Older versions of Design Studio didn't support mandatory variables from BEx queries

The current version does now support mandatory BEx variables