Ansicht
Dokumentation

EXIT_SAPLCOIH_005 -

EXIT_SAPLCOIH_005 -

CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

This extension allows you to perform customer-specific determination of the profit center.

In the SAP standard, the system determines the profit center from the cost center of the main work center.

However, if you want to represent the point of receipt in the profit center, you can use the following coding as a reference. In this example the cost center of the PM object (functional location or equipment) is used for profit center determination.

If no profit center determination is required, the exception NO_PC_DETERMINATION can be set.

Also, no profit center determination will be carried out if the customer extension returns a profit center.



*----------------------------------------------------------------------*
* INCLUDE ZXWOCU04
*----------------------------------------------------------------------*
DATA: DATE LIKE CAUFVD-GSTRP.
DATA: XCSKSV LIKE CSKSV.

PERFORM GET_HEADER_DATE(SAPLCOIH) USING CAUFVD_IMP
DATE.

IF NOT CAUFVD_IMP-KOSTL IS INITIAL.

CALL FUNCTION 'RK_KOSTL_READ'
EXPORTING
DATUM = DATE
KOKRS = CAUFVD_IMP-KOKRS
KOSTL = CAUFVD_IMP-KOSTL
IMPORTING
XCSKSV = XCSKSV
EXCEPTIONS
KOSTL_NOT_FOUND = 02.
* . . . Kostl nicht vorhanden
IF SY-SUBRC = 1.
RAISE KOSTL_NOT_FOUND.
ELSE.
PRCTR = XCSKSV-PRCTR.
ENDIF.
ELSE.
RAISE NO_PC_DETERMINATION.
ENDIF.

****************************+ END +*************************************






ABAP Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 2062 Date: 20240419 Time: 125117     sap01-206 ( 19 ms )