cancel
Showing results for 
Search instead for 
Did you mean: 

Using DM Package variables in LOOKUP statement

former_member577658
Participant
0 Kudos

Hello,

Please advise if it's convenient to use DM Package variables withing LOOKUP statement?

I have script logic executed via DM Package as follows:

*LOOKUP OWNERSHIP

*DIM TIME=%TIME_SET%

*DIM C_CATEGORY="%C_CATEGORY_SET%

*DIM POSG:O_ACCT="PGROUP"

*DIM GROUPS="GRP13"

*DIM INTCO="I_NONE"

*DIM MEASURES="PERIODIC"

*ENDLOOKUP

%TIME_SET% and %C_CATEGORY_SET% are variables passed via DM Package prompt (SELECTINPUT).

When compiling this script I receive message 'Invalid lookup/endlookup'.

I can make this script work only if I change the variables in question to fixed values, say, as follows

*LOOKUP OWNERSHIP

*DIM TIME="2012.Q4"

*DIM C_CATEGORY="CAT11"

*DIM POSG:O_ACCT="PGROUP"

*DIM GROUPS="GRP13"

*DIM INTCO="I_NONE"

*DIM MEASURES="PERIODIC"

*ENDLOOKUP

Is this correct behaviour of script logic, and DM Package variables cannot be used within LOOKUP statement? Or, there's some other mistake here?

This is NW7.5, SAPK-75010INCPMBPC

Thank you in advance,

Valery

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Valery,

You have some syntax errors in your code. The correct one:

*LOOKUP OWNERSHIP

*DIM TIME="%TIME_SET%"

*DIM C_CATEGORY="%C_CATEGORY_SET%"

*DIM POSG:O_ACCT="PGROUP"

*DIM GROUPS="GRP13"

*DIM INTCO="I_NONE"

*DIM MEASURES="PERIODIC"

*ENDLOOKUP

B.R. Vadim

former_member577658
Participant
0 Kudos

Thank you, Vadim!

This way ("%TIME_SET%" and "%C_CATEGORY_SET%", variable names in quotes) it definitely works.

Best regards,

Valery

Answers (1)

Answers (1)

ashwin_kulkarni2
Contributor
0 Kudos

Hi Andy,

You cannot use DM package variables within Lookup statement.

If you use, you will get the error message for invalid lookup.

Regards,

Ashwin.