PA_ALLOC_TARGET_LINES_PKG API to populate target.

Can someone help me,
My requirement is to populate Rule target line using API. targets are getting papulated using API but after population , Generate Allocation concurrent program error out.
below is the steps.
Same data if i am uploading using dataloader it's working fine. and PRC: Generate Allocations Transactions Concurrent program did not return any error. i tried the option of calling it through concurrent program but all in vain.
Reproduction steps.
1-     Populate PA_ALLOC_TARGET_LINES using PA_ALLOC_TARGET_LINES_PKG API
2-     Execute PRC: Generate Allocations Transactions Concurrent program
3-     Check the output. It is erroring. (error msg : 1-PA_AL_NO_BASIS_FOUND ,2-PA_AL_NO_TARGET_DETAILS , 3- PA_AL_LINE_PRCNT_NOT_100, 4-PA_AL_ALL_TASKS_RECD_ZERO_AMT)
Script
DECLARE
lv_line_num number;
x_rowid varchar2(1000);
lv_h_rno number;
lv_tmp_sum number;
lv_rule_id number;
lv_project_id number;
lv_task_id number;
l_LINE_PERCENT NUMBER;
BEGIN
fnd_global.apps_initialize(10882,52041,275);
FOR CUR IN (SELECT *
FROM xxfin.xxpa_pa_debug_cost_allc
WHERE ORG_ID=1502
AND PAYROLL_ID=73
AND to_char(PAYROLL_EFFECTIVEDATE,'Mon-YY')='Nov-12'
AND INCLUdE='Y'
AND GL_COMPANY='0701'
AND PTD_BALANCE <> 0
AND rule_id in (404))
LOOP
SELECT NVL(MAX(LINE_NUM),0)+1
INTO LV_LINE_NUM
FROM PA_ALLOC_TARGET_LINES
WHERE RULE_ID=CUR.RULE_ID;
IF cur.task_id is not null
and cur.prj_id is not null
and cur.rule_id is not null THEN
lv_rule_id := cur.rule_id;
lv_project_id:=cur.prj_id;
lv_task_id:=cur.task_id;
lv_tmp_sum := nvl(lv_tmp_sum,0) + ROUND((cur.percentage * 100),5) ;
l_LINE_PERCENT := ROUND((cur.percentage * 100),5);
DBMS_OUTPUT.put_line('lv_Line_num--->Line Value:::->'||lv_Line_num||'--->'||l_LINE_PERCENT);
PA_ALLOC_TARGET_LINES_PKG.INSERT_ROW (
X_ROWID => X_ROWID,
X_RULE_ID => cur.rule_id,
X_LINE_NUM => lv_Line_num,
X_PROJECT_ORG_ID => 1502, --ORG ID
X_TASK_ORG_ID => NULL, --ORG ID
X_PROJECT_TYPE => NULL,
X_CLASS_CATEGORY => NULL,
X_CLASS_CODE => NULL,
X_SERVICE_TYPE => NULL,
X_PROJECT_ID => cur.prj_id,
X_TASK_ID => cur.task_id,
X_EXCLUDE_FLAG => 'N',
X_BILLABLE_ONLY_FLAG => 'N',
X_LINE_PERCENT => l_LINE_PERCENT,
X_CREATED_BY => 10882,
X_CREATION_DATE => SYSDATE,
X_LAST_UPDATE_DATE => SYSDATE,
X_LAST_UPDATED_BY => 10882,
X_LAST_UPDATE_LOGIN => 10882
commit;
ELSE
dbms_output.put_line('Project ID/Task ID/Rule ID these can not be null....!');
END IF;
END LOOP;
DBMS_OUTPUT.put_line('Total Value:::->'||lv_tmp_sum);
------To make it 100%
SELECT MAX(LINE_NUM)
INTO LV_LINE_NUM
FROM PA_ALLOC_TARGET_LINES
WHERE RULE_ID=lv_rule_id;
lv_tmp_sum:=(100 - lv_tmp_sum);
DBMS_OUTPUT.put_line('Total l_LINE_PERCENT:::->'||l_LINE_PERCENT||'Line lv_tmp_sum'||lv_tmp_sum);
update PA_ALLOC_TARGET_LINES set LINE_PERCENT= (l_LINE_PERCENT + lv_tmp_sum)
where rule_id=lv_rule_id
and line_num=LV_LINE_NUM;
commit;
lv_tmp_sum:=(100 - lv_tmp_sum);
dbms_output.put_line('Babu .... '|| lv_tmp_sum);
--- Status updating
BEGIN
update xxfin.xxpa_alloc_header
set status='INTERFACED'
WHERE h_rno=lv_h_rno;
END;
EXCEPTION WHEN OTHERS THEN NULL;
END;

Hi Cuauhtemoc Amox,
thanks for your response ,but in the case of tasks we have  "p_tasks_in"  parameter  i am  wondering if  there is  such a parameter in the api   used to populate  the budgetary control details  i.e budget type,balance type,non-project budget etc

Similar Messages

  • API to populate default benefits in OAB

    Hi All,
    We have configured OAB in a way that the benefits also include the Employer portion automatically when an employee is enrolled for a benefit. For example, if employee is enrolled for Medical Employee only benefit, the entry for Employer Match will also be added in the benefits. When I am doing it manually in the form, it works fine but when I use API to convert the benefits, it takes only I get in datafile and pass it to the API. Is there any way I can populate all default enrollments for an employee? Or I need to derive the default benefits based on what is entered and need to run API against it?
    Appreciate your reply.
    Thanks,
    CAH

    Hi Gaurav,
    Thanks for your reply.
    No we did not create a plan for employer contribution. It is an option in the same plan which will be added to the benefits when Employee election is entered. For example, for Employee Medical, the plan name is "Standard Plan" and option is "Employee Only" or "Employee + 1" or "Employee + 2 or more". When any of these option is added, a respective options for Employer Match will be added to employee benefits. The employer Match options are "Employer EE only", "Employer EE + 1" and "Employer EE + 2 or more". And it works the same way for other Medical, Dental and Vision plans.
    How do we program Default Enrollment Process(Which API and parameters should be used)?
    Hope this makes things more clear. Please let me know if you want more clarification on a particular matter.
    Thanks,
    CAH

  • How to populate target directory from the source XML in Receiver File Adap?

    Hi All,
    Our scenario is IDoc - XI -(Receiver File adapter) File. Is it possible to populate complete "Target Directory" from the source XML message??
    Lets say we added field to maintain target directory in Idoc structure and some how populated value to it, then grab this target directory from the IDoc-XML and pass in Comunication Channel. I think its possible through Variable Substitation ...just want to make sure and if sombody has done the similar scenario their inputs would be great.
    Thanx
    Navin

    Hi,
    Please see the belowlinks
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios
    Re: Dynamic  File Name for Receiver File Adapter
    Variable Substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    try with adapter specific
    Example code...
    String newfilename="";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // Get Sourcefilename
    String oldfilename=conf.get(key);
    //extract first 3 chars of source filename
    newfilename=oldfilename.substring(0,2);
    //get the date
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    dateformat.format( new java.util.Date() );
    //append sourcedateL
    newfilename=newfilenamedateformat"L";
    // determine if prod/ dev / qa
    map = container.getTransformationParameters();
    senderService = (String) map.get("SenderService");
    if(senderServcie.equald("Prod"){
    newfilename=newfilename+"P";
    // change to new file name
    conf.put(key, newfilename+".tmp");
    Change it according to your requirement
    Regards
    Chilla..

  • Populate target table with default value

    I have a query like this:
    SELECT 0 AS ID,
    9999999999 AS CODE
    FROM DUAL
    UNION ALL
    SELECT VEH.TP_ID AS ID,
    VEH.VEH_ID AS CODE
    FROM TB_VEHICLE;
    So I have an interface with two data sets, one for each query.
    The first data set represents the "select from dual" "constant values" and the second represents the "select * from tb_vehicle".
    In the first data set I don´t have a source, then ODI generates a select without a table "select 0 AS ID, 99999 AS CODE FROM".
    Any ideas on how can I achieve my objective? I need to populate one row on target table with constant values.
    Thanks

    Alternatively , try this :
    Duplicate the LKM and IKM you are using, create copies , something like LKM xyz (No Source) , IKM xyz (No Source).
    Then adust the KM steps accordingly, remove the 'FROM' part and replace with VALUES ( ) , keeping the odiref substitution call in the parenthesis.
    So you basically have a knowlede module that accepts no source data, generating :
    insert into C$
    (col 1, col 2, col 3 etc)
    VALUES
    (Target mapping 1, target mapping 2, target mapping 3 etc)
    I've seen it done, nice and tidy, keeps all the lineage in ODI etc.

  • HOW populate target table if one of the column in target has sequence on it

    Hi,
    I am trying to insert rows in oracle target, on oracle table column is LIST_ID(PK) has sequence on it.
    I am not mapping the LIST_ID(target) from source but it seeing an error invalid identifier.
    How to solve this

    at 14 step giving that invalid identifier as LIST_ID which is PK column in target column
    how to slove to this

  • How to use CrossReference and DVM in ODI &how to populate data into Xref

    Can any one tell how to use Domain Value Maps and Cross Referencing in ODI?
    DVM or Domain Value Map are created and used in ESB console of SOA suite.
    My actual requirement is as follows:
    The below steps describe loading data from ERP Application 1 to ERP Application 2.
    1. The Source Application ERP APP1, populates the interface table using their native technology.
    2. A job scheduler invokes the Source side ODI Package.
    3. ODI then extracts the data from Source Interface table and populates the Target Interface table.
    4. After populating the Target interface table the ODI populates the X-ref table with App 1 ID and generated common ID.
    5. The ODI either deletes or updates the rows that were processed from the Source interface table.
    6. On the Target Application ERP APP2, the native application extracts data from target interface table and populates target database there by generating ERP Application 2 ID.
    7. A job scheduler on the Target application invokes the ODI package to populate the Application 2 ID onto the Xref table matching on the Common ID.
    I just want to know :
    1. How to populate data into the Xref table from Source datastore
    2. And if data is successfully laoded from target datastore to actual base table of target then how to populate the target id into the cross reference table.

    can anyone suggest me some answer, then it would be of great help?

  • File Adapter: Target directory does not exist

    Hi All,
    Using RFC to File Scenario.
    While processing in File adapter, i get following error for the target directory.
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Target directory '
    *********************\Out' does not exist and cannot be created.
    Although I am able to use the same target directory on my local machine.

    I think FTP user didnt have suffiecinet otherrization to create directory in FTP, check once again Directory format entered is correct.
    if you have phycial access to FTP then create one folder and enter the same in File channel and push one message and let us know the result.
    Regards,
    Raj

  • Wb_rt_api_exec in pl/sql as OWB target

    I've got a question similar to the one posted by Donna Kelley on 26-mar-2007 (
    Re: 10gR2: How do you run OWB from Enterprise Manager (OEM) and Scheduler?
    I'm unable to figure out the grants needed to execute wb_rt_api_exec.run_task within a pl/sql procedure when the procedure is being run by the OWB target user.
    We just upgraded OWB in devo from 10.1.0.4 to 10.2.0.1.31. In the earlier version, there was no problem with the target user executing wb_rt_api_exec (although we used open, execute, close instead of run_task). The runtime repository owner granted execute on wb_rt_api_exec to the target schema. And then the 2 roles wb_r_owbruntime and wb_u_owbruntime were also granted to target. That's all it required.
    In the new version, I can execute wb_rt_api_exec only as the design repository owner. I've granted the target user execute on wb_rt_api_exec. Also granted the 2 roles owb_d_owbowner and owb_o_owbowner roles to the target user (see sqlplus_exec_template.sql). But within a pl/sql procedure with the procedure run as the target user, the return code is 3 (failure). I can also not run sqlplus_exec_template as the target user. But I can run it successfully as the design repository owner.
    This seems strange. We're running ETL mappings to populate target tables. It should be easy to run the pl/sql procedure as the target user. I don't want to run it as the repository owner because that would involve a bunch of grants on target tables. Seems silly.
    I'd welcome any thoughts and advice.
    Many thanks.
    Gary

    First, David, thanks very much for your help. Based on your example, what I'm trying to do should work.
    Below is a very simplified example that demonstrates the problem. Note that executing the procedure as the target user produces an error (ie, the return value is 3) while executing it as the design repository owner succeeds.
    Comments and advice are welcomed from all. I very well could be missing something obvious. Thanks to all.
    devo> @who
    OWBTARGET
    devo> start t1
    devo> create procedure t1 authid current_user as
    2      sql_stmt varchar2(50) := 'set role owb_d_owbdesign, owb_o_owbdesign';
    3 begin
    4      execute immediate sql_stmt;
    5      dbms_output.put_line(to_char(owbdesign.wb_rt_api_exec.run_task(
    6      'RPTDEVO_LOC', 'PLSQLMAP', 'TERM_TO_DMS_CURR', ',', ',', 0, 0)));
    7 end;
    8 /
    Procedure created.
    devo> grant execute on t1 to owbdesign;
    Grant succeeded.
    devo> exec t1
    Stage 1: Decoding Parameters
    | location_name=RPTDEVO_LOC
    | task_type=PLSQLMAP
    | task_name=TERM_TO_DMS_CURR
    Stage 2: Opening Task
    | l_audit_execution_id=5390
    Stage 3: Overriding Parameters
    Stage 4: Executing Task
    | l_audit_result=3 (FAILURE)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=3
    3
    PL/SQL procedure successfully completed.
    devo> @check_role_privs owbtarget
    devo> select grantee "grantee",
    2      granted_role "role",
    3      admin_option "option"
    4 from dba_role_privs
    5 where grantee = upper('&1')
    6 order by 2
    7 ;
    admin
    grantee role option
    OWBTARGET AQ_USER_ROLE NO
    CONNECT NO
    OLAP_USER NO
    OWBR_OWBDESIGN NO
    OWB_D_OWBDESIGN NO
    OWB_OWBDESIGN NO
    OWB_O_OWBDESIGN NO
    RESOURCE NO
    SELECT_CATALOG_ROLE NO
    9 rows selected.
    devo> connect owbdesign
    Connected.
    devo> @who
    OWBDESIGN
    devo> exec owbtarget.t1
    Stage 1: Decoding Parameters
    | location_name=RPTDEVO_LOC
    | task_type=PLSQLMAP
    | task_name=TERM_TO_DMS_CURR
    Stage 2: Opening Task
    | l_audit_execution_id=5400
    Stage 3: Overriding Parameters
    Stage 4: Executing Task
    | l_audit_result=1 (SUCCESS)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=1
    1
    PL/SQL procedure successfully completed.

  • How to populate LOV of one prompt based on other prompts w/o cascade

    Hello All,
    Scenario- There are three prompts in my report.
    Source_Prompt1, Source_Prompt2 and Target_Prompt.
    There is no direct reletion between Source_Prompt1 and Source_Prompt2.
    And user wants Target_Prompt data on selection of these source_prompts.
    Is there any way to populate target prompt on selection of source prompt.
    Note- This can be implemented by applying cascading between all three prompts fields.
    However user dosent want Cascading between source prompts.?
    is there any other method except cascading prompt to populate LOV of one prompt based on selection of other prompt values?
    Your insights are most welcome.
    Amit

    I believe the only way to populate LOVs is directly from a database. E.g.; you can not populate it "manually". In your case, you may have to create your own prompt forms and use those.
    - Ludek

  • How to delete Duplicate records from the informatica target using mapping?

    Hi, I have a scenario like below: In my mapping I have a source, which may containg unique records or duplicate records. Source and target are different tables. I have a target in my mapping which contains duplicate records. Using Mapping I have to delete the duplicate records in the target table. Target table does not contain any surrogate key. We can use target table as a look up table, but target table cannot be used as source in the mapping. We cannot use post SQL.

    Hi All, I have multiple flat files which i need to load in a single table.I did that using indirect option at session level.But need to dig out on how to populate substring of header in name column in target table. i have two columns Id and Name. in all input file I have only one column 'id' with header like H|ABCD|Date. I need to populate target like below example. File 1                                    File2     H|ABCD|Date.                      H|EFGH|Date.1                                            42                                            5  3                                            6 Target tale: Id    Name1     ABCD2     ABCD3     ABCD4     EFGH5     EFGH6     EFGH can anyone help on what should be the logic to get this data in a table in informatica.

  • A mutilple sources to multiple targets integration interface

    I need to populate multiple target tables based on multiple source tables. Is there a way to do it using ODI?
    Many thanks,
    Irina

    Tables on the target side are related through a foreign key. So I need to populate target table 1 with interface 1, then populate table 2 with interface 2 using both tables on the source side and a newly populated table 1, right?

  • Populate TargetAddress from Mail attribute

    Hi,
    I have a management agent pulling AD information from a domain without Exchange, and I want to populate Target Address using the Mail attribute by putting SMTP:[email protected] infront of it.
    I've found this article, but having not done any dev work before I'm a bit lost.
    https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.metadirectoryservices.imasynchronization.mapattributesforimport(v=vs.100).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2
    Something like cd.user:("SMTP:"mail)->mv.person:targetAddress
    Can anyone point me the in right direction to write a custom expression to do this?
    Thanks,
    James

    Hello,
    ok thought you use portal as you ask for a "custom expression".
    So so generating the MA rules extension project and create the advanced flow in mA see the following links:
    http://www.wapshere.com/missmiis/advanced-attribute-flow-rules
    https://technet.microsoft.com/en-us/library/cc720667%28v=ws.10%29.aspx
    The flowrulename you set in the MA on the advanced attribute flow will be used in the code to point to the correct code part, I like to use friendly names here like: export_targetAddress.
    you code in the MapAttributesForExport Method goes like this then:
    Case "export_targetAddress"
    If mventry("mail").IsPresent Then
    csentry("targetAddress").Value = "SMTP:" & mventry("mail").Value
    Else
    csentry("targetAddress").Delete()
    End If
    Regards
    Peter
    Peter Stapf - ExpertCircle GmbH - My blog:
    JustIDM.wordpress.com

  • Oracle Advanced Pricing and Order Import API

    Dear All,
    We have an Interface which is used to create customer orders in booked state using Order Import Api, we populate the OE_HEADERS_IFACE_ALL and OE_LINES_IFACE_ALL Interface tables and then run the order import concurrent program.
    We have a requirement as follows, We are servicing 15 different customers sharing the same price list which defaults based on Customer Ship To. We want to offer a discount (X% on entire price list) to only 5 of these customers.
    How can we achieve this ? Could we create a Modifier to achieve this? What would be the Qualifier setup in this case.
    Thanks,
    Kishore

    Dear Nat,
    Thanks for your reply. Is there a method where we in we can define a modifier(Promotion Discount Modifier) and invoke it based on a promotion code which could be part of the input file.Therefore the qualifier for the modifier to be applied to an order line would be a promotion code which is in the order line. This was a suggestion i received, please could you let me know if this too can be achieved.
    Thanks,
    Kishore

  • Need the API Name for OPM tables

    Hi,
    I need the public / private API to populate data into the following Tables.
    Table Name :
    QC_SPEC_MST
    QC_SMPL_MST
    QC_RSLT_MST
    I didnt get any reference from Metalink.
    Can anyone help us to identify the API or any workaround to solve this ?
    Thanks & Regards,
    Anik Datta

    Hi Anik;
    All APIs are listed in Oracle Integration Repository
    http://irep.oracle.com/index.html
    API User Notes - HTML Format [ID 236937.1]
    R12.0.[3-4] : Oracle Install Base Api / Open Interface Setup Test [ID 427566.1]
    Oracle Trading Community Architecture API User Notes, June 2003 [ID 241320.1]
    Technical Uses of Customer Interface and TCA-API [ID 269121.1]
    Pelase also check below:
    Api's in EBS
    Re: Api's in EBS
    http://sairamgoudmalla.blogspot.com/2009/05/script-to-find-oracle-apis-for-any.html
    API
    Fixed Asset API
    List of API
    Re: List of APIs
    Oracle Common Application Components API Reference Guide
    download.oracle.com/docs/cd/B25284_01/current/acrobat/jta115api.pdf
    List of APIs and open interface R12
    Re: List of APIs and open interface R12
    Regard
    Helios

  • Populate flat file header substring in table

    Hi All, I have multiple flat files which i need to load in a single table.I did that using indirect option at session level.But need to dig out on how to populate substring of header in name column in target table. i have two columns Id and Name. in all input file I have only one column 'id' with header like H|ABCD|Date. I need to populate target like below example. File 1                                    File2     H|ABCD|Date.                      H|EFGH|Date.1                                            42                                            5  3                                            6 Target tale: Id    Name1     ABCD2     ABCD3     ABCD4     EFGH5     EFGH6     EFGH can anyone help on what should be the logic to get this data in a table in informatica.

    Hi All, I have multiple flat files which i need to load in a single table.I did that using indirect option at session level.But need to dig out on how to populate substring of header in name column in target table. i have two columns Id and Name. in all input file I have only one column 'id' with header like H|ABCD|Date. I need to populate target like below example. File 1                                    File2     H|ABCD|Date.                      H|EFGH|Date.1                                            42                                            5  3                                            6 Target tale: Id    Name1     ABCD2     ABCD3     ABCD4     EFGH5     EFGH6     EFGH can anyone help on what should be the logic to get this data in a table in informatica.

Maybe you are looking for

  • Excise number range

    Hi All, I have scenario where Sold to party, bill to party, payer is U.S.A. customer but the ship to party is India. While creating excise invoice (J1IIN) the system is taking the Official excise number ranges of Export transaction where as it should

  • Buying a refurbished mac.

    I'm going to start with an apology if this is in the wrong place, I'm new to the forums and just finding my way about. Please feel free to shout at me or move this post to a more suitable place. Anyhow, hi there everybody, I'm a (shudder) PC user at

  • B1 with SQL Server 2008 and SEC with SQL Server 2005

    Hi, we are currently upgrading from B1 2005 to B1 2007. With B1 2007 we could use MS SQL Server 2008. In parallel we have a SEC implementation (which uses SQL Server 2005). Would there be any issues with the integration of B1 and SEC although they ru

  • Can't update to 2.1    (Error Message -19)

    As the subject line suggests, I am havng difficulty "upgrading" to 2.1. I am running iTunes 8 on a Windows XP machine. The update process begins and successfully makes it through the "extracting software" step, but it is hanging up in the "backing up

  • Transport details during GR

    Hi all , I wanted to capture the Vehicle no ..and its relevant  details during GR , is there any functionality available within SAP  or there any work around thanks , ksr