SAP K_COSTCTR_BAPI_ACTMULTIPLE Function Module for Activate Inactive Cost Centers
K_COSTCTR_BAPI_ACTMULTIPLE is a standard k costctr bapi actmultiple SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Activate Inactive Cost Centers 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 k costctr bapi actmultiple FM, simply by entering the name K_COSTCTR_BAPI_ACTMULTIPLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: KMA1
Program Name: SAPLKMA1
Main Program: SAPLKMA1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function K_COSTCTR_BAPI_ACTMULTIPLE 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 'K_COSTCTR_BAPI_ACTMULTIPLE'"Activate Inactive Cost Centers.
EXPORTING
CONTROLLINGAREA = "Controlling Area
* TESTRUN = 'X' "Switch to Simulation Mode for Write BAPIs
TABLES
COSTCENTERLIST = "Interface Structure: Cost Centers - Keys and Texts
RETURN = "Return Parameter(s)
* EXTENSIONIN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSIONOUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLKMA1_001 Flow Logic PBO
EXIT_SAPLKMA1_002 Flow Logic PAI
EXIT_SAPLKMA1_003 Checks for Saving
IMPORTING Parameters details for K_COSTCTR_BAPI_ACTMULTIPLE
CONTROLLINGAREA - Controlling Area
Data type: BAPI0012_GEN-CO_AREAOptional: No
Call by Reference: No ( called with pass by value option)
TESTRUN - Switch to Simulation Mode for Write BAPIs
Data type: BAPI0012_GEN-TESTRUNDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for K_COSTCTR_BAPI_ACTMULTIPLE
COSTCENTERLIST - Interface Structure: Cost Centers - Keys and Texts
Data type: BAPI0012_CCLISTOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return Parameter(s)
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
EXTENSIONIN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: No ( called with pass by value option)
EXTENSIONOUT - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for K_COSTCTR_BAPI_ACTMULTIPLE 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_costcenterlist | TYPE STANDARD TABLE OF BAPI0012_CCLIST, " | |||
lv_controllingarea | TYPE BAPI0012_GEN-CO_AREA, " | |||
lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lv_testrun | TYPE BAPI0012_GEN-TESTRUN, " 'X' | |||
lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX. " |
  CALL FUNCTION 'K_COSTCTR_BAPI_ACTMULTIPLE' "Activate Inactive Cost Centers |
EXPORTING | ||
CONTROLLINGAREA | = lv_controllingarea | |
TESTRUN | = lv_testrun | |
TABLES | ||
COSTCENTERLIST | = lt_costcenterlist | |
RETURN | = lt_return | |
EXTENSIONIN | = lt_extensionin | |
EXTENSIONOUT | = lt_extensionout | |
. " K_COSTCTR_BAPI_ACTMULTIPLE |
ABAP code using 7.40 inline data declarations to call FM K_COSTCTR_BAPI_ACTMULTIPLE
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 CO_AREA FROM BAPI0012_GEN INTO @DATA(ld_controllingarea). | ||||
"SELECT single TESTRUN FROM BAPI0012_GEN INTO @DATA(ld_testrun). | ||||
DATA(ld_testrun) | = 'X'. | |||
Search for further information about these or an SAP related objects