Share this page

# createProgram

## Purpose

This operation creates a program in PPM Center.

## Function

This operation creates a program, identified by the program name and program type name (or program type ID).

To perform this operation, the user must meet one of the following conditions:

- Have the Edit All Programs access grant.

- Have both the Create Programs access grant and the Edit Programs access grant.

## Related Information

Data Type: ProgramInfo

## Input

A ProgramInfo object with the following required property:

- name

- program type name (or program type ID)

All the other properties are optional. Specify those properties only when you need to create a program with the corresponding information.

## Return

Program ID will be returned if the program is created successfully.

## Java Examples

See webservice_toolkit:

`java\client\src\examples\pgm`\`ProgramServiceClient.java`

testCreateProgram()

    ProgramServiceStub stub = new ProgramServiceStub(ctx, WSURL);
    CreateProgramDocument doc =
    CreateProgramDocument.Factory.newInstance();
    ProgramInfo program =
    doc.addNewCreateProgram().addNewProgram();
    program.setName(PROGRAM_NAME);
    Managers managers = program.addNewManagers();
    User manager = managers.addNewManager();
    // Set a manager (user with ID=1) on the program. (Optional)
    manager.setId(BigInteger.valueOf(1));
    managers.setManagerArray(new User[] { manager });
    program.setProgramTypeName("Enterprise");
    CreateProgramResponseDocument responseDoc =
    stub.createProgram(doc);
    long programId =
    responseDoc.getCreateProgramResponse().getProgramId();

## Errors and Exceptions

Possible root cause descriptions:

Exception/Message Code | Message | Cause(s) | Possible Corrective Action
--- | --- | --- | ---
NameAlreadyExistsException | A Program with the name <name> already exists. Please enter a different name. | The name is already used. | Use another name.
AuthorizationException | You do not have the privilege to take this action. Please consult your PPM Administrator. | The user has no access granted to create programs. | Grant the appropriate access to the user. For more information, see Function
ITGException | Unable to get program type for program <program name> | Program type ID or name is invalid. | Validate program type ID or name.

https://admhelp.microfocus.com PPM 8942
Tips to improve your search results... OpenText™ Project and Portfolio Management Help Center PPM Help 26.2-26.3 All View Local Help Center View Online Help Center Version: