Avalados por :

Enhancing Prerequisites Logic with Custom Exits in SAP FI-Substitutions

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 64 Vistas
0
Cargando...
Hello SAPers!

There are quite many guides on how to use user exits in FI-substitutions, however these materials refer primarily to application of exits for substitution logic i.e. the logic that is triggered once the prerequisites are met. However, you can also use exits to enhance prerequisites logic. The following post provides some insights on this topic.

Consider the following definition of substitution step (in t-code GGB1). Constant value “BS account” will be populated into line item when two prerequisites are met:

  • Company code is “UKRP”;

  • GLBS custom prerequisite based on user exit that check if GL account is balance sheet account.




Exit GLBS can be chosen on dedicated tab during prerequisite definition.



Custom exits should be developed beforehand in a dedicated program pool for prerequisites. You can check the settings in your system in transaction code GCX2.



As you can see, there two Z-programs ZRGGBR000 and ZRGGBS000 in this menu. Both programs are copies of standard programs RGGBR000 / RGGBS000 respectively. The program for application area GBLR (i.e. ZRGGBR000) is used for prerequisites logic, whereas the program for area GBLS (i.e. ZRGGBS000) is used for substitution logic. Please note, that you can use one program for both areas, but for clarify purposes it is recommended to split it into two programs.

From programming perspective custom exit should be created as a subroutine (similarly as for substitution logic). An example of custom program with some comments can be found attached bellow.
program zrggbr000 .
*---------------------------------------------------------------------*
* EXIT-Formpool for FI substitutions                                  *
*---------------------------------------------------------------------*

include fgbbgd00.

* Activate tables types, that you want to use
tables:
  bkpf,
  bseg,
  ska1,
  skb1,
  t001.

*&---------------------------------------------------------------------*
*&      Form  get_exit_titles
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->ETAB       text
*----------------------------------------------------------------------*
form get_exit_titles tables etab.

  data: begin of exits occurs 50,
          name(5)   type c,
          param     like c_exit_param_none,
          title(60) type c,
        end of exits.

  exits-name  = 'GLBS'.
  exits-param = c_exit_param_none.    " Complete data used in exit.
  exits-title = text-900.             " GL account is BS
  append exits.
  
  " Add definitions of other exits for prerequisites here

  " Refresh exit names (visible in GGB1)
  refresh etab.
  loop at exits.
    etab = exits.
    append
            
            
Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

Sin respuestas

No hay respuestas para mostrar No hay respuestas para mostrar Se el primero en responder

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?