cancel
Showing results for 
Search instead for 
Did you mean: 

Hierarchy Question - How to pump 2 hierarchy data into 2 Info Object

Former Member
0 Kudos

Hello All -

We are now in BW 7.3 already.

Regarding to BW Hierarchy, there's requirement to push Hierarchy from 0WBS_ELEMT Hierarchy into 2 Info Objects, therefore . Since Hierarchy data flow cannot use transformation BI 7, hence, it needs to use transfer rules 3.x. Transfer rule has a limitation : 2 Transfer rules cannot have same info source.

How do I overcome this limitation in BW 7.3?

Can BW 7.3 make a possible for the usage of Transformation in hierarchy?

Kindly please ask your feedback,

Appreciate it much.

Thanks, and cheers

Accepted Solutions (1)

Accepted Solutions (1)

sander_vanwilligen
Active Contributor
0 Kudos

Hi Naomi,

When it comes to hierarchies, life has become easier with the "new" hierarchy framework as introduced in BW release 7.3. You can use 7.0 data staging technology with transformations and DTPs. In the transformation there are some new hierarchy rule types and on top of that, you can even write routines.

Most of the mapping is done automatically. If you have a look at your PSA data, then you will normally see what you have to do and whether or not to write a tiny routine (e.g. to map to another InfoObject).

There are basically 2 cases to determine the Hierarchy Characteristics:

  • FIELDNAME is available in hierarchy structure (e.g. G/L account number);
  • Only IOBJNM is available in hierarchy structure (e.g. Material Hierarchy).

In the first case, you can use the transformation rule type Derive Hierarchy Characteristic. In the second case, you can use the transformation rule type Hierarchy Split for NODENAME and a simple ABAP coding for the InfoObject. You have to program any replacement of BCT InfoObjects (e.g. 0MATERIAL by RMATERIAL). You can check the PSA data of segment Hierarchy Nodes to determine all BCT InfoObjects to be replaced.

More information can be found in the following blog . Also you can refer to SAP Help:

Best regards,

Sander

Former Member
0 Kudos

Hello Sander - thanks a lot for your advice, appreciate it much.

My case is to push hierarchy from 0wbs_elemt Info object to Z info objects. So for this case is from one info object to other info object.

I'll have a look on the document that you sent to me.

I'll come back to you if I have any questions

Thank you very much for your help. Appreciate it much.

Cheers,

sander_vanwilligen
Active Contributor
0 Kudos

Hi Naomi,

I did not understand your question completely, your source is InfoObject 0WBS_ELEMT. I tried it in my BW 7.30 sandbox and it works fine.

Prerequisite is that both source and target InfoObject are defined as InfoProviders to enable a 7.0 Transformation and DTP. You can do that - if necessary - by assigning the respective InfoObject to an InfoArea.

Firstly I created a new InfoObject ZWBSELEMT with template InfoObject 0WBS_ELEMT. Then I created a Transformation as shown in the screenshot.

In the next screen all transformation rules for every segment are automatically proposed correctly, except the one for InfoObject 0WBS_ELEMT to ZWBSELEMT. You have to connect them yourself as shown in the screenshot.

So yes, it's possible and probably fairly easy.

Best regards,

Sander

Former Member
0 Kudos

Hello Sander -

Thanks you very much for this, appreciate it much.

Yes, I tried it, but I notice in my transformation I cannot find the assignment from 0WBS_ELEMT to ZXWBSELMT like your screen capture. And when I ran data loading, I encounter error. I suspect it's caused of this.

Did you need to apply OSS Notes for hierarchy data flow beforehand?

Kindly please ask your advice,

Cheers,

sander_vanwilligen
Active Contributor
0 Kudos

Hi Naomi,

The assignment from InfoObject 0WBS_ELEMT to InfoObject ZXWBSELMT is not automatically proposed since the InfoObject technical names are different. Here a manual action is necessary:

  • Go to the Transformation in change mode;
  • Select target segment Hierarchy Structure (as shown in the screenshot);
  • Either draw a line from 0WBS_ELEMT to ZXWBSELMT or define a new rule for InfoObject ZXWBSELMT (rule type "Direct Assignment" with source InfoObject 0WBS_ELEMT);
  • Activate the Transformation;
  • Go back to the DTP and activate it again.

