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

Debug IDOC

Former Member
0 Likes
7,052

Hello all,

Good Day.

By reading the topic, I know that this has been such a easy one for some but i need a help on this.

Im done on creating enhancement for payment outbound idoc, so I need to test it via technical prospective (DEBUG).

* I put breakpoint in FM

* I also activate the update debugging

* I also use the SRDEBUG fucntionality

* EVEN external breakpoint.

* i also took advice from some forum related on this topic and properly do the step,

BUT none of these work, please tell me how to get out with this.

Your Help will be much more appreciated.

thanks in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
5,500

Use tcode we19 , enter your idoc no and click on the inbound function module push button then check call in debugging mode to debug.

or

1. Go to BD87

2. make a right click at the IDoc and choose restrict and process.

3. delete the check at the bottom(Background Processing)

4. Go ahead

5. edit -> process -> Foreground at Error

or

IDocs are processed by a function module, which are mapped

against in table EDIFCT. When you process an IDoc with BD87

you can have a breakpoint in the function and it will stop.

For outbound processing it depends on which program is

sending the IDoc. For transactional data like purchase

orders, the IDoc is created via RSNAST00 which in turn calls

a function module assigned to the processing code (BD41).

Read only

Clemenss
Active Contributor
0 Likes
5,500

You may use WE19 test IDOC transaction. Here you can request debugging.

Usually IDocs are processed in parallel background tasks to gain perfomance. That's why you can not debug them easily.

Another possibility to test in the process desired is to put a 'brake' loop into the code:

data:

  lv_continue type flag.

while flag is initial.

endwhile.

Start the process, see your process in SM50 process overview, debug from here. Set lv_continue to 'X' in debugger, step forward.

Regards

Clemens

Read only

Former Member
0 Likes
5,500

hello all tnx for that very useful suggestion..

Im doing an outbound IDOC for payment method in finance..

Actually a correction, im on the estimation process of creating my enhanecment and using debug i just want to check how the values for segment was being created.

I do believe that when i used the BD87 the process of call stack will be different now? is it correct.?

Read only

Neslinn
Participant
0 Likes
5,500

1. Put a endless loop in the code as below

    Code:

     data: w_Var type i value 5.

          do.

            if w_var < 5.

               exit.

            endif.

           w_var = w_var + 1.

         enddo.

2. Goto SM50 and select the processid in your SAP user id and from the menu option select      program->debugging

Thanks,

Neslin.

Read only

Former Member
0 Likes
5,500

which message type you are using. U can use user exit for that message type and can put break point in that exit.

Read only

Former Member
0 Likes
5,500

Hi,

By reading your request I could understand that, you want to check the enhancement which you have done in one system though other system. Thats the reason external debugging is active.

In this case, the breakpoints are not working because the idoc processing user is not you but the RFC user might be. When you are trying this, you need to change the RFC user to dialogus user. Please try the same and check.