24.1.11

SAP Note 19089 - Deleting PO item: requisition quantity wrongly updated

Symptom:

You create a requisition without a material (transaction ME51). When
converting into a PO (ME21), you choose a different unit of measure,
for which a conversion factor exists (e.g. 1000 KG = 1 TO).
If you now delete the PO item, the requisition quantity is updated
wrongly. The reconversion into the requisition unit of measure is
not carried out.

Cause and prerequisites

Program error.

Solution
Cf. correction numbers in this note.
Prior to this the correction can be implemented as follows:
Program MM06EFET, FORM ETT_EKPO-LOEKZ:

*- offene bestellte Menge ermitteln -----------------------------------
F1 = ETT-MENGE - ETT-WEMNG.
IF EKPO-MATNR NE SPACE.
F1 = F1 * EKPO-UMREZ / EKPO-UMREN.
ENDIF.
QDIFF = F1.
IF BATU-MEINS NE EKPO-MEINS. "<-- insert
* Umrechnen von Bestell-ME auf Banf-ME "<-- insert
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE' "<-- insert
EXPORTING "<-- insert
INPUT = F1 "<-- insert
NO_TYPE_CHECK = 'X' "<-- insert
UNIT_IN = EKPO-MEINS "<-- insert
UNIT_OUT = BATU-MEINS "<-- insert
IMPORTING "<-- insert
OUTPUT = F1 "<-- insert
EXCEPTIONS "<-- insert
CONVERSION_NOT_FOUND = 01 "<-- insert
DIVISION_BY_ZERO = 02 "<-- insert
INPUT_INVALID = 03 "<-- insert
OUTPUT_INVALID = 04 "<-- insert
OVERFLOW = 05 "<-- insert
TYPE_INVALID = 06 "<-- insert
UNITS_MISSING = 07 "<-- insert
UNIT_IN_NOT_FOUND = 08 "<-- insert
UNIT_OUT_NOT_FOUND = 09. "<-- insert
ENDIF. "<-- insert
*- Bestellanforderung fortschreiben ----------------------------------
IF ETT-BANFN NE SPACE.
MOVE EKKO-MANDT TO BATKEY-MANDT.
MOVE ETT-BANFN TO BATKEY-BANFN.
.
.
.

No comments:

Post a Comment