In my example this was the only manual assignment which I had to make, all ohers were automatically proposed. I expect this is the only missing piece.

Best regards,

Sander

Former Member
0 Kudos

Hi Sander -

Thanks you very much for your help. Appreciate it much. I am almost there

I found an issue when pumping Hierarchy data, and I found the workaround. But I think this is not a good solution due I need to do a hard code in the transformation.

This is the error message when I do data loading.

This is the work around whereby I put the routine in 0H_IOBJNM:

If you see on my routine, I need to do an hard code. I think it's not a good solution. Is there any Function or Class to get the IOBJNM so that I don't have to manually hard code it.

Have you encountered this issue? Appreciate if you can share your thought what approach that you did to resolve the issue?

Thanks in advance,

Cheers,

sander_vanwilligen
Active Contributor
0 Kudos

Hi Naomi,

Your work-around is perfect. I don't see an alternative.

The standard rule type Hierarchy Derivation won't work in my opinion since you are using a custom Characteristic.

By the way, if external (custom) Characteristics are used in the hierarchy, you will have to accomodate it in your coding. I would then suggest to use a CASE..ENDCASE statement with the various InfoObject technical names to be converted. You will have to analyze your source hierarchy data and you will understand how to write the coding.

Best regards,

Sander

Former Member
0 Kudos

Hi Sanders - Thanks you very much for feedback on this. Appreciate it much.

Btw, I am still looking the way how I don't have to put an hard code there due I'm afraid if the source has new characteristics hierarchy, it means that I need to change the ABAP Code whereby it requires Transport, and the stuff.

If you have a thought feel free to let me know, I will create new thread for this discussion.

Again, thanks you very much for your help. Appreciate it much.

Cheers,

Message was edited by: Naomi Abi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all

please refer to new message 3809233 posted today

Former Member
0 Kudos

Hi all,

I fully agree with the solution proposed by Sander.

I have actually an opposite scenario where i struggle to make the hierarchy loading correctly.

Scenario: BW 7.4, Loading a Z object <ZTEST> master data hierarchy from two STD SAP infoobjects hierarchies (ZHIER) defined for both Costcenter <CC> and WBS element <WBS>.

ZTEST is defined as 24 CHAR to hold either a CC or a WBS value.

ZTEST has a hierarchy definition that uses external characteristics infoobject <CC> and <WBS> in insure proper validation. That work fines in BW

In BW, when we maintained manually the <ZTEST> (ZHIER) hierarchy, we can either enter <CC> or <WBS> value has children or leaves. NO ISSUE.

Now, in our business process and dataflow , we want the business in ECC maintaining same hierarchy (ZHIER) for both <CC> and <WBS> separately.

EXCLUDING the leaves values, both hierarchies will have same technical name, and exactly same structure (NODES).

First

We want to load using DTPs these hierarchies the usual way from ECC to both <CC> hierarchy (ZHIER) and <WBS> hierarchy (ZHIER) first (That worked fine no issue)

Second

Sourced ZTEST (ZHIER) from both (ZHIER) <CC> and (ZHIER) <WBS>

We create Transformations from both <CC> and <WBS> Infoobject hierarchy to feed <ZTEST>

We modify the ABAP for both transformations to change infoobject name, <CC> or <WBS> to <ZTEST> and activate.

In these realted DTPs, we filter on hierarchy name (ZHIER) and pick update method

(Tree update)

We start by loading <CC>, was just perfect.

Then we loaded <WBS> and all <CC> leaves got erased by <WBS>.

BIG ISSUE

If we load <CC> after <WBS> then <CC> leaves replace <WBS> ones.

We did not find a way to have both <CC> and <WBS> attached to same nodes-subnodes etc..

Its either <CC> or <WBS> even if we change the update method to tree insert instead of tree update.

Assuming the BW support <ZTEST> using the external characteristics to hold multiples characteristics in the same hierarchy, how can we load a hierarchy sourced from their respective infoobjects.

Please provide some advise if possible

NOTE: we have also investigate creating SETS in ECC (t-code GS01) and use generic datasources to load BW without success for now but we will not explain in detail here.

rgds

Marc

sander_vanwilligen
Active Contributor
0 Kudos

Hi Marc,

This discussion is closed. Please open a new discussion with reference to this discussion.

Thanks in advance.

Best regards,

Sander