2007 Nov 26 1:52 PM
Materials in an order can be set up to generate free product (ie. Buy 10, get 1 free) using transaction VBN1. However, users can also manually change the item category of the material to make it free. An authorization object is required to prevent this being done by anyone other than authorized users.
Detail Descriptions:
Item category assignment to order types is stored in table T184.
In order entry, when entering a material number and quantity, the system will default an item category into VBAP: PSTYV (it obtains this item category from T184:PSTYV)
For any document type, if the usage (T184:VWPOS) is FREE and the document automatically determines free goods, this must be allowed irrespective of the users authorization.
However, if the usage (T184:VWPOS) is blank, the user must NOT be allowed to manually change the item category to the item category listed in Manual item category (T184:PSTY2
2007 Nov 26 9:32 PM
Assuming you are performing these actions during a sales order creation or update, you could use the enhancements found in the program SAPMV45A, subroutines USEREXIT_MOVE_FIELD_TO_VBAP, and USER_EXIT_CHECK_VBAP. There are other user exits available, and which one to use is dependent upon your requirements regarding when to react, how to react, etc.
These user exits are also available in CMOD, but I am not sure of the mapping of the old to new.
Hope this gets you pointed in the right direction.
Regards,
Mark Schwendinger