I had a hard time to make this thing working, replicating customer from CRM and extending the company codes to more than one. The standard CRM -> R/3 won't have a company code and some of the information available during the replication. However this can be added in few places, one of them is using BTE (transaction FIBF->Infosystem P/S), event DE_BALE. We can add our own entries into the CT_IDOC_DATA or manipulate the entries.
To get the multiple company codes to work, it seems that the sequence of segments in the CT_IDOC_DATA is important. I was reading the problem found here: http://scn.sap.com/thread/3257644 which says that someone had the same problem as me, "Fill all required fields " kind of error. It took me few hours replicating the sequence, trials and errors and found out that the sequence of segment in CT_IDOC_DATA is important. I couldn't get pass the error if I have the E1KNB1M segment (and it's child segments) earlier than the E1KNVVM segment. Moving the E1KNB1M segment to the end seems to solve my problem. So, if you've problem with your DEBMAS IDOC, trying to create multiple company codes for the customer, try move the segments around, best is to follow the sequence found in the DEBMAS which is: