Parser and Formatter for Distinguished Names (RFC 1779)
NO WARRANTIES, MIT License
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) = zcl_distinguished_name=>parse( input ).
" Result
output = VALUE zcl_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 zcl_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) = zcl_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 componentscommon_order
: Change fromabap_true
(default) toabap_false
for keeping the name components in the input order
SAP Basis 7.50 or higher
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.
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: $DISTINGUISHED-NAME
Made with ❤ in Canada
Copyright 2025 apm.to Inc. https://apm.to