Application Development and Automation 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: 
Read only

database view problem

Former Member
0 Likes
790

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

7 REPLIES 7
Read only

Former Member
0 Likes
755

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

Read only

0 Likes
755

HI Boobalan ,

i created a view in SE11

Edited by: JJ on Aug 5, 2008 2:24 PM

Read only

former_member217544
Active Contributor
0 Likes
755

Hi,

You can also use the statement "delete adjacent duplicates" for deleting the repeated records.

Hope this will help.

Regards,

Swarna Munukoti.

Read only

0 Likes
755

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.

Read only

0 Likes
755

Thanks amit ur question is correct one

Edited by: JJ on Aug 5, 2008 2:26 PM

Read only

Former Member
0 Likes
755

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

Read only

Former Member
0 Likes
755

hi,

you can use collect statement.

but , I am not sure.

thnks and rgds,

raghul