Functionality The ControllingArea.GetRelatedCompCodes method(BAPI_COAREA_GET_RELATED_CCODES) determines all the company codesassigned to one controlling area. Example DATA: 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 . Notes You 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 initialand the RELATED_COMPANYCODES table contains no entries.Description Return code for the methods Value range Type Code Description E(rror) KZ600 No authorization to display controlling areas E(rror) KZ601 Controlling area X does not exist Blank Blank Method completed successfully Description Key of the controlling area>, for which detailinformation is to be determined.Description This table contains all company code>s in the currentclients that are assigned to a specified controlling area (parameterCONTROLLINGAREAID). The assigned controlling area is contained as well. If there are no assignments, the table remains empty and the RETURNparameter is initial. |