on 10-20-2014 4:39 AM
Hi all,
I have a requirement which requires automatic redetermination at sales order item level when plant is changed at the shipping tab. The user does not want to manually update the pricing at the conditions tab in the order item. Can you please help and enlighten me with the approach I can use?
Thanks.
This Exit -
in the programme-MV45AFZB
will meet your requirement,consult your abaper for the same
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
I already made my modifications in the userexit but when I changed the plant, it does not redetermine the price automatically. is there something that I am missing in my code?
IF t180-trtyp EQ 'H'.
CLEAR xvbap.
READ TABLE xvbap WITH KEY posnr = '000000'.
IF sy-subrc EQ 0.
lv_werks = xvbap-werks.
READ TABLE xvbap WITH KEY posnr = vbap-posnr.
IF sy-subrc EQ 0.
IF lv_werks NE xvbap-werks.
* pricing will be re-determined
NEW_PRICING = 'G'.
ENDIF.
ENDIF.
ENDIF.
* Change
ELSEIF t180-trtyp EQ 'V'.
CLEAR zz_org_xvbpa.
READ TABLE zz_org_xvbap WITH KEY posnr = vbap-posnr.
IF sy-subrc EQ 0.
CLEAR xvbap.
READ TABLE xvbap WITH KEY posnr = vbap-posnr.
IF sy-subrc EQ 0.
IF zz_org_xvbap-werks NE xvbap-werks
OR ( xvbap-updkz EQ 'I' OR xvbap-updkz EQ 'U' ).
*pricing will be re-determined
NEW_PRICING = 'G'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.