Enhancement in VA01 Additional data B tab
I have added 2 fields in tcode VA01 in header --> Additional Function --> Addtional data B (screen 8309) which are getting saved in VBAK table in custom fields which i have added in VBAK table using append structure.
Now my requirement is, for a particular order type one of the fields which I have added in Additional data B screen should be mandatory. For that i have wriiten a code in PBO (include MV45AOZZ)
LOOP AT SCREEN.
IF VBAK-AUART = 'Z2OR' AND SY-TCODE = 'VA01'.
IF SCREEN-NAME = 'VBAK-ZZTRIPORDER'.
SCREEN-REQUIRED = 1.
Now this code is working fine if I visit that screen (Additional data B screen), but it is not working if i dont visit that screen. I want that the document will not get saved if that field blank for that particular order type.
Can anyone help me please?
Thanks in advance.
If you are in the screen, it works, if no, it doesn't work. The manner to do it is with a userexit. Try it with USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ for instance.
I hope this helps you
Edited by: E_Hinojosa on Jul 1, 2011 9:14 AM