cancel
Showing results for 
Search instead for 
Did you mean: 

Logic in calculation view

former_member254442
Participant
0 Kudos

Hi All, I need to exclude AUFK-AUFNR( AUFNR is key field)  from my report where AUFK-OBJNR=JEST-OBJNR, JEST-STAT = I0015 and I0076  with JEST-INACT NE X . Please note that relationship between AUFK-OBJNR & JEST-OBJNR is 1:n  . How can we apply this logic in Calculation view of HANA studio . Thanks in advance .

Accepted Solutions (1)

Accepted Solutions (1)

anindya_bose
Active Contributor
0 Kudos

Hi Pranjal

As per my understanding of the scenario , if you model as following it would give you right data .

1 ) You are planning to do it in Graphical Calculation view ( assumption )

2) Create a projection on JEST table with all the filters . i.e

Status in list ( I0076 ,I0015 )   and INACT  NOT EQUAL X .   Now, you would get all OBJNR for which you do not want to show data in report.  However, there might be multiple lines for one OBJNR based on status .

3) Use a rank node and take latest status  --- ( in your case I0076 would be latest if OBJNR for both status exists ) -- It would give you only one line for one OBJNR .

4) Take another Projection for AUFKtable .

5) Left outer Join AUFK-Projection with Rank Node on OBJNR .   Filter records where OBJNR from RANK NODE ( JEST) is populated.

Regards

Anindya

former_member254442
Participant
0 Kudos

Hi Bose ,

Thanks for your quick response . Yes, your understanding is correct . I am plannning to create graphical calculation view which in turn will be used in another calculation view .

For point no .3 as you have explained , at a given point of time, there will be only one status out of these two status ( ie. either IOO76 or I0015 ) with some other status like IOO11, IOO12 etc (one OBJNR will have multiple status ) at JEST table for an object nr (OBJNR) . I need to exclude this OBJNR & subsequently corresponding field AUFNR ( table AUFK) . How can we filter in this scenario  ?

For point no 4. , since this view will be used in another view , can we filter out AUFNR at JOINT node ? or how can we exclude .

Please note that there will be OBJNR in JEST table ,without these two status ( IOO76/IOO15) & I need to capture corresponding AUFNR in my report .

Thanking you .

anindya_bose
Active Contributor
0 Kudos

For point no .3 as you have explained , at a given point of time, there will be only one status out of these two status ( ie. either IOO76 or I0015 ) with some other status like IOO11, IOO12 etc (one OBJNR will have multiple status ) at JEST table for an object nr (OBJNR) . I need to exclude this OBJNR & subsequently corresponding field AUFNR ( table AUFK) . How can we filter in this scenario  ?

In point 2 ) we are making a list of OBJNR which need to be excluded from AUFK. 

As per your requirement ,

If  in JEST  --Status in list ( I0076 ,I0015 )   and INACT  NOT EQUAL X, you don't want those OBJNRs. First projection would give you list of OBJNR you do not want .  Rank node would give you only one if there is multiple OBJNRs because of the status field.


For point no 4. , since this view will be used in another view , can we filter out AUFNR at JOINT node ? or how can we exclude .

No.  You add another PROJECTION node and pass the result of the Left Outer Join . Filter data in projection node. Alternatively , you can also filter in reporting tool. However, that might have some performance degradation as more data needs to go to reporting front end.

On, your last point, we are not making a list of entries which need to be included, instead we are making a list of OBJNR which need to excluded.

Regard

Anindya

former_member254442
Participant
0 Kudos

Hi,

I am not able to take latest status in rank node as you have mentioned . Screen shot is attached herewith . Please let me know how can we select this status .

anindya_bose
Active Contributor
0 Kudos

You need to make Thresh hold as 1( ascending or descending )   , Order By STATUS .

Partition By OBJNR .

Status is not important here, important is to take only OBJNR from multiple entries.

Check some youtube videos on how to use Rank Node and basic modeling functionalities.

former_member254442
Participant
0 Kudos

Hi Bose ,

Thanks a lot , It works now .

Answers (0)