Skip to Content
0
Former Member
Jul 15, 2008 at 03:58 AM

group by in select statment

1339 Views

hi all

i want to group by vblnr how to do it ? this is my select statement

SELECT * from reguh into table it_reguh

WHERE ZBUKR eq p_bukrs

AND laufd eq p_laufd

AND laufi eq p_laufi

and RZAWE eq p_zlsch

and xvorl eq space

and vblnr ne space.

IF it_reguh[] IS INITIAL.

MESSAGE i000 WITH 'no data for that selection'.

EXIT.

ENDIF.

IF NOT it_reguh[] IS INITIAL.

select * from regup into table it_regup

for ALL ENTRIES IN it_reguh

where laufd eq it_reguh-laufd

and laufi eq it_reguh-laufi

and zlsch eq it_reguh-rzawe

and xvorl eq it_reguh-xvorl

and vblnr eq it_reguh-vblnr.

endif.

thanks in advance

cheers

uday