cancel
Showing results for 
Search instead for 
Did you mean: 

Catch click event in BSP-page (web interface)

Former Member
0 Kudos

Hi Folks!

In my Web Interface, I have created a planning function button of type user-exit. The function does a file upload. When the user clicks on the button I need to do a few checks in ABAP (before the actual function executes). Question is... where exactly can I catch the click-event and do these checks?

I tried a few things with the generated bsp-app in se80, but nothing seemed to catch the click event.

Thanks a lot in advance for your input!

Simon

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member93896
Active Contributor
0 Kudos

Hi Simon,

the (upload) function is already an ABAP exit. So you can just add your checking logic to the INIT part of the ABAP exit function.

Regards

Marc

SAP NetWeaver RIG

Former Member
0 Kudos

Hi Marc,

thanks for your reply. Actually, we want to export the contents of the file to ABAP memory even before the init function is called. To do this, we need the http request object in context. This is not available in the init function. Therefore we thought the best place to do this would be in the On-Input-Processing event of the generated BSP application in the event 'OnClick' of the button.

Regards,

Simon

p.s : We are using the standard How-to paper to do this but we have locking issues with this solution. Therefore this workaround.

former_member93896
Active Contributor
0 Kudos

Simon,

I suggest to resolve the locking issues instead of doing a lot of custom development. The web file upload how-to paper is based on a ad-hoc planning package. Therefore, if multiple users try to upload data at the same time, you have to set the selection criteria of the ad-hoc package accordingly. This is already foreseen in the how-to paper (chapter 11.4 OnInputProcessing CALL FUNCTION 'API_SEMBPS_ADHOCPACKAGE_SET'). Typically you can derive the selection criteria from the file content. Alternatively you might include other input fields on the BSP to specify the criteria.

Regards

Marc

SAP NetWeaver RIG