Java Sample – UpdateDimension.java for Oracle Profitability and Cost Management Cloud

Prerequisites: json.jar

Prerequisites: See Oracle Profitability and Cost Management Cloud Common Helper Functions for Java

    public void updateDimensions() throws Exception {
        
        JSONObject json = new JSONObject();
        json.put("dataFileName", "Accounts.txt");
        
        String urlString = "%s/epm/rest/%s/fileApplications/%s/updateDimension";
        String response = executeRequest(urlString, "POST", json.toString(), "application/json");
        JSONObject jsonObj = new JSONObject(response);
        int resStatus = jsonObj.getInt("status");
        
        if(resStatus == 0) {
            System.out.println("Dimensions updated successfully");
        } else {
            System.out.println("Dimensions update failed");
        } 
    }