2005 Apr 05 4:52 PM
Greetings,
I am having a problem where I cannot get a transaction to stop at a breakpoint that I have set in a user exit include program (<b>ZXEDFU02</b> starting from transaction <b>VF04</b>) and I cannot figure out why. I am sure that the exit code is being executed because of the results, and if I put a syntax error in this include and activate and execute, i receive a short dump at the syntax error - evidence that the program is in the include code.
I have even tried switching on system and update debugging just to be sure, but no matter what I cannot hit this exit. The exit for those unfamiliar allows the addition of additional data to segments of the INVOICE02 IDOC in SD.
Thank you in advance for any help you can provide.
Geoff
2005 Apr 05 7:45 PM
Hi Brad,
In our version and configuration in R/3 4.6C, there is no selection as such, or scrollbars for that matter. The last options are some check boxes for specific functions as follows:
Order-related
Delivery-related
Rebate-related
Intercompany Billing
I don't think I am missing anything, it just does not appear to be there. Do you know if there is a system field in the SY table that I can change if I enter debug with /h before executing VF04 as an alternative?
Greetings,
I am having a problem where I cannot get a transaction to stop at a breakpoint that I have set in a user exit include program (<b>ZXEDFU02</b> starting from transaction <b>VF04</b>) and I cannot figure out why. I am sure that the exit code is being executed because of the results, and if I put a syntax error in this include and activate and execute, i receive a short dump at the syntax error - evidence that the program is in the include code.
I have even tried switching on system and update debugging just to be sure, but no matter what I cannot hit this exit. The exit for those unfamiliar allows the addition of additional data to segments of the INVOICE02 IDOC in SD.
Thank you in advance for any help you can provide.
Geoff
2005 Apr 05 4:54 PM
2005 Apr 05 5:12 PM
Since it is a Z.. program, add the command BREAK followed by your userid at the point where you want the code to be stopped. For example:
BREAK CFOLWELL.I have had the same problem with user exits but the BREAK command should do the job for you.
2005 Apr 05 5:19 PM
Thanks for the help, but i have tried a breakpoint in the EXIT function module (I cannot find where it is called from which is part of the problem - maybe you have a suggestion here?) and it still does not stop.
As well, I am familiar with the BREAK username statement and actually have that statement in the exit include but it never makes it... I'm at a loss!
2005 Apr 05 5:57 PM
I'm not familiar with this user exit, but it looks like it has to do with output. Sometimes output is ran as a secondary update. If this is the case, then the code is not run in your interactive session, it is run in the background, and therefore, no break. There is a way to set up a break on a background job. I haven't done it in a while, and therefore don't remember how to do it. I don't know if you can create a break for a secondary update or not.
Brian
2005 Apr 05 6:15 PM
Hi Geoff,
The problem most probably lies with the fact that in default mode VF04 does not perform the update logic synchronously (for performance reasons). The only thing that is performed synchronously is the selection of the data, the bundling of the data into work packets, and the submission of these work packets for execution.
Thus, you do not hit your break point for debugging (the actual code gets executed either in a background or update work process). You will, however, get short dumps if the synchronous section of the program uses any function module in the function group in which you have introduced syntax errors (hence how you can get short dumps but still not stop at the break point).
The way to solve this is right down the bottom of the VF04 transaction you have an option for Update:
Asynchronous
Synchronous via VB log
Synchronous w/o VB log
By default it is set to the first option. If you choose either option 2 or 3, you should then run the update logic synchronously and stop at your breakpoint.
If this still doesn't work, you have still another thing to try. Before hitting execute, put in /H at the okcode. When you hit execute it will throw you into debug mode. Hit the settings button (far right) and flag the option 'In background task: do not process', and then continue. Any background processes started will be thrown up into another session in debug mode. Go to this other session and hit continue. You SHOULD stop at your breakpoint if it is being processed as a background job.
If this still doesn't work then you have some options for update debugging. Let me know and I'll see if I can help.
Cheers,
Brad
2005 Apr 05 6:26 PM
Thank you for your response Brad. It really clarifies the issue for me.
I would like to try your first suggestion, changing to the other processing mode, but I am afraid I am not sure how to do this. If you could provide steps to try this, I would appreciate it. The system in R/3 4.6C.
Thank you,
Geoff
2005 Apr 05 7:01 PM
Geoff,
To try this option, run the transaction VF04. Right down the bottom of the selection screen (you may have to scroll to see it) you should see the Update options I was discussing:
Update:
Asynchronous
Synchronous via VB log
Synchronous w/o VB log
Just select the radio button next to either the second or the third option.
If you then hit execute (assuming you have entered all the other selection criteria) you should be running in synchronous mode for the invoice creation. It should then stop at your break point.
Let me know how you go.
Cheers,
Brad
2005 Apr 05 7:45 PM
Hi Brad,
In our version and configuration in R/3 4.6C, there is no selection as such, or scrollbars for that matter. The last options are some check boxes for specific functions as follows:
Order-related
Delivery-related
Rebate-related
Intercompany Billing
I don't think I am missing anything, it just does not appear to be there. Do you know if there is a system field in the SY table that I can change if I enter debug with /h before executing VF04 as an alternative?
2005 Apr 05 10:03 PM
Hi Geoff,
I think what is happening with your VF04 is that it is creating NAST entries for creating IDOCs as per your output configuration. Now when you go to create these IDOCs, that is when you will hit your user exit. We are using it and we are in 46c.
So do the following.
Set your breakpoint.
Run RSNAST00. In the selection screen,
Enter V3 for "output application".
Enter the internal format(with leading 0s) of your invoice for "Object Key".
Select the output type relevant to you.
Select '6' as the "Transmission Medium".
Once you run this, it should stop at your break-point, provided, your configuration supports repeat output. If not you can always go in change mode VF02 and add another row for the output there and then run the above program.
Please let me know if I am on the right track here.
Regards,
Srinivas
2005 Apr 05 10:16 PM
The User exit is processed when Messages (for edi) are triggered in Invoices. Messages could be triggered immediately when document is created or set to be processed at a later time (Example RSNAT00).
Most likely in you case it is just creating a record in NAST table for it to be processed at a later time. First go into one of the Invoices which was created and check at what time your Message with communication type "6" is set to be processed. Or if you can check the config for Message Determination that's even better. If it is set to anything but 4 (immediately) no matter what you do, cannot stop the code in the User exit because it is never getting fired in first place.
To be sure try processing an edi message manually for an invoice using RSNAST00 program. This should help you stopping at the breakpoint in User exit.
Hope this helps....
Shashi Reddy
2005 Apr 06 8:57 AM
Hello,
I have had a similar problem because the code was being run in in update task. Not sure if it is the same - but can't hurt to try. The following is a way on how to debug a program that runs in update task.
Prioring to the execution before the user exit, turn on debugging (/h). When the debug screen comes up, go to the Settings tab and check the box next to 'Update debugging'. Next, go the menu Breakpoint>Breakpoint at>subroutine/function module and set a function module at the routine you want to check. Continue to cursor(F8). A new session pops up with the breakpoint at your code, in update task.
I hope this helps.
Cheers,
Corinne
2005 Apr 06 12:01 PM
Hi Geoff,
Some of the other posts here have opened my eyes as to other possibilities as to how best to trap this error.
Can you please specify exactly where your userexit is, and what you are trying to do with it.
If its an Idoc userexit (which it seems to be) there are definitely easier (to do and to understand) ways to debug them than the ones I listed.
Thanks,
Brad
2005 Apr 06 1:14 PM
All these suggestions are great. I will be trying them all today and I will prvide feedback ASAP...
TO answer more specifically to Brad, the exit info is as follows:
Enhancement: LVEDF001 (for IDOC_OUTPUT_INVOICE)
The exit FM is EXIT_SAPLVEDF_002 with the include ZXEDFU02.
I use this exit to add additional segments to the INVOICE02 IDOC before it is output from SAP and processed in our EDI system in case anyone was curious.
2005 Apr 06 1:33 PM
Just to update - Srinivas's suggestion did the trick. I had to modify the record in the NAST table to change the displatch time from 4 (immediately) to 1 so that RSNAST00 would process it again, but that was ok for debugging purposes. As soon as I did this record and ran with the specified selection screen entries, I hit the breakpoint and can continue debugging.
Thanks very much for all the suggestions. They have all been very helpful!
Cheers,
Geoff
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |