How To Load a Project Budget Line Through API in R12 ?

Hello
Could you please let me know how to load the project budget lines through API in R12 system, I am trying with below script but it is not working.
Could you please let me know if you have any solution.
=========================================================================================================================================================================
Script
DECLARE
--––variables needed for API standard parameters
   l_api_version_number     NUMBER                                 := 1.0;
   l_commit                 VARCHAR2 (1)                           := 'T';
   l_return_status          VARCHAR2 (1);
   l_init_msg_list          VARCHAR2 (1);
   l_msg_count              NUMBER;
   l_msg_data               VARCHAR2 (2000);
   l_data                   VARCHAR2 (2000);
   l_msg_entity             VARCHAR2 (100);
   l_msg_entity_index       NUMBER;
   l_msg_index              NUMBER;
   l_msg_index_out          NUMBER;
   l_encoded                VARCHAR2 (1);
   i                        NUMBER;
   a                        NUMBER;
--––variables needed for Oracle Project specific parameters
   l_pm_product_code        VARCHAR2 (100);
   l_pa_project_id          NUMBER;
   l_pm_project_reference   VARCHAR2 (100);
   l_budget_type_code       VARCHAR2 (30);
   l_change_reason_code     VARCHAR2 (30);
   l_description            VARCHAR2 (255);
   l_entry_method_code      VARCHAR2 (30);
   l_resource_list_name     VARCHAR2 (60);
   l_resource_list_id       NUMBER;
   l_budget_lines_in        pa_budget_pub.budget_line_in_tbl_type;
   l_budget_lines_in_rec    pa_budget_pub.budget_line_in_rec_type;
   l_budget_lines_out       pa_budget_pub.budget_line_out_tbl_type;
   l_line_index             NUMBER;
   l_line_return_status     VARCHAR2 (1);
   l_user_id                NUMBER;
   l_responsibility_id      NUMBER;
   API_ERROR                EXCEPTION;
BEGIN
   -- SET GLOBAL INFO
   SELECT user_id,
          responsibility_id
     INTO l_user_id,
          l_responsibility_id
     FROM pa_user_resp_v
    WHERE user_name = 'RAJU';
   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
   IF l_return_status != 'S'
   THEN
      RAISE API_ERROR;
   END IF;
--––PRODUCT RELATED DATA
   l_pm_product_code        := 'GMS';
--––BUDGET DATA
   l_pa_project_id          := 6271;
   l_pm_project_reference   := NULL;--'ABC';
   l_budget_type_code       := 'FC';
   -- l_change_reason_code := 'INITIAL';
   l_description            := 'New description –> 2';
   l_entry_method_code      := 'PA_TASKLVL_BASELINE';
   l_resource_list_id       := 1001;
--––BUDGET LINES DATA
   a                := 1;
   FOR i IN 1 .. a
   LOOP
      l_budget_lines_in_rec.pa_task_id := 405156;
      l_budget_lines_in_rec.pm_task_reference       := NULL;
      l_budget_lines_in_rec.resource_alias          := 'Labor';
      l_budget_lines_in_rec.resource_list_member_id := '1034';
      -- l_budget_lines_in_rec.budget_start_date        := '01-Jan-13';
      -- l_budget_lines_in_rec.budget_end_date          := '31-Dec-14';
      -- l_budget_lines_in_rec.period_name          := 'JUL-10FY2011';
      l_budget_lines_in_rec.description             := 'Some Text';
      l_budget_lines_in_rec.quantity := 100.00;
      l_budget_lines_in_rec.raw_cost := 300.00;
      l_budget_lines_in (i)                         := l_budget_lines_in_rec;
   END LOOP;
--––INIT_BUDGET
   pa_budget_pub.init_budget;
