cancel
Showing results for 
Search instead for 
Did you mean: 

SAP query - SQ01 distinct rocord

Former Member
0 Kudos

Hi,

I created a join with VBAK and VBAP tables.

We are trying to get distinct sales order document number based on sales order line item details.

Currently query output is listing sales document number repeated for input.

How we can get a list output with distinct sales document number?.

Kindly help.

Regards,

Shabeer Ahammed

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In SQ01, create an infoset instead. To get to info set, SQ01, then Environment InfoSet. Create the info set and save. Then click on Code icon and select the code section. Select the section that code should appear and manually type in the select statement such as 'select distinct vbeln from vbap where vbeln = vbak-vbeln'.

Generate. Get ABAP help if necessary.

Role assignment may also be necessary.