SAP KE_PROFIT_CENTER_CHECK Function Module for Check profit center against table CEPC/Return of information
KE_PROFIT_CENTER_CHECK is a standard ke profit center check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check profit center against table CEPC/Return of information 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 ke profit center check FM, simply by entering the name KE_PROFIT_CENTER_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: PC00
Program Name: SAPLPC00
Main Program: SAPLPC00
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function KE_PROFIT_CENTER_CHECK 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 'KE_PROFIT_CENTER_CHECK'"Check profit center against table CEPC/Return of information.
EXPORTING
* BUKRS = ' ' "Company code (or conrolling area)
* DATUM = '00000000' "(Starting) date for time-related check
* DATUM_BIS = '00000000' "End of the period to be tested
PRCTR = "Profit center
* TEST_KOKRS = ' ' "Controlling area (or CoCde)
* READ_TEXT = 'X' "Flag whether text table should be read (= 'X')
* TEST = ' ' "
IMPORTING
BUKRS_JV = "Company code of the joint venture
VNAME = "Joint venture name
LTEXT = "
DATBI = "Return value of the missing key part
ETYPE = "Investment class (joint venture)
KOKRS = "Controlling area of the profit center found
KTEXT = "Short text of the profit center found
RECID = "Recovery indicator (joint venture)
REGIO = "Region (joint venture)
RETURN_CODE = "--> Siehe comment at beginning of source code
TXJCD = "Tax jurisdiction code (joint venture)
EXCEPTIONS
NOT_FOUND = 1 NOT_DEFINED_FOR_DATE = 2 NO_KOKRS_FOR_BUKRS = 3 PARAMETER_MISMATCH = 4 PRCTR_LOCKED = 5 NOT_DEFINED_FOR_BUKRS = 6
IMPORTING Parameters details for KE_PROFIT_CENTER_CHECK
BUKRS - Company code (or conrolling area)
Data type: T001-BUKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATUM - (Starting) date for time-related check
Data type: CEPC-DATBIDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATUM_BIS - End of the period to be tested
Data type: CEPC-DATBIDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PRCTR - Profit center
Data type: CEPC-PRCTROptional: No
Call by Reference: No ( called with pass by value option)
TEST_KOKRS - Controlling area (or CoCde)
Data type: CEPC-KOKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_TEXT - Flag whether text table should be read (= 'X')
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEST -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for KE_PROFIT_CENTER_CHECK
BUKRS_JV - Company code of the joint venture
Data type: CEPC-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
VNAME - Joint venture name
Data type: CEPC-VNAMEOptional: No
Call by Reference: No ( called with pass by value option)
LTEXT -
Data type: CEPCT-LTEXTOptional: No
Call by Reference: Yes
DATBI - Return value of the missing key part
Data type: CEPC-DATBIOptional: No
Call by Reference: Yes
ETYPE - Investment class (joint venture)
Data type: CEPC-ETYPEOptional: No
Call by Reference: No ( called with pass by value option)
KOKRS - Controlling area of the profit center found
Data type: CEPC-KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
KTEXT - Short text of the profit center found
Data type: CEPCT-KTEXTOptional: No
Call by Reference: Yes
RECID - Recovery indicator (joint venture)
Data type: CEPC-RECIDOptional: No
Call by Reference: No ( called with pass by value option)
REGIO - Region (joint venture)
Data type: CEPC-REGIOOptional: No
Call by Reference: No ( called with pass by value option)
RETURN_CODE - --> Siehe comment at beginning of source code
Data type: SY-SUBRCOptional: No
Call by Reference: Yes
TXJCD - Tax jurisdiction code (joint venture)
Data type: CEPC-TXJCDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - No profit center exists (for the specified date)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_DEFINED_FOR_DATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_KOKRS_FOR_BUKRS - Company code is not assigned to a controlling area
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PARAMETER_MISMATCH - Set either the company code or the controlling area only
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRCTR_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_DEFINED_FOR_BUKRS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for KE_PROFIT_CENTER_CHECK 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: | ||||
lv_bukrs | TYPE T001-BUKRS, " SPACE | |||
lv_bukrs_jv | TYPE CEPC-BUKRS, " | |||
lv_not_found | TYPE CEPC, " | |||
lv_vname | TYPE CEPC-VNAME, " | |||
lv_ltext | TYPE CEPCT-LTEXT, " | |||
lv_datbi | TYPE CEPC-DATBI, " | |||
lv_datum | TYPE CEPC-DATBI, " '00000000' | |||
lv_not_defined_for_date | TYPE CEPC, " | |||
lv_etype | TYPE CEPC-ETYPE, " | |||
lv_datum_bis | TYPE CEPC-DATBI, " '00000000' | |||
lv_no_kokrs_for_bukrs | TYPE CEPC, " | |||
lv_kokrs | TYPE CEPC-KOKRS, " | |||
lv_prctr | TYPE CEPC-PRCTR, " | |||
lv_parameter_mismatch | TYPE CEPC, " | |||
lv_ktext | TYPE CEPCT-KTEXT, " | |||
lv_test_kokrs | TYPE CEPC-KOKRS, " SPACE | |||
lv_prctr_locked | TYPE CEPC, " | |||
lv_recid | TYPE CEPC-RECID, " | |||
lv_read_text | TYPE CEPC, " 'X' | |||
lv_not_defined_for_bukrs | TYPE CEPC, " | |||
lv_test | TYPE CEPC, " ' ' | |||
lv_regio | TYPE CEPC-REGIO, " | |||
lv_return_code | TYPE SY-SUBRC, " | |||
lv_txjcd | TYPE CEPC-TXJCD. " |
  CALL FUNCTION 'KE_PROFIT_CENTER_CHECK' "Check profit center against table CEPC/Return of information |
