Skip to Content

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

Event Handling

I feel like I'm in a dark room where the door is locked

and I have 1000 keys on a ring, only one of which will

let me out, and that there are still more unlocked doors

before me!

I did not get to take any SBO classes before they were ended, and I'm

afraid that what I've seen on-line and in the SDK help, I just can't find what I need.

On the delivery form, I want to do some stock transfers of the line items on the matrix, just before the delivery note is added. I have managed to detect the Add button click on form 140, but then SBO displays a system message box for verification since the document can't be changed once it is added.

I'm currently detecting that too, but the way I do it seems horrible - their must be a better way! Plus error messages can appear after the verify message, if there is no price on the line - and that's starts to get REALLY hard. Is there some EASY way to detect just before the ADD occurs? I know about BeforeAction, but that appears to be triggered BEFORE any of the system messages.

Here's what I'm doing:

     Case Is = "140"
        g_DeliveryForm = True
        g_InvoiceForm = False

        If pVal.Before_Action = True Then

            If pVal.ItemUID = "1" Then
                g_addPressed = True

            End If
	End If

      Case Is = "0"
          If g_DeliveryForm And g_addPressed And pVal.ItemUID = "1" _
		And Not pVal.Before_Action Then
                g_addPressed = False
		'Right here is the waring message box    about not being able to change the doc
          End If

But this requires detection of multiple events and it doesn't even consider that some other warning boxes might also appear!

I'd really appreciate any insights

Former Member

Helpful Answer

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