1.3.11

SAP Note 23949 - Incorrect date calculation cycle counting OMCO

Symptom:

In fiscal year variants that are not calendar-dependent, the annual intervals could calculated incorrectly during the cycle counting Customizing.

Cause and prerequisites

Program error in L0MI0FI0

Solution
SE38 -> Module L0MI0FI0.
FORM INTERVALL_BERECHNEN USING LOC_WERK
LOC_ANZ
CHANGING LOC_INT
LOC_PZ.
..
..
*-- Im ersten Fall gibt es eine jahresspezifische Periodenbestimung
SELECT * FROM T009B WHERE PERIV EQ T001-PERIV
AND BDATJ EQ MARV-VJGJA
* AND BUMON EQ MARV-VJMON. <-OLD
AND POPER EQ MARV-VJMON. <-NEW
ENDSELECT.
IF SY-SUBRC IS INITIAL.
IF T009B-RELJR EQ '0 '. <-INSERT
DATUM-JAHR = MARV-VJGJA.
ENDIF. <-INSERT
DATUM-TAG = T009B-BUTAG.
DATUM-MONAT = T009B-BUMON.

*-- Im zweiten Fall ist die Periodenbestimmung jahresunabhängig
ELSE.
SELECT * FROM T009B WHERE PERIV EQ T001-PERIV
AND BDATJ EQ SPACE <-INSERT
* AND BUMON EQ MARV-VJMON. <-OLD
AND POPER EQ MARV-VJMON. <-NEW
ENDSELECT.
IF T009B-RELJR EQ '0 '. <-INSERT
DATUM-JAHR = MARV-VJGJA.
ENDIF. <-INSERT
DATUM-TAG = T009B-BUTAG.
DATUM-MONAT = T009B-BUMON.
ENDIF.
..

No comments:

Post a Comment