EXPORTING | ||
BUKRS | = lv_bukrs | |
DATUM | = lv_datum | |
DATUM_BIS | = lv_datum_bis | |
PRCTR | = lv_prctr | |
TEST_KOKRS | = lv_test_kokrs | |
READ_TEXT | = lv_read_text | |
TEST | = lv_test | |
IMPORTING | ||
BUKRS_JV | = lv_bukrs_jv | |
VNAME | = lv_vname | |
LTEXT | = lv_ltext | |
DATBI | = lv_datbi | |
ETYPE | = lv_etype | |
KOKRS | = lv_kokrs | |
KTEXT | = lv_ktext | |
RECID | = lv_recid | |
REGIO | = lv_regio | |
RETURN_CODE | = lv_return_code | |
TXJCD | = lv_txjcd | |
EXCEPTIONS | ||
NOT_FOUND = 1 | ||
NOT_DEFINED_FOR_DATE = 2 | ||
NO_KOKRS_FOR_BUKRS = 3 | ||
PARAMETER_MISMATCH = 4 | ||
PRCTR_LOCKED = 5 | ||
NOT_DEFINED_FOR_BUKRS = 6 | ||
. " KE_PROFIT_CENTER_CHECK |
ABAP code using 7.40 inline data declarations to call FM KE_PROFIT_CENTER_CHECK
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 BUKRS FROM T001 INTO @DATA(ld_bukrs). | ||||
DATA(ld_bukrs) | = ' '. | |||
"SELECT single BUKRS FROM CEPC INTO @DATA(ld_bukrs_jv). | ||||
"SELECT single VNAME FROM CEPC INTO @DATA(ld_vname). | ||||
"SELECT single LTEXT FROM CEPCT INTO @DATA(ld_ltext). | ||||
"SELECT single DATBI FROM CEPC INTO @DATA(ld_datbi). | ||||
"SELECT single DATBI FROM CEPC INTO @DATA(ld_datum). | ||||
DATA(ld_datum) | = '00000000'. | |||
"SELECT single ETYPE FROM CEPC INTO @DATA(ld_etype). | ||||
"SELECT single DATBI FROM CEPC INTO @DATA(ld_datum_bis). | ||||
DATA(ld_datum_bis) | = '00000000'. | |||
"SELECT single KOKRS FROM CEPC INTO @DATA(ld_kokrs). | ||||
"SELECT single PRCTR FROM CEPC INTO @DATA(ld_prctr). | ||||
"SELECT single KTEXT FROM CEPCT INTO @DATA(ld_ktext). | ||||
"SELECT single KOKRS FROM CEPC INTO @DATA(ld_test_kokrs). | ||||
DATA(ld_test_kokrs) | = ' '. | |||
"SELECT single RECID FROM CEPC INTO @DATA(ld_recid). | ||||
DATA(ld_read_text) | = 'X'. | |||
DATA(ld_test) | = ' '. | |||
"SELECT single REGIO FROM CEPC INTO @DATA(ld_regio). | ||||
"SELECT single SUBRC FROM SY INTO @DATA(ld_return_code). | ||||
"SELECT single TXJCD FROM CEPC INTO @DATA(ld_txjcd). | ||||
Search for further information about these or an SAP related objects