Skip to Content
Technical Articles
Author's profile photo Thomas Schneider

XCO: A Powerful ABAP Re-Use Library now available in ABAP For Key Users

As of version 2005, SAP published a first version of the key user edition of the XCO library. The XCO (“Extension Components”) library is a general-purpose development library for ABAP aimed at providing a highly efficient ABAP development experience. The key user (KU) edition of the XCO library is specifically designed to support typical In-App Extensibility logic scenarios in SAP S/4HANA Cloud.

You can find more information and code examples in the documentation of the XCO library XCO library.

In 2005 version, the library provides modules with focus on handling of:

  • String
  • UUID
  • Regular Expression
  • JSON

In particular the JSON library is a long-lasting whish of the community, when handling external service calls in ABAP key user extensions (see documentation  Executing Outbound Services).

There is more to come …

Assigned tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sandra Rossi
      Sandra Rossi

      Thanks. Is it planned to be downported to non-Cloud versions?

      Author's profile photo Alexander Frank
      Alexander Frank

      Looks like it, according to this comment by Andre Fischer: https://blogs.sap.com/2020/05/17/the-rap-generator/#comment-508594

      Author's profile photo Thomas Schneider
      Thomas Schneider
      Blog Post Author

      As the ABAP Platform has one codeline, the classes will be available in the next on-premise release automatically (2020).

      In short:

      • All XCO library modules will be available in on-premise
      • Some XCO library modules will be released for ABAP for Key Users, which is available in S/4HANA Cloud MTE. This is what my blog post is about.
      • Some XCO library modules will be released for ABAP for SAP Cloud Platform, which is available in SAP Cloud Platform ABAP Environment (this includes e.g. the generation APIs mentioned in André Fischers blog - so thank you for linking this document in the other comment)
      • For some XCO library modules, there may be differences between the versions for ABAP for key users and for ABAP for SAP Cloud Platform. In this case, you will find a "KU" or "CP" in the respective name. 

       

      Author's profile photo Grzegorz Owczarek
      Grzegorz Owczarek

      ​Hello, I’m ABAP Steampunk user and it seems the XCO stuff is not permitted in there?

      Error message is the following “Use of Class XCO_KU is not permitted.”.

      Just wanted to try the string methods:

      https://help.sap.com/viewer/0f69f8fb28ac4bf48d2b57b9637e81fa/2005.500/en-US/41de98cee211444f92aa9b83e161c892.html

      Author's profile photo Thomas Schneider
      Thomas Schneider
      Blog Post Author

      Hi, this is correct. The classes with "KU" are released for ABAP for key users only.

      SAP plans to provide the XCO classes for Steampunk also, but they are not yet available in 2005.

      Author's profile photo Grzegorz Owczarek
      Grzegorz Owczarek

      Thanks, I thought it's ready to use since it looks so cool 😉

      Author's profile photo Frank Jentsch
      Frank Jentsch

      Corresponding API for SAP CP ABAP Environment (Steampunk) was released in between with 2008. The class name is e.g. xco_cp_json ("CP" instead of "KU").