on 02-28-2018 12:21 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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.
Can anyone help with the correct concatenation logic for the string "USER" with user id of the executor?
Regards,
Swakshar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.