SAP BAPI_CTR_GETACTIVITYTYPES Function Module for List of Cost Centers / Activity Types with Control Information









BAPI_CTR_GETACTIVITYTYPES is a standard bapi ctr getactivitytypes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for List of Cost Centers / Activity Types with Control 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 bapi ctr getactivitytypes FM, simply by entering the name BAPI_CTR_GETACTIVITYTYPES into the relevant SAP transaction such as SE37 or SE38.

Function Group: 0012
Program Name: SAPL0012
Main Program: SAPL0012
Appliation area: K
Release date: 18-May-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_CTR_GETACTIVITYTYPES 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 'BAPI_CTR_GETACTIVITYTYPES'"List of Cost Centers / Activity Types with Control Information
EXPORTING
COAREA = "Controlling Area
FISCYEAR = "Fiscal Year
* VERSION = '000' "Version
* COSTCENTERFROM = "Cost Center
* COSTCENTERTO = "To Cost Center (for Interval Entry)
* COSTCENTERGRP = "Cost Center Group
* ACTTYPEFROM = "Activity Type
* ACTTYPETO = "To Activity Type (For Interval Entries)

TABLES
RETURN = "BAPI Return Struct.
CONTROLDATA = "Table with Control Data for CCtr/AType Object
* 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_SAPL0012_001 Exit One (Input) for CostCenter.CreateMultiple
EXIT_SAPL0012_002 Exit Two (Output) for CostCenter.CreateMultiple
EXIT_SAPL0012_003 Exit One (Input) for CostCenter.ChangeMultiple
EXIT_SAPL0012_004 Exit Two (Output) for CostCenter.ChangeMultiple
EXIT_SAPL0012_005 Exit One (Input) for CostCenter.CheckMultiple
EXIT_SAPL0012_006 Exit Two (Output) for CostCenter.CheckMultiple
EXIT_SAPL0012_007 Exit One (Input) for CostCenter.GetList1
EXIT_SAPL0012_008 Exit Two (Output) for CostCenter.GetList1
EXIT_SAPL0012_009 Exit One (Input) for CostCenter.GetDetail1
EXIT_SAPL0012_010 Exit Two (Output) for CostCenter.GetDetail1

IMPORTING Parameters details for BAPI_CTR_GETACTIVITYTYPES

COAREA - Controlling Area

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

FISCYEAR - Fiscal Year

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

VERSION - Version

Data type: BAPI0012_6-VERSION
Default: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

COSTCENTERFROM - Cost Center

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

COSTCENTERTO - To Cost Center (for Interval Entry)

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

COSTCENTERGRP - Cost Center Group

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

ACTTYPEFROM - Activity Type

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

ACTTYPETO - To Activity Type (For Interval Entries)

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

TABLES Parameters details for BAPI_CTR_GETACTIVITYTYPES

RETURN - BAPI Return Struct.

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

CONTROLDATA - Table with Control Data for CCtr/AType Object

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

EXTENSIONIN - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT

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

EXTENSIONOUT - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT

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

Copy and paste ABAP code example for BAPI_CTR_GETACTIVITYTYPES 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_coarea  TYPE BAPI0012_6-CO_AREA, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_fiscyear  TYPE BAPI0012_6-FISC_YEAR, "   
lt_controldata  TYPE STANDARD TABLE OF BAPI0012_ACTCTRLDATA, "   
lv_version  TYPE BAPI0012_6-VERSION, "   '000'
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_extensionout  TYPE STANDARD TABLE OF BAPIPAREX, "   
lv_costcenterfrom  TYPE BAPI0012_6-COSTCENTER, "   
lv_costcenterto  TYPE BAPI0012_6-COSTCENTER, "   
lv_costcentergrp  TYPE BAPI0012_6-COST_CENTER_GRP, "   
lv_acttypefrom  TYPE BAPI0012_6-ACTTYPE, "   
lv_acttypeto  TYPE BAPI0012_6-ACTTYPE. "   

  CALL FUNCTION 'BAPI_CTR_GETACTIVITYTYPES'  "List of Cost Centers / Activity Types with Control Information
    EXPORTING
         COAREA = lv_coarea
         FISCYEAR = lv_fiscyear
         VERSION = lv_version
         COSTCENTERFROM = lv_costcenterfrom
         COSTCENTERTO = lv_costcenterto
         COSTCENTERGRP = lv_costcentergrp
         ACTTYPEFROM = lv_acttypefrom
         ACTTYPETO = lv_acttypeto
    TABLES
         RETURN = lt_return
         CONTROLDATA = lt_controldata
         EXTENSIONIN = lt_extensionin
         EXTENSIONOUT = lt_extensionout
. " BAPI_CTR_GETACTIVITYTYPES




ABAP code using 7.40 inline data declarations to call FM BAPI_CTR_GETACTIVITYTYPES

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_6 INTO @DATA(ld_coarea).
 
 
"SELECT single FISC_YEAR FROM BAPI0012_6 INTO @DATA(ld_fiscyear).
 
 
"SELECT single VERSION FROM BAPI0012_6 INTO @DATA(ld_version).
DATA(ld_version) = '000'.
 
 
 
"SELECT single COSTCENTER FROM BAPI0012_6 INTO @DATA(ld_costcenterfrom).
 
"SELECT single COSTCENTER FROM BAPI0012_6 INTO @DATA(ld_costcenterto).
 
"SELECT single COST_CENTER_GRP FROM BAPI0012_6 INTO @DATA(ld_costcentergrp).
 
"SELECT single ACTTYPE FROM BAPI0012_6 INTO @DATA(ld_acttypefrom).
 
"SELECT single ACTTYPE FROM BAPI0012_6 INTO @DATA(ld_acttypeto).
 


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!