on 02-13-2014 1:46 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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.
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?
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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 ?!
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
Older versions of Design Studio didn't support mandatory variables from BEx queries
The current version does now support mandatory BEx variables
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 | |
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.