Tuesday 5 November 2019

Convert local class in program to global class in SE24

This document explain how to convert a local class in program to a Global class in SE24.

Convert local class to Global:


◈ Go to transaction SE24, select menu Object type and option Import (Local class in program):

SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Tutorial and Material, SAP ABAP Online Exam

◈ Fill the program name were local class is implemented, define the Global class name, select the line and click button   to import:


SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Tutorial and Material, SAP ABAP Online Exam

◈ At the end edit your class and activate it:

SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Tutorial and Material, SAP ABAP Online Exam

◈ After success activation the class can be used globally.

Please consider before converting:


◈ Is not possible to have a 100% conversion because some objects inside the local class can’t be automatically converted and manual steps are required:
     ◈ It is important to define correctly the scope of global variables and methods parameters to avoid problem when converting;
     ◈ If you are using ABAP command MESSAGE without message class you should declared it in class proprieties or in each line of code where is used:

SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Tutorial and Material, SAP ABAP Online Exam


◈ Existent Text Symbols are not converted to the global class, they should be moved manually or using this command syntax that when clicking will automatically trigger the creation:

SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Tutorial and Material, SAP ABAP Online Exam

Convert from Global to local class


◈ This functionality is not available but it can be done with the following steps:
     ◈ Go to SE24, edit the class and click Toolbar button SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Tutorial and Material, SAP ABAP Online Exam;
     ◈ Select all code and copy/past to a new or existent report, activate it and remove all illegal command and syntax in local classes.

No comments:

Post a Comment