on 2016 May 23 7:54 PM
Hello Gurus,
My client requirement is Ex: if a new equipment cost is 100 rs and if my refurbishment cost of that equipment is 60 rs or more, then refurbishment order should not be saved/ released.
How can this be achieved?
Harsh
IF caufvd_imp-auart = 'ZM04'.
DATA: v_stat TYPE char1.
SELECT SINGLE iphas FROM afih INTO v_stat WHERE aufnr = caufvd_imp-aufnr.
IF v_stat = '0'.
DATA:v_cost TYPE verpr,
v_mult TYPE p DECIMALS 1,
v_wrt TYPE bp_wpl,
v_wrt01 TYPE bp_wpl,
v_wrt02 TYPE bp_wpl,
v_wrt03 TYPE bp_wpl,
v_wrt04 TYPE bp_wpl,
v_wrt05 TYPE bp_wpl,
v_wrt06 TYPE bp_wpl,
v_wrt07 TYPE bp_wpl,
v_wrt08 TYPE bp_wpl,
v_wrt09 TYPE bp_wpl,
v_wrt10 TYPE bp_wpl,
v_wrt11 TYPE bp_wpl,
v_wrt12 TYPE bp_wpl.
SELECT SINGLE verpr FROM mbew INTO v_cost WHERE matnr = caufvd_imp-matnr.
SELECT SINGLE wrt01 wrt02 wrt03 wrt04 wrt05 wrt06 wrt07 wrt08 wrt09 wrt10 wrt11 wrt12
FROM pmco INTO ( v_wrt01, v_wrt02, v_wrt03, v_wrt04, v_wrt05, v_wrt06, v_wrt07,
v_wrt08, v_wrt09, v_wrt10, v_wrt11, v_wrt12 ) WHERE objnr = caufvd_imp-objnr AND wrttp = '01'.
v_wrt = v_wrt01 + v_wrt02 + v_wrt03 + v_wrt04 + v_wrt05 + v_wrt06 + v_wrt07 + v_wrt08 + v_wrt09 +
v_wrt10 + v_wrt11 + v_wrt12.
ENDIF.
v_mult = '0.6' .
IF v_wrt >= v_cost * v_mult.
MESSAGE: 'Plan costs exceed 60% of the MvgAvgPrice of new material, Order can not be released.' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.
ENDIF.
This is the error pop-up which stops the Release under the conditions
Good luck
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.