✒️ABAP / Las Ampliaciones: los User Exits y los Customer Exits Por Jaime Gomez Arango

Selector Alummnos / Empresas

CVOSOFT UNITED STATES OF AMERICA | 17 años de ingeniería dedicados a formación profesional de Consultores SAP | +info

ABAP Las Ampliaciones: los User Exits y los Customer Exits

ABAP Las Ampliaciones: los User Exits y los Customer Exits

What is an Enhancement?

Enhancements: These are various tools provided by SAP to make improvements, modifications, or additions to a standard system program.

Some standard programs are designed to add new functionality to existing ones. In some cases, you can validate fields on a particular dynpro, add fields to a screen with code to handle that new data, add a new option within a menu, or add fields to standard tables. Enhancements are generated and coded in separate modules from the standard code, so there's no need to modify it, thus maintaining the original functionality and proper operation.

The main advantages of enhancements are:

  • They allow modifying certain programs to adapt them to the specific needs of the company, adding new features to existing ones.
  • They enable improvements to a program without modifying its original code, thus maintaining its proper functioning and features.
  • Changes take effect by simply transporting the new objects.

The main disadvantages of enhancements are:

  • Not all modifications can always be made satisfactorily since most enhancements are prepared for a specific task and moment within the execution of a program.
  • Not all standard programs are prepared to add all types of enhancements.

In SAP, there are several types of enhancements, each used according to the type of improvement or requirement to be developed, each with its own particularities that will be explained in detail later. The most important ones are:

  • User Exits
  • Customer Exits
  • KeyWord Exits
  • Field Exits
  • Append Structures
  • Badis
  • Enhancements
  • Menu Exits

User Exits

It is a subroutine defined within a standard ABAP program that is empty, meaning it has no code, it's there for the user to add their own source code to perform specific tasks not foreseen by SAP.

They are the first enhancements introduced by SAP and are specific to the SAP SD Sales and Distribution module, not existing in other SAP modules. They are implemented as subroutines.

All User Exits are named by SAP as USEREXIT_XXXXXXXX. The main problem they present is finding the correct User Exit. Once found, we must verify that it serves our purpose. The ABAP code to be inserted into the User Exit can be placed within an INCLUDE that will start with Z or separately.

For entering ABAP code or modifying existing code within a User Exit, a SAP access key is not required.

For example, in the standard program MV45AFZZ, we find the following User Exit used by transaction VA02 every time it reads a document.

Transaction VA02: We will use the standard transaction VA02 to modify sales orders.

Some SD module applications still use this type of enhancement, but this practice is not used for new SAP code extensions. Instead, the other available enhancement types are used, although it's worth noting that User Exits will be maintained by SAP in the new system versions.

User Exits are hollow points generated by SAP in the standard system, located at specific places in the system. It's important to clarify that it's not possible to generate new holes or User Exits, but we must work only with existing ones. If we don't find a User Exit that fits our requirement, then we should look for another alternative solution among the other possible enhancement solutions offered by SAP in its system.

Customer Exits

It's a point within a program where a custom program can be called. They are executed from a standard program by calling a function module. Some standard programs have within their code, calls to function modules that can be modified by the programmer. Customer Exits are called within standard programs through a number. This number is the end of the function module name associated with the program.

In the MODSAP table, all function modules used in Customer Exits are found.

MODSAP Table: The standard database table MODSAP stores all existing enhancements in the SAP system.

For each enhancement, the following is stored: the enhancement name, the component type which can be "E" for Function Exits, "S" for Screens, "T" for Tables, and "C" for GUI Code, and finally the name of the SAP object (program, function module, etc.) being modified.

The main advantages of a Customer Exit are:

  • The Customer Exit is a good tool to add new functionality to a standard program such as validation or execution of control routines without modifying the original code.
  • To transport and activate Customer Exits, only the new Include is sufficient, without touching the original program.

The main disadvantages of a Customer Exit are:

  • The Customer Exit does not always fit the programmer's needs since the objects it imports or exports are fixed and may not have all the objects required.
  • There is no search for Customer Exits by program with a comprehensive explanation of their usage; to find them, you have to search for the string CALL CUSTOMER-FUNCTION within the standard control program, and its functioning is tested without knowing exactly if it is correct for what you want to do.

To work with Customer Exits, we will mainly use two transactions:

  • SMOD: to manage enhancements.
  • CMOD: for enhancement project management.

