on 08-22-2011 12:36 PM
Hi Experts ,
I have a scenario in which i need some method to stop the addition of a marketing document of SAP .
Lets suppose the GRPO ,i need if any error occurs in my add on then GRPO should also not to be added.
Thanks'
Amit
Hi Amit,
You need to do validation before adding the data Like...
'You need to check this in before action=true
If BusinessObjectInfo.FormTypeEx = "143" And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD And BusinessObjectInfo.BeforeAction = True Then
if omatrix.Columns.Item("Status").Cells.Item( 1).Specific.value="" then
bubbleevent=False
end if
End If
Thanks
Shafi
Edited by: shafi_sunshine on Aug 23, 2011 10:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Try This......
'You need to insert the data into the user defined table
Dim orecordset As SAPbobsCOM.Recordset
Dim orecordset As SAPbobsCOM.Recordset
orecordset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
For i As Integer = 0 To omatrix.RowCount - 1
orecordset.DoQuery("insert into [@sales](Code,Name,U_frmdate,U_ToDate)values( " & code & " ,'" & name & "','" & matrixfield1 & "' ,'" & matrixfield2 & "' )")
next
omatrix.Clear()
Thanks
Shafi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
I think ur adding a extra tab and a matrix to a system form and want to insert data
Try This.......
'In Form Data Event
If BusinessObjectInfo.FormTypeEx = "143" And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD And BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess = True Then
'Write ur code here
end if
Thanks
Shafi
Edited by: shafi_sunshine on Aug 23, 2011 6:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shafi,
Thanks for reply...
But the scenario is that
'In Form Data Event
If BusinessObjectInfo.FormTypeEx = "143" And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD And BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess = True Then
'My code should run
end if
it will ensure that my code will run only when the GRPO will be added successfully but i need the vice versa also if any error occurs in my code the GRPO should also not to be added
Hi Amit,
You may try SP_TN to block the addition of documents. It would be difficult within your code to block the same.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit.......
If any error occurs anyhow system wont allow to add the document. But still it is allowing then you must have to manage it with SDK Code of your Addon..........
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.