Sometimes custom fields added in the sales order do not flow to the billing document.
This QuickFix shows how to transfer those fields using a data transfer routine.
Step 1: Navigate to the SAP Area
Go to transaction VOFM.
Select Data Transfer → Billing Documents.
Step 2: Create the Routine
Create a new data transfer routine (for example: 901).
Step 3: Add the ABAP Logic
Maintain the following code inside the routine:
vbrp-zz1_stock_custom_bdi = vbap-zz1_stock_custom_sdi.
vbrp-zz1_sales_type_bdi = vbap-zz1_sales_type_sdi.
After this change, custom fields will flow correctly from the sales order to the billing document.