Steps to Perform a Customer Exit

  • First, go to transaction SMOD. In the transaction, fill in the enhancement name containing the function module to be used.
  • If you don't know the name, in transaction SE16 with the MODSAP table, in the MEMBER field, fill in the function module name to search for, and the NAME field will tell us the enhancement that contains it.
  • If you don't know the specific name, you should search in the code of the standard program for user function calls, indicated by CALL CUSTOMER-FUNCTION '001'.
  • Once you have used the name, you will see the enhancement name on the SMOD transaction screen, enter the enhancement in the SMOD transaction field, and view it.
  • In the next step, press the COMPONENTS button to view all modules.
  • Once you have the name of the function to use, double-click on it, which will take you to another screen, to view objects to import and export this function.
  • In the Code tab, there is a Z include to add user code.
  • If the include does not exist when double-clicking, the user will be prompted to assign a transport order to generate it.
  • Once created, it is possible to generate ABAP code; in the objects of the IMPORT, MODIF, and TABLES tabs, being able to return results by modifying the objects found in the EXPORT, MODIF, TABLES tabs.
  • Once the coding is complete, the enhancement must be activated and included in a project. Projects are created in the CMOD transaction. There, a Z project must be generated in which the enhancements to be included will be added.

An enhancement project associates multiple enhancements. Its activation or deactivation affects all associated enhancements. The transaction to access enhancement projects is CMOD. There, enter the project name and press Create. Now press the Assignment Enhancement button to assign the enhancements to include. Then, introduce the enhancements and press the Components button to visualize each enhancement's components. On the components screen, activate the enhancement by pressing the activation button. Each of these components represents the exits of the enhancement. Once activated, the enhancement project will turn green. You can deactivate the activation of the enhancement project by pressing the deactivate button.

How to test Customer Exits

A challenging aspect of using Customer Exits is locating them and understanding when they occur in the process. To conduct this investigation effectively, the most efficient method is to create an enhancement project, assign the enhancement, activate it, and then place a breakpoint in the function module to determine the data available at that moment and the exact point in the process where it is located.


 

Escanear / Compartir

 

 


Sobre el autor

Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor ABAP Nivel Avanzado.

SAP Expert


Jaime Eduardo Gomez Arango

Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C

✒️Autor de: 149 Publicaciones Académicas

🎓Egresado de los módulos:

Disponibilidad Laboral: FullTime

Presentación:

Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.

Certificación Académica de Jaime Gomez

✒️+Comunidad Académica CVOSOFT

Continúe aprendiendo sobre el tema "Las Ampliaciones: los User Exits y los Customer Exits" de la mano de nuestros alumnos.

SAP Expert


1. Concepto General de Ampliaciones Las ampliaciones son herramientas que ofrece SAP para realizar mejoras, modificaciones o agregados a programas estándar sin alterar el código fuente original. • Funcionamiento: Se codifican en módulos aparte, permitiendo que la funcionalidad original permanezca intacta y facilitando las actualizaciones del sistema. • Ventajas: Permiten adaptar el sistema a necesidades específicas de la empresa y sus cambios toman efecto simplemente transportando los nuevos objetos. • Desventajas: Están limitadas a momentos y tareas específicas de la ejecución del programa predefinidas por SAP. 2. User Exits Fueron las primeras herramientas de ampliación...

Acceder a esta publicación

Creado y Compartido por: Gabriel José Luces González

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Master


Las Ampliaciones los User Exits y los Customer Exits. Definición y propósito de las ampliaciones Las ampliaciones permiten realizar mejoras en aplicaciones relacionadas con programas estándar de sistemas, agregando funcionalidades sin modificar el código original. Ejemplos de mejoras: agregar campos a módulos y plantillas, nuevas opciones en menús, o modificar tablas de bases de datos. Se desarrollan aparte del código estándar para mantener la funcionalidad y el rendimiento original. Ventajas: adaptación a necesidades de la empresa y facilidad para transportar los nuevos objetos. Desventajas: limitación...

Acceder a esta publicación

Creado y Compartido por: Juan Ignacio Romero

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Master

Introducción: Las ampliaciones son herramientas clave en SAP que permiten adaptar y mejorar los programas estándar sin modificar su código original, garantizando su estabilidad y funcionamiento. Teoría Esencial: ¿Qué son las Ampliaciones? Definición: Son herramientas que permiten realizar mejoras, modificaciones o agregados a un programa estándar de SAP. Objetivo Principal: Adaptar el sistema a las necesidades específicas de una empresa sin alterar el código base de SAP. Principio Fundamental: El código personalizado se escribe en módulos separados, por lo que la funcionalidad original permanece intacta. Ventajas Clave:...

Acceder a esta publicación

Creado y Compartido por: Oscar Aravena Muller / Disponibilidad Laboral: FullTime

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert



Las Ampliaciones en SAP: User Exits y Customer Exits En SAP, las ampliaciones (Enhancements) permiten adaptar el sistema estándar a necesidades específicas del cliente sin modificar el código original. Su objetivo principal es añadir o modificar funcionalidades preservando la integridad del sistema, evitando conflictos durante actualizaciones o upgrades. Entre los tipos de ampliaciones más conocidos se encuentran los User Exits y los Customer Exits. Concepto de User Exits Los User Exits son puntos predefinidos en los programas estándar de SAP donde los desarrolladores pueden insertar código adicional. Se implementan en forma de subrutinas o módulos de función que SAP deja vacíos...

