Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Handle a vb.net event in SAP

Former Member
0 Kudos

Hey,

I need to raise an event in vb.net and handle it in a SAP Dynpro.

For some reason SAP doesn't get the event. I tried to register it, but didn't work out by now.

Maybe someone got an idea how to handle this?

7 REPLIES 7

Former Member
0 Kudos

Hi,

What is the exact requirement?

If you register any event in .NET it does not get to SAP by default. For me you have to call an RFC/Webservice if you want to interact with SAP from .NET. Then if you need to raise any Event (Workflow)inside SAP there are standard FM like SWE_EVENT_CREATE for this which can be called from that RFC/Webservice.

R

0 Kudos

Hey,

For the beginning I just want a event handled in SAP.

So by now I'm pressing a button in my Dynpro which calls a sub in vb.net. This sub calls 'RaiseEvent controlEvent()' with controlEvent() as an event I created on my own.

Now SAP should just handle the event and do something like a pop-up message "event handled".

By now I created an event in VB.net and raised it there. In SAP I added an event with the same name, and registered it with `set_registered_events`. But that doesn't work out.

0 Kudos

What type of dynpro it is where the button is located. Is is SAP Module pool dynpro? Or ABAP Webdynpro? BSP? Or some custom dynpro written in JSP/ASP/Javascript/HTML?

0 Kudos

Hey Rudra,

It's a Module Pool Dynpro in SAP.

0 Kudos

Then as soon as the button is clicked, that can be classified as the event. Sorry but I am not sure why you want to register an event in SAP? What are going to do with that that event?

Or if you want to perform some action on the VB side and based on some condition you want to do something back in SAP then still it makes sense to me and can be achieved via what I have said already in my first post.

0 Kudos

We embedded a user control (written in vb.net) in a sap dynpro. Now we want that events triggered on the control to be handled in SAP. Such as leaving a textbox triggers an event that checks the value in it or something.

In vb.net I can raise and handle the event, but it is necessary to handle the event in SAP.

0 Kudos

It does not happen automatically. From .NET you can trigger an RFC to do the job or simply raise an event by ABAP coding inside RFC.

So when you raise the vent in vb.net you also call an RFC which should do the job for you.

R