--––LOAD_BUDGET_LINE
   FOR i IN 1 .. a
   LOOP
      pa_budget_pub.load_budget_line
                        (p_api_version_number           => l_api_version_number,
p_return_status                => l_return_status,
                         p_pa_task_id                   => l_budget_lines_in (i).pa_task_id,
p_pm_task_reference            => l_budget_lines_in (i).pm_task_reference,
p_resource_alias               => l_budget_lines_in (i).resource_alias,
p_resource_list_member_id      => l_budget_lines_in (i).resource_list_member_id,
p_budget_start_date            => l_budget_lines_in (i).budget_start_date,
                         p_budget_end_date              => l_budget_lines_in (i).budget_end_date,
p_period_name                  => l_budget_lines_in (i).period_name,
p_description                  => l_budget_lines_in (i).description,
                         p_raw_cost                     => l_budget_lines_in (i).raw_cost,
p_burdened_cost                => l_budget_lines_in (i).burdened_cost,
p_revenue                      => l_budget_lines_in (i).revenue,
p_quantity                     => l_budget_lines_in (i).quantity
   END LOOP;
   IF l_return_status != 'S'
   THEN
      RAISE api_error;
   END IF;
--––EXECUTE_CREATE_DRAFT_BUDGET
    pa_budget_pub.execute_create_draft_budget (p_api_version_number        => l_api_version_number,
p_msg_count                 => l_msg_count,
p_msg_data                  => l_msg_data,
p_return_status             => l_return_status,
p_pm_product_code           => l_pm_product_code,
                                              p_pa_project_id             => l_pa_project_id,
p_pm_project_reference      => l_pm_project_reference,
p_budget_type_code          => l_budget_type_code,
p_change_reason_code        => l_change_reason_code,
p_description               => l_description,
                                              p_entry_method_code         => l_entry_method_code,
p_resource_list_name        => l_resource_list_name,
p_resource_list_id          => l_resource_list_id
   IF l_return_status != 'S'
   THEN
      NULL; --––RAISE API_ERROR;
   END IF;
--––FETCH_LINE
   FOR l_line_index IN 1 .. pa_budget_pub.g_budget_lines_tbl_count
   LOOP
      pa_budget_pub.fetch_budget_line (p_api_version_number      => l_api_version_number,
p_return_status           => l_return_status,
p_line_index              => l_line_index,
p_line_return_status      => l_line_return_status
      IF l_return_status != 'S' OR l_line_return_status != 'S'
      THEN
         RAISE api_error;
      END IF;
   END LOOP;
--––CLEAR_BUDGET
   pa_budget_pub.clear_budget;
   IF l_return_status != 'S'
   THEN
      RAISE api_error;
   END IF;
--––HANDLE EXCEPTIONS
EXCEPTION
   WHEN api_error
   THEN
      FOR i IN 1 .. l_msg_count
      LOOP
         pa_interface_utils_pub.get_messages (p_msg_data           => l_msg_data,
p_data               => l_data,
p_msg_count          => l_msg_count,
p_msg_index_out      => l_msg_index_out
         DBMS_OUTPUT.put_line ('Error Mesg ' || l_data);
         DBMS_OUTPUT.put_line ('Error Mesg ' || l_msg_data);
      END LOOP;
   WHEN OTHERS
   THEN
      FOR i IN 1 .. l_msg_count
      LOOP
         pa_interface_utils_pub.get_messages (p_msg_data           => l_msg_data,
p_data               => l_data,
                                              p_msg_count          => l_msg_count,
p_msg_index_out      => l_msg_index_out
         DBMS_OUTPUT.put_line ('error mesg ' || l_data);
      END LOOP;
END;
=========================================================================================================================================================================

Not knowing how its embedded...  you will need to get the report instance from the dll and cast it as a ReportDocument object.
Given the info so far, that is all we can say.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • How to load flat file in BPS through Web-debugging

    Hi,
    We are working on flat file upload in BPS thru guide 'How to load flat file in BPS through Web'. Can some one guide on how to debug the function modules used while uploading the data.
    We have set up the break point in the function modules and also in the BSP page. But when trying to debug while uploading, it is not going to the break point which was set.
    Could you assist in setting up the break point.
    Regards,
    Sreenath
    Message was edited by:
            sreenath reddy

    Hi,
    I  have put an external break-point.
    I have hard coded it in the coding of the function module itself.
    The code is perfectly working. But, when I want to check for the values of the variables in the F.M during runtime, the break-point is not triggering. Any ideas??
    Regards,

  • How to create a project templace using a API?

    Hi all,
    I can create a project using API PA_PROJECT_PUB.create_project, but how to create a project templace using a API?
    thanks for your any effort.
    Caril

    Hi Caroline:
    If sub projects are not supported currently, does the EDK API support creating the project folders under a project? Please let me know.
    Thanks.
    Bhanu

  • How to load data with carriage return through DRM action script ?

    Hello,
    We are using DRM to manage Essbase metadata. These metadata contain a field for member formula.
    Currently it's a string data type property in DRM so we can't use carriage return and our formula are really hard to read.
    But DRM support other data type property : memo or formatted memo where we can use carriage return.
    Then in the export file, we have change the record delimiter to an other character than CRLF
    Our issue : we are regularly using action script to load new metadata => How to load data properties with carriage return using action script ? There is no option to change the record delimiter.
    Thanks!

    Hello Sandeep
    here what I want to do through action script : loading a formula that use more on than one line:
    Here, I write my formula using 4 lines but action script cannot load since one line = 1 record.
    ChangeProp|Version_name|Hier_name|Node_name|Formula|@round(
    qty*price
    *m05*fy13

  • How to load a project with Eclipse

    Ok, I'm new to eclipse, and I know this may seem like a dumb question, but how do you load a project you've already been working on? I don't see any "open project" menu item to click on in Eclipse, all I see are "new..." everything.

    Ithink the problem here may be that you are thinking in Visual Studio while trying to use Eclipse.
    In Eclipse, the workspace is a sort of "mini-environment" (for want of a better phrase) in which you develop you application. You can have many projects within each workspace (you are prompted for the workspace when you start Eclipse, so you can have multiple workspaces). Projects are merely directories at the filesystem level).
    I would suggest that you simply import all your projects into your workspace and then you can switch between then by clicking on the project - an Eclipse project is not really analogous to a VS project (I think - haven't used VS much and not for some time). The idea is that projects in Eclipse are really application modules

  • How Do I Draw a Circle / Line Through An Image In Pages?

    Hi guys,
    I never do anything very involved in Pages but today ...
    I have an image (jpeg file) and I would like to draw a circle around it and a line through it -- you know, turn it into one of those International "Don't Do This" signs.
    Is there an easy way?
    Thanks
    I'm using Pages '09 version 4.1

    Insert a round Shape and give it a very thick border with equally thick line (also in Shapes) diagonally across the circle.
    To add the image just drag it onto the shape and when you positioned it the way you like it, group the two.
    Peter

  • How to load ALBPM Project webRoot\webResources files in WebLogic

    How do I get the files I've included in the webRoot\webResources as part of my process to load in my WebLogic environment? I can these files are included in the project export but these do not appear to be deployed or are not currently visible to my application. I reference some of this files in my screenflows with an iframe component. At present I get "From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:10.4.5 404 Not Found" message in its place. Viewing the page source I can see the reference to my webResource as:
    <TD align="left" valign="middle" style="font-size:12;font-family:Arial;" colspan="2" rowspan="1">
    <DIV id="step7_a_div"><IFRAME style="width:100%;height:200px;" src="/workspace/webRoot/webResources/MOP114/instr_step7_a.html"></IFRAME></DIV>
    </TD>
    I've also tried to manually copy the files to C:\bea\albpm6.0\j2eewl\webapps\workspace\webRoot\webResources without any luck.
    Thanks in advance.

    "webRoot\custom JSP" only allows the importing of .jsp, .jsf, .jspf and .xhtml files. Along with the .html files I also have .png image files that are sourced by my .html files.
    Is there a way of having WebLogic include these files that have been exported as part of the Studio project export process in the runtime environment?
    I've managed to work around this at present by manually recreating the directory and file structure on the WebLogic environment under the directory I defined to store my WebLogic domain -->
    c:\bea\user_projects\domains\<my domain>\servers\<my ALBPM server>\upload\08-workspace-FDIDS.ear\app\08-workspace-FDIDS.ear\workspace.war\webRoot
    --> Added webResources subdirectory
    --> Added directories and files replicated from my Studio environment
    TP

  • Project budget and forecast tables in R12

    Hi All,
    I had to extract the budget and forecast amounts for each project in the below format.
    Project number, budget/forecast, task, resource, PA period, burden cost..etc.+
    We are on R12. Can I use below tables to extract the above information. or should i depend on PJI% tables. please suggest.
    pa_budget_versions
    pa_budget_lines
    below is the full query i built:
    SELECT pp.NAME project_name, pp.segment1 project_number,
    haou.NAME project_organization, pp.project_type,
    pp.project_status_code, pp.start_date project_start_date,
    pp.completion_date project_completion_date,
    pfpt.NAME fin_plan_type, pfpt.description fin_plan_description,
    pfpt.plan_class_code, pbv.budget_version_id, pbv.budget_type_code, pbv.version_number,
    pbv.budget_status_code, pbv.version_name, pbv.baselined_date,
    pbv.labor_quantity project_level_labor_quantity,
    pbv.labor_unit_of_measure, pbv.raw_cost project_level_raw_cost, pbv.burdened_cost project_level_burdened_cost,
    pbv.revenue project_level_revenue, pbv.version_type,pbv.current_planning_period, pt.task_number, pt.task_name,
    prlm.alias resource_alias, prlm.expenditure_type, prlm.event_type,
    prlm.expenditure_category, prlm.resource_class_code,
    prlm.unit_of_measure, pbl.start_date, pbl.end_date, pbl.period_name,
    pbl.quantity, pbl.raw_cost, pbl.burdened_cost, pbl.revenue, prlm.resource_list_member_id,
    prlm.resource_type_code
    FROM apps.pa_projects_all pp,
    hr_all_organization_units haou,
    apps.pa_budget_versions pbv,
    apps.pa_fin_plan_types_vl pfpt,
    apps.pa_budget_lines pbl,
    pa_resource_assignments pra,
    pa_tasks pt,
    pa_resource_list_members prlm
    WHERE 1 = 1
    AND pp.project_id = pbv.project_id
    AND pp.carrying_out_organization_id = haou.organization_id
    AND pbv.fin_plan_type_id = pfpt.fin_plan_type_id
    AND pbv.budget_status_code = 'B'
    AND pbv.budget_version_id =
    (SELECT MAX (budget_version_id)
    FROM pa_budget_versions pbv1
    WHERE 1 = 1
    AND pbv1.project_id = pp.project_id
    AND pbv1.budget_status_code = 'B'
    AND pbv1.version_type = pbv.version_type)
    --AND version_type = 'COST'
    AND pbl.budget_version_id = pbv.budget_version_id
    AND pbl.resource_assignment_id = pra.resource_assignment_id
    AND pra.resource_list_member_id = prlm.resource_list_member_id
    AND pt.task_id(+) = pra.task_id
    and pp.name = 'TEST_XX'
    order by pp.segment1, pbl.period_name, pt.task_number, pbl.start_date

    Can any body please help on this note..
    thanks in advance..

  • How to cancel a Move Order line using API

    Hi
    I have a requirement, where I have to cancel Move order lines.
    At times, multiple Move order lines are getting created for the same Sales order line.
    Even after the Sales Order line is shipped and closed, the move order line is still open and it also has a corresponding pending transaction in mtl_material_transactions_temp table.
    I came across INV_MOVE_ORDER_PUB.process move order line API.
    how do I use it to cancel the move order line. Any sample codes would be highly welcome.
    Thanks

    Finally, found an alternate solution.
    used the following code.
    ===================================
    SET serveroutput on size 1000000
    DECLARE
    l_return_status VARCHAR2(100);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    l_msg_index NUMBER;
    l_user_id NUMBER;
    l_resp_id NUMBER;
    l_appl_id NUMBER;
    l_org_id NUMBER := &org_id;
    l_move_order_line_id NUMBER := &mo_line_id ;
    BEGIN
    SELECT user_id
    INTO l_user_id
    FROM fnd_user
    WHERE user_name = 'PRAWILNSON';
    SELECT responsibility_id
    ,application_id
    INTO l_resp_id
    ,l_appl_id
    FROM fnd_responsibility_vl
    WHERE responsibility_name = 'Order Management Super User';
    FND_GLOBAL.apps_initialize (l_user_id, l_resp_id, l_appl_id);
    MO_GLOBAL.set_policy_context ('S', l_org_id);
    MO_GLOBAL.init;
    DBMS_OUTPUT.put_line ('Calling INV_MO_BACKORDER_PVT to Backorder MO');
    DBMS_OUTPUT.put_line ('===============================');
    inv_mo_backorder_pvt.backorder (p_line_id => l_move_order_line_id
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data);
    DBMS_OUTPUT.put_line ('Return Status is : '|| l_return_status);
    -- Check Return Status
    IF l_return_status = fnd_api.g_ret_sts_success THEN
    DBMS_OUTPUT.put_line ('Successfully BackOrdered the Move Order Line');
    COMMIT;
    ELSE
    DBMS_OUTPUT.put_line ('Could not able to Back Order Line Due to Following Reasons' );
    ROLLBACK;
    FOR j IN 1 .. l_msg_count LOOP
    FND_MSG_PUB.get(p_msg_index => j
    ,p_encoded => fnd_api.g_false
    ,p_data => l_msg_data
    ,p_msg_index_out => l_msg_index);
    DBMS_OUTPUT.put_line ('Error Message is : '|| l_msg_data);
    END LOOP;
    END IF;
    END;
    /

  • How to get crawler destination folder path through api

    with following code i am getting crawler folder source path
    com.plumtree.openfoundation.util.IXPPropertyBag propertyBag = oPTCrawler.GetStartLocation();
                   String oldFolder = propertyBag.ReadAsString("PTC_UNIQUE");
    how to get the destination folder path ?
    any help appreciated

    i would like to get the values from PT_TAX_DESTFOLDERS
    <A N="PT_TAX_DESTFOLDERS"><I N="DIMS">1</I><I N="MAX0">0</I><I N="0">1324</I></A>
    1324 being the folder id
    when trying
    com.plumtree.openfoundation.util.IXPPropertyBag propertyBag = oPTCrawler.GetStartLocation();
                   Object[][] propertyBags = (Object[][])propertyBag.ReadAsObject1DArray("PT_TAX_DESTFOLDERS");
    i am getting null

  • How to clear cache for a tab through api

    How do i clear cache for a tab programatically?

    All this info applies to
    Portal version 9.0.2.6.18
    I found that there is portlet called "clear cache",
    under provider portal tools. This when placed on a tab can clear the cache of that tab for a user.
    I found this as a work around for the API.
    Harish

  • How to load aliases to Dimension

    Hi,
    I have a Dimension Hierarchy like this,
    Account_Dim     (Dimension)
             -------> product1 (Member)
             -------> Product2 (Member)
    I am able to load aliases for members(product1 & product2) through HspOutlineLoad.sh with csv file. But don not  know how to do the same for Dimension Name (Account_Dim).
    HspOutlineLoad with " /D " switch seems to be loading only member properties. Please help how to load aliases to Dimension name through HspOutlineLoad. Sample format of csv/or whatever would be of great help.
    Thanks
    Mamatha

    You'll have to create 3 alias tables to hold 3 aliases. You cannot have 3 aliases for a dimension with 1 alias table.
    After adding you can then load (your header will look like something similar)
    Account,Parent,Alias: Default,Alias: French,Alias: German,Alias: Italian,Data Storage,Source Plan Type,Plan Type (Plan1),Aggregation (Plan1),Plan Type (Plan2),Aggregation (Plan2),Plan Type (Plan3),Aggregation (Plan3),Plan Type (Wrkforce),Aggregation (Wrkforce),Plan Type (Capex),Aggregation (Capex)
    Regards
    Celvin
    http://www.orahyplabs.com

  • Inserting lines through words (Strikethrough?)

    How do you insert a horizontal line through a word?  I remember once finding a way, but I've forgotten how I did it. I have been seeing soliutions using Word or other word processing programs, but it seems to me that the solution I found was much simplier and easier to use, like using FORMAT. I'm not interested in short-cut methods using keyboard combinations`. I never use them because I find that they're impossible to remember.

    And for those of you wanting to put a red line through black text in HTML, here is the result. If you try this in the Apple Support Community, it will get set to black strike.
    <!DOCTYPE html>
    <head>
              <meta charset="utf-8">
              <title>Red Strike-through Example</title>
    </head>
    <body>
    <p>This is a simple test of <strike style="color:red;"><span style="color:black;">line-through</span></strike> in a word using a black span nested inside a red strike.</p>
    <p>And, this is another <span style="color:red;text-decoration:line-through"><span style="color:black">line-through</span></span> example using a black span nested within a red, line-through span.</p>
    </body>
    </html>

  • How to allocate material to delivery line

    Hi
    I need To allocate material to delivery line Through API . Is there Any API to allocate Material .
    As requirement AUTO ALLOCATE is false and auto pick confirm is also false.I have to allocate material using Backend and then to confirm.
    Thanks
    Jitender

    Hi
    For theoritical point of view
    [Task List|http://help.sap.com/saphelp_erp60_sp/helpdata/en/c0/04d5454ebb11d189110000e8322f96/frameset.htm]
    For scenarios
    [plant Maintenance|http://help.sap.com/saphelp_46c/helpdata/en/fe/67ec5c9d6f11d189b60000e829fbbd/frameset.htm]
    - Pithan

  • How to get the list of deployed projects in OSB through commond line

    How to get the list of deployed projects in OSB through commond line; as we are able to get in weblogic.

    You can go with standard JMX API using WLST
    http://www.oracle.com/technology/sample_code/products/osb/index.html
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15033/index.html
    or you can try a little bit tricky way like
    ls $DOMAIN_HOME/osb/config/core/ | grep -v ^_:-)

Maybe you are looking for

  • Problems trying to load a full version of office home and student 2010

    I am trying to load office 2010 but it will not load, It just keeps saying its a trial version. I rang microsoft and they told me I have to un install the trial version installed on my touchsmart 310-1025a. Apparently it is put on there at manufactur

  • Error trying to import raw files from NIKON to Lightroom

    I am an amateur photographer. I just purchased a brand new NIKON D3300 took a few pictures, signed up for the Adobe annual Photographers Creative Cloud annual program and my first task to have Lightroom import a few test photos fails and I have no cl

  • Creating the dvd with 9-06 files.

    Hi, I have just downloaded the 5 parts for the 9-06 x86 dvd. After applying this command: cat sol-nv-b46-x86-dvd-iso-a.zip sol-nv-b46-x86-dvd-iso-b.zip sol-nv-b46-x86-dvd-iso-c.zip sol-nv-b46-x86-dvd-iso-d.zip sol-nv-b46-x86-dvd-iso-e.zip > Solaris-9

  • How do I reattach a key that has come off?

    I noticed one of my keys was sitting weird and I accidentally pulled it off and now cannot figure out how to put it back on. I have a macbook pro new bought in 2013 thanks

  • Temporary Queue BMQ size limit?

    Hi, is there a size limit for tha temporary queue on BEA Message queue? To explain better the ones managed by BMQ itself, not the permanent ones configured in the init files. I ask this since I have this kinf of transaction on my application: client