eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


en:transformation:mappings:objektdefinition:klassenaufbau:class_xmlfile

Example of integration via file exchange with XML files:

The following example shows the class structure of an ORDERS object for integration with file exchange. The ORDERS class implements the interface IMapObjectRoot. Since mapping objects are structured as a tree structure, the interface IMapObjectRoot is the highest instance of this tree structure. The variables that are declared with the keyword public within the class are displayed as data elements as segments within the object tree structure.

Sample C# Code

using System;
using System.Collections;
using eBiss.Api;
 
namespace XYZ.DB
{
    public class ORDERS : IMapObjectRoot
    {
        [MapTrigger, MapExternalName("ORDERSKOPF")]
        public ORDERS_HEADER HEADER;
    }
 
    public class ORDERS_HEADER : IMapObjectItem
    {
        public string DOCNUMBER;
        public DateTime DOCDATE;
        [MapSize(35)]
        public string ORDERTYPE;	
        public DateTime DELIVERYDATEFROM;
        public DateTime DELIVERYDATETO;	
        [MapFrameDocumentRecipient, MapSize(13)]
        public string SU_GLN;
        [MapFrameDocumentSender, MapSize(13)]
        public string BUYERGLN;
        [MapSize(13)]
        public string DELIVERYPARTYGLN;
        [MapSize(13)]
        public string ULTIMATECONSIGNEEGLN;
        [MapSize(13)]
        public string INVOICERECEIPIENTGLN;
        [MapSize(3)]
        public string XYZ_CURRENCYCODE; //XYZ Währungscode
 
        [MapListType(typeof(ORDERS_DETAIL)), MapExternalName("ORDERSDETAIL")]
        public ArrayList DETAIL;
 
    }
 
    public class ORDERS_DETAIL : IMapObjectItem
    {
        public Int32 POSNUMBER;	
        public string EAN;	
        public int ORDEREDQUANTITY;	
        public decimal PURCHASEPRICENET;
        [MapSize(3)]
        public string PURCHASEPRICENETCURRENCY;
    }	
}

The class ORDERS_HEADER contains the header information of the ORDERS and implements the interface IMapObjectItem. This may only occur once per file. The class ORDERS_DETAIL represents the item list of the ORDERS object. It also implements the interface IMapObjectItem, which represents the objects of the item list. These can be contained several times in the array list items of the class ORDERS_HEADER 1), while the ORDERS_HEADERs are only available once.

Note: using eBiss.Api;

en/transformation/mappings/objektdefinition/klassenaufbau/class_xmlfile.txt · Last modified: 2024/02/20 08:15 by 127.0.0.1