The first thing You need is to identify the printing program. To do that, You need to start transaction NACE. In case of Invoices we need to go to V3 – Billing related Output types

image Debug Invoice Print Program

You will find the program / subroutine invoked by the system when the printing of the Invoice is requested under Processing routines.

image-1-1024x234 Debug Invoice Print Program

As You recognized the document can be sent through variety of channels. One of them is the Print output, what we are looking for. Here You will find the type of the Form type and Name as well.

After You have the print program and subroutine name in hand, set the break-point in it.

image-2 Debug Invoice Print Program
So far so good, now we need to trigger the Output, so that our break-point gets hit. That can be a tricky part, because output operations are usually decoupled using an update task running in a separate session, not Your dialog user session. The reason is for that Output operations can be time consuming, because the execution leaves from ABAP Work Processes to somewhere else, to a printer, exchange server etc, which may not slow down the daily user interaction and performance when this goes in background. That is why it is defaulted as async operation done by another executables, like the Adobe Document Services (ADS).

There are some places however, where You can hit Your break-point with printing in Your dialog session, when the goal is to have the instant result in hand.

To do that go to transaction VF03, enter Your Invoice number and choose option Issue Output To

image-3 Debug Invoice Print Program
There You go. Select Your Output type and hit the Print Preview or Print buttons.
image-5-1024x629 Debug Invoice Print Program

Your break-point should hit. Ensure under the Print Options that a PDF printer is selected.

Share this content: