cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a R/3 transaction in a BSP

Former Member
0 Kudos
238

Hello,

we have developed a BSP-MVC application in CRM 4.0 and we're trying to call a R/3 transaction, to do that we are calling a RFC function from an event of our BSP source. The RFC function only call the transaction but it doesn't work (The page cannot be displayed), however if we execute the program in debug mode and we define breakpoints in it, the call stops in each breakpoint and then a R/3 mode with the transaction appears over our CRM program. does anybody know what is the problem? what is the different betweeen debug execution and normal execution?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Hallo Mario,

The answer is simple, just slightly complex to describe. Let me use my words, and some vague handwaving to explain.

When you log onto a webAS system the dynpro engine is started that contains all the logic to handle interaction with the SAPGUI. For example, things such as rendering controls, doing file upload, running ActiveX controls, etc.

When you run a HTTP request into webAS (which is the case for BSP), a very special "dark" dynpro is started. The dynpro is required to get all ABAP, etc. up and running. But now there is no SAPGUI available, so things such as control rendering, doing file upload via gui upload, etc will not work. Also little things such as popup windows, etc does not work. Or things such as a RFC suddenly wanting to display a dialog to ask for username and password.

So why does your code work only in debugger? Because once the debugger is triggered, like in the very first few steps, it is realized that a normal dynpro engine is required, and not the "dark" one. So the full blown dynpro engine is started.

If this transaction requires a GUI, it will NOT work in BSP. This can not be changed.

You can only consider to find the code that causes the error, and bracket it with IF statements in this transaction so that no GUI interaction is required in context of a HTTP call.

brian

Former Member
0 Kudos

Hi Brian

Can i start dynpro engine manually and call transaction.? or  is there any other way to do that

Naresh

former_member181879
Active Contributor
0 Kudos

No.

or  is there any other way to do that

Yes. Find few lines of code causing problems and fix them to not be called with running in HTTP context.