Skip to Content
0
Former Member
Mar 06, 2009 at 07:07 AM

data selection

24 Views

Please use more informative subject in future

Hi Friends,

I have one more problem. This is my select statement.

SELECT APERNR ASYEAR ASMONTH AAPF AVPF AEPF

BTYEAR BTMONTH BEMPLOYEEPF BEMPLOYERPF

FROM ( ZUPWARDHAWOR AS A INNER JOIN ZTRANS_ENTRY AS B

ON APERNR = BPERNR )

INTO CORRESPONDING FIELDS OF BODY1

WHERE A~SYEAR BETWEEN SYEAR AND SYEAR

AND A~SMONTH BETWEEN '04' AND SMONTH

AND A~PERNR = SMF1-PERNR AND

B~PERNR = SMF1-PERNR

ORDER BY ASYEAR ASMONTH ASCENDING .

APPEND BODY1.

COUNT = COUNT + 1.

ENDSELECT.

TMONTH and TYEAR is a field. It contains data once a time in year or may not be.

According this statement TDATE & TMONTH is to be retrieve data but every time it is repeated.

I need if the data is availbale in table it should be extract. but it should not be repeated in every month in loop.

I hope, u guys r getting my point.

Regards,

Swapnika

Edited by: Matt on Mar 6, 2009 10:02 AM