Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

can any one give me solution for this query using enhancement

Former Member
0 Kudos
106

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 user’s 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

1 REPLY 1

Former Member
0 Kudos
59

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