VENDOR_NAME_ALT

HI Friends
when vendor_name_alt column in po_vendors is useful,i need to do the validation on this column.
Raghu

Hi,
This field is used if you have any alternate vendor name. I think in most of the cases it should be NULL or same as the vendor name field. Both the cases would require slightly diffenrent validation checks.
Regards.

Similar Messages

  • Rewrite query

    hi
    i have a standard oracle report query which i ve taken from the data model
    is it possible to rewrite this query without the bind variable , also the data given as output should be same when rewritten
    wht does &C_vendor_dynamic_SQL stand for
    SELECT /*+ ORDERED_PREDICATES */  DISTINCT (v.vendor_id)           C_vendor_id,
                       v.vendor_name                               C_vendor_name,
         DECODE(:SORT_BY_ALTERNATE, 'Y', UPPER(v.vendor_name_alt),
                       UPPER(v.vendor_name))      C_sort_vendor_name,
         v.segment1          C_vendor_num
    FROM    ap_invoices i, po_vendors v
    WHERE  0 < (SELECT SUM(nvl(prepay_amount_remaining,amount))
                     FROM  ap_invoice_distributions aid
                     WHERE aid.invoice_id = i.invoice_id
                     AND   aid.line_type_lookup_code IN ('ITEM','TAX')
                     AND   nvl(aid.reversal_flag,'N') <> 'Y')
    AND v.vendor_id = i.vendor_id  
    AND i.invoice_type_lookup_code =  'PREPAYMENT'
    AND       i.cancelled_date IS NULL
    &C_vendor_dynamic_SQL
    ORDER BY DECODE(:SORT_BY_ALTERNATE, 'Y', UPPER(v.vendor_name_alt), UPPER(v.vendor_name))thanking in advance
    Edited by: makdutakdu on Jun 21, 2010 10:54 AM

    hi
    thank u for the speedy response
    there is after report and before report trigger and i dont see C_vendor_dynamic_SQL in both of them from the data model i see its a placeholder type column with no pl/sql formula specified
    this is the code for before report trigger
    function BeforeReport return boolean is
    begin
    /* This is the before report trigger for Oracle Payables Release 10 reports  */
    DECLARE
      init_failure    EXCEPTION; 
    BEGIN
      /* Start tracking report run time */
      :C_REPORT_START_DATE := sysdate;
      /* Init AOL - only necessary if AOL user exits are called           */
      /* If this is deleted, also delete SRWEXIT in After Report Trigger! */
      SRW.USER_EXIT('FND SRWINIT');
      IF (:p_debug_switch in ('y','Y')) THEN
         SRW.MESSAGE('1','After SRWINIT');
      END IF;
       /* get the set of books id and charge account id for this org */
      SELECT   ap.set_of_books_id, gl.chart_of_accounts_id
        INTO   :P_set_of_books_id, :P_chart_of_accounts_id
        FROM   ap_system_parameters ap, gl_sets_of_books gl
        WHERE  ap.set_of_books_id = gl.set_of_books_id;
      IF (:p_debug_switch in ('y','Y')) THEN
         SRW.MESSAGE('2','After initialize parameter p_set_of_books_id and p_charge_of_accounts_id');
      END IF;
      /* Get the organization name and SYSDATE from GL_SETS_OF_BOOKS */
      IF (get_company_name != TRUE) THEN  -- Call report level PL/SQL function
         RAISE init_failure;
      END IF;
      IF (:p_debug_switch in ('y','Y')) THEN
         SRW.MESSAGE('3','After Get_Company_Name');
      END IF;
      /* Get NLS strings for "All","Yes","No", and "No data exists..."  */
      IF (GET_NLS_STRINGS != TRUE) THEN -- Call report level PL/SQL function
         RAISE init_failure;
      END IF;
      IF (:p_debug_switch in ('y','Y')) THEN
         SRW.MESSAGE('4','After Get_NLS_Strings');
      END IF;
      /* Get code, precision, min.accountable unit,and descr. for base currency */
      IF (get_base_curr_data != TRUE) THEN   -- Call report level PL/SQL function
         RAISE init_failure;
      END IF;
      IF (:p_debug_switch in ('y','Y')) THEN
         SRW.MESSAGE('5','After Get_Base_Curr_Data');
      END IF;
      /* If you need to print cover page values, add the code to the existing */
      /* get_cover_page_values function and uncomment the call below.         */
      /* IF (get_cover_page_values != TRUE) THEN  */
      /*    RAISE init_failure;                   */
      /* END IF;                                  */
      /* IF (:p_debug_switch in ('y','Y')) THEN   */
      /*    SRW.MESSAGE('6','After Get_Cover_Page_Values'); */
      /* END IF;                                  */
      /* If this is a flex report, uncomment the following lines */
      /* IF (get_flexdata != TRUE) THEN             */
      /*    RAISE init_failure;                     */
      /* END IF;                                    */
      /* IF (:p_debug_switch in ('y','Y')) THEN     */
      /*    SRW.MESSAGE ('7', 'After Get_Flexdata');*/
      /* END IF;                                    */
      /* Add any custom code to the existing custom_init PL/SQL function and */
      /* uncomment the call to it below */
      IF(custom_init != TRUE) THEN             
        RAISE init_failure;                    
      END IF;                                   
      IF (:p_debug_switch in ('y','Y')) THEN   
        SRW.MESSAGE('7','After Custom_Init');  
      END IF;                                  
      /* If the debug switch is turned on, do an SRW.BREAK to show current */
      /* parameter and column assignments.                                 */
      IF (:p_debug_switch in ('y','Y')) THEN
         SRW.BREAK;
      END IF;
      /* If there have been no exceptions so far, RETURN(TRUE) */
      RETURN (TRUE);
    /* Exception Handler Section.  If there is an exception, abort program */
    EXCEPTION
      WHEN   OTHERS  THEN
        RAISE SRW.PROGRAM_ABORT;
    END;
      return (TRUE);
    end;this is for after report trigger
    function AfterReport return boolean is
    begin
    BEGIN
       SRW.USER_EXIT('FND SRWEXIT');
       IF (:P_DEBUG_SWITCH = 'Y') THEN
          SRW.MESSAGE('20','After SRWEXIT');
       END IF;
    EXCEPTION
    WHEN OTHERS THEN
       RAISE SRW.PROGRAM_ABORT;
    END;  return (TRUE);
    end;kindly help
    Edited by: makdutakdu on Jun 21, 2010 11:22 AM

  • Not being remove Blank space in Supplier Name

    Dear,
    Actully we have round more than 200 supplier having supplier name with space due to this client face problem especially in parameter while running reprots or sometime occur in oracle application, therefor i have developed this routine to remove space from the left & right side of suppliername, but not being update although some update get performed when package execute showig status sucessfull & error is blank as mentioned below.
    If any know about to update supplier name in Fron-End, right now we update supplier name but it's not wokrin could y please guide how can we upadate supplier name individulay so we can do it fron-end as per needed.
    DBMS_OUTPUT.PUT_LINE(' STATUS '||v_return_status||' ERROR '||v_error_msg);
    STATUS S ERROR
    declare
    v_return_status varchar2(100); --OUT NOCOPY VARCHAR2,
    v_error_msg varchar2(100); --OUT NOCOPY VARCHAR2);
    begin
    for i in (
    select s.*,par.jgzz_fiscal_code,par.sic_code,par.tax_reference,par.tax_name From ap_suppliers s,hz_parties par
    where ltrim(rtrim(s.vendor_name)) <> s.vendor_name
    and s.vendor_name = par.party_name
    and created_by_module = 'AP_SUPPLIERS_API'
    and vendor_name = 'ABC ' ) loop
    v_return_status := null;
    v_error_msg := null;
    POS_VENDOR_PUB_PKG.Update_Vendor
    p_vendor_id => i.vendor_id ,
    p_segment1 => i.segment1 ,
    p_vendor_name => ltrim(rtrim(i.vendor_name)),
    p_vendor_name_alt => i.vendor_name_alt ,
    p_summary_flag => i.summary_flag ,
    p_enabled_flag => i.enabled_flag ,
    p_segment2 => i.segment2 ,
    p_segment3 => i.segment3 ,
    p_segment4 => i.segment4 ,
    p_segment5 => i.segment5 ,
    p_employee_id => i.employee_id ,
    p_vendor_type_lookup_code => i.vendor_type_lookup_code ,
    p_customer_num => i.customer_num ,
    p_one_time_flag => i.one_time_flag ,
    p_parent_vendor_id => i.parent_vendor_id ,
    p_min_order_amount => i.min_order_amount ,
    p_terms_id => i.terms_id ,
    p_set_of_books_id => i.set_of_books_id ,
    p_always_take_disc_flag => i.always_take_disc_flag ,
    p_pay_date_basis_lookup_code => i.pay_date_basis_lookup_code ,
    p_pay_group_lookup_code => i.pay_group_lookup_code ,
    p_payment_priority => i.payment_priority ,
    p_invoice_currency_code => i.invoice_currency_code ,
    p_payment_currency_code => i.payment_currency_code ,
    p_invoice_amount_limit => i.invoice_amount_limit ,
    p_hold_all_payments_flag => i.hold_all_payments_flag ,
    p_hold_future_payments_flag => i.hold_future_payments_flag ,
    p_hold_reason => i.hold_reason ,
    p_type_1099 => i.type_1099 ,
    p_withhold_status_lookup_code => i.withholding_status_lookup_code ,
    p_withholding_start_date => i.withholding_start_date ,
    p_org_type_lookup_code => i.organization_type_lookup_code ,
    p_start_date_active => i.start_date_active ,
    p_end_date_active => i.end_date_active ,
    p_minority_group_lookup_code => i.minority_group_lookup_code ,
    p_women_owned_flag => i.women_owned_flag ,
    p_small_business_flag => i.small_business_flag ,
    p_hold_flag => i.hold_flag ,
    p_purchasing_hold_reason => i.purchasing_hold_reason ,
    p_hold_by => i.hold_by ,
    p_hold_date => i.hold_date ,
    p_terms_date_basis => i.terms_date_basis ,
    p_inspection_required_flag => i.inspection_required_flag ,
    p_receipt_required_flag => i.receipt_required_flag ,
    p_qty_rcv_tolerance => i.qty_rcv_tolerance ,
    p_qty_rcv_exception_code => i.qty_rcv_exception_code ,
    p_enforce_ship_to_loc_code => i.enforce_ship_to_location_code ,
    p_days_early_receipt_allowed => i.days_early_receipt_allowed ,
    p_days_late_receipt_allowed => i.days_late_receipt_allowed ,
    p_receipt_days_exception_code => i.receipt_days_exception_code ,
    p_receiving_routing_id => i.receiving_routing_id ,
    p_allow_substi_receipts_flag => i.allow_substitute_receipts_flag ,
    p_allow_unorder_receipts_flag => i.allow_unordered_receipts_flag ,
    p_hold_unmatched_invoices_flag => i.hold_unmatched_invoices_flag ,
    p_tax_verification_date => i.tax_verification_date ,
    p_name_control => i.name_control ,
    p_state_reportable_flag => i.state_reportable_flag ,
    p_federal_reportable_flag => i.federal_reportable_flag ,
    p_attribute_category => i.attribute_category ,
    p_attribute1 => i.attribute1 ,
    p_attribute2 => i.attribute2 ,
    p_attribute3 => i.attribute3 ,
    p_attribute4 => i.attribute4 ,
    p_attribute5 => i.attribute5 ,
    p_attribute6 => i.attribute6 ,
    p_attribute7 => i.attribute7 ,
    p_attribute8 => i.attribute8 ,
    p_attribute9 => i.attribute9 ,
    p_attribute10 => i.attribute10 ,
    p_attribute11 => i.attribute11 ,
    p_attribute12 => i.attribute12 ,
    p_attribute13 => i.attribute13 ,
    p_attribute14 => i.attribute14 ,
    p_attribute15 => i.attribute15 ,
    p_auto_calculate_interest_flag => i.auto_calculate_interest_flag ,
    p_validation_number => i.validation_number ,
    p_tax_reporting_name => i.tax_reporting_name ,
    p_check_digits => i.check_digits ,
    p_allow_awt_flag => i.allow_awt_flag ,
    p_awt_group_id => i.awt_group_id ,
    p_pay_awt_group_id => i.pay_awt_group_id ,
    p_awt_group_name => null ,
    p_pay_awt_group_name => NULL ,
    p_global_attribute1 => i.global_attribute1 ,
    p_global_attribute2 => i.global_attribute2 ,
    p_global_attribute3 => i.global_attribute3 ,
    p_global_attribute4 => i.global_attribute4 ,
    p_global_attribute5 => i.global_attribute5 ,
    p_global_attribute6 => i.global_attribute6 ,
    p_global_attribute7 => i.global_attribute7 ,
    p_global_attribute8 => i.global_attribute8 ,
    p_global_attribute9 => i.global_attribute9,
    p_global_attribute10 => i.global_attribute10 ,
    p_global_attribute11 => i.global_attribute11 ,
    p_global_attribute12 => i.global_attribute12 ,
    p_global_attribute13 => i.global_attribute13 ,
    p_global_attribute14 => i.global_attribute14 ,
    p_global_attribute15 => i.global_attribute15 ,
    p_global_attribute16 => i.global_attribute16 ,
    p_global_attribute17 => i.global_attribute17 ,
    p_global_attribute18 => i.global_attribute18 ,
    p_global_attribute19 => i.global_attribute19 ,
    p_global_attribute20 => i.global_attribute20 ,
    p_global_attribute_category => i.global_attribute_category ,
    p_bank_charge_bearer => i.bank_charge_bearer ,
    p_bank_branch_type => i.bank_branch_type,
    p_match_option => i.match_option ,
    p_create_debit_memo_flag => i.create_debit_memo_flag ,
    p_party_id => 2085 ,
    p_parent_party_id => i.parent_party_id ,
    p_jgzz_fiscal_code => i.jgzz_fiscal_code,
    p_sic_code => i.sic_code ,
    p_tax_reference => i.tax_reference,
    p_inventory_organization_id => NULL ,
    p_terms_name => NULL ,
    p_default_terms_id => NULL ,
    p_ni_number => NULL ,
    p_last_update_date => NULL ,
    x_return_status => v_return_status,
    x_error_msg => v_error_msg
    DBMS_OUTPUT.PUT_LINE(' STATU S '||v_return_status||' ERROR '||v_error_msg);
    end loop;
    end;
    Edited by: oracle0282 on Dec 24, 2011 3:36 AM
    Edited by: oracle0282 on Dec 25, 2011 9:51 PM

    Just a thought..
    How about creating a new supplier and then opt for Supplier Merge?
    Using supplier merge you may transfer all the open PO's and invoices of the old supplier to the new
    supplier. By using the supplier merge, the old supplier would be end date automatically by the
    system.
    P.S. I am NOT sure whether there exist a datafix to edit the supplier name.
    Regards,
    Srini

  • How to Create VO in CO's PR()

    Hi All,
    I am trying to create a VO in Co's PR().
    Following are the steps I need to do.
    I need to create New VO in CO's PR().
    I need to give sql query to that VO with where condition.
    Now on that page where CO is based there is a table region where there are 8 columns from which last one is for delete..it contains delete icon only...
    That table may have 1 row or more than one row...
    Now my task is put the values into this table through newly created VO whose query is same as previous query but there is little where condition changed...
    For this I have written code processRequest:
    OAApplicationModule oaapplicationmodule = pageContext.getApplicationModule(webBean);
            OADBTransaction dbTransaction=oaapplicationmodule.getOADBTransaction();
            OAViewDefImpl vd = (OAViewDefImpl)dbTransaction.createViewDef();
            vd.setExpertMode(true);
            String sqlyQuery = "select Line_NUM,Item_description,justification,unit_meas_lookup_code,quantity,unit_price,base_unit_price from PO_REQUISITION_LINES_ALL PoRequisitionLineEO WHERE PoRequisitionLineEO.REQUISITION_HEADER_ID = i ORDER BY PoRequisitionLineEO.LINE_NUM ASC";
            vd.setQuery(sqlyQuery);
           // OAViewObject vo = (OAViewObject)oaapplicationmodule.createViewObject("TableVO1", (OAViewDef)vd);
            OAViewObject vo = (OAViewObject)pageContext.getApplicationModule(webBean).createViewObject("ViewObjectName", vd);
    till that I have written this..but at this stage when I rebuild CO then I am getting error:   Error(31,83): method createViewObject(java.lang.String, oracle.apps.fnd.framework.server.OAViewDefImpl) not found in interface oracle.apps.fnd.framework.OAApplicationModule
    Plz help me to resolve this error as well as to complete this task also...
    Thanks...

    You can create a custom VO like this:
    Import the following in the Controller:
    import oracle.jbo.ViewObject;
    import oracle.apps.fnd.framework.server.OAViewDef;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    In the Process Request
                 //Create the sql
                 String sql ="select 1 from ap_suppliers \n" +
                 "where vendor_name_alt is not null \n" +
                 "and vendor_name_alt= :1";
                  ViewObject altVendorVO;
                  //Get the AM. Here
                  OAApplicationModuleImpl testAM= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
                 //Create the View Definition
                 OAViewDef viewDef  = suppAM.getOADBTransaction().createViewDef();
                 viewDef.setSql(sql);
                 viewDef.setExpertMode(true);
                 viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
                 viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
                 //Now since the View Definition is ready, we create the View Object
                 altVendorVO = testAM.createViewObject("ValAltVendorsVO",viewDef);
    The problem in your case is datatype of viewDefinition which should be OAViewDef and not OAViewDefImpl.
    Hope the information and the code snippet above helps.
    Regards
    Sumit

  • Vendor's DFF in R12

    Dear all,
    Just upgrade to R12.1.3 and would like to add one DFF in Vendor level. I have tried to add one DFF in Vendor and re-complie in error something like below.
    The descriptive flexfield "Vendors" of application "Purchasing" uses features which are only supported in Oracle Forms. This flexfield may not function in other environments such as OA Framework or PL/SQL APIs.
    The number of warning messages: 1.
    The segment "Account Holder" of context "517" has a default value that uses BLOCK.FIELD reference "VNDR.VENDOR_NAME_ALT".
    BLOCK.FIELD references are only supported in Oracle Forms.
    Can anyone tell me what's wrong?
    Please advice.

    Hi
    You are receiving the error because you have referenced another bock in the default value of the DFF. Supplier in R12 are in OAF pages which does not support these types of references. These are supported only for forms (as the error correctly suggested). This would have worked correctly in 11i where the suppliers were managed in Forms.
    Hope this helps.
    Thanks
    Vinit

  • Invalid aruments in decode when running report

    Hi,
    I have a decode statement in my sql.
    I can close the data model and compile the program - no errors
    However, when I run the report, I get invalid number of arguments for the decode.
    I have copied the same code from a working report with the same unfortunate result.
    Help !

    SELECT v.vendor_name C_VENDOR_NAME,
           v.segment1 C_VENDOR_NUMBER,
           decode(upper(:P_SORT_OPTION),'VENDOR NAME',decode(:C_VENDOR_NAME_SELECT,'%',upper(v.vendor_name),v.vendor_name),i.invoice_type_lookup_code) C_PRIMARY_BRK,
           decode(upper(:P_SORT_OPTION),'VENDOR NAME',decode(:C_VENDOR_NAME_SELECT,'%', decode(:SORT_BY_ALTERNATE, 'Y', upper(v.vendor_name_alt), upper(v.vendor_name)), decode(:SORT_BY_ALTERNATE, 'Y', v.vendor_name_alt, v.vendor_name)),i.invoice_type_lookup_code) C_PRIMARY_BRK_REAL,
           v.vendor_name C_SHORT_VENDOR_NAME,
           v.vendor_id C_VENDOR_ID,
           i.vendor_site_id C_CONTACT_SITE_ID,
           vs.vendor_site_code C_VENDOR_SITE_CODE,
           decode(:SORT_BY_ALTERNATE, 'Y', vs.vendor_site_code_alt, vs.vendor_site_code) C_VENDOR_SITE_CODE_BRK,
           nvl(vs.state,' ') C_VENDOR_STATE,
           nvl(substr(vs.city,1,15),' ') C_VENDOR_CITY,
           ps.payment_num C_REFERENCE_NUMBER,
           i.vendor_site_id C_ADDRESS_ID,
           nvl(substr(i.invoice_type_lookup_code,1,20), ' ') C_INVOICE_TYPE,
           i.invoice_id C_PAYMENT_SCHED_ID,
           nvl(to_char(ps.due_date,'DD-MON-RR'),' ') C_DUE_DATE,
           /* Bug: 1549982 */
           /* Bug 2083419 For foreign currencies, show amounts in functional currency */
           decode(i.invoice_currency_code,:C_BASE_CURRENCY_CODE,decode(:C_BASE_MIN_ACCT_UNIT,0,round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION),round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) *:C_BASE_MIN_ACCT_UNIT), decode(i.exchange_rate,NULL,0, decode(:C_BASE_MIN_ACCT_UNIT, 0,round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT))) C_AMT_DUE_REMAINING,
           decode(i.invoice_currency_code,:C_BASE_CURRENCY_CODE, decode(:C_BASE_MIN_ACCT_UNIT,0,round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT), decode(i.exchange_rate,NULL,0, decode(:C_BASE_MIN_ACCT_UNIT, 0,round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT))) C_AMT_DUE_ORIGINAL,
           i.accts_pay_code_combination_id C_VENDOR_TRX_ID,
           i.invoice_num C_INVOICE_NUMBER,
           i.invoice_num C_INVOICE_NUM_SHORT,
           nvl(hr.org_information4,i.org_id) ORGNAME,
           to_char(i.invoice_date,'DD-MON-RR') C_INVOICE_DATE,
           ceil(to_date(to_char(SYSDATE,'DD-MON-RR')) - ps.due_date) C_DAYS_PAST_DUE,
           decode(i.invoice_currency_code, :C_BASE_CURRENCY_CODE, ' ', decode(i.exchange_rate, NULL,'*', ' ')) C_DATA_CONVERTED,
           nvl(i.exchange_rate, 1) C_EXCHANGE_RATE,
           decode(:C_VENDOR_NAME_SELECT,'%',decode(:SORT_BY_ALTERNATE, 'Y', upper(v.vendor_name_alt), upper(v.vendor_name)),decode(:SORT_BY_ALTERNATE, 'Y', v.vendor_name_alt, v.vendor_name)) C_VENDOR_NAME_BRK,
           decode(:p_seq_numbers, 'N', i.voucher_num, i.doc_sequence_value) VOUCHER_NUMBER
      FROM hr_organization_information                     hr,
           ap_payment_schedules_all                         ps, 
           po_vendor_sites_all                          vs,      
           po_vendors                               v,      
           ap_invoices_all                               i    
    WHERE i.payment_status_flag in ('N','P')
       AND i.invoice_type_lookup_code like :C_INVOICE_TYPE_SELECT
       AND i.cancelled_date IS NULL  
       AND v.vendor_id                              = i.vendor_id
       AND vs.vendor_site_id                         = i.vendor_site_id
       AND ps.invoice_id                              = i.invoice_id
       AND ((to_date(to_char(SYSDATE,'DD-MON-RR')) - ps.due_date) between :C_MINDAYS and :C_MAXDAYS)
       AND hr.organization_id                         = i.org_id
       AND hr.org_information_context                     = 'Operating Unit Information'
       AND (nvl(ps.amount_remaining, 0) * nvl(i.exchange_rate,1))      != 0
       &P_VENDOR_PREDICATE
       &P_AMOUNT_PREDICATE  
       &P_ORDER_BYTry and comment out one of the 8 original decodes to see which one or ones is the offending statement and then default that column value to something, like:
           ceil(to_date(to_char(SYSDATE,'DD-MON-RR')) - ps.due_date) C_DAYS_PAST_DUE,
           --decode(i.invoice_currency_code, :C_BASE_CURRENCY_CODE, ' ', decode(i.exchange_rate, NULL,'*', ' ')) C_DATA_CONVERTED,
           '*' C_DATA_CONVERTED
           nvl(i.exchange_rate, 1) C_EXCHANGE_RATE,
    ...Also trying supplying more details on the "4 parameters that work". What does that mean to people who do not have your data. Does the 5th one work when null? Does the 5th one only produce an error when you supply a value. What are some example values of the other 4 parameters?

  • How to create VO,VOimpl,RowImpl programtically

    Hi All,
    I have a requirement where i should get the Query stored in the database and clob and set it to VO.For that i have created VO object dynamically .I doono whther iam doing correct or not.Please see the below code.
    OADBTransaction dbTransaction=getOADBTransaction();
    OAViewDefImpl vd = (OAViewDefImpl)dbTransaction.createViewDef();
    vd.setExpertMode(true);
    vd.setQuery(s);
    vd.addSqlDerivedAttrDef("PROJECTID", "ProjectId", "java.lang.Number", 250, false, true, (byte)0);
    vd.addSqlDerivedAttrDef("COSTACTUALPAPTD", "CostActualPaptd", "java.lang.Number", 250, false, true, (byte)0);
    //project vo impl and vorowimpl
    OAViewObject vo = (OAViewObject)this.createViewObject("TestProjectsVO1", (OAViewDef)vd);
    OAViewObjectImpl vdImpl=(OAViewObjectImpl)dbTransaction.createViewDef();
    vo.executeQuery();
    vd.setViewObjectClass("eis.oracle.apps.xxeis.projects.summary.server.TestProjectsVOImpl");
    vd.setViewRowClass("eis.oracle.apps.xxeis.projects.summary.server.TestProjectsVORowImpl");
    Problem is last 2 lines getting errored out as there are no classes.I want to create these two claasees dynamically .. or how to do that and createViewAtributes dynamically..........
    I need to create another VO similarly and create a view link using these 2 vo's and create a hgrid.
    Please help me whther iam doing correct or not?
    Soujanya

    You can create a custom VO like this:
    Import the following in the Controller:
    import oracle.jbo.ViewObject;
    import oracle.apps.fnd.framework.server.OAViewDef;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    In the Process Request
                 //Create the sql
                 String sql ="select 1 from ap_suppliers \n" +
                 "where vendor_name_alt is not null \n" +
                 "and vendor_name_alt= :1";
                  ViewObject altVendorVO;
                  //Get the AM. Here
                  OAApplicationModuleImpl testAM= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
                 //Create the View Definition
                 OAViewDef viewDef  = suppAM.getOADBTransaction().createViewDef();
                 viewDef.setSql(sql);
                 viewDef.setExpertMode(true);
                 viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
                 viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
                 //Now since the View Definition is ready, we create the View Object
                 altVendorVO = testAM.createViewObject("ValAltVendorsVO",viewDef);
    The problem in your case is datatype of viewDefinition which should be OAViewDef and not OAViewDefImpl.
    Hope the information and the code snippet above helps.
    Regards
    Sumit

  • Remove an End_Date on a Vendor

    Hi- I have a custome interface to do Supplier adds and updates in R12.
    My issue is that once a update comes in for an already end_dated supplier, the customer wants the updates done, and the supplier reactivated.
    I have no problem making the updates, but passing null into the API does nothing to remove the end_date on the supplier.
    How can I do this? Is there an API to re-activate a supplier? Should I just pass in '31-DEC-4912' instead of null?

    Hi Jason,
    You can try this as well...
    In Ap_VENDORS_PKG.updte_row look for end_date_active
         UPDATE po_vendors
              SET
              vendor_id               =     x_Vendor_Id,
              last_update_date          =     x_Last_Update_Date,
              last_updated_by               =     x_Last_Updated_By,
              vendor_name               =     x_Vendor_Name,
              segment1               =     x_Segment1,
              summary_flag               =     x_Summary_Flag,
              enabled_flag               =     x_Enabled_Flag,
              last_update_login          =     x_Last_Update_Login,
              employee_id               =     x_Employee_Id,
              validation_number          =     x_Validation_Number,
              vendor_type_lookup_code          =     x_Vendor_Type_Lookup_Code,
              customer_num               =     x_Customer_Num,
              one_time_flag               =     x_One_Time_Flag,
              parent_vendor_id          =      x_Parent_Vendor_Id,
              min_order_amount          =     x_Min_Order_Amount,
              ship_to_location_id          =     x_Ship_To_Location_Id,
              bill_to_location_id          =     x_Bill_To_Location_Id,
              ship_via_lookup_code          =     x_Ship_Via_Lookup_Code,
              freight_terms_lookup_code     =     x_Freight_Terms_Lookup_Code,
              fob_lookup_code               =     x_Fob_Lookup_Code,
              terms_id               =     x_Terms_Id,
              set_of_books_id               =     x_Set_Of_Books_Id,
              always_take_disc_flag          =     x_Always_Take_Disc_Flag,
              pay_date_basis_lookup_code     =     x_Pay_Date_Basis_Lookup_Code,
              pay_group_lookup_code          =     x_Pay_Group_Lookup_Code,
              payment_priority          =     x_Payment_Priority,
              invoice_currency_code          =     x_Invoice_Currency_Code,
              payment_currency_code          =     x_Payment_Currency_Code,
              invoice_amount_limit          =     x_Invoice_Amount_Limit,
              hold_all_payments_flag          =     x_Hold_All_Payments_Flag,
              hold_future_payments_flag     =     x_Hold_Future_Payments_Flag,
              hold_reason               =     x_Hold_Reason,
              distribution_set_id          =     x_Distribution_Set_Id,
              accts_pay_code_combination_id     =     x_Accts_Pay_CCID,
              future_dated_payment_ccid     =     x_Future_Dated_Payment_CCID,
              prepay_code_combination_id     =     x_Prepay_CCID,
    --TIN          num_1099               =     x_Num_1099,  bug5930700
    --TIN Proj enter value for num_1099 field  bug5930700
    num_1099 =
              decode( UPPER(x_Vendor_Type_Lookup_Code),'EMPLOYEE',NULL,'CONTRACTOR',
                   decode(x_Org_Type_Lookup_Code,'INDIVIDUAL',NULL
                                       ,'FOREIGN INDIVIDUAL',NULL
                                       ,'PARTNERSHIP',NULL
                                       ,'FOREIGN PARTNERSHIP',NULL
                                       ,x_Num_1099),
                   x_Num_1099),
    --TIN Proj enter value for  individual_1099 field  bug5930700
    individual_1099 =
              decode( UPPER(x_Vendor_Type_Lookup_Code),'EMPLOYEE',NULL,'CONTRACTOR',
                   decode(x_Org_Type_Lookup_Code,'INDIVIDUAL',x_Num_1099
                                       ,'FOREIGN INDIVIDUAL',x_Num_1099
                                       ,'PARTNERSHIP',x_Num_1099
                   ,'FOREIGN PARTNERSHIP',x_Num_1099
    ,NULL),
                   NULL),
              type_1099               =     x_Type_1099,
              withholding_status_lookup_code     =     x_withholding_stat_Lookup_Code,
              withholding_start_date          =     x_Withholding_Start_Date,
              organization_type_lookup_code     =     x_Org_Type_Lookup_Code,
              vat_code               =     x_Vat_Code,
              start_date_active          =     x_Start_Date_Active,
              end_date_active          =     x_End_Date_Active,
              qty_rcv_tolerance          =     x_Qty_Rcv_Tolerance,
              minority_group_lookup_code     =     x_Minority_Group_Lookup_Code,
              payment_method_lookup_code     =     x_Payment_Method_Lookup_Code,
              bank_account_name          =     x_Bank_Account_Name,
              bank_account_num          =     x_Bank_Account_Num,
              bank_num               =     x_Bank_Num,
              bank_account_type          =     x_Bank_Account_Type,
              women_owned_flag          =     x_Women_Owned_Flag,
              small_business_flag          =     x_Small_Business_Flag,
              standard_industry_class          =     x_Standard_Industry_Class,
              attribute_category          =     x_Attribute_Category,
              attribute1               =     x_Attribute1,
              attribute2               =     x_Attribute2,
              attribute3               =     x_Attribute3,
              attribute4               =     x_Attribute4,
              attribute5               =     x_Attribute5,
              hold_flag               =     x_Hold_Flag,
              purchasing_hold_reason          =     x_Purchasing_Hold_Reason,
              hold_by                    =     x_Hold_By,
              hold_date               =     x_Hold_Date,
              terms_date_basis          =     x_Terms_Date_Basis,
              price_tolerance               =     x_Price_Tolerance,
              attribute10               =     x_Attribute10,
              attribute11               =     x_Attribute11,
              attribute12               =     x_Attribute12,
              attribute13               =     x_Attribute13,
              attribute14               =     x_Attribute14,
              attribute15               =     x_Attribute15,
              attribute6               =     x_Attribute6,
              attribute7               =     x_Attribute7,
              attribute8               =     x_Attribute8,
              attribute9               =     x_Attribute9,
              days_early_receipt_allowed     =     x_Days_Early_Receipt_Allowed,
              days_late_receipt_allowed     =     x_Days_Late_Receipt_Allowed,
              enforce_ship_to_location_code     =     x_Enforce_Ship_To_Loc_Code,
              exclusive_payment_flag          =     x_Exclusive_Payment_Flag,
              federal_reportable_flag          =     x_Federal_Reportable_Flag,
              hold_unmatched_invoices_flag     =     x_Hold_Unmatched_Invoices_Flag,
              match_option               =     x_match_option,
              create_debit_memo_flag          =     x_create_debit_memo_flag,
              inspection_required_flag     =     x_Inspection_Required_Flag,
              receipt_required_flag          =     x_Receipt_Required_Flag,
              receiving_routing_id          =     x_Receiving_Routing_Id,
              state_reportable_flag          =     x_State_Reportable_Flag,
              tax_verification_date          =     x_Tax_Verification_Date,
              auto_calculate_interest_flag     =     x_Auto_Calculate_Interest_Flag,
              name_control               =     x_Name_Control,
              allow_substitute_receipts_flag     =     x_Allow_Subst_Receipts_Flag,
              allow_unordered_receipts_flag     =     x_Allow_Unord_Receipts_Flag,
              receipt_days_exception_code     =     x_Receipt_Days_Exception_Code,
              qty_rcv_exception_code          =     x_Qty_Rcv_Exception_Code,
              offset_tax_flag               =     x_Offset_Tax_Flag,
              exclude_freight_from_discount     =     x_Exclude_Freight_From_Disc,
              vat_registration_num          =     x_Vat_Registration_Num,
              tax_reporting_name          =     x_Tax_Reporting_Name,
              awt_group_id               =     x_Awt_Group_Id,
              check_digits               =     x_Check_Digits,
              bank_number               =     x_Bank_Number,
              allow_awt_flag               =     x_Allow_Awt_Flag,
              bank_branch_type          =     x_bank_branch_type,
              EDI_Payment_Method          =     x_EDI_Payment_Method,
              EDI_Payment_Format          =     x_EDI_Payment_Format,
              EDI_Remittance_Method          =     x_EDI_Remittance_Method,
              EDI_Remittance_Instruction     =     x_EDI_Remittance_Instruction,
              EDI_transaction_handling     =     x_EDI_transaction_handling,
              Auto_Tax_Calc_Flag          =     x_Auto_Tax_Calc_Flag,
              Auto_Tax_Calc_Override          =     x_Auto_Tax_Calc_Override,
              Amount_Includes_Tax_Flag     =     x_Amount_Includes_Tax_Flag,
              AP_Tax_Rounding_Rule          =     x_AP_Tax_Rounding_Rule,
              vendor_name_alt               =     x_Vendor_Name_Alt,
    global_attribute_category = X_global_attribute_category,
    global_attribute1 = X_global_attribute1,
    global_attribute2 = X_global_attribute2,
    global_attribute3 = X_global_attribute3,
    global_attribute4 = X_global_attribute4,
    global_attribute5 = X_global_attribute5,
    global_attribute6 = X_global_attribute6,
    global_attribute7 = X_global_attribute7,
    global_attribute8 = X_global_attribute8,
    global_attribute9 = X_global_attribute9,
    global_attribute10 = X_global_attribute10,
    global_attribute11 = X_global_attribute11,
    global_attribute12 = X_global_attribute12,
    global_attribute13 = X_global_attribute13,
    global_attribute14 = X_global_attribute14,
    global_attribute15 = X_global_attribute15,
    global_attribute16 = X_global_attribute16,
    global_attribute17 = X_global_attribute17,
    global_attribute18 = X_global_attribute18,
    global_attribute19 = X_global_attribute19,
    global_attribute20 = X_global_attribute20,
    bank_charge_bearer = X_Bank_Charge_Bearer
         WHERE     rowid = x_Rowid;
    Hope this will help...
    Regards,
    S.P DASH

  • Updating Vendor_name in R12 (12.1.3)

    Can someone please help me in telling me how to update the vendor_name in R12 (12.1.3)
    I am using apps.ap_vendor_pub_pkg.Update_Vendor, but its not updating the vendor_name field in the ap_suppliers table.
    The v_vendor_rec record type variable doesn't have the vendor_name field. Is there any other API that I should be using?
    My piece of code:
    v_vendor_rec.vendor_id := v_vendor_id;
    v_vendor_rec.vendor_name := p_sup_number||p_sup_name;
    v_vendor_rec.vendor_name_alt := p_sup_name;
    --calling the API
    apps.ap_vendor_pub_pkg.Update_Vendor
    ( p_api_version => 1.0
    ,p_init_msg_list => fnd_api.g_true
    ,p_commit => fnd_api.g_true
    ,p_validation_level => fnd_api.g_valid_level_full
    ,x_return_status => x_return_status
    ,x_msg_count => x_msg_count
    ,x_msg_data => x_msg_data
    ,p_vendor_rec => v_vendor_rec
    ,p_vendor_id => v_vendor_id
    Any help is very much appreciated.
    Edited by: ganpat76 on Jun 5, 2012 9:51 AM
    Edited by: ganpat76 on Jun 5, 2012 10:58 AM

    Hi,
    You can update vendor name and vendor alt name using this api
    hz_party_v2pub.update_organization (p_init_msg_list => fnd_api.g_false
    ,p_organization_rec => l_vendor
    ,p_party_object_version_number => v_object
    ,x_profile_id => v_profile_id
    ,x_return_status => l_vendor_status
    ,x_msg_count => v_msg_count
    ,x_msg_data => v_msg_data
    where l_vendor.organization_name represents vendor name
    and l_vendor.organization_name_phonetic represents vendor alternate name
    SELECT pv.party_id
    ,hp.object_version_number
    FROM po_vendors pv
    ,hz_parties hp
    WHERE upper(pv.vendor_name) = upper(p_vendor_name)
    AND pv.end_date_active IS NULL
    AND pv.party_id = hp.party_id;
    This query will give mandatory fields for this api

  • R12 API Supplier site purpose shows blank after set pay_site_flag:='Y';

    hi,
    i have set the pay_site_flag of supplier site to 'Y', but when i go to Address Book, but the purpose shows blank. Click on Update, it brings me to the detail screen, the Payment also shown as not ticked.
    any idea?
    below is my code.
    declare
    -- Local variables here
    x_return_status VARCHAR2(2000); x_msg_count NUMBER; x_msg_data VARCHAR2(2000);
    p_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type; p_vendor_rec_null AP_VENDOR_PUB_PKG.r_vendor_rec_type;
    x_vendor_id number; x_party_id number;
    p_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type; p_vendor_site_rec_null AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
    x_vendor_site_id number; x_party_site_id number; x_location_id number;
    p_vendor_contact_rec AP_VENDOR_PUB_PKG.r_vendor_contact_rec_type; p_vendor_contact_rec_null AP_VENDOR_PUB_PKG.r_vendor_contact_rec_type;
    x_vendor_contact_id number;     x_per_party_id number;     x_rel_party_id number;     x_rel_id number;     x_org_contact_id number;
         x_cparty_site_id number;
    begin
    p_vendor_rec:=p_vendor_rec_null;
    p_vendor_rec.segment1:='R0003_12'; p_vendor_rec.VENDOR_NAME:='3ED FORKLIFTS REPAIRERS_12'; p_vendor_rec.VENDOR_NAME_alt:='3ED FORKLIFTS REPAIRERS_12';
    p_vendor_rec.INVOICE_CURRENCY_CODE:='SGD'; p_vendor_rec.PAYMENT_CURRENCY_CODE:='SGD';
    begin
    select term_id into p_vendor_rec.terms_id from AP_TERMS_TL where upper(description)=upper('30 DAYS');
    exception when others then
    rollback;
    dbms_output.put_line('error term id not found:'||'30 DAYS');
    return;
    end;
    p_vendor_rec.ext_payee_rec.default_pmt_method := 'CHECK';
    AP_VENDOR_PUB_PKG.Create_Vendor(p_api_version=>1,
         p_init_msg_list=>'T',
         x_return_status=>x_return_status,
         x_msg_count=>x_msg_count,
         x_msg_data=>x_msg_data,
         p_vendor_rec=>p_vendor_rec,
         x_vendor_id=>x_vendor_id,
         x_party_id=>x_party_id);
    DBMS_OUTPUT.put_line('creating vendor id:'||x_vendor_id||',party id:'||x_party_id);
    if x_return_status!='S' then
    DBMS_OUTPUT.put_line('x_msg_count = ' || TO_CHAR(x_msg_count));
    DBMS_OUTPUT.put_line(SUBSTR('x_msg_data = ' || x_msg_data, 1, 255));
    IF x_msg_count > 1 then
    FOR i IN 1 .. x_msg_count loop
    DBMS_OUTPUT.put_line(i|| '. '|| SUBSTR(fnd_msg_pub.get(p_encoded => fnd_api.g_false),1,255));
    END LOOP;
    END IF;
    rollback;
    return;
    end if;
    --must select from hr_operating_units to see what is the org_id!
    p_vendor_site_rec:=p_vendor_site_rec_null;
    p_vendor_site_rec.vendor_id:=x_vendor_id; p_vendor_site_rec.vendor_site_code:=1001; p_vendor_site_rec.country:='SG';
    p_vendor_site_rec.address_line1:='NO.22 SUNGEI KADUT WAY'; p_vendor_site_rec.address_line2:='SINGAPORE 728777';
    p_vendor_site_rec.terms_id:=p_vendor_rec.terms_id; p_vendor_site_rec.org_id:=121;
    p_vendor_site_rec.INVOICE_CURRENCY_CODE:='SGD'; p_vendor_site_rec.PAYMENT_CURRENCY_CODE:='SGD';
    begin
    select code_combination_id into p_vendor_site_rec.ACCTS_PAY_CODE_COMBINATION_ID from GL_CODE_COMBINATIONS where --LIABILITY
    segment1||'-'||segment2||'-'||segment3||'-'||segment4||'-'||segment5||'-'||segment6||'-'||segment7='01-000-210060-00-0000-0000-000';
    select code_combination_id into p_vendor_site_rec.PREPAY_CODE_COMBINATION_ID from GL_CODE_COMBINATIONS where --PREPAYMENT
    segment1||'-'||segment2||'-'||segment3||'-'||segment4||'-'||segment5||'-'||segment6||'-'||segment7='01-000-150227-00-0000-0000-000';
    exception when others then
    rollback;
    dbms_output.put_line('error not found for comb_id');
    return;
    end;
    --HARCODE
    p_vendor_site_rec.purchasing_site_flag:='N'; p_vendor_site_rec.pay_site_flag:='Y'; p_vendor_site_rec.PRIMARY_PAY_SITE_FLAG:='Y';
    p_vendor_site_rec.EXT_PAYEE_REC.Exclusive_Pay_Flag:='Y';
    p_vendor_site_rec.pay_on_receipt_summary_code:='RECEIPT'; p_vendor_site_rec.create_debit_memo_flag:='N';
    p_vendor_site_rec.gapless_inv_num_flag:='N';
    begin
    select location_id into p_vendor_site_rec.ship_to_location_id from HR_LOCATIONS_ALL where location_code='UBTS MAIN';
    exception when others then
    rollback;
    dbms_output.put_line('error not found for location_code=UBTS_MAIN');
    return;
    end;
    p_vendor_site_rec.BILL_TO_LOCATION_ID:=p_vendor_site_rec.ship_to_location_id;
    p_vendor_site_rec.address_style:='SG';
    AP_VENDOR_PUB_PKG.create_vendor_site(p_api_version=>1,
         p_init_msg_list=>'T',
         x_return_status=>x_return_status,
         x_msg_count=>x_msg_count,
         x_msg_data=>x_msg_data,
         p_vendor_site_rec=>p_vendor_site_rec,
         x_vendor_site_id=>x_vendor_site_id,
         x_party_site_id=>x_party_site_id,
         x_location_id=>x_location_id);
    DBMS_OUTPUT.put_line('creating vendor site id:'||x_vendor_id||',party site id:'||x_party_id||',location_id:'||x_location_id);
    if x_return_status!='S' then
    DBMS_OUTPUT.put_line('x_msg_count = ' || TO_CHAR(x_msg_count));
    DBMS_OUTPUT.put_line(SUBSTR('x_msg_data = ' || x_msg_data, 1, 255));
    IF x_msg_count > 1 then
    FOR i IN 1 .. x_msg_count loop
    DBMS_OUTPUT.put_line(i|| '. '|| SUBSTR(fnd_msg_pub.get(p_encoded => fnd_api.g_false),1,255));
    END LOOP;
    END IF;
    rollback;
    return;
    end if;

    can anyone help me pls...

  • Query to get Supplier Aging Analysis on AP

    Hi all,
    This seems like a common question. But i haven't found a solution yet. Does anyone have a query which i can use to create a Supplier Aging Analysis for R12?
    The application can give me a report for any backdated date which lists all the suppliers, with their total outstandings as at that date along with what transactions make up that outstandings. I need to create an aging report for this exact report.
    Any help is much appreciated
    Thanks
    Miranga

    Try this:
    Your technical person should help you pass the values for bind variables
    SELECT v.vendor_name C_VENDOR_NAME,
    v.segment1 C_VENDOR_NUMBER,
    decode(upper(:P_SORT_OPTION), 'VENDOR NAME',decode(:C_VENDOR_NAME_SELECT, '%',upper(v.vendor_name), v.vendor_name), i.invoice_type_lookup_code) C_PRIMARY_BRK,
    decode(upper(:P_SORT_OPTION), 'VENDOR NAME',decode(:C_VENDOR_NAME_SELECT, '%', decode(:SORT_BY_ALTERNATE, 'Y', upper(v.vendor_name_alt), upper(v.vendor_name)),
    decode(:SORT_BY_ALTERNATE, 'Y', v.vendor_name_alt, v.vendor_name)), i.invoice_type_lookup_code) C_PRIMARY_BRK_REAL,
    v.vendor_name C_SHORT_VENDOR_NAME,
    v.vendor_id C_VENDOR_ID,
    i.vendor_site_id C_CONTACT_SITE_ID,
    vs.vendor_site_code C_VENDOR_SITE_CODE,
    decode(:SORT_BY_ALTERNATE, 'Y', vs.vendor_site_code_alt, vs.vendor_site_code) C_VENDOR_SITE_CODE_BRK,
    nvl(vs.state,' ') C_VENDOR_STATE,
    nvl(substr(vs.city,1,15),' ') C_VENDOR_CITY,
    ps.payment_num C_REFERENCE_NUMBER,
    i.vendor_site_id C_ADDRESS_ID,
    nvl(substr(i.invoice_type_lookup_code,1,20), ' ') C_INVOICE_TYPE,
    i.invoice_id C_PAYMENT_SCHED_ID,
    -- RM nvl(to_char(ps.due_date,'DD-MON-RR'),' ') C_DUE_DATE,
    nvl(to_char(decode(:P_AGING, 'Due Date', ps.due_date, i.invoice_date),'DD-MON-RR'),' ') C_DUE_DATE,
    /* Bug: 1549982 */
    /* Bug 2083419 For foreign currencies, show amounts in functional currency */
    /* decode(i.invoice_currency_code,:C_BASE_CURRENCY_CO DE, decode(:C_BASE_MIN_ACCT_UNIT, 0,round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) *nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT), decode(i.exchange_rate,NULL,0, decode(:C_BASE_MIN_ACCT_UNIT,
    0,round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.amount_remaining, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT))) C_AMT_DUE_REMAINING,
    decode(i.invoice_currency_code,:C_BASE_CURRENCY_CO DE, decode(:C_BASE_MIN_ACCT_UNIT, 0,round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT), decode(i.exchange_rate,NULL,0, decode(:C_BASE_MIN_ACCT_UNIT, 0,round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1)),:C_BASE_PRECISION), round(((nvl(ps.gross_amount, 0)/(nvl(i.payment_cross_rate,1))) * nvl(i.exchange_rate,1))/:C_BASE_MIN_ACCT_UNIT) * :C_BASE_MIN_ACCT_UNIT))) C_AMT_DUE_ORIGINAL, */ -- ps.gross_amount C_GROSS_AMOUNT,
    i.invoice_currency_code C_INVOICE_CUR_CODE,
    i.payment_cross_rate C_PAYMENT_CROSS_RATE,
    i.cancelled_amount C_CANCELLED_AMOUNT,
    i.accts_pay_code_combination_id C_VENDOR_TRX_ID,
    i.invoice_num C_INVOICE_NUMBER,
    i.invoice_num C_INVOICE_NUM_SHORT,
    to_char(i.invoice_date,'DD-MON-RR') C_INVOICE_DATE,
    -- ceil(to_date(to_char(sysdate,'DD-MON-RR')) - decode(:P_AGING, 'Due Date', ps.due_date, i.invoice_date)) C_DAYS_PAST_DUE, -- Commented for MCR 52037
    ceil(to_date(to_char(:P_AS_OF_DATE,'DD-MON-RR')) - decode(:P_AGING, 'Due Date', ps.due_date, i.invoice_date)) C_DAYS_PAST_DUE, -- Added for MCR 52037
    decode(i.invoice_currency_code, :C_BASE_CURRENCY_CODE, ' ', decode(i.exchange_rate, NULL,'*', ' ')) C_DATA_CONVERTED,
    nvl(i.exchange_rate, 1) C_EXCHANGE_RATE,
    decode(:C_VENDOR_NAME_SELECT, '%',decode(:SORT_BY_ALTERNATE, 'Y', upper(v.vendor_name_alt), upper(v.vendor_name)),
    decode(:SORT_BY_ALTERNATE, 'Y', v.vendor_name_alt, v.vendor_name)) C_VENDOR_NAME_BRK,
    decode(:p_seq_numbers, 'N', i.voucher_num, i.doc_sequence_value) VOUCHER_NUMBER
    FROM ap_payment_schedules ps,
    ap_invoices i,
    ap_suppliers v,
    po_vendor_sites vs
    WHERE i.invoice_id = ps.invoice_id
    AND i.vendor_id = v.vendor_id
    AND i.vendor_site_id = vs.vendor_site_id
    &P_VENDOR_PREDICATE
    &KCI_BUILD_WHERE
    AND ((TO_DATE(:P_AS_OF_DATE) - ps.due_date)
    between :C_MINDAYS and :C_MAXDAYS)
    AND i.invoice_type_lookup_code like :C_INVOICE_TYPE_SELECT
    -- Added for MCR 52037
    AND nvl((select min(accounting_date) from ap_invoice_distributions where invoice_id = i.invoice_id),to_date(i.gl_date) ) <= TO_DATE(:P_AS_OF_DATE)
    and ( ( i.cancelled_date is not null and i.cancelled_date > to_date(:P_AS_OF_DATE))
    or (i.cancelled_date is null and ( nvl((select sum(amount) from apps.ap_invoice_distributions d where invoice_id = i.invoicE_id and d.accounting_date < TO_DATE(:P_AS_OF_DATE)),ps.gross_amount))-
    nvl((select sum(amount) from apps.ap_invoice_payments p where p.invoice_id = i.invoice_id and p.accounting_date < TO_DATE(:P_AS_OF_DATE)),0)!= 0))
    &P_AMOUNT_PREDICATE
    --AND i.payment_status_flag in ('N','P')
    &P_ORDER_BY
    Hope it helps!
    Regards,
    Yuvaraj

  • Failed while running Execution Plan for Financial Analytics

    Hi gurus,
    I got this error when running SDE_ORA_PartyOrganizationDimension_Customer_Full
    *****START LOAD SESSION*****
    Load Start Time: Thu May 10 10:43:51 2012
    Target tables:
    W_PARTY_ORG_DS
    2012-05-10 10:43:51 : INFO : (16808 | READER_1_1_1) : (IS | BIA_IS) : node01_bidev.localhost : RR_4029 : SQ Instance [mplt_BC_ORA_PartyOrganizationDimension_Customer.SQ_BCI_CUSTOMERS] User specified SQL Query [SELECT  DISTINCT  HZ_PARTIES.PARTY_ID,
      HZ_PARTIES.CREATED_BY,
      HZ_PARTIES.LAST_UPDATED_BY,
      HZ_PARTIES.CREATION_DATE,
      HZ_PARTIES.LAST_UPDATE_DATE,
      HZ_PARTIES.PARTY_NUMBER,
      HZ_PARTIES.PARTY_NAME,
      HZ_PARTIES.ADDRESS1,
      HZ_PARTIES.ADDRESS2,
      HZ_PARTIES.ADDRESS3,
      HZ_PARTIES.ADDRESS4,
      HZ_PARTIES.CITY,
      HZ_PARTIES.STATE,
      HZ_PARTIES.POSTAL_CODE,
      HZ_PARTIES.PROVINCE,
      HZ_PARTIES.COUNTRY,
      HZ_ORGANIZATION_PROFILES.DUNS_NUMBER_C,
        (CASE
       WHEN DOM_DUNS.RELATIONSHIP_CODE = 'DOMESTIC_ULTIMATE_OF' THEN DOM_DUNS.DOM_DUNS_NUMBER
      END) DOM_DUNS_NUMBER,
      (CASE
       WHEN DOM_DUNS.RELATIONSHIP_CODE = 'GLOBAL_ULTIMATE_OF' THEN DOM_DUNS.DOM_DUNS_NUMBER
       END) GLBL_DUNS_NUMBER,
      HZ_PARTIES.EMPLOYEES_TOTAL,
      HZ_PARTIES.YEAR_ESTABLISHED,
      HZ_PARTIES.CURR_FY_POTENTIAL_REVENUE,
      HZ_PARTIES.HQ_BRANCH_IND,
      HZ_PARTIES.PERSON_LAST_NAME,
      HZ_PARTIES.KNOWN_AS,
      HZ_PARTIES.PERSON_TITLE,
      HZ_PARTIES.EMAIL_ADDRESS,
      HZ_PARTIES.URL,
      HZ_PARTIES.CATEGORY_CODE,
      HZ_PARTIES.SIC_CODE,
      HZ_PARTIES.PARTY_TYPE,
      HZ_ORGANIZATION_PROFILES.OOB_IND,
      HZ_ORGANIZATION_PROFILES.MINORITY_OWNED_IND,
      HZ_ORGANIZATION_PROFILES.MINORITY_OWNED_TYPE,
      HZ_ORGANIZATION_PROFILES.WOMAN_OWNED_IND,
      HZ_ORGANIZATION_PROFILES.DISADV_8A_IND,
      HZ_ORGANIZATION_PROFILES.SMALL_BUS_IND,
      HZ_ORGANIZATION_PROFILES.DB_RATING,
      HZ_ORGANIZATION_PROFILES.SIC_CODE_TYPE,
      HZ_ORGANIZATION_PROFILES.INTERNAL_FLAG,
      HZ_ORGANIZATION_PROFILES.BRANCH_FLAG,
      HZ_ORGANIZATION_PROFILES.CREDIT_SCORE,
      HZ_ORGANIZATION_PROFILES.STATUS,
      HZ_PARTIES.CUSTOMER_KEY,
      HZ_PARTIES.JGZZ_FISCAL_CODE,
      AP_SUPPLIERS.VENDOR_ID,
      AP_SUPPLIERS.VENDOR_NAME,
      AP_SUPPLIERS.VENDOR_NAME_ALT,
      AP_SUPPLIERS.SEGMENT1,
      AP_SUPPLIERS.ENABLED_FLAG,
      AP_SUPPLIERS.VENDOR_TYPE_LOOKUP_CODE,
      AP_SUPPLIERS.ONE_TIME_FLAG,
      AP_SUPPLIERS.PARENT_VENDOR_ID,
      AP_SUPPLIERS.ORGANIZATION_TYPE_LOOKUP_CODE,
      AP_SUPPLIERS.START_DATE_ACTIVE,
      AP_SUPPLIERS.END_DATE_ACTIVE,
      AP_SUPPLIERS.MINORITY_GROUP_LOOKUP_CODE,
      AP_SUPPLIERS.WOMEN_OWNED_FLAG,
      AP_SUPPLIERS.SMALL_BUSINESS_FLAG,
      HZ_CUST_ACCOUNTS.PARTY_ID
    FROM HZ_PARTIES,
      AP_SUPPLIERS,
      HZ_ORGANIZATION_PROFILES,
      HZ_CUST_ACCOUNTS,
        (SELECT  DOM_REL.RELATIONSHIP_CODE RELATIONSHIP_CODE,
         DOM_ULT_DUNS.PARTY_ID PARTY_ID,
         DOM_ULT_DUNS.DUNS_NUMBER DOM_DUNS_NUMBER,
         DOM_REL.OBJECT_ID OBJECT_ID
       FROM HZ_PARTIES DOM_ULT_DUNS,
         HZ_RELATIONSHIPS DOM_REL
       WHERE(1 = 1)
       AND(DOM_REL.SUBJECT_ID = DOM_ULT_DUNS.PARTY_ID)
       AND(DOM_REL.OBJECT_TYPE = 'ORGANIZATION')
       AND(DOM_REL.SUBJECT_TYPE = 'ORGANIZATION')
       AND(DOM_REL.SUBJECT_TABLE_NAME = 'HZ_PARTIES')
       AND(DOM_REL.RELATIONSHIP_CODE IN('DOMESTIC_ULTIMATE_OF',    'GLOBAL_ULTIMATE_OF'))
       AND(DOM_REL.ACTUAL_CONTENT_SOURCE = 'DNB')
       AND(DOM_REL.RELATIONSHIP_TYPE = 'DNB_HIERARCHY')
       AND((DOM_REL.END_DATE IS NULL
       OR DOM_REL.END_DATE > SYSDATE
    DOM_DUNS
    WHERE(1 = 1)
    AND HZ_PARTIES.PARTY_TYPE = 'ORGANIZATION'
    AND HZ_PARTIES.PARTY_ID = AP_SUPPLIERS.PARTY_ID(+)
    AND HZ_ORGANIZATION_PROFILES.EFFECTIVE_END_DATE IS NULL
    AND HZ_ORGANIZATION_PROFILES.ACTUAL_CONTENT_SOURCE = 'SST'
    AND
    (HZ_ORGANIZATION_PROFILES.LAST_UPDATE_DATE >  TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS') OR
    HZ_PARTIES.LAST_UPDATE_DATE >  TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS') OR
    AP_SUPPLIERS.LAST_UPDATE_DATE >  TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    OR
    HZ_CUST_ACCOUNTS.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    AND HZ_ORGANIZATION_PROFILES.PARTY_ID = HZ_PARTIES.PARTY_ID
    AND HZ_CUST_ACCOUNTS.PARTY_ID(+)=HZ_PARTIES.PARTY_ID
    AND DOM_DUNS.OBJECT_ID(+) = HZ_PARTIES.PARTY_ID]
    2012-05-10 10:43:51 : INFO : (16808 | READER_1_1_1) : (IS | BIA_IS) : node01_bidev.localhost : RR_4049 : RR_4049 SQL Query issued to database : (Thu May 10 10:43:51 2012)
    2012-05-10 10:43:51 : ERROR : (16808 | READER_1_1_1) : (IS | BIA_IS) : node01_bidev.localhost : RR_4035 : SQL Error [
    ORA-00942: table or view does not exist
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT DISTINCT HZ_PARTIES.PARTY_ID,
    HZ_PARTIES.CREATED_BY,
    HZ_PARTIES.LAST_UPDATED_BY,
    HZ_PARTIES.CREATION_DATE,
    HZ_PARTIES.LAST_UPDATE_DATE,
    HZ_PARTIES.PARTY_NUMBER,
    HZ_PARTIES.PARTY_NAME,
    HZ_PARTIES.ADDRESS1,
    HZ_PARTIES.ADDRESS2,
    HZ_PARTIES.ADDRESS3,
    HZ_PARTIES.ADDRESS4,
    HZ_PARTIES.CITY,
    HZ_PARTIES.STATE,
    HZ_PARTIES.POSTAL_CODE,
    HZ_PARTIES.PROVINCE,
    HZ_PARTIES.COUNTRY,
    HZ_ORGANIZATION_PROFILES.DUNS_NUMBER_C,
    (CASE
    WHEN DOM_DUNS.RELATIONSHIP_CODE = 'DOMESTIC_ULTIMATE_OF' THEN DOM_DUNS.DOM_DUNS_NUMBER
    END) DOM_DUNS_NUMBER,
    (CASE
    WHEN DOM_DUNS.RELATIONSHIP_CODE = 'GLOBAL_ULTIMATE_OF' THEN DOM_DUNS.DOM_DUNS_NUMBER
    END) GLBL_DUNS_NUMBER,
    HZ_PARTIES.EMPLOYEES_TOTAL,
    HZ_PARTIES.YEAR_ESTABLISHED,
    HZ_PARTIES.CURR_FY_POTENTIAL_REVENUE,
    HZ_PARTIES.HQ_BRANCH_IND,
    HZ_PARTIES.PERSON_LAST_NAME,
    HZ_PARTIES.KNOWN_AS,
    HZ_PARTIES.PERSON_TITLE,
    '[email protected]' EMAIL_ADDRESS,
    HZ_PARTIES.URL,
    HZ_PARTIES.CATEGORY_CODE,
    HZ_PARTIES.SIC_CODE,
    HZ_PARTIES.PARTY_TYPE,
    HZ_ORGANIZATION_PROFILES.OOB_IND,
    HZ_ORGANIZATION_PROFILES.MINORITY_OWNED_IND,
    HZ_ORGANIZATION_PROFILES.MINORITY_OWNED_TYPE,
    HZ_ORGANIZATION_PROFILES.WOMAN_OWNED_IND,
    HZ_ORGANIZATION_PROFILES.DISADV_8A_IND,
    HZ_ORGANIZATION_PROFILES.SMALL_BUS_IND,
    HZ_ORGANIZATION_PROFILES.DB_RATING,
    HZ_ORGANIZATION_PROFILES.SIC_CODE_TYPE,
    HZ_ORGANIZATION_PROFILES.INTERNAL_FLAG,
    HZ_ORGANIZATION_PROFILES.BRANCH_FLAG,
    HZ_ORGANIZATION_PROFILES.CREDIT_SCORE,
    HZ_ORGANIZATION_PROFILES.STATUS,
    HZ_PARTIES.CUSTOMER_KEY,
    HZ_PARTIES.JGZZ_FISCAL_CODE,
    AP_SUPPLIERS.VENDOR_ID,
    AP_SUPPLIERS.VENDOR_NAME,
    AP_SUPPLIERS.VENDOR_NAME_ALT,
    AP_SUPPLIERS.SEGMENT1,
    AP_SUPPLIERS.ENABLED_FLAG,
    AP_SUPPLIERS.VENDOR_TYPE_LOOKUP_CODE,
    AP_SUPPLIERS.ONE_TIME_FLAG,
    AP_SUPPLIERS.PARENT_VENDOR_ID,
    AP_SUPPLIERS.ORGANIZATION_TYPE_LOOKUP_CODE,
    AP_SUPPLIERS.START_DATE_ACTIVE,
    AP_SUPPLIERS.END_DATE_ACTIVE,
    AP_SUPPLIERS.MINORITY_GROUP_LOOKUP_CODE,
    AP_SUPPLIERS.WOMEN_OWNED_FLAG,
    AP_SUPPLIERS.SMALL_BUSINESS_FLAG,
    HZ_CUST_ACCOUNTS.PARTY_ID
    FROM HZ_PARTIES,
    AP_SUPPLIERS,
    HZ_ORGANIZATION_PROFILES,
    HZ_CUST_ACCOUNTS,
    (SELECT DOM_REL.RELATIONSHIP_CODE RELATIONSHIP_CODE,
    DOM_ULT_DUNS.PARTY_ID PARTY_ID,
    DOM_ULT_DUNS.DUNS_NUMBER DOM_DUNS_NUMBER,
    DOM_REL.OBJECT_ID OBJECT_ID
    FROM HZ_PARTIES DOM_ULT_DUNS,
    HZ_RELATIONSHIPS DOM_REL
    WHERE(1 = 1)
    AND(DOM_REL.SUBJECT_ID = DOM_ULT_DUNS.PARTY_ID)
    AND(DOM_REL.OBJECT_TYPE = 'ORGANIZATION')
    AND(DOM_REL.SUBJECT_TYPE = 'ORGANIZATION')
    AND(DOM_REL.SUBJECT_TABLE_NAME = 'HZ_PARTIES')
    AND(DOM_REL.RELATIONSHIP_CODE IN('DOMESTIC_ULTIMATE_OF', 'GLOBAL_ULTIMATE_OF'))
    AND(DOM_REL.ACTUAL_CONTENT_SOURCE = 'DNB')
    AND(DOM_REL.RELATIONSHIP_TYPE = 'DNB_HIERARCHY')
    AND((DOM_REL.END_DATE IS NULL
    OR DOM_REL.END_DATE > SYSDATE
    DOM_DUNS
    WHERE(1 = 1)
    AND HZ_PARTIES.PARTY_TYPE = 'ORGANIZATION'
    AND HZ_PARTIES.PARTY_ID = AP_SUPPLIERS.PARTY_ID(+)
    AND HZ_ORGANIZATION_PROFILES.EFFECTIVE_END_DATE IS NULL
    AND HZ_ORGANIZATION_PROFILES.ACTUAL_CONTENT_SOURCE = 'SST'
    AND
    (HZ_ORGANIZATION_PROFILES.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS') OR
    HZ_PARTIES.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS') OR
    AP_SUPPLIERS.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    OR
    HZ_CUST_ACCOUNTS.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    AND HZ_ORGANIZATION_PROFILES.PARTY_ID = HZ_PARTIES.PARTY_ID
    AND HZ_CUST_ACCOUNTS.PARTY_ID(+)=HZ_PARTIES.PARTY_ID
    AND DOM_DUNS.OBJECT_ID(+) = HZ_PARTIES.PARTY_ID
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT DISTINCT HZ_PARTIES.PARTY_ID,
    HZ_PARTIES.CREATED_BY,
    HZ_PARTIES.LAST_UPDATED_BY,
    HZ_PARTIES.CREATION_DATE,
    HZ_PARTIES.LAST_UPDATE_DATE,
    HZ_PARTIES.PARTY_NUMBER,
    HZ_PARTIES.PARTY_NAME,
    HZ_PARTIES.ADDRESS1,
    HZ_PARTIES.ADDRESS2,
    HZ_PARTIES.ADDRESS3,
    HZ_PARTIES.ADDRESS4,
    HZ_PARTIES.CITY,
    HZ_PARTIES.STATE,
    HZ_PARTIES.POSTAL_CODE,
    HZ_PARTIES.PROVINCE,
    HZ_PARTIES.COUNTRY,
    HZ_ORGANIZATION_PROFILES.DUNS_NUMBER_C,
    (CASE
    WHEN DOM_DUNS.RELATIONSHIP_CODE = 'DOMESTIC_ULTIMATE_OF' THEN DOM_DUNS.DOM_DUNS_NUMBER
    END) DOM_DUNS_NUMBER,
    (CASE
    WHEN DOM_DUNS.RELATIONSHIP_CODE = 'GLOBAL_ULTIMATE_OF' THEN DOM_DUNS.DOM_DUNS_NUMBER
    END) GLBL_DUNS_NUMBER,
    HZ_PARTIES.EMPLOYEES_TOTAL,
    HZ_PARTIES.YEAR_ESTABLISHED,
    HZ_PARTIES.CURR_FY_POTENTIAL_REVENUE,
    HZ_PARTIES.HQ_BRANCH_IND,
    HZ_PARTIES.PERSON_LAST_NAME,
    HZ_PARTIES.KNOWN_AS,
    HZ_PARTIES.PERSON_TITLE,
    '[email protected]' EMAIL_ADDRESS,
    HZ_PARTIES.URL,
    HZ_PARTIES.CATEGORY_CODE,
    HZ_PARTIES.SIC_CODE,
    HZ_PARTIES.PARTY_TYPE,
    HZ_ORGANIZATION_PROFILES.OOB_IND,
    HZ_ORGANIZATION_PROFILES.MINORITY_OWNED_IND,
    HZ_ORGANIZATION_PROFILES.MINORITY_OWNED_TYPE,
    HZ_ORGANIZATION_PROFILES.WOMAN_OWNED_IND,
    HZ_ORGANIZATION_PROFILES.DISADV_8A_IND,
    HZ_ORGANIZATION_PROFILES.SMALL_BUS_IND,
    HZ_ORGANIZATION_PROFILES.DB_RATING,
    HZ_ORGANIZATION_PROFILES.SIC_CODE_TYPE,
    HZ_ORGANIZATION_PROFILES.INTERNAL_FLAG,
    HZ_ORGANIZATION_PROFILES.BRANCH_FLAG,
    HZ_ORGANIZATION_PROFILES.CREDIT_SCORE,
    HZ_ORGANIZATION_PROFILES.STATUS,
    HZ_PARTIES.CUSTOMER_KEY,
    HZ_PARTIES.JGZZ_FISCAL_CODE,
    AP_SUPPLIERS.VENDOR_ID,
    AP_SUPPLIERS.VENDOR_NAME,
    AP_SUPPLIERS.VENDOR_NAME_ALT,
    AP_SUPPLIERS.SEGMENT1,
    AP_SUPPLIERS.ENABLED_FLAG,
    AP_SUPPLIERS.VENDOR_TYPE_LOOKUP_CODE,
    AP_SUPPLIERS.ONE_TIME_FLAG,
    AP_SUPPLIERS.PARENT_VENDOR_ID,
    AP_SUPPLIERS.ORGANIZATION_TYPE_LOOKUP_CODE,
    AP_SUPPLIERS.START_DATE_ACTIVE,
    AP_SUPPLIERS.END_DATE_ACTIVE,
    AP_SUPPLIERS.MINORITY_GROUP_LOOKUP_CODE,
    AP_SUPPLIERS.WOMEN_OWNED_FLAG,
    AP_SUPPLIERS.SMALL_BUSINESS_FLAG,
    HZ_CUST_ACCOUNTS.PARTY_ID
    FROM HZ_PARTIES,
    AP_SUPPLIERS,
    HZ_ORGANIZATION_PROFILES,
    HZ_CUST_ACCOUNTS,
    (SELECT DOM_REL.RELATIONSHIP_CODE RELATIONSHIP_CODE,
    DOM_ULT_DUNS.PARTY_ID PARTY_ID,
    DOM_ULT_DUNS.DUNS_NUMBER DOM_DUNS_NUMBER,
    DOM_REL.OBJECT_ID OBJECT_ID
    FROM HZ_PARTIES DOM_ULT_DUNS,
    HZ_RELATIONSHIPS DOM_REL
    WHERE(1 = 1)
    AND(DOM_REL.SUBJECT_ID = DOM_ULT_DUNS.PARTY_ID)
    AND(DOM_REL.OBJECT_TYPE = 'ORGANIZATION')
    AND(DOM_REL.SUBJECT_TYPE = 'ORGANIZATION')
    AND(DOM_REL.SUBJECT_TABLE_NAME = 'HZ_PARTIES')
    AND(DOM_REL.RELATIONSHIP_CODE IN('DOMESTIC_ULTIMATE_OF', 'GLOBAL_ULTIMATE_OF'))
    AND(DOM_REL.ACTUAL_CONTENT_SOURCE = 'DNB')
    AND(DOM_REL.RELATIONSHIP_TYPE = 'DNB_HIERARCHY')
    AND((DOM_REL.END_DATE IS NULL
    OR DOM_REL.END_DATE > SYSDATE
    DOM_DUNS
    WHERE(1 = 1)
    AND HZ_PARTIES.PARTY_TYPE = 'ORGANIZATION'
    AND HZ_PARTIES.PARTY_ID = AP_SUPPLIERS.PARTY_ID(+)
    AND HZ_ORGANIZATION_PROFILES.EFFECTIVE_END_DATE IS NULL
    AND HZ_ORGANIZATION_PROFILES.ACTUAL_CONTENT_SOURCE = 'SST'
    AND
    (HZ_ORGANIZATION_PROFILES.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS') OR
    HZ_PARTIES.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS') OR
    AP_SUPPLIERS.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    OR
    HZ_CUST_ACCOUNTS.LAST_UPDATE_DATE > TO_DATE('01/01/1753 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    AND HZ_ORGANIZATION_PROFILES.PARTY_ID = HZ_PARTIES.PARTY_ID
    AND HZ_CUST_ACCOUNTS.PARTY_ID(+)=HZ_PARTIES.PARTY_ID
    AND DOM_DUNS.OBJECT_ID(+) = HZ_PARTIES.PARTY_ID
    Oracle Fatal Error].
    2012-05-10 10:43:51 : ERROR : (16808 | READER_1_1_1) : (IS | BIA_IS) : node01_bidev.localhost : BLKR_16004 : ERROR: Prepare failed.
    2012-05-10 10:43:51 : INFO : (16808 | WRITER_1_*_1) : (IS | BIA_IS) : node01_bidev.localhost : WRT_8333 : Rolling back all the targets due to fatal session error.
    2012-05-10 10:43:51 : INFO : (16808 | WRITER_1_*_1) : (IS | BIA_IS) : node01_bidev.localhost : WRT_8325 : Final rollback executed for the target [W_ORG_DS] at end of load
    2012-05-10 10:43:51 : INFO : (16808 | WRITER_1_*_1) : (IS | BIA_IS) : node01_bidev.localhost : WRT_8035 : Load complete time: Thu May 10 10:43:51 2012
    LOAD SUMMARY
    ============
    WRT_8036 Target: W_PARTY_ORG_DS (Instance Name: [W_ORG_DS])
    WRT_8044 No data loaded for this target
    I have already checked table source (HZ_PARTIES,AP_SUPPLIERS,HZ_ORGANIZATION_PROFILES,HZ_CUST_ACCOUNTS) and table target (W_PARTY_ORG_DS). All source table and target table are exist. But when I ran execution plan for Financial Analytics, I got failed on task SDE_ORA_PartyOrganizationDimension_Customer_Full
    Did anyone ever get this issue?
    Regards,
    Joni

    Have you tried running the sql against your source? I ran this against one of our EBS instances and it runs fine.
    If it runs OK I would next check what connection the Informatica workflow is using. Check the full session and workflow logs to make sure its connecting to the correct database.

Maybe you are looking for

  • Exported PDF changes colour depending on software its viewed on

    Hi I've searched on the forums but can't find a solution to my problem. I export my design to PDF in indesign CS6 and looks fine on my Windows 8.1 laptop, but when the printer company open it up in their software it changes colour. I can replicate it

  • My i phone 3gs is unlocked so can i update iso or will it lock back

    my i phone 3gs is unlocked so can i update iso or will it **** back. and how do i find out whant network it started on

  • Points Hunter..

    Hi, I think Amruth Kumar and Chandra Prakash are Same. Table of t-codes About CTS Difference between MACRO & SUBROUTINE how to caputre report output into an internal table? Need transaction code How to debug a program running in background?

  • Adobe Reader 11 Silent Install

    The old was appending Install Manager -install to the .app binary no longer works. I need to deploy to hundreds of Mac. Is there an updated method for this?

  • Plz help to run the web service

    I have developed one web service & also deployed on tomcat 5.0 using Axis1.1. I have checked the wsdd & wsdl files in the browser. It is all ok. when sending some request from web service client by the following method & parameters SDNScan(java.lang.