cancel
Showing results for 
Search instead for 
Did you mean: 

Allocation Script Logic

Former Member
0 Kudos

Hi Guys,

I am trying to find a work around.

I copied the DRIVER data to the same BPC cube with a data source called like DRIVER DS.

I am using the standard allocation script logic.

So the WHAT vertical is the data set selection for the sender data right ?

The WHERE vertical is the data set selection for the target and USING is the percentage calculation .

If I have few dimension member values different between the SOURCE and the DRIVER data. if I ignore the dimensions in the allocation script it is not reading the READ driver data set.

For example Dim1 = V1 in the source and in the driver data Dim1 = V2. I want to ignore the Dim1 in the driver and select the driver data comparing other dimensions. But still it is comparing with the source and it is not selecting the DRIVER data. if I have the same members for example Dim1= V1 in both source and DRIVER(Reference data) then it selects the intersection .How to avoid this in script logic. Like don't check that dimension values in the DRIVER data and select only like 4 out 7 dimensions.

I tried to use

*RUNALLOCATION

     *FACTOR=USING/TOTAL

* The below code is only to ignore the dimensions - just copy the source to target

     *DIM D1          WHAT=%D1%;     WHERE=<<<

     *DIM D2          WHAT=%D2%;     WHERE=<<<

     *DIM D3          WHAT=%D3%;     WHERE=<<<

//PLUS ALL THE DIMESNIONS LIKE WHAT SENDER ..WHERE MULTIPLE TARGET MEMBERS ..USING..ETC

*ENDALLOCATION

But if I want to copy the same source value to the target it is not reading the DRIVER data . If the dimension values D1,D2 and D3 are same between source and driver then DRIVER data is READ.Do you know know how to achieve this ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

-----------------------------------------

--Read WHAT region

--Time to load WHAT :0.162687 second(s).

WHAT data:1  records.

-----------------------------------------

--Read USING region

--Time to load USING :0.164427 second(s).

USING data:57  records.

-----------------------------------------

--Merge WHAT and USING

--Time to merge WHAT and USING :0.000414 second(s).

Data after merging WHAT and USING 0  records.

-----------------------------------------

--Apply factor

TOTAL data:57  records.

WHERE=WHAT *USING/TOTAL

--Time to apply factor :0.156849 second(s).

-----------------------------------------

--Read destination and calculate difference

--Time to read destination and calculate difference :0.137306 second(s).

-----------------------------------------

--Records succeeded to write back 0

- It has WHAT 1 record and USING 57 records . When it merges it gives 0 records. It is WRITING back 0 records. Any suggestion how to debug and find out why it is writing 0 records. I can't debug the code. If it is FOX code I can debug the ABAP code behind it. I am wondering how to debug the script logic in UJKT.

former_member186338
Active Contributor
0 Kudos

Hi Senthil,

I am unable to understand your requirements... Looks like you don't understand how allocation works.

Please provide a data sample with dimension members and values and the desired calculation result!

Vadim

P.S. FOX is not relevant to script logic!

Former Member
0 Kudos

Hi Vadim,

We can debug FOX code using a ABAP program like what is the ABAP code got generated behind the FOX  code. Can you please suggest how to debug the script logic. In UJKT  we can debug the BADI  . How to debug the script logic. Thanks

Former Member
0 Kudos

Hi Senthil,

Have you seen the below threads :

http://scn.sap.com/thread/1269221

Maybe if you use UJK_SCRIPT_LOGIC_TESTER as mentioned by Sheldon, it might help you?

Jay

former_member186338
Active Contributor
0 Kudos

Hi Senthil,

Yes, you can debug ABAP code related to script logic processing and execution. But for this particular case it will be a waste of time.

"Please provide a data sample with dimension members and values and the desired calculation result!"

There is no magic in *RUNALLOCATION, simple tests in UJKT will solve the issue!

Vadim