Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Copy fields when form is saved

Very simple one,

When I add a new sales quote I want the Total Value edit box to be copied to my Expected Value edit box, as the data is not added to the table yet I thought it would all be available as stings in the edit boxes, hence the following:

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD And pVal.FormType = 149 And pVal.Before_Action = True Then

oApp.Forms.Item("149").Items.Item("oEdit4").String = oApp.Forms.Item("149").Items.Item("29").String

End If

Please excuse any stupidity, its a steep learning curve......



Former Member replied


i think you are catching wrong event altogether,

try this.

If BusinessObjectInfo.FormTypeEx = "149" And BusinessObjectInfo.BeforeAction = True And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD Then

                Dim oform2 As SAPbouiCOM.Form
                oform2 = oApp.Forms.GetForm("149", 1)
                oform2.Items.Item("oEdit4").Specific.value = oform2.Items.Item("29").Specific.value
         Catch ex As Exception
            End Try
         End If

and this is under FormDataEvent. NOT Itemevent.


Edited by: Binita Joshi on Sep 24, 2008 11:20 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question