Automatically create Project number

Hello,
i heard that there is a way to create automatically a project number when the user creates a new project.
There must be a BADI to configure it.
Can anybody help me?
Thanks for your help!

I have used the Example code given by SAP for the method IF_EX_DPR_ATTRIBUTES~SET_DEFAULTS_UPON_CREATION
But it gives a dump (RABAX_STATE) on the ASSIGN  -
FIELD-SYMBOLS:                                                         
  <ls_attributes> TYPE dpr_ts_project_ext.                                                                               
/*Work with field symbols (IS_ATTRIBUTES has no type)                    
/* this ASSIGN statment is causing a dump
ASSIGN cs_attributes TO <ls_attributes>.                              
Can someone see what is the problem here?

Similar Messages

  • Primavera P6 - Release 7.0.0 -- Automatically creating Project Reports

    Hi All
    How to configure Primavera to generate the html file of the Project Report either automatically or when new data date is scheduled.
    Regards

    Hi,
    To get job services to work, there is a small app that has to be installed (it's basically the job engine).
    It's in the installation package. Usually it gets installed on a server so jobs can run any time of the day.
    Have a look at the admin guide for version 7 here http://docs.oracle.com/cd/E16281_01/index.htm and search for Job Services.
    Michael
    http://www.plannertuts.com
    Edited by: Michael Lepage on 17-May-2013 05:58

  • Automatcally create Project from Sales Order

    We are on SAP R/3 4.7. We are currently using Project system for customer projects. We are manually linking the WBS element to the sales order item.
    We are considering to automatically creating project from sale order.
    Can someone offer any suggestions or recommendations?
    If you have already done in the past, did you encounter any issues or concerns that need to be considered?
    Thank You
    Sanjay

    Hi,
    As per standard configuration:
    1.) Maintain requirement class in OVZG as 80
    2) Maintain Requirement type in OVZH as KP and assign 80 there
    3) Strategy in SPRO->Project System->material->Strategy and maintain requirment class and requirement type and account assignment there.
    4).Then maintain strategy in strategy group...it would be same as 85.
    5). Then you can maintain item category from SD side and item category group from MM and assign these item categories to SD document type .
    6). Now create standard templates(Project and network activities and make assignment to standard project)
    7). Create configurable material(Variant configurator) in MM01 as KMAT and maintain item category group as same defined above and maintain strategy group in MRP tab same as defined above.
    8). Now assign these Variant configurator to standard network and projects in CN08.
    Look into these setting would definately help you.
    Regards
    Abhinay

  • Error while creating new project number

    Hi Folks,
    I am getting the below error while creating a new project number.
    "Oracle Projects failed to generate unique project number. Please contact your system administrator to setup the next number field for automatic project numbering in implementation options window.
    Can any expert help me out in this issue?
    Thanks in advance.
    SPR

    Hi,
    What u can do is to navigate to setup>>system>> implemention options and project TAB look for the next project number sequence and just increase the next number by 1.
    This problem may have come coz there is some project which already have that project number which is next in sequence.
    Thanks
    -Shivdeep Singh

  • How to automatically create the custom migration scripts after recreating SSMA project?

    How to automatically create the custom data migration scripts after recreating SSMA project?
    There is number of tables ( big tables with BLOBS)  which I want to set up automatically to be migrated with custom migration scripts (replacing e.g. attribute named "FILE" with "TO_BLOB('') AS FILE" ).
    So the question is how to open MB file (I think that it should be standard db of some destktop RDBMS) ? 

    Hi Roman.Pokrovskij,
    According
    to your description, we can use SSMA tool to migrate data from one database (including Access, Oracle and so on) to SQL Server via GUI or the scripts. There is an example about migrating Access database to SQL Server via the
    custom migration scripts, you can review refer to them.
    <?xml version="1.0" encoding="utf-8"?>
    <ssma-script-file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Microsoft SQL Server Migration Assistant for Access\Schemas\A2SSConsoleScriptSchema.xsd">
    <config>
    <output-providers>
    <output-window suppress-messages="false"
    destination="stdout"/>
    <upgrade-project action="yes"/>
    <data-migration-connection source-use-last-used="true"
    target-server="target_1"/>
    <progress-reporting enable="false"
    report-messages="false"
    report-progress="off"/>
    <object-overwrite action="skip" />
    </output-providers>
    </config>
    <servers>
    <!-- Server definition for Sql server target server-->
    <sql-server name="target_1">
    <sql-server-authentication>
    <server value="$SQLServerName$"/>
    <database value="$SQLServerDb$"/>
    <user-id value="$SQLServerUsrID$"/>
    <password value="$SQLServerPassword$"/>
    <encrypt value="true"/>
    <trust-server-certificate value="true"/>
    </sql-server-authentication>
    </sql-server>
    </servers>
    <script-commands>
    <create-new-project project-folder="$project_folder$ "
    project-name="$project_name$"
    overwrite-if-exists="true"/>
    <connect-target-database server="target_1"/>
    <load-access-database database-file="$AccessDbFolder$\$AccessDatabaseFile$"/>---
    <!--Schema Mapping-->
    <map-schema source-schema="$AccessDatabase$" sql-server-schema="$SQLServerDb$.dbo" />
    <!-- Convert schema -->
    <!-- Example: Convert entire Schema (with all attributes)-->
    <convert-schema object-name="$AccessDatabase$"
    object-type="Databases"
    conversion-report-overwrite="true"
    verbose="true"
    report-errors="true" />
    <!-- Synchronize target -->
    <!-- Example: Synchronize target entire Database with all attributes-->
    <synchronize-target object-name="$SQLServerDb$.dbo"
    on-error="fail-script" />
    <!-- Data Migration-->
    <!--Example: Data Migration of all tables in the schema (with all attributes)-->
    <migrate-data object-name="$AccessDatabase$.Tables"
    object-type="category"
    report-errors="true"
    verbose="true"/>
    </script-commands>
    </ssma-script-file>
    There is a similar scripts about migrating Oracle database to SQL Server, you can use powershell script to automatically run the console for scripts/variable files, saved in the specified folder. For more information, review the following
    article.
    http://blogs.msdn.com/b/ssma/archive/2010/09/09/performing-database-migration-assessment-using-ssma-console-application.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How can I create accurate decimal dimensions when creating a new document or using the art board in Illustrator CS6? When I type in a number with a decimal, it automatically rounds the number up.

    How can I create accurate decimal dimensions when creating a new document or using the art board in Illustrator CS6? When I type in a number with a decimal, it automatically rounds the number up.

    For my part you are welcome, sdowers.
    Unfortunately, the uncertainty arising from the rounding has been up several times here in this forum.
    I just came to remember a warning that needs to be given:
    The rounding of the representation of a numerical value may be harmless in itself, but if you use it for any operation that changes the value, such as multiplication or whatever, things will go wrong because the operation will be made on the basis of the rounded value instead of the true value. So, as in your first case in post #2, 39.625 rounded to 39.63 will become 79.26 instead of 79.25.

  • Error while creating project automatically from cProjects

    Hi,
    Need suggestion on creating projects in SAP-PS from cProjects. There is cProjects & SAP-PS interface.The requirment is to create project in SAP-PS from cProjects. All the configuration has done in cProjects & PS module also. While saving the projects & checking the accouting the following error & project is n't creating.
    1.Combination company / CO area is invalid Message no. KO124
    2.Acct assignment determination is not poss.in the account assgnmnt manager
    Message no. IAOM220
    3.Only one error message is transferred from the log to the cockpit
    Message no. IAOM_CPROJECTS029
    I would like to request all to suggest in fixing the issue.
    Thank you for your coopearation.
    Regards,
    Ranjan

    Hi,
    The neccesary configuration for cProjects & SAP-PS interface are as follows.
    1. Project Types in cProjects, Object types, Organisation unit with Org structure in line with project profile
    2. Activate Accounting integration
    3. Object types for object link (WBSE in this case)
    4. Accounting integration using cost collector
    5. Easy cost planing settings both in R/3 systems & cProjects
    6. Project profile configuration in R/3 (cProjects standard)
    7. CO Scenario maintainance view determination (Multi level controlling-Project role, automatic)
    All the enterprise structure assignments should be same in cProjects & R/3.
    Hope this may help you.
    Regards,
    Rakesh Pradhan

  • Bapi to create project version or create a project version automatically as soon as project get released

    Hi Experts,
    My client requirement is to create a project version as soon as project status changes to released .
    Can u please help me with bapi which will work same as CN72.Or any other way so that version get automatically created after project release.
    Thanks
    Suraj prakash

    Hi Sachin ,
    I tryied the same but failed to create it automatically,
    I have created version profile
    Assigned to control of project profile
    Created a project with same project profile and then released the project but no version got created.
    Am i doing something wrong.

  • Creating project in project server from sharepoint list 2013 automatically

    Hi All,
    is it possible to create project plan on project server center from sharepoint custom list automatically once i added an item to it using project server setting in the list setting not event receiver on item added on the list 
    I've configure the project server setting in my custom list and mapped the list field to the project custom fields
    but when i create an item the project not created in center i have to select the item in the list and from the the item tab in the ribbon i select create a project and this is not good i need to be automatic 
    khatib7

    Hello, if you need it to be created in ProjectServer straightaway why not skip the project ideas type list and just create the project in Project Server? Alternatively if you want to use the custom list look at using workflow to automate the project creation.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Is it possible to automatically create new folder for each project?

    Hi! Here´s another (maybe stupid) question:
    I wonder if it's possible for Premiere to also automatically create a new folder on the harddrive when a new project is created. This to get all material, preview files etc for each project in a separate folder.
    It´s easy to forget to manually do this and I tend to end up with many projects and files in the same folder. Makes it hard when I want to "clean house" and delete some stuff and backup other.
    Thank's for any help with this!

    Everyone develops their own method of project organization,
    but this has worked for me through several versions of Premiere.
    I keep a 'Project Template' folder that contains all of the sub-directories
    that I will normally need for each job... Media, Approvals, Documents, Audio,
    Rendered Image Sequences, Still Images, Finals etc.
    This 'Project Template' folder also contains a template Premiere project that is
    pre-set with the interface settings, column layout and project folders I will always use...
    Audio (vo, music, sfx), Graphics (sequences, stills, titles, slates),
    Cuts (approval versions, finals, and broadcast distribution finals).
    When I start a new project I simply duplicate the entire 'Project Template' folder along
    with all of its contents, then rename the folder and Premiere project to suit the current job.

  • Personnel number in automatically created confirmations CO11N

    Hello experts,
    I want to enhance the order confirmation (CO11N). I have extended the screen to give two personel numbers in one confirmation and have done an append to table AFRU for the second number. For automatically created confirmations I have to take the personel number and personel number 2 from the last confirmation and to add them.
    The User Exit CONFPP06 haven't a reference to table AFRU. It's only possible to give one personel number to the export interface - it doesn't know my append field.
    Therefore I had a look on the BADI WORKORDER_CONFIRM. But all methods have only import parameters - no export. How it is possible to make changes on the current confirmations? Is there any global available access to the current AFRUD?
    Regards Thomas

    Hi,
    Try with the below exits :
    CONFPP07 (screen exit for co11n)
    CONFPP04 (updating screen fields) This has got exporting parameter
        EXPORTING
    *" VALUE(AFRUD_EXP) LIKE AFRUD STRUCTURE AFRUD
    CONFPP05 (while saving co11n)
    Put a break point in all the three Exits, and check out.
    Thanks,
    Shailaja Ainala.

  • "Automatically create a cProjects project when this item is created"

    Hi,
    In the creation screen (after the item type is entered),then input the 'cProject template ', AND
    selection the option, 'Automatically create a cProjects project when this item is created'
    (typically in the bottom.)
    I need to change the check box to Disabled. can i know the were we need to change?
    Please Provide me Field name and Table name.
    Regards,
    Dhananjaya

    Dear Dhananjaya;
    Check this thread --> Re: Default values while item create
    Best regards;
    Mariano

  • Why connections automatically created??

    Hi,
    database: sqlserver 200
    driver: sqlserver jdbc driver from microsoft
    web applications and database are running on two separate window boxes.
    database connections are retrieved from our own connection pool and then released back to the pool.
    After the application runs about half a day or more, the server crashes and netstat shows that much more tcp/ip database connections are created than the number of connections in the pool.
    debugging found that in the following case connections are automatically created outside of the pool.
    connection con = pool.getConnection()
    statement st = null;
    for(int i=0; i<3; i++)
    st = con.createStatement();
    st.executeUpdate("updatestring");
    if(st != null){st.close();}
    pool.release connection;
    In the above code, 2 more connections are created outside of the pool. after we added 'st.close();' behind the ste.excuteUpate(), the problem is solved. However, there are still some connections created without calling getconnection from the database.
    The weird thing is that this kind of problem did not happen when the database and java application were running on the same windows box.
    Any idea will be appreciated.

    According to the "SQL Server 2000 Driver for JDBC User's Guide and Reference" (which comes bundled with the MS driver), page 26:
    >
    SelectMethod - SelectMethod={cursor | direct}. Determines whether database cursors are used for Select statements. Performance and behavior of the driver are affected by the SelectMethod setting.
    Direct - The direct method sends the complete result set in one request to the driver. [...] You should avoid using direct when executing queries that produce a large amount of data, as the result set is cached completely on the client and constrains memory. In this mode, each statement requires its own connection to the database. This is accomplished by "cloning" connections. [...]because transactions must occur on a single connection, auto commit mode is required. [...]
    Cursor - When the SelectMethod is set to cursor, a server-side cursor is generated. The rows are fetched from the server in blocks. the JDBC Statement method setFetchSize can be used to control the number of rows that are fetched per request. [...]
    The default is direct.
    There are a few things you should pay attention here. First, when using the default settings, the MS driver (and it's parent, the DataDirect driver) doesn't support transactions. Also, for some reason, it seems to be caching all the ResultSet on the client, although it doesn't have to; it could just read one row at a time and buffer it (which it doesn't do right either, because it doesn't support reading the columns out of order).
    Then, moving on to cursor mode, although it doesn't say it the default fetch size is of 1 (one) row. This means that a request has to be made for each row returned by a ResultSet. A very serious performance drop (depending on network latency). I haven't tested setFetchSize, I thought it only fetches one row at a time, regardless of this, I could be wrong.
    Now, about jTDS. jTDS used an approach similar to the direct mode of the MS/DataDirect driver up to jTDS 0.8 or so. It wasn't a good idea, as it also tried to support transactions, so you can imagine the mess.
    Currently jTDS has a socket multiplexer, which makes each Statement "think" it's the only one using the physical connection. This is how most other drivers that support concurrent statements do it. The multiplexing means that in some cases server response has to be cached to memory (or disk, after a certain limit is reached), this is why concurrent Statements should be avoided even if supported by the driver. As you can see it's not a limitation of the protocol or, to be more exact, it is but the driver usually does something to work around it. DataDirect choose to take the easy road.
    Then there are scrollable/updateable Statements. For these, drivers can use either server-side or client-side cursors. jTDS implements both: server-side for SQL Server and client-side for Sybase (which doesn't support server-side cursors) and cases when SQL Server can't create a server-side cursor (such as stored procedures consisting of more than a single SELECT). The default fetch size of jTDS is of 100 rows; this ensures a good compromise between performance (one request-response for each 100 rows) and memory overhead (unless the ResultSet contains LOBs, the maximum row size for SQL Server is 8000 and something bytes; this means at most 800KB of memory + the overhead of Java objects).
    So, to sum it up, jTDS uses direct selects (also known as fire-hose cursors) for forward-only read-only ResultSets (which is pretty much the only type of ResultSet used in server applications) and server-side cursors for scrollable and/or updateable ResultSets (with a default fetch size of 100 rows). All this on a single network connection.
    HTH,
    Alin,
    The jTDS Project.

  • Firefox 29 is no longer automatically creating bookmarks backups.

    I hate to be posting another question having finally (I believe) finding a work around for the "Firefox 29 fails to exit properly and remains running in task manager" problem.
    https://support.mozilla.org/en-US/questions/997670
    However, in Firefox 28 FF would automatically create a new bookmarks backup upon first opening of each day and the number of bookmark backups could be set in about:config setting:
    browser.bookmarks.max_backups
    Since installing Firefox 29 this functionality does not appear to be working. Is this by design or another "issue"? Has anyone else noticed this issue?
    Please don't ask me to "reset to default state", "run in safe mode", etc. I just went through all that with the above "Failing to exit properly" thread. I know I can manually backup bookmarks. I would like to know whether this is by design, if other people have noticed this, or I am the only one experiencing this.
    Here is my troubleshooting information (excluding the thousand references to my printer):
    <pre><nowiki>Application Basics
    Name: Firefox
    Version: 29.0
    User Agent: Mozilla/5.0 (Windows NT 6.1; rv:29.0) Gecko/20100101 Firefox/29.0
    Crash Reports for the Last 3 Days
    All Crash Reports
    Extensions
    Name: Firebug
    Version: 1.12.8
    Enabled: true
    ID: [email protected]
    Important Modified Preferences
    accessibility.typeaheadfind.flashBar: 0
    browser.cache.disk.capacity: 51200
    browser.cache.disk.smart_size_cached_value: 358400
    browser.cache.disk.smart_size.enabled: false
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.places.smartBookmarksVersion: 6
    browser.search.suggest.enabled: false
    browser.search.useDBForOrder: true
    browser.sessionstore.upgradeBackup.latestBuildID: 20140421221237
    browser.startup.homepage: http://www.wcwcw.com/
    browser.startup.homepage_override.buildID: 20140421221237
    browser.startup.homepage_override.mstone: 29.0
    browser.tabs.loadInBackground: false
    browser.urlbar.autocomplete.enabled: false
    dom.mozApps.used: true
    dom.w3c_touch_events.expose: false
    extensions.lastAppVersion: 29.0
    font.internaluseonly.changed: true
    general.autoScroll: false
    gfx.direct3d.last_used_feature_level_idx: 1
    keyword.URL: https://www.google.com/search?q=
    network.cookie.cookieBehavior: 2
    network.cookie.lifetimePolicy: 1
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1399218213
    places.history.expiration.transient_current_max_pages: 80511
    plugin.disable_full_page_plugin_for_types: application/vnd.fdf,application/vnd.adobe.xdp+xml,application/vnd.adobe.xfdf
    plugin.importedState: true
    plugin.state.npdeployjava: 0
    plugin.state.npgoogleupdate: 0
    print.printer_HP_DeskJet_710C_(Copy_1).print_bgcolor: false
    privacy.clearOnShutdown.cache: false
    privacy.clearOnShutdown.cookies: false
    privacy.clearOnShutdown.formdata: false
    privacy.clearOnShutdown.offlineApps: true
    privacy.clearOnShutdown.sessions: false
    privacy.cpd.cache: false
    privacy.cpd.cookies: false
    privacy.cpd.offlineApps: true
    privacy.cpd.sessions: false
    privacy.popups.showBrowserMessage: false
    privacy.sanitize.migrateFx3Prefs: true
    privacy.sanitize.timeSpan: 0
    security.disable_button.openCertManager: false
    security.disable_button.openDeviceManager: false
    security.warn_viewing_mixed: false
    storage.vacuum.last.index: 1
    storage.vacuum.last.places.sqlite: 1396579220
    Graphics
    Adapter Description: NVIDIA GeForce 9400 GT
    Adapter Drivers: nvd3dum nvwgf2um,nvwgf2um
    Adapter RAM: 1024
    ClearType Parameters: Gamma: 2200 Pixel Structure: B ClearType Level: 50 Enhanced Contrast: 300
    Device ID: 0x0641
    Direct2D Enabled: true
    DirectWrite Enabled: true (6.2.9200.16571)
    Driver Date: 12-19-2013
    Driver Version: 9.18.13.3221
    GPU #2 Active: false
    GPU Accelerated Windows: 1/1 Direct3D 10
    Vendor ID: 0x10de
    WebGL Renderer: Google Inc. -- ANGLE (NVIDIA GeForce 9400 GT Direct3D9Ex vs_3_0 ps_3_0)
    windowLayerManagerRemote: false
    AzureCanvasBackend: direct2d
    AzureContentBackend: direct2d
    AzureFallbackCanvasBackend: cairo
    AzureSkiaAccelerated: 0
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.3
    Version in use: 4.10.3
    NSS
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSSMIME
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSSSL
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSUTIL
    Expected minimum version: 3.16
    Version in use: 3.16</nowiki></pre>
    Kind Regards,
    Axis

    This is a bit of a "bump" with some new things I have tried. I have run the Places Maintenance add-on (again) and places.sqlite integrity seems absolutely fine.
    Places Maintenance: https://addons.mozilla.org/firefox/addon/places-maintenance/
    I have re-installed FF 29.
    I am able to create manually, and restore, bookmark backups without a hitch.
    I did delete places.sqlite and restarted FF 29. The only thing I lost was all my bookmark Icons. So I re-added the former places.sqlite. Of course, I would have to wait until tomorrow morning to know for sure, but since the Places Maintenance add-on indicated no problems, and since I can manually create them, I am quite sure it is not a corrupted places.sqlite file.
    I tried what may be a dubious add-on, BackupFox, and it failed to create a new backup but left a temp file in the main profile folder.
    Logic tells me that if I can manually create and restore bookmark backups, then something in the engine(?) may be responsible but I do not know enough to go further with that. Permissions must be O.K. or I wouldn't be able to make (manually) a backup.
    I did not have this problem at all with FF 28. Rather, I was asking cor-el how to limit the number of backups, which he showed me. What makes this difficult to test is that I would have to wait until the first opening of FF each day to tell.
    I can't tell if this problem is "only me" or affecting others, however, (no insult intended) I can paste into the support.mozilla.org page search box the exact title of this thread and not find it. I shows up number 1 on Google doing similar search. People who aren't checking their profile folder each day might not even be noticing this.
    cor-el, or anybody, have you found auto backups have stopped in FF 29 for you? Anyone who reads this please let me know if your bookmark auto-backup is working. Just peak in your profile and see if you have a new one each day.
    Does anyone know just what .dll or .exe or what actually is triggered how that causes the auto-backup to occur? Is it the maintenance service?
    What I have not tried is creating another profile because this one seems just fine and I has always worked before 29, and still does work, as far as profiles go. I need to know what "triggers" auto bookmark backup and I doubt it is my profile.
    Regards again,
    Axis

  • I got Class category is invalid error. while i am trying to create project by using pa_project_pub API trough backend

    Hi Everyone,
    Can you please help me.. how can i solve this problem.
    please find out the following code which was i written..
    DECLARE
      -- Variables needed to create task hierachy
      level1               NUMBER;
      level2               NUMBER;
      level3               NUMBER;
      a                    NUMBER;
      m                    NUMBER;
      parent_level1         VARCHAR2(30);
      parent_level2         VARCHAR2(30);
      parent_level3         VARCHAR2(30);
      number_of_tasks1      NUMBER;        -- number of tasks/levels
      number_of_tasks2      NUMBER;
      number_of_tasks3      NUMBER;
      number_of_tasks4      NUMBER;
      -- Variables needed for API standard parameters
      l_api_version_number  NUMBER := 1.0;
      l_commit                VARCHAR2(1) := 'F';
      l_return_status       VARCHAR2(1);
      l_init_msg_list       VARCHAR2(1) := 'F';
      l_msg_count           NUMBER;
      l_msg_index_out       NUMBER;
      l_msg_data            VARCHAR2(2000);
      l_data                VARCHAR2(2000);
      l_workflow_started    VARCHAR2(1) := 'Y';
      l_pm_product_code     VARCHAR2(10);
    -- Predefined Composit data types
      l_project_in          PA_PROJECT_PUB.PROJECT_IN_REC_TYPE;
      l_project_out         PA_PROJECT_PUB.PROJECT_OUT_REC_TYPE;
      l_key_members         PA_PROJECT_PUB.PROJECT_ROLE_TBL_TYPE;
      l_class_categories    PA_PROJECT_PUB.CLASS_CATEGORY_TBL_TYPE;
      l_tasks_in_rec        PA_PROJECT_PUB.TASK_IN_REC_TYPE;
      l_tasks_in            PA_PROJECT_PUB.TASK_IN_TBL_TYPE;
      l_tasks_out_rec       PA_PROJECT_PUB.TASK_OUT_REC_TYPE;
      l_tasks_out           PA_PROJECT_PUB.TASK_OUT_TBL_TYPE;
      l_cust_rec            PA_PROJECT_PUB.CUSTOMER_IN_REC_TYPE;
      l_cust_tbl            PA_PROJECT_PUB.CUSTOMER_TBL_TYPE;
      l_person_id           NUMBER;
      l_project_role_type   VARCHAR2(20);
      l_responsibility_id    NUMBER;
      l_user_id        NUMBER;
      v_ind            NUMBER;
      API_ERROR                EXCEPTION;
    BEGIN
    -- GET GLOBAL VALUES
      select user_id, responsibility_id
      into  l_user_id, l_responsibility_id
      from pa_user_resp_v
      where user_name = 'SATISH'                    -- substitute valid username
      and responsibility_name = '*PAC Projects Administrator';    -- substitute responsibility name
    dbms_output.put_line( 'initilaization');
    -- SET GLOBAL VALUES
      pa_interface_utils_pub.set_global_info(
        p_api_version_number    => 1.0,
        p_responsibility_id     => l_responsibility_id,
        p_user_id               => l_user_id, 
        p_msg_count             => l_msg_count,
        p_msg_data              => l_msg_data,
        p_return_status         => l_return_status);
      dbms_output.put_line( 'Assigning values');
    -- PRODUCT RELATED DATA
      l_pm_product_code := 'GMS';         -- can be user defined
    -- PRODUCT DATA (PROJECT_IN_REC_TYPE)
      l_project_in.created_from_project_id := 11759;--'1746';--'11759';  -- Project id from template
      l_project_in.project_name := 'TEST_VS_14052014';
      l_project_in.pm_project_reference := 'TEST_VS_14052014';
      l_project_in.description := 'CREATION OF PROJECT(VS)';
      l_project_in.project_status_code := 'APPROVED';
      l_project_in.carrying_out_organization_id := 652;--3274;    -- can default from template
      l_project_in.start_date := '01-JAN-2007'; -- can override default from template
      l_project_in.completion_date := '31-JAN-2010';       -- can override default from template
      l_project_in.actual_start_date := '01-JAN-2010';
      l_project_in.actual_finish_date := '31-JAN-2010';
      l_project_in.early_start_date := '01-JAN-2010';
      l_project_in.early_finish_date :='31-JAN-2010';
      l_project_in.late_start_date := '01-JAN-2010';
      l_project_in.late_finish_date :='31-JAN-2010';
    -- l_proj_in.process_mode := 'ONLINE';
    -- l_project_in.customer_id := 1001;
    --KEY MEMBERS DATA (PROJECT_ROLE_TBL_TYPE)
    -- can be defaulted from the Template, but not from a Project
      m := 1;
      l_person_id := 34;            -- need to get from Apps
      l_project_role_type := 'PROJECT MANAGER';
      l_key_members(m).person_id := 53;
      l_key_members(m).project_role_type := 'PROJECT MANAGER';
    -- l_class_categories(1).class_category := 'Engineering';
      --l_class_categories(1).class_code := 'Programs';
      --l_class_categories(2).class_category := 'Planned';
      --l_class_categories(2).class_code := 'Active';
      l_class_categories(3).class_category := 'Rank';
      l_class_categories(3).class_code := 'CUST';
    -- CUSTOMERS
      v_ind := 0;
      l_cust_rec.customer_id                    := 1001;
      l_cust_rec.project_relationship_code      := 'CLIENT'; --cus.project_relationship_code;
      l_cust_rec.Bill_To_Customer_id            := NULL; --cus.x_bill_customer_id;    
      l_cust_rec.contact_id                     := NULL;                   --  pa_interface_utils_pub.g_pa_miss_num;
      l_cust_rec.project_contact_type_code      := NULL;  --  pa_interface_utils_pub.g_pa_miss_char;
      l_cust_rec.customer_bill_split            := NULL; --nvl(cus.customer_bill_split, pa_interface_utils_pub.g_pa_miss_num);
      l_cust_rec.allow_inv_user_rate_type_flag  := NULL; --nvl(cus.allow_inv_user_rate_type_flag, pa_interface_utils_pub.g_pa_miss_char);
      l_cust_rec.inv_rate_date                  := NULL; --nvl(cus.inv_rate_date, pa_interface_utils_pub.g_pa_miss_date);
      l_cust_rec.inv_rate_type                  := NULL; --nvl(cus.inv_rate_type, pa_interface_utils_pub.g_pa_miss_char);
      l_cust_rec.inv_currency_code              := NULL; --nvl(cus.inv_currency_code, pa_interface_utils_pub.g_pa_miss_char);
      l_cust_rec.inv_exchange_rate              := NULL; --nvl(cus.inv_exchange_rate, pa_interface_utils_pub.g_pa_miss_num);
      l_cust_rec.bill_another_project_flag      := 'Y'; --nvl(cus.bill_another_project_flag, pa_interface_utils_pub.g_pa_miss_char);
      l_cust_rec.RECEIVER_TASK_ID               := 35078;
      v_ind  :=  v_ind  +  1;
      l_cust_tbl   (v_ind)  :=  l_cust_rec;
    --CLASS CATEGORIES DATA (CLASS_CATEGORY_TBL_TYPE)
    --  l_class_categories(1).class_category := 'Product'; --value from template
    --  l_class_categories(1).class_code := 'Product 1';
    --TASKS DATA
      --Set the number of tasks for every level (there are 4 levels)
      number_of_tasks1 := 1;
      number_of_tasks2 := 2;
      number_of_tasks3 := 0;
      number_of_tasks4 := 0;
    -- This is just a set of looping structures to create the tasks and sub-tasks
    -- If it is difficult to understand, then feel free to create them individually.
      a := 0;
      for level1 in 1..number_of_tasks1 loop
        a := a + 1;
        l_tasks_in_rec.pm_task_reference := level1 || '.' || '0';
        l_tasks_in_rec.task_name := 'Top Level ' || level1 || '.' || '0';
        l_tasks_in_rec.pm_parent_task_reference := '';
        l_tasks_in_rec.task_start_date := '01-JAN-2010';
        l_tasks_in_rec.task_completion_date := '31-JAN-2010';
        l_tasks_in_rec.actual_start_date := '01-JAN-2010';
        l_tasks_in_rec.actual_finish_date :='31-JAN-2010';
        l_tasks_in_rec.early_start_date := '01-JAN-2010';
        l_tasks_in_rec.early_finish_date :='31-JAN-2010';
        l_tasks_in_rec.late_start_date := '01-JAN-2010';
        l_tasks_in_rec.late_finish_date :='31-JAN-2010';
        l_tasks_in_rec.receive_project_invoice_flag := 'Y';
        l_tasks_in(a) := l_tasks_in_rec;
        parent_level1 := level1 || '.' || '0';
        for level2 in 1..number_of_tasks2 loop
          a := a + 1;
          l_tasks_in_rec.pm_task_reference := level1 || '.' || level2;
          l_tasks_in_rec.task_name := '2 Level ' || level1 || '.' || level2;
          l_tasks_in_rec.pm_parent_task_reference := parent_level1;
          l_tasks_in(a) := l_tasks_in_rec;
          parent_level2 := level1 || '.' || level2;
        end loop;
      end loop;
    --INIT_CREATE_PROJECT
      pa_project_pub.init_project;
    --CREATE_PROJECT
      pa_project_pub.create_project(
        l_api_version_number,
        p_commit            => l_commit,
        p_init_msg_list     => l_init_msg_list,
        p_msg_count         => l_msg_count,
        p_msg_data          => l_msg_data,
        p_return_status     => l_return_status,
        p_workflow_started  => l_workflow_started,
        p_pm_product_code   => l_pm_product_code,
        p_project_in        => l_project_in,
        p_project_out       => l_project_out,
        p_key_members       => l_key_members,
        p_class_categories  => l_class_categories,
        p_tasks_in          => l_tasks_in,
        p_tasks_out         => l_tasks_out,
        p_customers_in      => l_cust_tbl);
    -- Check for errors
      if l_return_status != 'S'
      then
        raise API_ERROR;
      end if;
      dbms_output.put_line('New Project Id: ' || l_project_out.pa_project_id);
      dbms_output.put_line('New Project Number: ' || l_project_out.pa_project_number);
      Commit;
    --HANDLE EXCEPTIONS
    -- Get the error message that were returned if it did not complete sucessfully
      EXCEPTION
      When API_ERROR then
        if l_msg_count >= 1
        then
          for i in 1..l_msg_count loop
            pa_interface_utils_pub.get_messages(
            p_msg_data      => l_msg_data,
            p_encoded       => 'F',
            p_data          => l_data,
            p_msg_count     => l_msg_count,
            p_msg_index     => l_msg_count,    -- Added in 11i.PA.I
            p_msg_index_out => l_msg_index_out);
            dbms_output.put_line('error message: ' || l_data);
          end loop;
          rollback;
        end if;
      When OTHERS then
        if l_msg_count >= 1
          then
          for i in 1..l_msg_count loop
            pa_interface_utils_pub.get_messages(
            p_msg_count     => l_msg_count,
            p_encoded    => 'F',
            p_msg_data     => l_msg_data,
            p_data         => l_data,
            p_msg_index     => l_msg_count,    -- Added in 11i.PA.I
            p_msg_index_out => l_msg_index_out);
            dbms_output.put_line('error message: ' || l_data);
          end loop;
          rollback;
        end if;
    END;
    ERROR:=
    initilaization
    Assigning values
    debug message -->: Start..
    debug message -->: 1
    debug message -->: 2
    debug message -->: 3
    debug message -->: 4
    debug message -->: 5
    debug message -->: 6
    debug message -->: 7
    debug message -->: 8
    debug message -->: 9
    debug message -->: 10
    debug message -->: 11
    debug message -->: 12
    debug message -->: 13
    debug message -->: 14
    debug message -->: 15
    debug message -->: 16
    debug message -->: 17
    debug message -->: 18
    debug message -->: 19
    debug message -->: 20
    debug message -->: 21
    debug message -->: 22
    debug message -->: 23
    debug message -->: 25
    debug message -->: 26
    debug message -->: 26-I
    debug message -->: 26-II
    debug message -->: 26-I
    debug message -->: 26-II
    debug message -->: 26-I
    debug message -->: 26-II
    debug message -->: 26-I
    debug message -->: 26-II
    debug message -->: 26-Vi
    debug message -->: 26-I
    debug message -->: 26-II
    debug message -->: 26-VII
    debug message -->: 27
    debug message -->: 28
    debug message -->: 30
    error message: Project: 'TEST_VS_14052014'
    The class category is invalid.

    Please see if (PA_PROJECT_PUB.create_project Errors - The Class Category Is Invalid (Doc ID 1323904.1)) helps.
    Thanks,
    Hussein

Maybe you are looking for

  • Digital Inputs do not record over long time periods

    I am running Signals Express 2009 with a USB-6009.  I have a project that needs to record the states of 8 digital inputs over a 24 hour period.  The inputs typically do not change state for long periods of time.  When I run the project it does record

  • Runtime.exec() - Problem when using cvs-command

    I have a problem with the Runtime.getRuntime().exec() - Command. I try to execute a command to export files from our cvs-repository. As you hopefully know, cvs produces a lot of output. When I start my 'cvs export ... '- command from the console-wind

  • Sidecar.xml generator

    Good Morning. I present to you the sidecar.xml generator for Adobe's Digital Publishing Suite. This tool creates the sidecar.xml file for you after you entered all metadata for each article. You can change the order of the articles by just drag-and-d

  • I cant connect to my routers IP address.

    Hi, I  have tried just about everything I looked up belkin router and stuff found my routers IP  which is 192.168.2.1 and i cant connect i looked on CMD and i found gateway ip and tried that I still can connect can anyone help me? Message Edited by F

  • Odd problem with drop shadows

    I shot some footage of a guy in front of a green screen. I got an awesome key and I put him in front of a white background. In order to add a more animated look I want to put a drop shadow behind him. The problem I am experiencing is when I add a cro