Importing and exporting table data
Getting a file somebody supplies, a spreadsheet, a CSV or a JSON dump, into tables with its columns mapped and its values checked, and getting table content back out as a file. Data shipped with an application for development and demonstration is seed dataSeed dataGetting realistic data into a service so it can be developed and demonstrated — initial data, per-tenant content, and believable volumes for testing.SAP and community, narrow by design.
Overview
XCO_CP_XLSX reads and writes XLSX content held as an xstring, and CL_CSV_FACTORY creates writers that turn internal table content into CSV; both are among SAP's released ABAP classes.
Not covered: At converting content. Getting the file from a user, mapping its columns onto a target structure and checking values before they are written are left to the application; SAP's own example uploads through a generated Fiori elements preview.
SAP-samples repositories demonstrate the concern, a JSON uploader for SAP BTP ABAP Environment and an ALV export to Google Sheets; samples are not counted as providers. The community tools differ in where the file is handled: ABAP Spreadsheet ImporterABAP Spreadsheet ImporterA server-side ABAP component that parses an uploaded XLSX or CSV file and creates instances of a named RAP business object through dynamic EML, so its validations and authorizations run on every row.community org, abap parses an uploaded XLSX or CSV file in the backend and creates its rows on a RAP business object, and abap2UI5 for Excelabap2UI5 for ExcelAn Office add-in that runs an abap2UI5 app in Excel's task pane, where the app reads and writes the workbook through the z2ui5.cc.ExcelBridge control.community org, abap moves table data between an abap2UI5 app and the open workbook without a file. How these tools relate to the XCO classes has not been assessed.
sap/ui/export/Spreadsheet exports tabular data to an XLSX document, with the configuration preset for sap.ui.comp.smarttable.SmartTable and sap.ui.mdc.Table.
Not covered: At export. The spreadsheet export documentation describes no import, so reading a spreadsheet a user uploads is left to the application.
Whether the UI5 export API and the community import components were built to meet has not been assessed; they answer opposite halves of the concern.
The import side, in the browser: a dialog reads the uploaded file and submits its rows through the app's own OData model, so the service the app already talks to decides what is written.
No core answer is documented.
CSV files in a project are loaded into the database when it is deployed, which is seed dataSeed dataGetting realistic data into a service so it can be developed and demonstrated — initial data, per-tenant content, and believable volumes for testing.SAP and community, narrow by design rather than a file a user supplies to a running service; capire's database guide documents no runtime import of an uploaded file, so no core answer has been found for this concern in CAP.
The import side, as a service endpoint: a spreadsheet is uploaded to a running CAP service, parsed on the server and written into the CDS entity named in the request.
Licence
LicenceSAP Developer License Agreement 3.2 CAP§ 1AlwaysA covered CAP application exports SAP product data into a non-SAP product, especially systematically or at scale.
- § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
The export side can become the data-extraction case named in section 1. File format alone does not decide it; destination, scale and the scoped interoperability purpose matter.
SAP Developer License Agreement 3.2 CAP →Artifacts
Content
Seen working
Not where SAP's own Google Workspace integration already applies: the README opens by announcing a native integration between Google Workspace and [SAP S/4HANA](external:sap-s4hana), whose first set of features is included in SAP S/4HANA Cloud 2208 and SAP S/4HANA 2022 and needs an additional licence for the SAP Document Management Service. Not where end users cannot each hold a regular Google account, since there is no way to use an enterprise account or to log on to Google Drive through single sign-on, and not where the redirect URL Google calls cannot reach a public top-level domain server. No SAP standard support is provided for it.
Neither the package manifest nor the repository tree declares a licence.
Neither the package manifest nor the repository tree declares a licence.
Neither the package manifest nor the repository tree declares a licence.
Details
Coverage
For your agent
- Ref
capability:data-import-export- JSON
- /capabilities/data-import-export.json
- MCP
- Connecting an agent