Skip to Content
0
Jun 13, 2017 at 08:48 AM

MDX statement referencing SAP variables within select query

286 Views

Hi , I would like to reference SAP variables used in a MDX statement within the select query of the statement so that I can display the variables themselves as a column in the final output? The cube was designed using SAP BeX Query Designer. Would appreciate any input as to how this can be done. The MDX query in it's current form is as follows:

SELECT

{[AUZ3ZD79Z34DA42PU2VE46IQX].[BE5NBCUMBISEKNPRR093P3B6X] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BGADGOT7OWJ2PTWBYNYMJEYCP] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BIF3M0RT2A9QV02W6BO5DQLIH] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BKJTRCQEFO0F069GDZDO828O9] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BMOJWOOZT1R35CG0LN372DVU1] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BOTA20NL6FHRAIMKTASPWPIZT] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BQY07CM6JT8FFOT50YI8R165L] ,[AUZ3ZD79Z34DA42PU2VE46IQX].[BT2QCOKRX6Z3KUZP8M7RLCTBD] }

ON AXIS(0) ,

{[8O48I2NB7YPJYRBXYPN0Y7PT5].[A49N5FK7OZ3329HTA60E43MG9], [8O48I2NB7YPJYRBXYPN0Y7PT5].[A6EDARIT2CTR7FODHTPWYF9M1], [8O48I2NB7YPJYRBXYPN0Y7PT5].[A8J3G3HEFQKFCLUXPHFFSQWRT], [8O48I2NB7YPJYRBXYPN0Y7PT5].[AANTLFFZT4B3HS1HX54YN2JXL], [8O48I2NB7YPJYRBXYPN0Y7PT5].[ACSJQREL6I1RMY824SUHHE73D], [8O48I2NB7YPJYRBXYPN0Y7PT5].[AEX9W3D6JVSFS4EMCGK0BPU95], [8O48I2NB7YPJYRBXYPN0Y7PT5].[AH201FBRX9J3XAL6K49J61HEX], [8O48I2NB7YPJYRBXYPN0Y7PT5].[AJ6Q6RADAN9S2GRQRRZ20D4KP], [8O48I2NB7YPJYRBXYPN0Y7PT5].[ALBGC38YO10G7MYAZFOKUORQH], [8O48I2NB7YPJYRBXYPN0Y7PT5].[ANG6HF7K1ER4CT4V73E3P0EW9], [8O48I2NB7YPJYRBXYPN0Y7PT5].[BRXZAQGU3NTV32LJ8LV1P5MY1], [8O48I2NB7YPJYRBXYPN0Y7PT5].[CFDYXE1D6UZ8NYLPKUNSYPPPL], [8O48I2NB7YPJYRBXYPN0Y7PT5].[CHIP2PZYK8PWT4S9SIDBT1CVD], [8O48I2NB7YPJYRBXYPN0Y7PT5].[D0P8EPNAWODY3OFBPFR1DY5BD], [8O48I2NB7YPJYRBXYPN0Y7PT5].[6BVGGLFPPFD5OJK27QGNZD36X], [8O48I2NB7YPJYRBXYPN0Y7PT5].[6E06LXEB2T3TTPQMFE66TOQCP]}

ON AXIS(1)

FROM [0XOOC_C1/Z0COOM_PNL]

SAP VARIABLES

[0P_FYRA] INCLUDING [0FISCYEAR].[V32016]

[!V000002] INCLUDING [0FISCPER3].[001]

[!V000003] INCLUDING [0FISCPER3].[012]

[!V000004] INCLUDING [0VERSION].[Q2]