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

A question about debugging in VA01

Former Member
0 Likes
1,604

Hello Expert,

In our SAP system, when one sales order is created by VA01, a customing function module Z_SENDIDOC will be called to send out IDOC.

The logic and the FM were implemented by another colleague, who already left the company.

Currently, I take over his job. I want to know how the FM Z_SENDIDOC is triggered. I set breakpoints(both internal and external breakpoints) in the FM. Then I run VA01 to create the sales order. But the program will not stop at these breakpoints.

I already switch on system debugging and update debugging. I'm sure the FM will be called when the sales order is created.

Can any expert help me on what I should do to stop the program in the FM?

Thanks in advance,

Best Regards,

Johnny

1 ACCEPTED SOLUTION
Read only

madhu_vadlamani
Active Contributor
0 Likes
1,433

Hi Johnny,

If it is not triggering like you directly type break-point and see.Where is the fm calling in any include.

Regards,

Madhu.

9 REPLIES 9
Read only

madhu_vadlamani
Active Contributor
0 Likes
1,434

Hi Johnny,

If it is not triggering like you directly type break-point and see.Where is the fm calling in any include.

Regards,

Madhu.

Read only

0 Likes
1,433

Is this function, Z_SENDIDOC, triggered through message control (or output determination) through a output type? If it is triggered through output type, then follow the instructions below:

Break points won't get triggered when output type is set to trigger immediately (dispatch time 4) during Sales order save, because the IDoc will be triggered asynchronously in this mode by the system and not in your session.

What you need to do is go into the output page (Extras -> Output -> Header -> Edit, select the condition type in yellow color (not yet processed), click on "Further data"and set "Dispatch time" to 1 (Send with periodically schedule job);. After doing this save the sales order. This will mean that the output idoc is not triggered immediately.

Now put the break point in your function.

Come to SE38 and execute RSNAST00 program, give "Output application" as "V1", object key as your sales order number (format it with leading zeros for full 10 digits) and enter your output type. Run it and then you will see that your break point is hit.

If you are not using output type, you can also do a where used list on Z_SENDIDOC to see where exactly it is being called and put your break point higher in the call hierarchy.

Read only

0 Likes
1,433

Hello Experts,

Thanks for your replies. There is not output type for the sales order, and I still can't catch the breakpoint.

The FM is called in the method "SalesOrderCO.Z_UPDATE_STATUS" of Object Type YBUS2032.

Can any expert tell me how the Object Type YBUS2032 is created and how it is used?

Once this is clear, maybe I can find some clue on how to catch the breakpoint.

Thanks in advance.

Best Regards,

Johnny.

Read only

0 Likes
1,433

Hi Yongbo

Check YBUS2032 in T-Code swo1.

Regards,

Faisal

Read only

0 Likes
1,433

Hi Johnny,

This is an rfc fm .please check in swo1.Keep break point in that method and see.

Regards,

Madhu.

Read only

0 Likes
1,433

Hello Experts.

Since the FM is called in the method "SalesOrderCO.Z_UPDATE_STATUS" of Object Type YBUS2032, I want to know how can find where the system call the Object Type YBUS2032 when I save the sales order?

Can any one help on this?

Thanks,

Best Regards, Johnny

Read only

0 Likes
1,433

Hi,

Check where used list in swo1 and find.

Regards,

Madhu.

Read only

Former Member
0 Likes
1,433

Hi,

Is your custom FM called from an enhancement in VA01 ? If there is an implicit enhancement, can you activate the enhancement again ? After the server refresh, you need to activate again all the enhancements.

Then, can you try another tip: after inputing data in VA01, you can put a '/h' in the command field to debug, then press F9, enter your funtion module in the tab Function, and hope it will go there.

Best regards,

paul

Read only

Former Member
0 Likes
1,433

Find solution from technical specification.