cancel
Showing results for 
Search instead for 
Did you mean: 

Foreach in Refdata

Former Member
0 Kudos

Dear All,

I am not able to read data,through FOREACH IN REFDATA.As per my information Reference data is the one, which is not present in your current filter selection but it can be used for reading.

In my infoprovider i have the data with two versions(version1 and version5). I have two layouts,each is restricted with individual versions. In my cube I've data as follows:-

Project1, WBS1, VERSION1.

Project1, WBS1, VERSION5.

Project2, WBS2, VERSION5.

Now I want to copy all the data from version5 to version1,irrespective of all the characteristics combination,if the characteristics combination exist in version1 ,it should overwrite the keyfigures,

else

it should append the rest of the records.

1)My First Observation is:-

I have restricted the filter with version1,but not able to read version5 with foreach in refdata.

2)My Second Observation is:-

If i'll restrict the filter with both the versions or remove the version from filter ,I'll be able to read data for both versions with foreach in refdata but if i'll open my both layouts at the same time,there is no lock but as soon as i'll use the planning function to copy i'll get the lock.

I want to restrict my filter with one version and read the data for another version using refdata,so i'll not get lock.

Rgds,

Indu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Indu,

I hope you already know the concept of data blocking in planning functions. I think the Foreach in Refdata statement picks up the values to loop on from each data block (not the whole reference data the function reads).

As an example, if the filter selection is restricted to Project1 and Version1, and Version is marked 'to be changed, the function will read the first two records that you mentioned below (first record as transaction data and second as refererence data), but it will not read the third record in this data block - in fact, in this case, the third record will never be read in this function because Project2 is outside the selection and Project is not marked 'to be changed'.

The point that I am trying to stress here is that you need to remember that if a particular value of version is present in reference data, its not necessary that it will be looped on in all the data blocks. Design your function keeping the data block formation in mind.