11-30-2007 7:47 AM
I appended one structure with one field field1 of component type char1 to the table VBAK. That field is added to the subscreen(Header-add data A). Default value to be assigned to that field VBAK-field1 with out going to that screen.
while creating sales order even if he doesn't open that subscreen default value value must be saved to that table while saving tha sales order using usr exit.
First of all is it possible using user exit not customer exit because there are no SAP standard enhancements are available for this scenario.
thanks,
Raju
11-30-2007 7:58 AM
Hi!
It can't be performed on the screen, because, if user don't click on that tab, it's events will not run.
You can do this during saving, in program MV45AFZZ, in the FORM userexit_save_document.
Like this:
IF vbak-myfield IS INITIAL.
MOVE 'A' TO vbak-myfield.
ENDIF.
Regards
Tamá
11-30-2007 8:59 AM
Hi Tamas,
actually the field has to take three possible values not only one value.The field may be initial. But if the field you have set as initial in the sub screen then in ur case it again assigns value to that field while saving.
regards,
raju
11-30-2007 11:07 AM
Hi Raju,
Here is user exit you can implement <b>"MV45AFZZ</b>"...
in this there is one form where you can pass your values in that subscreen field.
Eg. you have appended field<b> "field1"</b> in table <b>VBAK</b> .
<b>FORM userexit_move_field_to_vbak.</b>
here under this you can pass your own value with condition as per your scenario....
If any other query please let me know....
<b>Reward Points</b>
Cheers,
Enjoy,
Sagun Desai....
11-30-2007 11:11 AM
Hi,
One more thing here is eg....
FORM userexit_move_field_to_vbak.
* vbak-zzfield = xxxx-zzfield2.
<b><u>Note :</u> your append structure field should start with name "ZZ......"</b>
Cheers,
Sagun Desai.....
11-30-2007 4:35 PM