on 08-19-2012 4:25 PM
dear gurs
Requirement in my project:material quantity has to fill automatically in sales order.
Based on sales document type, and customer, material number system has to pick order quantity fro imrg table.
For this any user exit we have,
SD user exits are very well documented (there is a Wiki entry right here on SCN). What user exit to use depends on what exactly needs to happen. E.g. USEREXIT_SAVE_DOCUMENT_PREPARE is triggered only when a user saves the document. Changes that need to trigger other processes (ATP check, free goods determination, pricing, to name a few) need to be done much earlier.
Using a debugger, it is not difficult for an average ABAPer who knows at least something about SD to identify the most suitable user exit. This is rather an ABAP question than SD, so why not just leave it up to the ABAPer?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
IMRG is Table for Measurement Document.
Now, you will have to insert a ABAP Code in Program - MV45AFZZ - User Exit -
USEREXIT_FIELD_MODIFICATION or USEREXIT_MOVE_FIELD_TO_VBAP. Just speak to your ABAPer & he will do the needful.
Thanks,
Jignesh Mehta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello T W,
User Exit - USEREXIT_FIELD_MODIFICATION is processed for each Field in given Screen.
Now the requirement here is to Fill the Material Quantity automatically in Sales Order. Which means User should not Material Quantity & it should be determined from IMRG Table.
Thus by inserting a code in USEREXIT_FIELD_MODIFICATION we can make the Quantity Field in Sales Order in Grey (nnon-changeable mode). Thus the User would not be able to enter any Quantity here.
While if the ABAP code is written in USEREXIT_MOVE_FIELD_TO_VBAP then User will able to enter Material Quantity which will later be over-written by the User Exit.
Thanks,
Jignesh Mehta
The coding for inserting the Table-Field(IMRG-XXXX) can be done practically at any of the forms of the include program MV45AFZZ. These forms are called at different time of the order processing. For example, if the purpose is to specify the order quantity no matter what the user enters manually, one can use FORM USEREXIT_SAVE_DOCUMENT or FORM USEREXIT_SAVE_DOCUMENT_PREPARE. Just before saving the document the codes in these forms are processed, thus the program will change the manually entered value with the value retrieved from the table-field (IMRG-XXXX) without giving the user a chance to change it in VA01 transaction. (However the input can be changed in VA02)
Message was edited by: Ashish Mohapatra
You can do the coding either at
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
or at
FORM USEREXIT_MOVE_FIELD_TO_VBAP.
of the include program MV45AFZZ.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.