Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

View is giving redundant data

Former Member
0 Kudos

Dear Friends,

I have created one view, the data base creation statement is like the below. My main intertion is get the SO no, Delivery No, shipment no in one row.

CREATE VIEW "ZSD_LIPS_VTTK"

("DELIVERY_NO","SHIPMENT_NO","MBL_NO","SHIPMENT_DT","ZZMBLISSUEDATE","SO_NUM")

AS SELECT

T1."VBELN",T2."TKNUM",T2."EXTI1",T1."WADAT_IST",T2."ZZMBLISSUEDATE",T4."VGBEL"

FROM "LIKP" T1,"VTTK" T2,"VTTP" T3,"LIPS" T4

WHERE

T2."TKNUM" = T3."TKNUM" AND

T1."VBELN" = T3."VBELN" AND

T4."VBELN" = T1."VBELN"

As SO is in the LIPS table, I am joining LIPS with LIKP. So I am getting redundant data for one perticular delivery no. you can see the below output......

DELIVERY_NO SHIPMENT_NO MBL_NO SHIPMENT_DT ZZMBLISSUEDATE SO_NUM

0080000447 0000001162 526485552 20080908 20080915 0000003643

0080000447 0000001162 526485552 20080908 20080915 0000003643

0080000447 0000001162 526485552 20080908 20080915 0000003643

0080000447 0000001162 526485552 20080908 20080915 0000003643

Now tell me how could i generate this view so that, I can get one row

0080000447 0000001162 526485552 20080908 20080915 0000003643

Please guide me how to do that.

Rgds

Farhad

3 REPLIES 3

former_member555112
Active Contributor
0 Kudos

Hi,

Since you are also joining LIPS and VTTP.

So your view fields should contains fields from these tables such as POSNR so that multiple entries are avoided.

Regards,

Ankur Parab

0 Kudos

HI,

I have added T4."POSNR" ='000010' to reduce the redundant data, but the reality is that sometimes the no 10 line item data can be deleted from the delivery. In this case i need to have the unique value of the desire fields.

Rgds

Farhad

0 Kudos

This message was moderated.