cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect Join in between VBAK and VBAP

Former Member
0 Kudos

Hi Experts,

Calculation view has been created with sales doc and sales item customized tables(fields) and details are:

1) left outer join

2) Cardinality n:1

card n:1

in the data preview, am getting in correct results( getting doubles results)

 

VBAK Tables Data In the below:

Table Data

am confused here, how to join in between VBAK and VBAP.

I know joing is incorrec VBAK(7235) --> VBAP(2 twice of 7235) and getting incorrect results.

Kindly suggest how to join?

Thanks.

Best Regards,

Edukondalu K

Accepted Solutions (0)

Answers (2)

Answers (2)

henrique_pinto
Active Contributor
0 Kudos

You probably have two items in this case, but since you dont have the item number being outputed, it's summing the same KF twice. As mentioned before, if you want KFs from the header table, you need to model differently. Anil's suggestion might work.

former_member210482
Active Participant
0 Kudos

Hi Ed,

Join is correct. Please check your VBAP table. It can have multiple sales item. Your doing n:1 join. So for n sales item it will fetch 1 value each from vbak. Here there may be 2 sales item in vbap. so 2*1 value from vbak.

Regards,

Safiyu

Former Member
0 Kudos

Hi,

Exactly It is happening like that 2*2802 = 5604  but I need only with respect to VBAK ie

Result should be only  2802  then only it is correct  because I am looking in VBAK tables only.

suppose I need Item KWMENG then It should come double in Item level.

so the cardinality is not working here

thanks.

Br,

Ed

former_member210482
Active Participant
0 Kudos

Hi Ed,

Then change the left table to vbak. The table of interest should always be kept in left. Even a right outer join will do. Dont specify cardinality if your not sure about it. System will decide appropriate one.

Regards,

Safiyu

Former Member
0 Kudos

Hi,

Since you are interested KFs from VBAK but not multiplied values eqaul to no of entries in VBAP, Can you think about creating 2 Analytical views . One on VBAK and another on VBAP, and then union them in Calculation view.

Thanks,

Anil Kumar. P

Former Member
0 Kudos

thanks.

It worked fine.