2007 Jul 06 1:48 AM
update routine - date difference need to be calculated
-
Hi,
I have a report for which I need to add 6 keyfigure fields.
I need abap code to add to my update routine
They are:
Early ZEARLYDT
On Time ZONTIME
Late ZLATEDT
Early%
On Time%
Late%
The is what the scenario is:
If Completion Date (ZCOMP_DT) < Request Date (ZRQEND_DT) then,
Early = 1, OnTime = 0, Late = 0
If Completion Date (ZCOMP_DT) = Request Date (ZRQEND_DT) then,
Early = 0, On Time = 1, Late = 0
If Completion Date (ZCOMP_DT) > Request Date (ZRQEND_DT) then,
Early = 0, On Time = 0, Late = 1
If Early = 1, Early% = 100%
If Early = 0, Early% = 0%
If On Time = 1, On Time% = 100%
If On Time = 0, On Time% = 0%
If Late = 1, Late% = 100%
If Late = 0, late% = 0%
QMMA/JCDS Source Table(s) for "Complete Date"
"PETER" Source Field for "Complete Date"
QMEL Source Table for "Request Date"
LTRMN Source Field for "Request Date"
--
update routine - date difference need to be calculated
-
Hi,
I have a report for which I need to add 6 keyfigure fields.
I need abap code to add to my update routine
They are:
Early ZEARLYDT
On Time ZONTIME
Late ZLATEDT
Early%
On Time%
Late%
The is what the scenario is:
If Completion Date (ZCOMP_DT) < Request Date (ZRQEND_DT) then,
Early = 1, OnTime = 0, Late = 0
If Completion Date (ZCOMP_DT) = Request Date (ZRQEND_DT) then,
Early = 0, On Time = 1, Late = 0
If Completion Date (ZCOMP_DT) > Request Date (ZRQEND_DT) then,
Early = 0, On Time = 0, Late = 1
If Early = 1, Early% = 100%
If Early = 0, Early% = 0%
If On Time = 1, On Time% = 100%
If On Time = 0, On Time% = 0%
If Late = 1, Late% = 100%
If Late = 0, late% = 0%
QMMA/JCDS Source Table(s) for "Complete Date"
"PETER" Source Field for "Complete Date"
QMEL Source Table for "Request Date"
LTRMN Source Field for "Request Date"
--
2007 Jul 06 1:50 AM
Hi Deva,
you should first write the ABAP code and if you face some problem then we can suggest you the solution.
Regards,
Atish
2007 Jul 06 5:28 PM
Yes, I need Abap code for this scenario. Need help writing it
2007 Jul 11 4:00 PM
I have included the following update routine which is supposed to give me results for ZEARLYDT, ZONTIME and ZLATE as either 1 or 0.
But, I am receiving all kinds of numbers in there.
--
Are there any changes that I need to make to the below code?
For Scheduled orders if Completed dt is le Required end dt
then met req dt is 1
IF LT_DATA_PACKAGE-NOT_TYPE = 'Z3' OR LT_DATA_PACKAGE-NOT_TYPE = 'Z4'
OR LT_DATA_PACKAGE-NOT_TYPE = 'Z5' OR LT_DATA_PACKAGE-NOT_TYPE = 'Z6'
OR LT_DATA_PACKAGE-NOT_TYPE = 'Z7' OR LT_DATA_PACKAGE-NOT_TYPE = 'Z8'.
IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT LE LT_DATA_PACKAGE-/BIC/ZRQEND_DT .
LT_DATA_PACKAGE-/BIC/ZMETREQDT = 1.
ENDIF.
IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT LT LT_DATA_PACKAGE-/BIC/ZRQEND_DT.
LT_DATA_PACKAGE-/BIC/ZEARLYDT = 1.
ENDIF.
IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT EQ LT_DATA_PACKAGE-/BIC/ZRQEND_DT.
LT_DATA_PACKAGE-/BIC/ZONTIME = 1.
ENDIF.
IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT GT LT_DATA_PACKAGE-/BIC/ZRQEND_DT.
LT_DATA_PACKAGE-/BIC/ZLATEDT = 1.
ENDIF.
LT_DATA_PACKAGE-/BIC/ZDATDIFF = LT_DATA_PACKAGE-CALDAY -
LT_DATA_PACKAGE-/BIC/ZRQEND_DT.
ENDIf.
2007 Jul 15 11:25 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |