28.12.10

SAP Note 16225 - Wrong thereshold value for currency w/o decim.places

Symptom:

Note is no longer valid. Please see instead notes 19170 and 34696!!!!

If you create a physical inventory document in a currency which does not have two decimal places and you then post any inventory differences or enter recount results for this document, the system will select the wrong items provided that a threshold value was entered on the initial screen.

Cause and prerequisites

Internally, the specified value is always represented with two decimal places. Therefore, the value is converted into a wrong value.

Solution
To solve the problem, the following changes are necessary:

1. In structure RM07I, include the following field:
IWERT -> data element DMBTR_BI

2. Tools -> Case -> Development -> Screen Painter:
Program: SAPMM07I
Screen number: 0701
-> Field list -> Change:
Field name: RM07I-SWERT: in the 2nd line replace SWERT by IWERT
-> Go To -> Processing logic:
...
PROCESS AFTER INPUT.
...
-> FIELD RM07I-SWERT. "Delete
-> FIELD RM07I-IWERT. "New
MODULE BELEG_LESEN.
...
-> Screen -> Generate

Additionally, do the same procedure for screen 0702.


3. Change Include MM07MCOM as follows:
TABLES: ...
T185V,
-> TCURX. "NEW!!

DATA: ...
DIALOG TYPE C VALUE 'X',
-> EXPONENT TYPE I, "NEW!!
HELL TYPE C VALUE 'X',
...

4. Change Include MM07IFE0 as follows:

PERFORM WERK_PRUEFEN(SAPFM07I) USING X ...
-> SELECT SINGLE * FROM TCURX WHERE CURRKEY = T001-WAERS. "NEW!!
-> IF SY-SUBRC = 0. "NEW!!
-> EXPONENT = TCURX-CURRDEC. "NEW!!
-> ELSE. "NEW!!
-> EXPONENT = 2. "NEW!!
-> ENDIF. "NEW!!
-> IF EXPONENT NE 0. "NEW!!
-> RM07I-SWERT = RM07I-IWERT * ( EXP( EXPONENT * LOG( 10 ) ) ). "NEW
-> ELSE. "NEW!!
-> RM07I-SWERT = RM07I-IWERT. "NEW!!
-> ENDIF. "NEW!!
*--- Prüfung, ob die Buchungsperiode im Kopf bereits gesetzt ist.

5. Change Report RM07IDIF as follows:
TABLES: ISEG,
-> TCURX, "NEU!!
VM07I.
DATA: ...
BLANK(256) TYPE C VALUE ' ',
-> EXPONENT TYPE I, "NEU!!
KENNG(5) TYPE C VALUE 'IIKPF',
...
REFE1 LIKE AM07M-IWERT,
-> IWERT LIKE AM07M-IWERT. "NEU!!

SELECT-OPTIONS GJAHR FOR ISEG-GJAHR.
-> PARAMETER IWERT LIKE AM07M-IWERT. "Löschen!!
-> PARAMETER IIWERT(13) TYPE C. "Neu!!

FORM YISEG_FUELLEN.
ON CHANGE OF IIKPF-WERKS.
PERFORM WERK_LESEN USING IIKPF-WERKS.
-> SELECT SINGLE * FROM TCURX WHERE CURRKEY = T001-WAERS. "NEU!!
-> IF SY-SUBRC = 0. "NEU!!
-> EXPONENT = TCURX-CURRDEC. "NEU!!
-> ELSE. "NEU!!
-> EXPONENT = 2. "NEU!!
-> ENDIF. "NEU!!
-> IF EXPONENT NE 0. "NEU!!
-> IWERT = IIWERT * ( EXP( EXPONENT * LOG( 10 ) ) ). "NEU!!
-> ELSE. "NEU!!
-> IWERT = IIWERT. "NEU!!
-> ENDIF. "NEU!!
H_BWKEY = T001W-BWKEY.
ENDON.
...
ENDFORM.

No comments:

Post a Comment