Ansicht
Dokumentation

BAPI_COSTCENTER_GETLIST - List of Cost Centers Using Selection Criteria

BAPI_COSTCENTER_GETLIST - List of Cost Centers Using Selection Criteria

Addresses (Business Address Services)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Uses selection criteria for a key date to provide a list of all cost centers that meet this criteria. The list contains controlling area, cost center, and cost center name.

Caution: This method is out-of-date.

The GetDetail method is obsolete after Release 4.6. The functionality is borrowed from the GetDetail1 method.

If you have already used this method, you should change over to the new method.

Otherwise, use the new GetDetail1 method.

Example

You want a list of all cost centers in controlling area 0001 and company code 0002 for the current date.

Function module call:

DATA: I_COSTCENTER_LIST LIKE BAPI0012_2 OCCURS 0 WITH HEADER LINE.

I_RETURN LIKE BAPIRETURN.

CALL FUNCTION 'BAPI_COSTCENTER_GETLIST'

EXPORTING CONTROLLINGAREA = "0001"

COMPANYCODE = "0002"

DATE = SY-DATUM

TABLES = I_COSTCENTER_LIST

IMPORTING RETURN = I_RETURN.

Notes

You require system authorization for object K_CSKS.

The selection criteria can be transferred as:

  • Individual values, for example parameter COMPANYCODE is filled
  • Intervals, for example parameters COMPANYCODE and COMPANYCODE_TO are filled
  • Upper limits, for example parameter COMPANYCODE_TO (the system selects all company codes <= COMPANY_CODE_TO)
  • As an alternative to intervals, you can also select using Cost Center Group (interface parameter COSTCENTERGROUP). If you have specified intervals and cost center groups, the system evaluates only using cost center groups.

If you do not enter any restricting criteria for the controlling area and/or cost center, the system issues a list of all cost centers.

Note that a selection can only be successful if it does not contain any contradictions. For example, in a controlling area there should not be any cost centers from company codes that are not assigned to the controlling area.

If no cost centers could be found by the system for the selection criteria entered, you can get information about the errors that have occurred by choosing the RETURN parameter.





Parameters

COMPANYCODE
COMPANYCODE_TO
CONTROLLINGAREA
CONTROLLINGAREA_TO
COSTCENTER
COSTCENTERGROUP
COSTCENTER_LIST
COSTCENTER_TO
DATE
DATE_TO
PERSON_IN_CHARGE
PERSON_IN_CHARGE_TO
PERSON_IN_CHARGE_USER_FROM
PERSON_IN_CHARGE_USER_TO
RETURN

Exceptions

Function Group

0012

CL_GUI_FRONTEND_SERVICES - Frontend Services   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 4392 Date: 20240523 Time: 103449     sap01-206 ( 48 ms )