GetRelatedCompCodes
The ControllingArea.GetRelatedCompCodes method (BAPI_COAREA_GET_RELATED_CCODES) determines all the company codesassigned to one controlling area. ExampleDATA: CONTROLLINGAREAID LIKE BAPI0004_3-CO_AREA , RELATED_COMPANYCODES LIKE BAPI0004_3 OCCURS 0,
RETURN LIKE BAPIRETURN .
CONTROLLINGAREAID = '0001'.
CALL FUNCTION 'BAPI_COAREA_GET_RELATED_CCODES' EXPORTING CONTROLLINGAREAID = CONTROLLINGAREAID IMPORTING RETURN = RETURN TABLES
RELATED_COMPANYCODES = RELATED_COMPANYCODES . NotesYou require authorization for object S_TABU_DIS and table class KC. You can determine the existing key for the controlling area using theControllingArea.GetList (BAPI_CONTROLLINGAREA_GETLIST) method.
Messages are are issued in the RETURN parameter. In this parameterdocumentation you can find the return values and their meaning. If no company codes have been assigned, the RETURN parameter is initial and the RELATED_COMPANYCODES table contains no entries.
|