1. A computer implemented method of automatically generating Electronic Data Interchange (EDI) documents or messages using an EDI system, comprising: receiving a source data model having a first EDI format corresponding to EDI related data, the source data model including metadata; mapping the metadata of the source data model to corresponding variables of a virtual document; and mapping the variables of the virtual document to metadata of a target data model having a second EDI format.