The requirement is importing of new records. Right? Not merging/updating existing ones?
I'd import the XML file on the client into the ProDataset and send that using InvokeTask to a Business Task or InvokeMethod to a Business Entity Method. Then you'll have to turn on Tracking Changes:
DatasetHelper:SetTrackingChanges (DATASET dsYourDataset:HANDLE, TRUE).
Then you'll have to loop through the records and mark them as ROW-CREATED. The records have the ROW-STATE of ROW-UNMODIFIED after the Read-XML.You can use the buffers
MARK-ROW-STATE method for that:
BUFFER eYourTable:MARK-ROW-STATE (ROW-CREATED).
Then call SaveChanges of the Business Entity.
If merging of records is required, consider using the Consultingwerk.SmartFramework.Tools.Import.GenericDataImporter class. This is what we use when deploying the framework meta-data.
This method allows merging new and updated data into a Business Entity. This method should be called from within a Business Task and not the Business Entity you're importing to:
METHOD PUBLIC ImportResult ImportBusinessEntityData (pcBusinessEntityName AS CHARACTER,
phDatasetImport AS HANDLE,
pcSkipFields AS CHARACTER):