CONDITION EXCLUSION does not function properly with condition records that have a positive value for the following situation:
- suppose you want to setup the exclusion rules to give the customer the best price out of a group of price conditions.
- if you used PR00, ZPR1, ZPR2, ZPR3 and you want the system to choose only one as the "best price", you could set this up by creating one exclusion group for each one of the four conditions. "customizing-> functions-> pricing -> control-> pricing proced-> exclusion-> assign"
EXCLUSION GROUP CONDITION TYPE
ZPR0 PR00
ZPR1 ZPR1
ZPR2 ZPR2
ZPR3 ZPR3
in "customizing --> functions --> pricing --> control --> pricing prod --> exclusion --> assign proceed as follows:
STEPNO PROCEDURE GROUP1 GROUP2
10 C ZPR0 ZPR1
20 C ZPR0 ZPR2
30 C ZPR0 ZPR3
40 C ZPR1 ZPR2
50 C ZPR1 ZPR3
60 C ZPR2 ZPR3
THIS METHOD OF CONDITION EXCLUSION DOES NOT FIND THE BEST PRICE!!!
Program error.
SolutionProgram LV61AF0K:
form kond_ausschluss_guenstigster_c using ausgrp1 ausgrp2.
data: gruppenwert1 like komv-kwert,
gruppenwert2 like komv-kwert.
data: active1 like komv-kinak, "insert
active2 like komv-kinak. "insert
perform kond_ausschluss_gruppenwert using ausgrp1 gruppenwert1."delete
perform kond_ausschluss_gruppenwert using ausgrp1 "insert
gruppenwert1 "insert
active1. "insert
if active1 is initial. "insert
perform kond_ausschluss_gruppenwert using ausgrp2 gruppenwert2."delete
perform kond_ausschluss_gruppenwert using ausgrp2 "insert
gruppenwert2 "insert
active2. "insert
endif. "insert
if active1 is initial and active2 is initial. "insert
if gruppenwert2 > gruppenwert1.
perform kond_ausschluss_gruppe_inak using ausgrp2.
else.
perform kond_ausschluss_gruppe_inak using ausgrp1.
endif.
endif. "insert
endform.
form kond_ausschluss_gruppenwert using ausgrp gruppenwert. "delete
form kond_ausschluss_gruppenwert using ausgrp "insert
gruppenwert "insert
active. "insert
READ TABLE XT684 WITH KEY AUSGRP BINARY SEARCH. "insert
IF NOT XT684-KINAK IS INITIAL. "insert
ACTIVE = XT684-KINAK. "insert
EXIT. "insert
ENDIF. "insert
read table xt684g with key ausgrp binary search.
...
endform.
form kond_ausschluss_gruppe_inak using ausgrp.
READ TABLE XT684 WITH KEY AUSGRP BINARY SEARCH. "insert
XT684-KINAK = 'A'. "insert
MODIFY XT684 INDEX SY-TABIX. "insert
read table xt684g with key ausgrp binary search.
...
endform.
Program LV61AF0X:
FORM XKOMV_BEWERTEN.
.
.
.
IF KOMP-KPOSN NE 0 AND ( ( PREISFINDUNGSART NE 'E' AND
XKOMV-KSTEU <> 'E' ) OR BASISZEILE <> 0 ). "delete XKOMV-KSTEU <> 'E' ) OR BASISZEILE <> 0 ) AND "insert
XKOMV-KINAK NE 'A'. "insert
.
.
.
* Staffelbasis ermitteln
YKSTBS = XKOMV-KSTBS.
IF XKOMV-KZBZG NE SPACE AND KOMP-KPOSN NE 0. "delete
IF ( XKOMV-KZBZG NE SPACE AND KOMP-KPOSN NE 0 ) AND "insert XKOMV-KINAK NE 'A'. "insert
IF PREISFINDUNGSART NE 'E'.
.
.
.
.
.
* Konditionsswert ermitteln / ggf. KBETR aus Staffel holen
IF PREISFINDUNGSART NE 'E' AND KOMP-KPOSN NE 0
AND XKOMV-KINAK NE 'A' "insert
AND XKOMV-KSTEU NE 'E'.
.
.
.
No comments:
Post a Comment