Acceder a esta publicación

Creado y Compartido por: David Ibarra / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

lección "Las Ampliaciones: los User Exits y los Customer Exits" Introducción a las Ampliaciones • Descripción General de las Ampliaciones: Las ampliaciones en SAP son herramientas que permiten agregar funcionalidad nueva a programas estándar sin modificar su código original, asegurando su buen funcionamiento. Esto permite insertar validaciones, nuevos campos con su lógica, opciones de menú, o campos en tablas de base de datos estándar en lugares preparados por SAP. · â—¦ Ventajas de las Ampliaciones: Permiten adaptar programas a necesidades específicas de la empresa y realizar mejoras sin modificar el código original, con cambios que se...

Acceder a esta publicación

Creado y Compartido por: Roberto Fluder Ahumada

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


Los User Exits son huecos que genera SAP en el sistema estandar, estos huecos estan en lugares determinados del sistemas, es importante dejar en claro que no es posible generar nuevos huecos user exits sino que debemos trabajar unicamente con los ya existentes sino encontramos un user exits que se ajuste a nuestro requerimiento entonces deberemos buscar otra alternativa de solucion dentro de las demas soluciones de ampliaciones posibles que ofrece SAP en su sistema. Tal como mencionamos dentro del include ZXVVAU05 vamos a escribir el codigo ABAP que colocaremos dentro del exits en general el codigo que colocaremos dentro de los exits sera destinado a realizar validaciones de los campos de entrada en caso de cumplirse una condicion determinada...

Acceder a esta publicación

Creado y Compartido por: Jose Medina / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Senior

Aplicaciones: son diferentes herramientas que presenta SAP para realizar mejoras, modificaciones o agregados a un programa estándar del sistema. Las Aplicaciones se generan y codifican en módulos aparte del código estándar, con lo cual no se necesita modificar el estándar, manteniendo la funcionalidad original y el buen funcionamiento. Las principales Ventajas que presentan las Aplicaciones son: Permiten modificar ciertos programas para adaptarlos a necesidades particulares de la empresa, agregando nuevas características a las existentes. Permite realizar mejoras a un programa si modificar el código original del mismo, manteniendo el buen funcionamiento y las características...

Acceder a esta publicación

Creado y Compartido por: Javier Miguel Angel Barcelo / Disponibilidad Laboral: PartTime

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Senior

QUE ES UNA AMPLIACIÓN? Son diferentes herramientas que se presenta en SAP para realizar mejoras, modificaciones o agregados a un programa estándar del sistema. Algunos programas estándares están preparados para agregarles funcionalidad nueva a la existente. Las ampliaciones se generan y codifican en módulos aparte del código estándar, con lo cual no se necesita modificar el estándar manteniendo la funcionalidad original y el buen funcionamiento. Las principales ventajas que presentan las ampliaciones son: Permiten modificar ciertos programas para adaptarlos a necesidades particulares de la empresa, agregando nuevas características a las existentes. Permiten realizar mejoras a un...

Acceder a esta publicación

Creado y Compartido por: Luis Enrique Romero Pinto

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


What is an Enhancement? Enhancements: These are various tools provided by SAP to make improvements, modifications, or additions to a standard system program. Some standard programs are designed to add new functionality to existing ones. In some cases, you can validate fields on a particular dynpro, add fields to a screen with code to handle that new data, add a new option within a menu, or add fields to standard tables. Enhancements are generated and coded in separate modules from the standard code, so there's no need to modify it, thus maintaining the original functionality and proper operation. The main advantages of enhancements are: They allow modifying certain programs to adapt them to the specific needs of the company, adding new...

Acceder a esta publicación

Creado y Compartido por: Jaime Eduardo Gomez Arango / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


Las Ampliaciones: los User Exits y los Customer Exits 1 - Ampliaciones Herramientas para realizar mejoras, modificaciones, agregados a un programa estandar, se generan y codifican aparte del modulo estandar. Ventajas: - permiten modificar los programas a las necesidades de la empresa. - permite modificar sin tocar el programa estandar. - los cambios toman efectos al transportar los objetos. Desventajas: - no todos los programas estandares estan preparados para agregar una ampliacion. - no siempre se pueden hacer las modificaciones de manera satisfactoria, ya que, las ampliaciones estan preparadas para determinada tarea y momento dentro de la ejecucion del programa. Tipos de ampliaciones: - user exits. - customer...

Acceder a esta publicación

Creado y Compartido por: Pablo Adrian Oggero

 


 

👌Genial!, estos fueron los últimos artículos sobre más de 99.000 publicaciones académicas abiertas, libres y gratuitas compartidas con la comunidad, para acceder a ellas le dejamos el enlace a CVOPEN ACADEMY.

🔎Buscador de Publicaciones:

 


 

No sea Juan... Solo podrá llegar alto si realiza su formación con los mejores!