Skip to Content
0

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

Feb 28 at 12:21 PM

75

avatar image

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

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

2 Answers

Swakshar Choudhury Feb 28 at 01:20 PM
0

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

Regards,

Swakshar

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please read my comment and prepare your question correctly.

0
Vadim Kalinin Feb 28 at 03:19 PM
0

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.

Show 9 Share
10 |10000 characters needed characters left characters exceeded

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

0
Swakshar Choudhury

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.

0

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

0

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.

0
Swakshar Choudhury

There is no special variable %USER%!

You have to pass user name from advanced script using REPLACEPARAM

0

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

0
Swakshar Choudhury

"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...

0

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.

0
Swakshar Choudhury

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!

0