codepage
A polyfill class, ZCL_ABAP_CODEPAGE, that converts strings to binary and back behind one interface, where Clean Core blocks CL_ABAP_CODEPAGE and older systems lack CL_ABAP_CONV_CODEPAGE.
SAP's CL_ABAP_CODEPAGE handled string-to-binary conversion for formats such as XML or JSON, but Clean Core now blocks its use, and the class it points to instead, CL_ABAP_CONV_CODEPAGE, is not present in older systems. ZCL_ABAP_CODEPAGE wraps the conversion behind one interface, with to() and from() methods that round-trip a string through binary, so the same call works whichever class the system underneath actually allows. It carries its own round-trip unit test and depends, for its tests only, on two other abapifyabapifymaintains 9 entriesindependent projects, assert and throwthrowA minimalistic way to raise an ABAP exception, from a text passed directly or, with no argument, from the system fields a preceding MESSAGE statement filled, as a static method or through an interface.independent, abap.
Facts
Where it sits
Who is behind it
In the atlas: maintains 9@abapifymaintainerPetr PlenkovContributes to this
In the atlas: contributes to 13@ThePlenkov1 contributor
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- does not say
- Distributed through
- does not say
Connections
Whether code can run in ABAP Cloud, and what to do when it cannot
JSON renderer and parser for ABAP with camelCase conversion
Download
README
quoted from abapify/codepage under MIT, readCodepage polyfill
It never happened and it happened again. Clean core requires a new class for code page and the old class is not allowed.
Why?
CL_ABAP_CODEPAGE was a class SAP introduced long time ago and it was efficiently handling string <-> binary conversion for UTF-8 documents such as XML or JSON or whatever else.
We can see that is still present in a new ABAP documentation snippets.
However it turned out to be one more example when "Clean Core" concept simply prevented us from using this class:
The use of Class CL_ABAP_CODEPAGE is not permitted
So what should we use instead? Well there is another nice class which we can use: CL_ABAP_CONV_CODEPAGE
Introducing one class in a new environment which is not present in the old environment prevents us from reusing the code. Polyfill approach allows us to use one class which will work in any system.
ZCL_ABAP_CODEPAGE
Rountrip example from the unit test
data(test) = |This is a sample string|.
" String to xstring ( to codepage )
data(lv_binary) = zcl_abap_codepage=>to( test ).
" Xstring to string ( from codepage )
assert( zcl_abap_codepage=>from( lv_binary ) )->eq( test ).
Test Dependencies
History
Others providing
Compare all 11 on the ABAP Cloud readiness page →- abap-cloud-guiabap-cloud-guiA report-style programming model for abap2UI5: one class produces a selection screen with a WRITE list or an ALV grid, running as a UI5 app on ABAP Cloud as well as on NetWeaver 7.02.independent, abapReport-style programming model for abap2UI5 on ABAP Cloud
- Modernization Agents for SAP on AWSModernization Agents for SAP on AWSAWS's suite of agents for SAP modernisation work: custom ABAP converted for S/4HANA, PI/PO interfaces moved to Integration Suite, BW objects moved to SAP Datasphere, deployed into a customer's own AWS account and reached only after registration.partner, abapAWS agents for ABAP, PI/PO and BW modernisation work
- ROSAROSAAnswers whether an SAP object is released for ABAP Cloud, and what to use instead when it is not — served from SAP's own Cloudification Repository over MCP and over plain REST.independent, abapMCP server answering whether SAP objects are released for ABAP Cloud
- Cloudification RepositoryCloudification RepositorySAP's list of released APIs for SAP Cloud ERP, with the successors of the objects that are not released — the content the ABAP test cockpit's cloud readiness and clean core checks are pointed at.sap official, abapSAP's list of released APIs for SAP Cloud ERP with successors
- code pal for ABAP — Cloud Editioncode pal for ABAP — Cloud EditionThe same Clean ABAP check set for ABAP Cloud, where the legacy edition cannot run.sap official, abapClean ABAP check set for ABAP Cloud
- Clean-Core.ioClean-Core.ioA free hosted workspace that reads one piece of custom ABAP, redraws its business process as BPMN with a line anchor on every element, grades the SAP objects it uses Level A–D and ends in a keep, rebuild, move-to-standard or retire decision.independent, abapHosted workspace redrawing custom ABAP as BPMN and grading it
- Clean Core MeasurementClean Core MeasurementAn ABAP application for a central ATC system that imports Clean Core check results and reports them per system as Level A to D KPIs, technical debt scores and documented assignments.independent, abapReports Clean Core ATC results per system as Level A to D KPIs
- ABAP Select ConverterABAP Select ConverterConverts a classic Open SQL SELECT against dictionary tables to the equivalent statement against released Core Data Services entities and their fields.independent, abapConverts classic Open SQL SELECTs to released CDS entities
- abap-system-fieldsabap-system-fieldsAn ABAP Cloud class that wraps SY system fields and calendar-date functions behind an injectable instance, so code that reads them stays stable under unit tests.independent, abapInjectable wrapper for SY fields and date functions in ABAP Cloud
- Cloudification Repository ViewerCloudification Repository ViewerA browser form over the Cloudification Repository, the list SAP publishes of which standard objects are released for ABAP Cloud and what replaces the ones that are not.independent, abapBrowser form over SAP's Cloudification Repository for ABAP Cloud
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:abapify-codepage- JSON
- /artifacts/abapify-codepage.json
- MCP
- Connecting an agent