SAP COMPARE_CONTROLLING_AREA Function Module for









COMPARE_CONTROLLING_AREA is a standard compare controlling area SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 compare controlling area FM, simply by entering the name COMPARE_CONTROLLING_AREA into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHPR
Program Name: SAPLRHPR
Main Program: SAPLRHPR
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function COMPARE_CONTROLLING_AREA 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 'COMPARE_CONTROLLING_AREA'"
EXPORTING
* P1001_AREA = "Infotype 1001
* P1003_AREA = "Infotype 1003
* P1013_AREA = "Infotype 1013
* CPPPAR = "Field string PPPAR
* OK_CODE = "
* NO_MESSAGE = "No E message output
* REFRESH_PERNR_TAB = ' ' "
* BUFFER_MODE = ' ' "
* DO_BUKRS_KOKRS_CHANGE_CHECK = 'X' "

IMPORTING
OK_CODE = "
CC_SUBRC = "

TABLES
* XPLOG_TAB = "PLOG_TAB
* MESSAGE_TAB = "If NO_MESSAGE: suppressed messages
.



IMPORTING Parameters details for COMPARE_CONTROLLING_AREA

P1001_AREA - Infotype 1001

Data type: P1001
Optional: Yes
Call by Reference: No ( called with pass by value option)

P1003_AREA - Infotype 1003

Data type: P1003
Optional: Yes
Call by Reference: No ( called with pass by value option)

P1013_AREA - Infotype 1013

Data type: P1013
Optional: Yes
Call by Reference: No ( called with pass by value option)

CPPPAR - Field string PPPAR

Data type: PPPAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

OK_CODE -

Data type: SY-UCOMM
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_MESSAGE - No E message output

Data type: HRPP0C-TEST
Optional: Yes
Call by Reference: No ( called with pass by value option)

REFRESH_PERNR_TAB -

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

BUFFER_MODE -

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

DO_BUKRS_KOKRS_CHANGE_CHECK -

Data type: FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for COMPARE_CONTROLLING_AREA

OK_CODE -

Data type: SY-UCOMM
Optional: No
Call by Reference: No ( called with pass by value option)

CC_SUBRC -

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for COMPARE_CONTROLLING_AREA

XPLOG_TAB - PLOG_TAB

Data type: HRDBTAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

MESSAGE_TAB - If NO_MESSAGE: suppressed messages

Data type: HRRHAD_MSG
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for COMPARE_CONTROLLING_AREA 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_ok_code  TYPE SY-UCOMM, "   
lt_xplog_tab  TYPE STANDARD TABLE OF HRDBTAB, "   
lv_p1001_area  TYPE P1001, "   
lv_cc_subrc  TYPE SY-SUBRC, "   
lv_p1003_area  TYPE P1003, "   
lt_message_tab  TYPE STANDARD TABLE OF HRRHAD_MSG, "   
lv_p1013_area  TYPE P1013, "   
lv_cpppar  TYPE PPPAR, "   
lv_ok_code  TYPE SY-UCOMM, "   
lv_no_message  TYPE HRPP0C-TEST, "   
lv_refresh_pernr_tab  TYPE CHAR1, "   ' '
lv_buffer_mode  TYPE CHAR1, "   ' '
lv_do_bukrs_kokrs_change_check  TYPE FLAG. "   'X'

  CALL FUNCTION 'COMPARE_CONTROLLING_AREA'  "
    EXPORTING
         P1001_AREA = lv_p1001_area
         P1003_AREA = lv_p1003_area
         P1013_AREA = lv_p1013_area
         CPPPAR = lv_cpppar
         OK_CODE = lv_ok_code
         NO_MESSAGE = lv_no_message
         REFRESH_PERNR_TAB = lv_refresh_pernr_tab
         BUFFER_MODE = lv_buffer_mode
         DO_BUKRS_KOKRS_CHANGE_CHECK = lv_do_bukrs_kokrs_change_check
    IMPORTING
         OK_CODE = lv_ok_code
         CC_SUBRC = lv_cc_subrc
    TABLES
         XPLOG_TAB = lt_xplog_tab
         MESSAGE_TAB = lt_message_tab
. " COMPARE_CONTROLLING_AREA




ABAP code using 7.40 inline data declarations to call FM COMPARE_CONTROLLING_AREA

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 UCOMM FROM SY INTO @DATA(ld_ok_code).
 
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_cc_subrc).
 
 
 
 
 
"SELECT single UCOMM FROM SY INTO @DATA(ld_ok_code).
 
"SELECT single TEST FROM HRPP0C INTO @DATA(ld_no_message).
 
DATA(ld_refresh_pernr_tab) = ' '.
 
DATA(ld_buffer_mode) = ' '.
 
DATA(ld_do_bukrs_kokrs_change_check) = 'X'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!