0
Former Member
Aug 28, 2007 at 03:49 AM

# REPORT-URGENT

25 Views

HI gurus,

can any one correct this code . I am not getting actual output of quantity.For this iam giving the input as date.Depens upon the date iam taking po number .depend on that iam taking matr no,desc,total qty,del qty . based on total qty and del qty i want to calculate remianing qty. I am getting some garbage values and qty also not getting.so any one can correct this and reply back to me .

DATA : BEGIN OF ITAB OCCURS 2,

EBELN LIKE EKET-EBELN,

END OF ITAB .

DATA : BEGIN OF ITAB1 OCCURS 2,

MATNR LIKE EKPO-MATNR,

TXZ01 LIKE EKPO-TXZ01,

MENGE LIKE EKET-MENGE,

WEMNG LIKE EKET-WEMNG,

MOBMNG(3) TYPE C,

END OF ITAB1.

SELECT-OPTIONS MEINDT FOR EKET-EINDT.

SELECT EBELN INTO ITAB FROM EKET WHERE EINDT IN MEINDT.

APPEND ITAB.

ENDSELECT.

LOOP AT ITAB.

SELECT MATNR TXZ01 INTO CORRESPONDING FIELDS OF ITAB1 FROM EKPO WHERE EBELN = ITAB-EBELN.

APPEND ITAB1.

ENDSELECT.

ENDLOOP.

LOOP AT ITAB.

CLEAR ITAB1-MENGE .

CLEAR ITAB1-WEMNG .

SELECT MENGE WEMNG INTO CORRESPONDING FIELDS OF ITAB1 FROM EKET WHERE EBELN = ITAB-EBELN.

APPEND ITAB1.

ENDSELECT.

ENDLOOP.

LOOP AT ITAB.

clear itab1-mobmng.

ITAB1-MOBMNG = ITAB1-MENGE - ITAB1-WEMNG.

APPEND ITAB1.

ENDLOOP.

LOOP AT ITAB1.

WRITE : / ITAB1-MATNR , ITAB1-TXZ01 , ITAB1-MENGE , ITAB1-WEMNG , ITAB1-MOBMNG.

ENDLOOP.

thanks & regards,

sunder