11-27-2007 9:41 AM
i am doing user exit for transaction va01.
for that can i used user exit USEREXIT_MOVE_FIELD_TO_VBAP and USER_EXIT_CHECK_VBAP.
If i use user exit from this two then tell me how can i write coding for following codition.
1. Item category assignment to order types is stored in table T184.
2. 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)
3. 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.
4. 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).
5. For this i am using one pop-up message : You are not authorized to manually change item to be free
11-27-2007 9:49 AM
Hi!
TABLES: t184.
IF NOT VBAP-PSTYV IS INITIAL.
SELECT SINGLE * FROM t184 WHERE pstyv = vbap-pstyv.
IF sy-subrc = 0.
IF t184-vwpos IS INITIAL.
IF t184-psty2 <> vbap-psty2.
MESSAGE e987(ZSD). "create the 987 message with SE91 transaction - ZSD mess.class
ENDIF.
ENDIF.
ENDIF.
ENDIF.
Somehow like this.
Regards
Tamá
01-24-2008 12:48 PM
... Alternatively use the User exit for field modification in MV45AFZZ and ensure that item cat (VBAP-PSTYV) is grayed out when usage (VWPOS) is blank