Java Sample – CopyPOV.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 copyPOVData() throws Exception {
        
        JSONObject json = new JSONObject();				String modelViewName = "Operating Expenses";
        json.put("isManageRule", true);
        json.put("isInputData", true);
        json.put("modelViewName", modelViewName);        
        json.put("createDestPOV", true);
        json.put("stringDelimiter", "_");
        
        String sourcePovGroupMember = "2014_January_Actual";
        String destPovGroupMember = "2014_December_Actual";
        
        String urlString = "%s/epm/rest/%s/applications/%s/povs/" + sourcePovGroupMember.trim().replaceAll(" ", "%20") 
                                       + "/jobs/copyPOVJob/"+  destPovGroupMember.trim().replaceAll(" ", "%20");
        executeJob(urlString, "POST", json.toString()); 
    }