Although an XMLport can be called from a user menu and present its own request page to set up parameter, often it proves useful to invoke the import or export routine directly from the application code. This provides more flexibility to the object functionality and allows the developer to control data exchange at a deeper level.
For example, running an XMLport as a C/AL variable allows you to do the following:
- Replace the standard file open dialog with a different one, or exclude it and generate a filename without requiring the user to enter it
- Set predefined filters on data items and control table records being imported or exported
- Import from and export to any Stream object, not necessarily a file stream