cancel
Showing results for 
Search instead for 
Did you mean: 

Logic Script SELECT function does not work

0 Kudos
386

Hi Experts,

I define a group of variables like below:

*SELECT(%ENTITY%, "ID", "P_ENTITY", "[Z_OWNER] = Y")

*SELECT(%ENTITY1%, "ID", "P_ENTITY", "[ID] = BAS(%P_ENTITY_SET%) AND [MAPPING] <> %ENTITY%")

then I define Data region for dimension P_ENTITY like below:

*XDIM_MEMBERSET P_ENTITY = %ENTITY1%

However when I run this script with the package, it always failed with error:

RUN_LOGIC:No value assigned to dimension "P_ENTITY"

It should has some certain entities that can be returned with the varialbles I made above.

Does there anything not make sense in my variable definition?

Please help to check and give me some experitse. thanks~

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

Hello,

The quickest way to check return values of SELECT statement is to run simulation in t code UJKT.

SELECT(%ENTITY%, "ID", "P_ENTITY", "[Z_OWNER] = Y")

SELECT(%ENTITY1%, "ID", "P_ENTITY", "[ID] = BAS(%P_ENTITY_SET%) AND [MAPPING] <> %ENTITY%")

XDIM_MEMBERSET P_ENTITY = %ENTITY1%

*WHEN P_ENTITY

*IS *

*REC(FACTOR=1)

*ENDWHEN

When you paste this in ujkt and run simulate on right hand pane you will get the list of entities it returned.

Also Try this version of *SELECT for your requirement.

*XDIM_MEMBERSET P_ENTITY AS %ENTITY2% = BAS(%P_ENTITY_SET%)

SELECT(%ENTITY%, "ID", "P_ENTITY", "[Z_OWNER] = Y")

SELECT(%ENTITY1%, "ID", "P_ENTITY", "[ID] = %ENTITY2% AND [MAPPING] <> %ENTITY%")

XDIM_MEMBERSET P_ENTITY = %ENTITY1%

Regards

Nikhil

0 Kudos

It works Nikhil, thanks so much!

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Nikhil code is correct!

The reason is simple - you can't use BAS operator inside select! You have to use temporary variable:

*XDIM_MEMBERSET P_ENTITY AS %ENTITY2% = BAS(%P_ENTITY_SET%)

to get a list of base members

0 Kudos

Yeah, it is going well now, thanks for the comments