SAP EXIT_SAPLKKAG_003 Function Module for Customer-Specific Postprocessing of Values from Table COSP
EXIT_SAPLKKAG_003 is a standard exit saplkkag 003 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Customer-Specific Postprocessing of Values from Table COSP processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for exit saplkkag 003 FM, simply by entering the name EXIT_SAPLKKAG_003 into the relevant SAP transaction such as SE37 or SE38.
Function Group: XKAG
Program Name: SAPLXKAG
Main Program: SAPLXKAG
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EXIT_SAPLKKAG_003 pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'EXIT_SAPLKKAG_003'"Customer-Specific Postprocessing of Values from Table COSP.
EXPORTING
ABGRENZUNGS_SCHLUESSEL = "Results Analysis Key
VBUK_VBELN = "Sales and Distribution Document Number
VBUP_POSNR = "Item Number of SD Document
OBJEKTNUMMER = "CO Object Number
IMPORT_COSPA = "Orginal COSPA Record
ABGRENZUNGSTYP = "Results Analysis Form
PLANVERSION = "Plan Version
ABGRENZUNGS_VERSION = "Results Analysis Version
BEARBEITUNGS_GJAHR = "Fiscal Year of Results Analysis
BEARBEITUNGS_PMONAT = "Period (Month) of Results Analysis
KOKRS = "Controlling Area
BUKRS = "Company Code
AUFK_AUFNR = "Order Number
PRPS_PSPNR = "Internal Project Item Number
PRPS_POSID = "Work Breakdown Structure Element
TABLES
EXPORT_COSPA = "One or More Replacing COSPA Records
EXCEPTIONS
FEHLER_MIT_NACHRICHT = 1 FEHLER_OHNE_NACHRICHT = 2
Related Function Modules
Below is a list of related SAP function modules this CUSTOMER FUNCTION exit / user exit is relevant for.CONVERSION_EXIT_RRQQT_INPUT
CONVERSION_EXIT_RRQQT_OUTPUT
KKA_ABGR_CHECK_RELEVANCE
KKA_ABGR_DEQUEUE
KKA_ABGR_DURCHFUEHREN
KKA_ABGR_ENQUEUE
KKA_ABGR_FORTSCHREIBEN
KKA_ABGR_GET_DY1000
KKA_ABGR_GET_DY2000
KKA_ABGR_GET_DY3000
KKA_ABGR_HINZUFUEGEN_FORTSCHR
KKA_ABGR_HINZUFUEGEN_SATZ_TEST
KKA_ABGR_HINZUFUEGE_SAETZE_KDU
KKA_ABGR_HOLE_BASIS
KKA_ABGR_HOLE_DATEN
KKA_ABGR_HOLE_EINZELPOSTEN
KKA_ABGR_HOLE_KDU_ZIDS
KKA_ABGR_INITIALISIEREN
KKA_ABGR_JAHR_CHECK
KKA_ABGR_KOSA_LESEN
KKA_ABGR_LOESCHEN
KKA_ABGR_LOESCHEN_VORBEREITEN
KKA_ABGR_NACHRICHTEN_AUSGEBEN
KKA_ABGR_NACHRICHTEN_FUER_CM_F
KKA_ABGR_NACHRICHT_HINZUFUEGEN Add Message
KKA_ABGR_NEXT_PERIOD
KKA_ABGR_OBJEKT_BELEG_STORNO
KKA_ABGR_OBJEKT_EPOS_KDU
KKA_ABGR_OBJEKT_TOTAL
KKA_ABGR_PAUSEPOINTS_SETZEN Set Breakpoints
KKA_ABGR_PREVIOUS_PERIOD
KKA_ABGR_PROTOKOLL_LISTEN
KKA_ABGR_PUT_MANUELLER_SATZ
KKA_ABGR_START_AUFTRAG
KKA_ABGR_START_KUNDENAUFTRAG
KKA_ABGR_START_PROJEKT_FAKZW
KKA_ABGR_START_SERIENAUFTRAG
KKA_ABGR_SUBOBJEKTE_HOLEN
KKA_ABGR_SUBOBJEKTE_LISTEN
KKA_ABGR_TABELLEN_LISTEN
KKA_ABGR_VORBEREITEN
KKA_ABGR_WAER_DURCHFUEHREN
KKA_CHECK_PERIOD_LOCK
KKA_CHECK_PERIOD_LOCK_INIT
KKA_COSS_ACT_REVAL_FOR_COGM
KKA_EB_EP_ZUORDNEN
KKA_EB_PERIODEN_ABSCHLUSS
KKA_EB_SET_ABGR_CHANGED
KKA_EB_VORBEREITEN
KKA_SETZE_CUST_STAMMDAT_LESEN
KKA_SIMULATION_ZUORDNUNG
K_COEPB_BUFFER
K_FARR_TO_COSB_TRANSFER
K_GET_TEMP_NUMBER
RA_INTEG_ACC_ASGN
RR_UNITS_STRING_CONVERT
WIP_DISPLAY_OBJ_LIST
IMPORTING Parameters details for EXIT_SAPLKKAG_003
ABGRENZUNGS_SCHLUESSEL - Results Analysis Key
Data type: XKALXKAG-ABGSLOptional: No
Call by Reference: No ( called with pass by value option)
VBUK_VBELN - Sales and Distribution Document Number
Data type: VBUK-VBELNOptional: No
Call by Reference: No ( called with pass by value option)
VBUP_POSNR - Item Number of SD Document
Data type: VBUP-POSNROptional: No
Call by Reference: No ( called with pass by value option)
OBJEKTNUMMER - CO Object Number
Data type: COSB-OBJNROptional: No
Call by Reference: No ( called with pass by value option)
IMPORT_COSPA - Orginal COSPA Record
Data type: COSPAOptional: No
Call by Reference: No ( called with pass by value option)
ABGRENZUNGSTYP - Results Analysis Form
Data type: KKALKKAG-ABGR_TYPOptional: No
Call by Reference: No ( called with pass by value option)
PLANVERSION - Plan Version
Data type: TKKAS-VERSPOptional: No
Call by Reference: No ( called with pass by value option)
ABGRENZUNGS_VERSION - Results Analysis Version
Data type: XKALXKAG-VERSAOptional: No
Call by Reference: No ( called with pass by value option)
BEARBEITUNGS_GJAHR - Fiscal Year of Results Analysis
Data type: XKALXKAG-ABGRJOptional: No
Call by Reference: No ( called with pass by value option)
BEARBEITUNGS_PMONAT - Period (Month) of Results Analysis
Data type: XKALXKAG-ABGRMOptional: No
Call by Reference: No ( called with pass by value option)
KOKRS - Controlling Area
Data type: COEP-KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
BUKRS - Company Code
Data type: COEP-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
AUFK_AUFNR - Order Number
Data type: AUFK-AUFNROptional: No
Call by Reference: No ( called with pass by value option)
PRPS_PSPNR - Internal Project Item Number
Data type: PRPS-PSPNROptional: No
Call by Reference: No ( called with pass by value option)
PRPS_POSID - Work Breakdown Structure Element
Data type: PRPS-POSIDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EXIT_SAPLKKAG_003
EXPORT_COSPA - One or More Replacing COSPA Records
Data type: COSPAOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FEHLER_MIT_NACHRICHT - Error with Message from This Module
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FEHLER_OHNE_NACHRICHT - Error Without Message from This Module
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EXIT_SAPLKKAG_003 Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lt_export_cospa | TYPE STANDARD TABLE OF COSPA, " | |||
| lv_fehler_mit_nachricht | TYPE COSPA, " | |||
| lv_abgrenzungs_schluessel | TYPE XKALXKAG-ABGSL, " | |||
| lv_vbuk_vbeln | TYPE VBUK-VBELN, " | |||
| lv_vbup_posnr | TYPE VBUP-POSNR, " | |||
| lv_objektnummer | TYPE COSB-OBJNR, " | |||
| lv_import_cospa | TYPE COSPA, " | |||
| lv_abgrenzungstyp | TYPE KKALKKAG-ABGR_TYP, " | |||
| lv_planversion | TYPE TKKAS-VERSP, " | |||
| lv_abgrenzungs_version | TYPE XKALXKAG-VERSA, " | |||
| lv_fehler_ohne_nachricht | TYPE XKALXKAG, " | |||
| lv_bearbeitungs_gjahr | TYPE XKALXKAG-ABGRJ, " | |||
| lv_bearbeitungs_pmonat | TYPE XKALXKAG-ABGRM, " | |||
| lv_kokrs | TYPE COEP-KOKRS, " | |||
| lv_bukrs | TYPE COEP-BUKRS, " | |||
| lv_aufk_aufnr | TYPE AUFK-AUFNR, " | |||
| lv_prps_pspnr | TYPE PRPS-PSPNR, " | |||
| lv_prps_posid | TYPE PRPS-POSID. " |
|   CALL FUNCTION 'EXIT_SAPLKKAG_003' "Customer-Specific Postprocessing of Values from Table COSP |
| EXPORTING | ||
| ABGRENZUNGS_SCHLUESSEL | = lv_abgrenzungs_schluessel | |
| VBUK_VBELN | = lv_vbuk_vbeln | |
| VBUP_POSNR | = lv_vbup_posnr | |
| OBJEKTNUMMER | = lv_objektnummer | |
| IMPORT_COSPA | = lv_import_cospa | |
| ABGRENZUNGSTYP | = lv_abgrenzungstyp | |
| PLANVERSION | = lv_planversion | |
| ABGRENZUNGS_VERSION | = lv_abgrenzungs_version | |
| BEARBEITUNGS_GJAHR | = lv_bearbeitungs_gjahr | |
| BEARBEITUNGS_PMONAT | = lv_bearbeitungs_pmonat | |
| KOKRS | = lv_kokrs | |
| BUKRS | = lv_bukrs | |
| AUFK_AUFNR | = lv_aufk_aufnr | |
| PRPS_PSPNR | = lv_prps_pspnr | |
| PRPS_POSID | = lv_prps_posid | |
| TABLES | ||
| EXPORT_COSPA | = lt_export_cospa | |
| EXCEPTIONS | ||
| FEHLER_MIT_NACHRICHT = 1 | ||
| FEHLER_OHNE_NACHRICHT = 2 | ||
| . " EXIT_SAPLKKAG_003 | ||
ABAP code using 7.40 inline data declarations to call FM EXIT_SAPLKKAG_003
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single ABGSL FROM XKALXKAG INTO @DATA(ld_abgrenzungs_schluessel). | ||||
| "SELECT single VBELN FROM VBUK INTO @DATA(ld_vbuk_vbeln). | ||||
| "SELECT single POSNR FROM VBUP INTO @DATA(ld_vbup_posnr). | ||||
| "SELECT single OBJNR FROM COSB INTO @DATA(ld_objektnummer). | ||||
| "SELECT single ABGR_TYP FROM KKALKKAG INTO @DATA(ld_abgrenzungstyp). | ||||
| "SELECT single VERSP FROM TKKAS INTO @DATA(ld_planversion). | ||||
| "SELECT single VERSA FROM XKALXKAG INTO @DATA(ld_abgrenzungs_version). | ||||
| "SELECT single ABGRJ FROM XKALXKAG INTO @DATA(ld_bearbeitungs_gjahr). | ||||
| "SELECT single ABGRM FROM XKALXKAG INTO @DATA(ld_bearbeitungs_pmonat). | ||||
| "SELECT single KOKRS FROM COEP INTO @DATA(ld_kokrs). | ||||
| "SELECT single BUKRS FROM COEP INTO @DATA(ld_bukrs). | ||||
| "SELECT single AUFNR FROM AUFK INTO @DATA(ld_aufk_aufnr). | ||||
| "SELECT single PSPNR FROM PRPS INTO @DATA(ld_prps_pspnr). | ||||
| "SELECT single POSID FROM PRPS INTO @DATA(ld_prps_posid). | ||||
Search for further information about these or an SAP related objects