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: 

Debugging portal related function modules.

Former Member
0 Kudos

Hi Friends,

I need help with the follwoing:

I have a portal link. I go to a transactioin within this link(menu path not Tcode I do not have any option here to find tcode) and enter some data. What I know is I need to debug a function module that gets called when I try to post this document. I had a breakpoint in the function module but it never stops me there.. Is there someother method to debug such functioin modules.(RFC enalbled).

Sorry friends if it is such a silly question..

Any help greatly appreciated.

8 REPLIES 8

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Can you simulate the call by using the "Test" functionality in SE37. Click the test tool, enter the parms and step thru the code. Will this work for you.

Are you trying to debug the FM from a portal iView?

Regards,

Rich Heilman

suresh_datti
Active Contributor
0 Kudos

Hi Phani,

It has to be a hard BREAK-POINT inside the function module.. If it is a std function module, you cannot debug it.. You have to execute it in R/3 & get inot debug mode..

Regards,

Suresh Datti

0 Kudos

Hi Rich and suresh,

Rich I'm trying to simulate the process by testing the fm in se37.

And suresh... I had a hard break point in the code but it did not stop me in the fm. However I know for sure that this function module did get triggered.

0 Kudos

You should be able to debug the FM via SE37. Put a break-point at the first statement of the FM. Now run in "test" mode.

Regards,

Rich Heilman

0 Kudos

It is not a standard function module... and When i try to post from the portal interface it gives me messages that are generated from the function module.. that way I know that this fm got triggered.

0 Kudos

> I had a hard break point in the code

Is it a z function? Then you can make a break-point by writing something like this into your function module:

data: exitloop.
if <some_user_parameter is set>.
  while exitloop = space.
  endwhile.
endif.

This will trigger an endless loop if you have set the user parameter. You can then go to SM50 and debug the process (program/mode->program->debug) and set the variable exitloop = 'X' in the debugger to get out of the loop.

If it is not a z-function, it is a little bit harder.

0 Kudos

Hi Phani,

Is it an RFC call? then you may be out of luck.. you say, you are getting back the messages from the function call.. where do you see them? in the portal? In that case, the method suggested by Robert may be the only way..

Regards,

Suresh Datti

0 Kudos

ok, so you are trying to debug it from the portal side, right. You can't do that. The only way would be to do what Robert has suggested. You can fire the RFC from the portal, but it will just loop untill you go and set debugger in SM50.

REgards,

Rich Heilman