Fonction SAP BAPI_COSTCENTER_GETDETAIL - Detailed Information About Cost Center For Key Date

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTROLLINGAREA BAPI0012_1-CO_AREA C 4 Controlling Area
COSTCENTER BAPI0012_1-COSTCENTER C 10 Cost Center
DATE BAPI0012_5-DATE D 8 SY-DATUM X Selection Date: Key Date

Paramètre Reférence Type Long. Description
ADDRESS BAPI0012_3 u 311 Cost Center Address Data
COMMUNICATION BAPI0012_4 u 157 Cost Center Communication Data
DESCRIPTION BAPI0012_5-DESCRIPT C 40 Cost Center Description
NAME BAPI0012_5-NAME C 20 Cost Center Name
PERSON_IN_CHARGE BAPI0012_5-INCHARGE C 20 Cost Center Manager
RETURN BAPIRETURN u 452 Return Parameters

Functionality
This method supplies detailed information for a cost center.
The method requires the controlling area, the cost center, and a keydate.
The method gives the name and description of the cost center, costcenter manager and structures with address and communication data.

Warning: This method is obsolete.
The GetDetail method is out-of-date as of Release 4.6. Functionalitywill be transferred from the GetDetail1 method.
If you have already used this method, you should change over to the newmethod.
Otherwise, use the new GetDetail1 method.

Example
You want to see the present cost center manager and telephone number ofcost center PRODUCTION in controlling area 0001.
Function module callup:
DATA: I_CONTROLLINGAREA LIKE BAPI0012_1-CO_AREA,
I_COSTCENTER LIKE BAPI0012_1-COSTCENTER,
I_PERSON_IN_CHARGE LIKE BAPI0012_5-INCHARGE,
I_ADDRESS LIKE BAPI0012_3,
I_COMMUNICATION LIKE BAPI0012_4.
I_RETURN LIKE BAPIRETURN.
I_CONTROLLINGAREA = "0001".
I_COSTCENTER = "PRODUCTION".
CALL FUNCTION "BAPI_COSTCENTER_GETDETAIL"
EXPORTING CONTROLLINGAREA = I_CONTROLLINGAREA
COSTCENTER = I_COSTCENTER
DATE = SY-DATUM
IMPORTING ADDRESS = I_ADDRESS
COMMUNICATION = I_COMMUNICATION
PERSON_IN_CHARGE = I_PERSON_IN_CHARGE
RETURN = I_RETURN.

Notes
You require system authorization for object K_CSKS.
If no detailed information was found by the system for the cost center,you can find more information on the errors that occurred in the RETURNparameter.

Description
For more information on the individual fields in the address structure,see the corresponding data element documentation:
Form of Address
Business Address
Street and House Number
Location 1
Postal Code
PO Box
Postal Code of PO Box
Location 2/
Country
Region
Tax jur.code

Description
For more information on the individual fields, see the correspondingdata element documentation:
Language
Telephone 1
Telephone 2/Extension
Telebox
Printer Name
Telex Number
Telefax Number
Teletex Number
Data Connection Number

Description
Parameter holding the cost center name/description.

Value range
Dictionary data type: CHAR (field length 40)

Description
This parameter contains the name of the cost center.

Value range
Dictionary data type: CHAR (Field length 20).

Description
Parameter holding the name of the cost center manager.

Value range
Dictionary data type: CHAR (field length 20)

Description
Return structure for errors and system messages.

Description
Parameter receiving the value of the controlling area in which you wantto search for detailed cost center information.
For more information, see the corresponding data element documentationon controlling areas.

Default
None.

Description
Parameter receiving the value of the cost center in which you want tosearch for detailed information.
For more information, see the corresponding data element documentationon cost centers.

Default
None.

Description
Key date for which you want to search for details about a cost center.
You can find information about the importance of the key date in thecorresponding data element documentation:
From date
To date.

Value range
Dictionary data type: DATS (field length 8).

Default
Specify default with the current date (SY-DATUM).