if the IDoc is failing for a specific reason then there is an accurate error message and message number available. Can you post that?
Also mentioning the IDOC name itself could already help further, e.g. whether the field with the DUNS number is at all in the standard IDoc or if the DUNS number was entered into a field which has nothing to do with a DUNS number.
The customer master stores a DUNS number in KNKK-KRAUS. If you have an interface to D&B then there is in extension to KNA1 table with DUNS number