Skip to Content
0
Former Member
Feb 13, 2007 at 02:35 PM

Schedule Delivery

21 Views

Hi,

DATA: SCHED_QUAN LIKE CETT-MENGE,

FIFTEEN_DAYS LIKE SY-DATUM.

FIFTEEN_DAYS = SY-DATUM + 15.

SCHED_QUAN = 0.

SORT CETT BY EBELP EINDT.

LOOP AT CETT.

IF CETT-EINDT GT FIFTEEN_DAYS.

EXIT.

ELSE.

SCHED_QUAN = CETT-MENGE + SCHED_QUAN.

ENDIF.

ENDLOOP.

F1 = SCHED_QUAN.

F2 = F1.

This code calculates the quantity(MENGE) of the individual items (EBELP) in the Purchase order to the delivered from the first record till 15 days from current date... However I am facing problems in the displaying the results... as it is returning the same quantity (last EBELP one) to all Items... How can i fix this one...