Hello all,

Not a long time ago I faced an issue with reading a mapping from a planning function. Before HANA was invented it was a no-brainer. We created a functional module and read it through “call function”. But what is the best approach now when we shouldn’t use ABAP inside planning functions anymore? (To be specific, the system which I’m using is BW4HANA).

It seems that the only one way to do it is to use a relatively new BI-IP function “Accessing InfoProviders”.

So I did a few setups:

  1. Direct update ADSO with a technical key figure (because we need to build an aggregation level on top of it);
  2. A composite provider;
  3. An aggregation level;
  4. To read a mapping a following code should be written:
INFOPROVIDER ZAGGLEV1.

FOREACH A, B IN SELECTION.

   KF = ZAGGLEV1.{ZKF, ZINFOPROV1, A, B }.
   IF KF = 1. 
       {ZAMOUNT, ZINFOPROV2, A, B} = …
   ENDIF.

ENDFOR.

It looks a little weird comparing to a function module call, but it works and works on HANA.

But in my case, it didn’t work. So, I tried to find out what might be causing the problem. The problem was that a characteristic with conversion routine was involved. It was one of those PS/PPM characteristics which have a technical GUID. So, it has only a few visible master data (which are used in the mapping) but hundreds GUIDs.

1

2

I tried different approaches to solve this obstacle including a composite provider with a left join (left join the ADSO which contains the mapping with the characteristic which contains GUID in its attributes). It was a good try but the absolute wrong one because it’s impossible to build an aggregation level on top of such a composite provider.

So, at the end I created a calculation view which joins the ADSO and another calculation view which is used to access the master data of my troubled characteristic.

This is how the mapping looks like before the join:

3

And this is how it is after:

4

And the last step, I used this calc view in the composite provider connecting GUID directly to my troubled characteristic:

5

This how the mapping finally looks like through LISTCUBE:

6

Now the code mentioned earlier works fine.

 

So, this is the only one way which I found to read a mapping inside BI-IP planning function without using ABAP. If you know something better, please share it with me.

Randa Khaled

Randa Khaled

Author Since: November 19, 2020

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x