Application Development and Automation 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: 
Read only

Unable to Debug

Former Member
5,134

Hello Friends,

I am trying to do debug for user exit in VF02.

User exit is EXIT_SAPLVEDF_002

This exit is not directly used in VF02.

It is called dynamically.I put the break points everywhere but not able to debug this exit.

When I save the document it does not reach to the point but the idoc is created.

The idoc creation part is in this exit.

Is there anyway something you can do using system debug etc.

Regards

Prashant

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,553

Try to put a hard break point in the exit for your user name.

Break <UserName>

Thanks

Amruta

18 REPLIES 18
Read only

Former Member
0 Likes
3,554

Try to put a hard break point in the exit for your user name.

Break <UserName>

Thanks

Amruta

Read only

0 Likes
3,553

I tested , this also does not work by putting user break.

Read only

0 Likes
3,553

Hi,

You should turn on the system debugging on from the menu settings.

award point for useful answers

Thanks

Dany

Read only

Former Member
0 Likes
3,553

you should the break point in Include program and do the debugging...

break username. It mean..only you can do the debugging...

Read only

0 Likes
3,553

hi Anil,

I think it is not that way , whenever you execute it will stop there.

You don't have to set the debug even after the session is killed, that is the purpose of user breakpoint.

Regards

Prashant

Read only

0 Likes
3,553

Is it solved? - else

After putting the break point in include , you should turn on the system debugging on from the menu settings.

award point for useful answers

Thanks

Dany

Read only

0 Likes
3,553

the exit is EXIT_SAPLVEDF_002, it is not solved even after putting the user break & system debugging ON.

Read only

0 Likes
3,553

Hello,

I am putting the user exit as SAPLVEDF in SMOD but system is saying no enhancemtn found.am I worng somewhere?

Regards

Read only

0 Likes
3,553

Hi,

You should place the break point at a place <b>before</b> where the EXIT_SAPLVEDF_002 is called and then select system debugging ON..then it will take you to debug mode.

put the break point at some call customer-function where this EXIT gets triggered

Thanks

Dany

Read only

0 Likes
3,553

Go to CMOD, create a Z project.

Give a short description and then click on 'Enhancement Assignment'. Save when prompted in a transportable package.

Enter LVEDF001 under enhancement and click on 'Components'.Save when prompted in a transportable package. You will find your function module exit in the components with a red dot.

Come back to the initial screen and then click on and click 'Activate'.

Now your enhancement is active and you can debug your changes. Remember you have to transport this enhancement project also to other environments.

Read only

0 Likes
3,553

the enhancement was already there , i just made a small change.

It is not a new enhancement.

I should have told this first.sorry for this.

Regards

Prashant

Read only

0 Likes
3,553

In that case, just make sure that it is active.

Read only

0 Likes
3,553

It is active. I tested though SMOD also , but not able to reach the debug point

thanks

Read only

0 Likes
3,553

Go to Vf02

1) Cllick header-->output

2) Repeat output type-->assuming you already have one output.

3) Select output type and click Further data and select dispatch time to 1(Send with periodic schedule job).

4) Save.

5) Go to Transaction WE15 or execute RSNAST00 program

6) Select your output type..input object key-->nothing but document number(eg..Billing document number).

select output type and transmission medium.

7) Now breakpoint stop at your user exit.

"Reward point if usefull".

Thanks,

Narayan

Read only

Former Member
0 Likes
3,553

Is this user exit active go to SMOD press the test button and see if your exit is active else it wont reach the code.

Read only

Former Member
0 Likes
3,553

It is not related to VF02, it is related to the invoice IDoc and the processing function module is IDOC_OUTPUT_INVOIC. To debug your changes, you have to execute RSNAST00, give V3 for 'output application', your invoice number (with leading zeros) for 'Object key', transmission media 6 and execute. Check the box 'Send Again'.

Read only

MarcinPciak
Active Contributor
3,553

The question is a bit outdated, but the answer is still valid (especially for those who look for the solution).

The problem is that IDOC_OUTPUT_INVOIC is tirggered to run in UPDATE process. This means no debugging is possible, because it is background execution. As the debugger needs to attach its session to dialog process, you need to do the following:

1. Make sure CMOD project is active

2. In any user exit within IDOC_OUTPUT_INVOIC i.e. ZXEDFU04 set an endless loop like this:


data lv_continue type c.

while lv_continue is initial.

endwhile.

3. Run VF02 and create output message for idoc (RD00).

4. The debug will not open, but instead the UPD process will be kicked off and keep executing your loop

5. Go to SM50 > identify the UPD process which runs on your user (report SAPLXEDF) > select this line > from menu choose Program/Mode > Program > Debugging > confirm you want to switch to debug mode

6. Debugger will open and stop at WHILE statement. Now all you need to do is to make the condition true > LV_CONTINUE = 'X'. All the break points will follow as usual, as the debugger was able to attach itself to a dialog process.

Regards

Marcin

Important note

If, like me, you are using exit ZXEDFU02, don't use local variable lv_continue, as it will get reset any time the FM is called again, resulting in endless loop every another call. Instead use STATIC variable where it will keep its previous value for all the calls:


statics gv_continue type c.

while gv_continue is initial.

endwhile.

Message was edited by: Marcin Pciak

Read only

0 Likes
3,553

Tanks for your help!