Skip to content

Parser and Formatter for Distinguished Names (RFC 1779)

License

Notifications You must be signed in to change notification settings

abapPM/ABAP-Distinguished-Name

Version

License Contributor Covenant REUSE Status

Distinguished Name

Parser and Formatter for Distinguished Names (RFC 1779)

NO WARRANTIES, MIT License

Usage

Parse a distinguished name string:

DATA(input) = 'CN=Sectigo ECC Domain Validation Secure Server CA, O=Sectigo Limited, L=Salford, SP=Greater Manchester, C=GB'.

DATA(output) = /apmg/cl_distinguished_name=>parse( input ).

" Result
output = VALUE /apmg/cl_distinguished_name=>ty_distinguished_name(
  ( key = 'CN' name = 'Sectigo ECC Domain Validation Secure Server CA' )
  ( key = 'O'  name = 'Sectigo Limited' )
  ( key = 'L'  name = 'Salford' )
  ( key = 'SP' name = 'Greater Manchester' )
  ( key = 'C'  name = 'GB' ) ).

Format a distinguished name as a string:

DATA(input) = VALUE /apmg/cl_distinguished_name=>ty_distinguished_name(
  ( key = 'CN' name = 'Sectigo ECC Domain Validation Secure Server CA' )
  ( key = 'O'  name = 'Sectigo Limited' )
  ( key = 'L'  name = 'Salford' )
  ( key = 'SP' name = 'Greater Manchester' )
  ( key = 'C'  name = 'GB' ) ).

DATA(output) = /apmg/cl_distinguished_name=>format( input ).

" Result
output = 'CN=Sectigo ECC Domain Validation Secure Server CA, O=Sectigo Limited, L=Salford, SP=Greater Manchester, C=GB'.

Options:

  • separator: Change from , (default) to ; as a separator between name components
  • common_order: Change from abap_true (default) to abap_false for keeping the name components in the input order

Prerequisites

SAP Basis 7.50 or higher

Installation

Install distinguished-name as a global module in your system using apm.

or

Specify the distinguished-name module as a dependency in your project and import it to your namespace using apm.

Contributions

All contributions are welcome! Read our Contribution Guidelines, fork this repo, and create a pull request.

You can install the developer version of ABAP Distinguished Name using abapGit by creating a new online repository for https://github.com/abapPM/ABAP-Distinguished-Name.

Recommended SAP package: /APMG/DISTINGUISHED-NAME

About

Made with ❤ in Canada

Copyright 2025 apm.to Inc. https://apm.to

Follow @marcf.be on Bluesky and @marcfbe or LinkedIn

About

Parser and Formatter for Distinguished Names (RFC 1779)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Languages