on 09-19-2007 11:01 AM
Hi
I am working on 2005a SP01 PL 29. I am using B1DE and have added a hook onto when the ok button is pressed on the delivery note form so I can perform some extra processing.
I am looking for the click event and did not tick the before box. The problem I have is that it seems to be running my code before SAP has started processing the form, as after my code finishes SAP displays a message about not being able to change the document after you have added it.
Any ideas how I can hook after this please ?
Thanks
Regards Andy
Hi Andy,
as Trinidad points out, try to use the Eventviewer-Tool. The order, the events are fired, if you click the item "1" are:
1. Click (before)
2. Click (after)
3. itemPressed (before)
4. dataAdd (before)
5. dataAdd (after)
6. itemPressed (after)
So, if you use the itemPressed event instead of itemclick, you are able to catch the event after SAP adds your delivery note. You cannot do that with the Click-Event.
hope it helps,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
I don't know whether I understood your problem but I'll try to help you.
When you create the listener for the click event with B1DE you haven't tick the before box, then you have chosen to receive the event in the "AFTER" action. If you tick the before box then you will receive the event in the before action.
Have you tried to have a look to your code listening the click event? Before the function declaration you can see the name of the event and the before or after tag. How is the listener declared?
You cannot change a document in the after event if the document cannot be modified once created. You have to listen the before event and modify what you need in there.
Hope it helps
Trinidad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trinidad
This is the code I am using -
<B1Listener(BoEventTypes.et_CLICK, false)> _
Public Overridable Sub OnAfterClick(ByVal pVal As ItemEvent)
Dim ActionSuccess As Boolean = pVal.ActionSuccess
Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)
Dim item As Item = form.Items.Item("1")
Dim button As Button = CType(item.Specific, Button)
Dim matrix As Matrix = form.Items.Item("38").Specific
Dim lc As Integer
'ADD YOUR ACTION CODE HERE ...
For lc = 1 To matrix.RowCount - 1
'B1Connections.theAppl.MessageBox(matrix.Columns.Item("1").Cells.Item(lc).Specific.string)
'Debug.Print(matrix.Columns.Item("1").Cells.Item(lc).Specific.string)
Beep()
Next
End Sub
I want to post some extra journals but only after SAP has finished it;s current operation
I hope that makes sense
Regards Andy
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
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.