2010 Oct 15 1:16 PM
Hello Experts,
To meet one of the busisness requirements, I need to auto populate a standard SAP field in VBAP while VA01/VA02 process.
So, I tried by using USER_EXIT_MOVE_FIELD_TO_VBAK and USER_EXIT_SAVE_DOCUMENT_PREPARE user-exits and populated in debugging mode....it worked well that I can see my data in that field of VBAP in SE16.
Pls. let me know what is the difference between MOVE_FIELD_TO_VBAK and SAVE_DOCUMENT_PREPARE?
Thank you
2010 Oct 15 1:41 PM
Difference would be when called...save_document_prepare is triggered after SAVE button. And, I think you'd want the move to VBAP, rather than VBAK, since VBAK references header data.
Hi,
If you want move any defaulted values use the move_fields_to_vbap. this is for line item,
for header data use move_fields_to_vbak.
Save_document_prepare gets triggered when the order is saved.
Thanks,
Rohan
2010 Oct 15 1:41 PM
Difference would be when called...save_document_prepare is triggered after SAVE button. And, I think you'd want the move to VBAP, rather than VBAK, since VBAK references header data.
2010 Oct 15 2:04 PM
Sorry, you are right, its typo.
But, i guess, still am suspecting some differences would be there or what would you suggest for me (with which user-exit i should go among these 2)?
Thank you
2010 Oct 15 4:48 PM
Hi,
If you want move any defaulted values use the move_fields_to_vbap. this is for line item,
for header data use move_fields_to_vbak.
Save_document_prepare gets triggered when the order is saved.
Thanks,
Rohan
2010 Oct 15 5:53 PM
still am suspecting some differences would be there
Exactly right.
what would you suggest for me
It depends on which fields you are populating. USEREXIT_SAVE_DOCUMENT_PREPARE is ok but only if you don't expect any validation to occur on the field values, there are no dependencies on the field values (such as pricing, sourcing, etc.) and you don't want the user to see or interact with the values set in the exit. If you are populating values that need to be validated by configuration or viewed by the user, go with the line item exit. Keep in mind that there are also 'better' user exits for some item values - for example, USEREXIT_SOURCE_DETERMINATION for plant and item category.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |