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.
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.
Details
Coverage
For your agent
- Ref
capability:data-import-export- JSON
- /capabilities/data-import-export.json
- MCP
- Connecting an agent