Skip to Content
author's profile photo Former Member
Former Member

How to control the addition of documents

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 11:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 12:03 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2011 at 04:57 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2011 at 05:24 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2011 at 05:42 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.