Blocking of Stock Posting after doing Usage Decision
How to make a setting for the following scenario?
1. When user is doing UD as Accepted
a. Then he would be able to do stock posting only to Unrestricted Use and rest of the fields to be greyed out or system should restrict him to do stock posting in another field.
2. When user is doing UD as Rejected
a. Then he would be able to do stock posting only to blocked stock and rest of the fields to be greyed out or system should restrict him to do stock posting in another field.
3. When user is doing UD as Partial Acceptance
a. Then he would be able to do stock posting only to Unrestricted Use and blocked stock and rest of the fields to be greyed out or system should restrict him to do stock posting in another field.
I am waiting for your valuable suggestions
Anand Rao replied
I just am trying to recall the information! But I would request you to verify the fields mentioned below in QALS and QAVE table, as I am not in front of the system right-now!
You need to have discussion with ABAP consultant to map it appropriately.
I assume you are posting the stock after UD is given. Convey the above exit to ABAPer. Build following logic in to it at the time of saving stock posting event.
- Pick inspection lot (IL) number in run time against which stock posting is being done
- Pass this IL number in to QAVE table and fetch value against field VCODE.
- I believe this field QAVE-VCODE represents the UD code
- Then check values in below fields in QALS table
- QALS - LMENGE01 - Unrestricted use stock
- QALS - LMENGE04 - Block stock
- If the UD code is "A" (the UD code that corresponds as Accepted in your system) then system should allow entry to be posted against LEMGE01 field. For all other stock posting options it should throw error message stopping the transaction
- On the similar lines if the UD code is "R" i.e. Reject, then LMENGE01 should throw error.
- For partial UD code, entries should be permitted in above fields.
- If you don't find any value in VCODE, that indicates no UD is done. You can restrict the movements here!
I also liked Craig's idea to suppress rest of the fields of stock posting (e.g. Return Delivery, Scrap) if you are not using them at all. But kindly remember this would be client level effect.
Please verify and confirm the field names in system!