Let's say, we don't want to use the standard form provided by SAP for our invoice printout. We want to design our own form and program and call it from the invoice-related transaction codes- VF02, VF03.
Yes, we are going to use VF02 for this example.
1. Check the Output Request first. Marked Red in the below image.
We can see the output type is RD00
Now Goto Transaction 'NACE'.
Select V3 - Billing. as we are working with the Invoice output, V3 is the type for this output. And click on Output types.
It will take us to the output types overview screen. Click on the output type you want to check. In out case it's RD00. and click the processing routines from the dialog structure sidebar.
Here we can see the actual program name and form used for Billing printout.
We can set our own program and form here. Usually, a new custom type of output is created and mapped to the form and program.
We already have a few in this demo system. Let's check it.
Here we have assigned our own custom Z program and form to the output type.
The output type is custom too. Therefore it needs to be set in the output request as well. This was the first step for this process.
Finally, we will prepare the Driver program to call it from the standard program with NACE assist using the same Form Routine name.
*All the Includes will go here
START-OF-SELECTION.
FORM entry USING ent_retco
ent_screen
CLEAR : ent_retco.
PERFORM fetch_data. "Fetch the data you want to pass to the form
PERFORM call_form. "Call the Form using FMs. There's already a post about how to call an adobe form from the Driver Program
ENDFORM.