cancel
Showing results for 
Search instead for 
Did you mean: 

derived field in BW

Former Member
0 Kudos

Hello Everyone,

I have a requirement which has a derived field "Category" and it has 31 scenarios. Please suggest what would be the best way to implement this.

Thanks,

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks everyone for your valuable suggestions!

former_member188080
Active Contributor
0 Kudos

Hi,

Since you have document number required to derive the category it will be huge data .You try to use coding with in transaction data only in transformation. Or else you can think of creating master data for document number and category.You need to take up a call based on your other condition whether you need to create any Z table or master data object and load the data through flat file?

Thanks and regards

Former Member
0 Kudos

Hi,

If you use case statement instead of If...else.... then the execution will be faster. And the loading time will also not increase much.

Regards,

Durgesh.

Former Member
0 Kudos

Hi Isha,

My understanding is, you need to derive a field "Category" in target info provider from the source which does not have Category. Can you be more specific on what scnerio the value for the field is populated?

-- Selva

Former Member
0 Kudos

Category field is not coming from R/3, it derived in BI side only. I have 31 scenario for this field e.g. if docment number is start with C and few more condition then Category is "China"..... etc.

I was thimking of putting logic in the routine but I have never used such a long procedure in the routine before and will take long time in data loading also.

former_member199691
Active Contributor
0 Kudos

I would suggest you to make a ZTABLE in BW and build your logic based on that table. Let us take a simplest example with just two fields in this rule table - Letter and Coutry. Letter would be Key and Country would be Data Field. Entry would be

C China

I India

S Singapore

and so on.

Now in your transformation, look up this table and derive category.

The structure of the table would determine the keys of the table. If you have multiple fields to derive Category, those would be the keys of the table. and differetn combination of the keys will make the table enteries. I guess you will end up will 31 entries in the table based on your 31 scenarios.

This kind of structure is helpful as it will avoid harcoding of the logic in transformation and if a new logic is to be introduced or some old logic is to be changes, you just need to change entry in this table and do not need to change transformation again and again.

A data load after changing the table entries will fix the data.

This way your transformation will also be easier to understand and performance will be good.

For maintaining ZTABLE, you can load it via flat file.

If required, you may create more than 1 rule tables.

I hope it helps.

Regards,

Gaurav

Former Member
0 Kudos

Hi ,

you can create an infoobject and use it as infoprovider .here you can load master data for that infoobject via flat file .

here you will have transformation where you can implement complex logics via routine .

this will be a one time effort but can be used for multiple targets and you can get data via lookup in your target .

regards,

jaya tiwari