Skip to Content
0
Former Member
Sep 19, 2007 at 10:31 AM

why i am getting **** as output? how to get first record and last record...

20 Views

REPORT ZMYTESTPRG62 .

DATA : BEGIN OF ITAB OCCURS 0,

KUNNR LIKE KNA1-KUNNR,

NAME1 LIKE KNA1-NAME1,

LAND1 LIKE KNA1-LAND1,

ORT01 LIKE KNA1-ORT01,

END OF ITAB.

SELECT kunnr name1 land1 ort01 FROM KNA1 INTO CORRESPONDING FIELDS OF

TABLE ITAB.

sort itab by land1.

LOOP AT ITAB.

at first.

WRITE : / ITAB-KUNNR, ITAB-NAME1, ITAB-LAND1, ITAB-ORT01.

endat.

AT last.

WRITE : / ITAB-KUNNR, ITAB-NAME1, ITAB-LAND1, ITAB-ORT01.

ENDAT.

ENDLOOP.

Any clues guyz...

thanks,