Generally, you may consider using the MASTERIDOC_CREATE_MATMAS function to do this job. However, if you copy it within the same system, there may also be a convenient alternative to call the MATERIAL_MAINTAIN_DARK directly with the correct data provided. Z-Fields in MARA table are usually copied into a new material when they are part of a proper APPEND-structure of MARA. If you send IDocs to the same system, you have to create a second logical system pointing back to your system (you can use destination NONE), as the integrity checker will not allow sending IDoc to your own system.
Dig Deeper on SAP manufacturing
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