cancel
Showing results for 
Search instead for 
Did you mean: 

End Routine Navigational Attribute

former_member207019
Participant
0 Kudos

Dear All,

I have a requirement to compare a navigational attribute field in the end routine. But it is not showing in RESULT_PACKAGE structure.

I could not able to see "plant__0region" which is navigational attribute. In my logic I have to compare the region to plant-region. So could you please do let me know any other alternative to have a customized coding.

Regards,

Jo

Accepted Solutions (1)

Accepted Solutions (1)

former_member186053
Active Contributor
0 Kudos

Hi Jyotsna,

If you have plant Infoobject in your end routine, you can read navigational attribute from your Plant master data(take a look up on P table). Try this and let us know.

Thanks,

Vengal.

Answers (3)

Answers (3)

Loed
Active Contributor
0 Kudos

Hi Jyotsna,

As Vengal said, just do a SELECT statement in end routine to get the NAV ATTR value of REGION from PLANT..Then use the result in your condition..

Regards,

Loed

former_member207019
Participant
0 Kudos

I have checked to get navigational attribute data from P table i.e. PPLANT. But no use, because here we have only one record combination for plant-region. But actually in cube we have many records with plant-region combination.

For instance, P1-R1, P1-R2,P1-R3 in cube. Where as in P table we have only one P1-R1 record but not other record combinations.

So how can I get remaining data records.

Regards,

Jo

Former Member
0 Kudos

Hi Jyotsna,

The PPLANT table has a key based on PLANT so you will only get one value of REGION for each value of PLANT. If you have different values of REGION in the cube I'm assuming that's because REGION is coming through separately from your source.

Why exactly do you need to compare the navigational attribute to the region from the cube?

Regards,

Gareth

former_member207019
Participant
0 Kudos

We have to perform some calculations based on plant-region combination data.

So I am looking into it.

Loed
Active Contributor
0 Kudos

Hi Jyotsna,

Huh? I didn't understand why you don't have unique combination of nav attribute in your master data..

Can you post a sample data of what do you want to do? Because you should be able to do a lookup in P table if you only like to get the nav attr..

Regards,

Loed

former_member207019
Participant
0 Kudos

Since Plant alone is primary key in Plant info object, If I create one more custom info object with the Plant as a primary key and region as a compounding info object, does it help much.

After creating it, I will include this info object in existing data flow. In that case what is the impact of it.

Loed
Active Contributor
0 Kudos

Hi Jyotsna,

What do you want to compare? After comparing,what do you want to do?

Can you provide sample data to help us visualize what you wanted to do?

Regards,

Loed

former_member207019
Participant
0 Kudos

we have a custom table which has PLANT, REGION, POSTAL CODE combination as a primary key.

Now in my info cube I am using 0plant info object which has navigational info objects i.e. region, postal code.

Table data is:

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

P1,R1,PCODE1

P1,R2,PCODE2

P1,R3,PCODE3

all r unique records in the table.

Now coming to PPLANT table, we have plant alone as a key field.

So we cant have same plant number for multiple regions as followed.

P1 R1 PCODE1  (R1 & PCODE1 is an attribute, no display in result_package structure)

P2 R2 PCODE2 (R2 & PCODE2 is an attribute, no display in result_package structure)

P3 R3 PCODE3 (R3 & PCODE3 is an attribute, no display in result_package structure)

each plant has only one region, since plant is primary key.

Now I have to compare this with custom table plant details and do some key figure calculations.

former_member186053
Active Contributor
0 Kudos

Hi Jyotsna,

Based on my understanding, just give a try with below approach.

Read all the records from Plant master data table into an internal table. After this read one record after the other into work area with where condition as WA1_plant = Plant_Cube and WA1_region = Region_Cube. This way you are fectching data with combination of plant & region seems to be unique. I am not sure this will work or not, have a try and let us know.

Thanks,

Vengal.

Former Member
0 Kudos

Hi Jyotsna,

If you have a custom table with those 3 fields as a key then you'll need to provide those 3 key fields in your end routine to do the lookup. Otherwise, like you said, you'll be looking at a single entry for Plant which will give a single Region and Post Code from the PPLANT table.

Are you able to put the other 2 fields (Region and Post Code) into your source so it flows through? If you don't need the other 2 fields in your target then you could do the calculation in a start routine and then not map them in the transformation.

Even if you create a custom infoobject compounding Plant and Region together you'd still need to provide the region in the flow so it can be assigned.

Regards,

Gareth

former_member207019
Participant
0 Kudos

If I take Region as compound info object, does it show in result_package structure in the end routine.

Former Member
0 Kudos

How do you mean take Region as a compound info object? If you have a compound object in the target then you'd have to supply both Region and Plant from the source and you'd need to include Region in the target anyway as it's part of the compound key for the new info object.

So yes, you would have Region in the end_package but it sounds like a lot of extra work when you could just have Region and Plant as separate objects and have them both in the target and use them to look up the values from the custom table as you required.

Regards,

Gareth

Loed
Active Contributor
0 Kudos

Hi Jyotsna,

May I ask why REGION and POSTAL CODE are not compounded in PLANT masterdata?

I think you should make those objects compounded to PLANT so as you can compare the values in masterdata and in the table..

Regards,

Loed

Regards,

Loed

sander_vanwilligen
Active Contributor
0 Kudos

Hi Jyotsna,

Unlike the Start Routine where as of BW release 7.3 you can also select Navigational Attributes, you do not have this feature for the End Routine. Alternatives are e.g. moving the logic to the Start Routine or using ABAP coding to read the Navigational Attributes.

Best regards,
Sander

KodandaPani_KV
Active Contributor
0 Kudos

Hi,

not required for writing the code for navigational attribute.

if you write the code for the 0PLANT  you will get automatically

form you question  0REGION was 0PLANT attribute.

0PLANT master data 0REGION convert to display to navigation attr.

uner the cube do same changes for 0REGION.

-Phani.