cancel
Showing results for 
Search instead for 
Did you mean: 

Help with SELECT Statement in Script Logic (SAP BPC 10.1 Standard)

Former Member
0 Kudos

Hi,

Need guidance regarding usage of SELECT Statement in script logic. I am trying to dynamically pick up ID from a DIMENSION using the below statement:

*SELECT(%XYZ%,XYZ,VERSION,ID = USER%USER%)

Objective is to pass the XYZ property value of VERSION Dimension for ID equal to USER12345, if the user id of the executer is 12345. But ID = USER%USER% is not working. Can anybody advise what is wrong and what needs to be done with the statement as correction?

Thanks and Regards,

Swakshar

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

Please read: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

Provide real script with test result in UJKT!

Now it's not possible to answer this question because you are not providing full info.

Former Member
0 Kudos

Hi Vadim,

The whole script logic is extremely big and complex so I did not want to confuse anyone here as it might deviate from the issue. During my validation and testing whatever I have done, I could conclude that the ID=USER%USER% is not doing what I am expecting it to do. This is because the statement returns validation error on the VERSION dimension - RUN_LOGIC:No value assigned to dimension "VERSION".

When I test *XDIM_MEMBERSET VERSION = USER%USER%, this perfectly scopes USER1234 at runtime for VERSION dimension, if the user ID of the executor is 1234. But this is not working when I am using ID=USER%USER% in the SELECT statement.

Hope I have been able to explain. Hope you can shed some light.

Thanks!

Swakshar

former_member186338
Active Contributor
0 Kudos

Sorry, but I don't see how %USER% variable is populated! That's why I am asking for full script.

Please provide full script!!! At least from the beginning to the line with error.

Former Member
0 Kudos

Hi Vadim,

Its the first line of the script where its failing. We have got multiple select statements to scope data passing properties of Version dimension where the ID=USER%USER%. We are calling it User version. It stops at the first line itself.

Can you guide me if somehow I can pass user id to the %USER% variable before the select statement? I supposed that it would pick up at runtime since *XDIM_MEMBERSET =USER%USER% is working at runtime.

I have managed to do it through DM script by giving user prompt to enter VERSION = USER1234 then passing it to the logic script as a variable to select statement. But this is not acceptable to the business because there is a long list of scripts attached to package link and all the script require to scope the user version. User have to set prompt every time for all scripts (attached to DMPs) and enter user version.

Let me know if the above inputs are helpful for you to understand the issue.

Regards,

Swakshar

Former Member
0 Kudos

Correction to the above comment: *XDIM_MEMBESET VERSION = USER%USER% picks up user id at runtime. no need to pass value to the %USER% manually.

former_member186338
Active Contributor
0 Kudos

There is no special variable %USER%!

You have to pass user name from advanced script using REPLACEPARAM

Former Member
0 Kudos

I have achieved it through REPLACEPARAM. but as per process not acceptable to the user. Anyway thank you!

former_member186338
Active Contributor
0 Kudos

"I have achieved it through REPLACEPARAM. but as per process not acceptable to the user" - please explain what do you mean! To my mind there is some misunderstanding here...

Former Member
0 Kudos

Using REPLACEPARAM I have given a prompt to the user to input the user version in the DM package. That's what I meant by achieving the result.

Why its not acceptable to the user: Because there is a package link with 48 tasks and that user prompt for user version needs to be set for all the 48 tasks which is obviously tedious for the user.

Hence, if we could achieve the user version being read at run time then the prompt would not be required.

former_member186338
Active Contributor
0 Kudos

Absolutely not clear!

"I have given a prompt to the user to input the user version" - what do you mean? Can you show advanced DM script?

How the user version is related to user name?

If you want help you need to provide detailed info!

Former Member
0 Kudos

Can anyone help with the correct concatenation logic for the string "USER" with user id of the executor?

Regards,

Swakshar

former_member186338
Active Contributor
0 Kudos

Please read my comment and prepare your question correctly.