‎2008 Aug 05 4:31 AM
Hi all,
I am creating database view in production.using lips, likp, mara..for to view the delivery order details in that view. but in each line come 4 times .
eg:
in delivery order 80010010 contains 2 line item
DO# line item material qty
80010010 90001 AAAAAA 345
80010010 90002 AbbbA-df 456
in my view shows four line item as follows
80010010 90001 AAAAAA 345
80010010 90001 AAAAAA 345
80010010 90002 AbbbA-df 456
80010010 90002 AbbbA-df 456
some each line item show four the times actual line items...
how can i solve it
‎2008 Aug 05 4:59 AM
Hi,
try the below code.
REPORT zb_set.
TYPES: BEGIN OF ty_likp,
vbeln TYPE vbeln,
posnr TYPE posnr,
matnr TYPE matnr,
END OF ty_likp.
DATA: it_likp TYPE STANDARD TABLE OF ty_likp.
START-OF-SELECTION.
SELECT a~vbeln
b~posnr
c~matnr
FROM likp AS a INNER JOIN lips AS b ON avbeln = bvbeln
INNER JOIN mara AS c ON bmatnr = cmatnr
UP TO 50 ROWS
INTO TABLE it_likp.
write: 'display'.
in this code i am not getting any duplicate record,
Regards,
Boobalan S
‎2008 Aug 05 7:24 AM
HI Boobalan ,
i created a view in SE11
Edited by: JJ on Aug 5, 2008 2:24 PM
‎2008 Aug 05 5:44 AM
Hi,
You can also use the statement "delete adjacent duplicates" for deleting the repeated records.
Hope this will help.
Regards,
Swarna Munukoti.
‎2008 Aug 05 5:52 AM
Swarna,
Hi,
You can also use the statement "delete adjacent duplicates" for deleting the repeated records.
Hope this will help.
Regards,
Swarna Munukoti.
can you please bit elaborate if JJ is creating view from Se11 than how can we use delete adjacent duplicates?
Amit.
‎2008 Aug 05 7:25 AM
Thanks amit ur question is correct one
Edited by: JJ on Aug 5, 2008 2:26 PM
‎2008 Aug 05 5:50 AM
JJ,
i assume you are creating view from se11.
You might have not declared the KEY links between the tables that are used in the View correctly, that's why you may be getting duplicate values
Check the same and redefine the link between tables
First check manually in 2 tables for the records and then define and fetch data from the view and use
‎2008 Aug 05 7:27 AM
hi,
you can use collect statement.
but , I am not sure.
thnks and rgds,
raghul