SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.

Install SAP Free

Read Registry Data in ABAP Code using Class Methods

To read Windows registry key values, SAP ABAP programmers can use build-in ABAP class method cl_gui_frontend_services=>registry_get_value. In this ABAP tutorial, I want to show a demo code where list separator character is fetched from Windows Registry by ABAP code with mentioned ABAP class method cl_gui_frontend_services=>registry_get_value

For example, assume that ABAP developer requires to read sList key value for list separator character which is stored under following registry path:
\HKEY_CURRENT_USER\Control Panel\International

read registry data in ABAP using class methods

In order to read registry key sList from Windows Registry, ABAP programmer can use cl_gui_frontend_services=>registry_get_value class method by configuring the input parameters as in following code block.

CALL METHOD cl_gui_frontend_services=>registry_get_value
  root = cl_gui_frontend_services=>hkey_current_user
  key = 'Control Panel\International'
  value = 'sList'
  reg_value = DATA(lv_seperator)
  get_regvalue_failed = 1
  cntl_error = 2
  error_no_gui = 3
  not_supported_by_gui = 4
  OTHERS = 5.

After class method cl_gui_frontend_services=>registry_get_value is called, registry value is returned in local variable lv_seperator which is declared in-line and has string data type.

Just to note, ABAP programmer can read Windows registry sDecimal key value and sThousand key value for decimal separator and thousand separator characters using above static class method.

SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Meetup Sunumu 1 meetup

Copyright © 2004 - 2020 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems