Skip to Content
0
Aug 29, 2008 at 02:08 PM

ABAP QUERY suppress muliple output lines

412 Views

Hi there,

I am using SQ01 and created a table join woth SQ02

My question is, is it possible to suppress additional lines of a certain key value.

The output at this moment is (simplified)

Customer Sales Org DC Div Contract

1 XXXX 01 01 ZABC

1 XXXX 01 01 ZABC

1 XXXX 01 01 ZABC

2 XXXX 01 01 ZABC

2 XXXX 01 01 ZABC

3 XXXX 01 01 ZABC

3 XXXX 01 01 ZABC

The customer data comes form table KNA1VV and the contract type comes from the VBAK table (inner join). In the selection I enter always a specific contract type in this example ZABC. The first three lines means that customer 1 has three different contracts of type ZABC, the second two lines means that customer 2 has two different contracts of type ZABC etcetera.. What I want to know (and see on the output) which customers have a valid contract of type ZABC?

This is what I need. I don't want duplicated records of the VBAK table.

1 XXXX 01 01 ZABC

2 XXXX 01 01 ZABC

3 XXXX 01 01 ZABC

Can anybody tell me how to acheive that?