‎2009 Sep 04 5:52 PM
hey ,
searched sdn forums and the web and didnt got the solution :
I am inserting an input/output field in sales order header data 'additional data b'.
i add the following code in user exitS :
USEREXIT_MOVE_FIELD_TO_VBAK , USEREXIT_SAVE_DOCUMENT :
VBAK-ZFIELD = SCREEN_STRUCURE-ZFIELD .
IN USEREXIT_SAVE_DOCUMENT_PREPARE :
I ADDED SOME CHECKS **
The field isn't saving in vbak .
maybe im passing it to vbak from the rong strcture ( SCREEN_STRUCURE = mycomp_vbak_add_data that
is the only one avalible in this user exit ) ?
what other structures available in this user exit or what additinal code i have to add ?
Best Regards
ASA
‎2009 Sep 04 6:53 PM
Dear
I think u have added this field at append structure .
From there u want to pass your field .
There is many userexit are present .other than MV45AFZZ need to search only which is best suits your requirment .
Extensive debug and ur problem will solve it not found Please revert .
‎2009 Sep 04 6:13 PM
Why did you name your screen field differently than your VBAK field? The value transfer is automatic if the names are the same. Don't use USEREXIT_SAVE_DOCUMENT for the VB* fields - see the documentation.
‎2009 Sep 04 6:13 PM
In the additional data B screen you have direct access to VBAK structure. So if you added an append to VBAK with field ZZ_FIELD01, you just need to add an input field to additional data B screen and name it VBAK-ZZFIELD01. This will automatically transfer the value and save it to the DB when you save the order.
One other thing, if you want to change data that is upposed to be saved to the DB you need to do this in the SAVE_DOCUMENT_PREPARE exit, because after that (and before the DOCUMENT_SAVE exit) the data is passed into update task, so any changes in the SAVE_PREPARE exit will not be saved to the DB.
Hope that helps,
Michael
‎2009 Sep 04 6:53 PM
Dear
I think u have added this field at append structure .
From there u want to pass your field .
There is many userexit are present .other than MV45AFZZ need to search only which is best suits your requirment .
Extensive debug and ur problem will solve it not found Please revert .
‎2009 Sep 04 7:52 PM
hello and thanks to all ,
i did add this field at append structure ( " SCREEN_STRUCTURE " is the append structure that i add in to ) .
is there any other userexits that i have to update and with what special code ?
thanks in advance
ASA
‎2009 Sep 04 8:06 PM
There's no special code required unless you need to validate the value or change the screen attributes of the field dynamically. Use the user exits in MV45AFZZ for this or the flow logic for the Additional Data B screen. I don't know what 'SCREEN_STRUCTURE' refers to for Additional Data B modifications - the standard (first proposed) append struture for VBAK is ZAVBAK and that's what should be used here even in ERP 6.0. Make sure that you adjust any BAPI calls and structures accordingly to populate the field being added.
‎2009 Sep 04 8:19 PM
hey,
i validate the field in userexit_prepare_to_save .
i dont remember ( i am not at work ) the name of the append structure so i wrote 'SCREEN_STRUCTURE' ,
it may be ZAVBAK but any way the value of the field dosnt save to vbak .
any ideas ?
‎2009 Sep 04 9:40 PM
Then your screen field and VBAK field do not have the same name...
‎2010 Sep 23 1:18 PM