Google Search - Blog...........

SAP ABAP:Sample Select Query Using Left Outerjoin.

report ztest.
DATA: CUSTOMER TYPE SCUSTOM,
BOOKING TYPE SBOOK.

SELECT SCUSTOM~NAME
SCUSTOM~POSTCODE
SCUSTOM~CITY
SBOOK~FLDATE
SBOOK~CARRID
SBOOK~CONNID
SBOOK~BOOKID

INTO (CUSTOMER-NAME, CUSTOMER-POSTCODE, CUSTOMER-CITY,
BOOKING-FLDATE, BOOKING-CARRID, BOOKING-CONNID,
BOOKING-BOOKID)

FROM SCUSTOM LEFT OUTER JOIN SBOOK
ON SCUSTOM~ID = SBOOK~CUSTOMID AND
SBOOK~FLDATE = '20081015'

ORDER BY SCUSTOM~NAME SBOOK~FLDATE.

WRITE: / CUSTOMER-NAME, CUSTOMER-POSTCODE, CUSTOMER-CITY,
BOOKING-FLDATE, BOOKING-CARRID, BOOKING-CONNID,
BOOKING-BOOKID.

ENDSELECT.



RETURN TO MAIN INDEX:

- Sample Programs On Uploading & Downloading Files.

- Sample Programs On HR ABAP.

- Sample Report Programs On ALV List/ Grid Display.

- Sample Programs On Selection Screen.

- Sample Programs On BDC.

.....Back To MAIN INDEX.

No comments:

Post a Comment