[Reprinted]How to Debug Billing IDOC User Exit ZXEDFU02

来源:互联网 发布:移动云商城 2.2 源码 编辑:程序博客网 时间:2024/06/09 18:45

Original article link: http://forums.sdn.sap.com/thread.jspa?threadID=1644680

 

[Issue]: Today when I trigger the O/P in billing document, I set the break point in the user exit ZXEDFU02, but the program won't stop at the break point place.

 

[Solution]: Then I search this in the internet, I found many people meet the same problems and somebody raised some solutions, I listed what are useful solutions here

 

The first idea

=================================================================================

Hi ,

Please check if you have created a project for user exit in SMOD and activated the same in CMOD. The control will not reach in your user exit until u create a project and activate it in CMOD.

If you have already done so then it means you have to search for another exit as this is not a suitable exit for you. Before implementing any exit put a break point and then test it.

Hope it helps.

Thanks,
Vivek Gupta

===================================================================================

 

The second idea

===================================================================================

Hi Umesh,

In Order to debug the IDOC enhancement in outbound billing document you have to do following -

1. When output type is put in the billing document header , change the further processing to value (1 or 2), the value shouldn't be 4.

2. Now save the billing document, ( the output in above document should be in yellow - ready to process)

3. Now put break point in your code and then call program RSNAST00 and give value in selection parameter for - output type you have used, application is V3, object key ( billing document number), transmission number as 6 .... etc. Now execute the program it will stop in your code.

Hope this helps!
Harry

 

[My comment:]  I use this way to solve my issue, then my program logic will go to the place where I set the break point

===================================================================================

[The third idea]

 

===================================================================================

Hi Umesh,

Add a soft breakpoint or a coded break point in the include.

Now before you click on the save button in VF01 go to the output type screen, select the output type and click on further data - here change the value from send immediately - 4 to value 1, and then click on save.

Copy the newly generated Invoice number, as Mentioned by Harpreet execute RSNAST00 program and input the Output type, invoice number and execute.

Now it should stop in the userexit that you have coded.

Regards,
Chen
===================================================================================
[The fourth idea]
===================================================================================
Hi, Umesh,

I met the same problem as you and finally found the reason was because the outboud IDOC was calling background.
So you could use VF31 to run your foreground, then the break-point will all work.
The parameters are the one used in your billing for output type.
Output type
Transmission medium
Sort order
Processing mode must be 2

Hopefully this thread could be closed.

Regards
David
[My comment: ] This way is also working
=================================================================================