cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic: summation based on Masterdata.

Former Member
0 Kudos

Hallo Everyone,

I was given a 6000 Line Script that I am supposed to shrink down.

It's basically the same 20 Lines of code over and over again with other paramters:

*XDIM_MEMBERSET [...]

*RUNALLOCATION

*FACTOR=1 or -1

*DIM ABC WHAT=BAS(ABC_ALL);WHERE=NA

*DIM DEF WHAT=BAS(DEF_ALL);WHERE=NA

*DIM GHI WHAT=BAS(GHI_ALL);WHERE=NA

*DIM XYZ WHAT=UE (or BAS(UE));WHERE=O_UE

*ENDALLOCATION

*COMMIT

So this grabs a whole lot of accounts and stuff and writes the sum of that lot into some new keyfigure (dimension xyz)

Well my Idea was to put the parameters for the dimensions sources and targets into the Dimension XYZ, as it's the driving dimension in this, an then use that masterdata as a parameter in this script.

But keep failing here. I am not a big script logic guru and probably would prefer an ABAP solution, however the business wants to keep that script, as they can do changes in it.

I gave the XYZ Dimension quite a few properties, one source and one target propertiey for every possible parameter (dimension), and one property for the factor.

My script looks like something like this:

*WHEN XYZ.XYZ_T

*IS ""

*ELSE

*REC(EXPRESSION=(

[XYZ].XYZ_S,

ABC=[XYZ].ABC_S,

DEF=[XYZ].DEF_S,

GHI=[XYZ].GHI_S)

*

([XYZ].FACTOR_T,

[XYZ].XYZ_T,

ABC=[XYZ].ABC_T,

DEF=[XYZ].DEF_T,

GHI=[XYZ].GHI_T)

*ENDWHEN

*COMMIT

I tried quite a few versions of this, and I am not sure if it's even possible to get the masterdata using this right now, the Scriptlogic tester gives not that much feedback, just tells me invalid diemnsion name right at the when statment, however dimension XYZ does have the attribut XYZ_T.

I am completly lost here and would really appriciate some pointers.

Best Regards

Hendrik

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Hi Hendrik,

You have to use correct syntax if you want to use property for target selection in REC:

*REC(EXPRESSION=(%VALUE%,DIM1NAME=DIM2NAME.PROP1,DIM3NAME=DIM2NAME.PROP2,...)

Not:

DIM1NAME=[DIM2NAME].PROP1 !

Vadim