I had a look at IDOC_OUTPUT_SHPMNT and see no reason why the segment should not have been added. It may be empty but the routine to create it should be called. The you can fill the data with customer exit '002'. The catch-all solution would be to build a wrapper function, e.g. Z_IDOC_OUTPUT_SHPMNT which in turn calls the original function IDOC_OUTPUT_SHPMNT. This will build your IDoc the traditional way. Then you can process the created IDoc data and manipulate your segments as desired.
Dig Deeper on SAP manufacturing module
Related Q&A from Axel Angeli
An SAP user is receiving an error message while integrating SAP iDoc PORDCR1 for a purchase order. Continue Reading
SAP expert Axel Angeli explains how to update the "further dates" tab information in am SAP transaction through an SAP IDoc. Continue Reading
An SAP R/3 4.7 user wants looking to post a document entry using different trading partner fields for credit and debit for function FB01. Continue Reading