06-17-2009 1:11 PM
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
06-17-2009 2:24 PM
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
06-18-2009 10:56 AM
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
06-19-2009 1:02 PM