‎2007 Jul 25 3:35 PM
‎2007 Jul 25 3:42 PM
recently i created a pricing routinue in SD...
routinue number 947 from VOFM-->Pricing....
Code written is as follows...
FORM KOBED_947.
*{ INSERT D81K926007 1
----
Notes : This routine is used to exclude Freight charge ZHFA for
service materials. Whenever material master document ZA5 is
specified then ZHFA on the material should not be applied
in the sales order.
constants: c_za5 like drad-dokar value 'ZA5',
c_mara like drad-dokob value 'MARA'.
data:l_dokar like drad-dokar. " Document Type
sy-subrc = 4.
clear: l_dokar.
Checking value of Document type from DRAD for the conditions of the
material specified in the sales order.
SELECT single dokar
INTO l_dokar
FROM drad
WHERE dokar eq c_za5
AND dokob EQ c_mara
AND objky EQ komp-matnr.
When there is no entry sy-subrc is set to value 4
if sy-subrc is initial.
sy-subrc = 4.
else.
When there is a entry sy-subrc is set to value 0
sy-subrc = 0.
endif.
*} INSERT
ENDFORM.
FORM KOBEV_947.
ENDFORM.
‎2007 Jul 25 3:58 PM