zoukankan      html  css  js  c++  java
  • EBS标准的查看供应商地点

    VO数据源:oracle.apps.pos.supplier.server.SitesVO

    SELECT pvsa.address_style,
           hzl.language,
           pvsa.province,
           pvsa.country,
           pvsa.area_code,
           pvsa.phone,
           pvsa.customer_num,
           pvsa.ship_to_location_id,
           pvsa.bill_to_location_id,
           pvsa.ship_via_lookup_code,
           pvsa.freight_terms_lookup_code,
           pvsa.fob_lookup_code,
           pvsa.inactive_date,
           pvsa.fax,
           pvsa.fax_area_code,
           pvsa.telex,
           pvsa.terms_date_basis,
           pvsa.distribution_set_id,
           pvsa.accts_pay_code_combination_id,
           pvsa.prepay_code_combination_id,
           pvsa.pay_group_lookup_code,
           pvsa.payment_priority,
           pvsa.terms_id,
           pvsa.invoice_amount_limit,
           pvsa.pay_date_basis_lookup_code,
           pvsa.always_take_disc_flag,
           pvsa.invoice_currency_code,
           pvsa.payment_currency_code,
           pvsa.county,
           pvsa.vendor_site_id,
           pvsa.last_update_date,
           pvsa.last_updated_by,
           pvsa.vendor_id,
           pvsa.vendor_site_code,
           pvsa.vendor_site_code_alt,
           pvsa.last_update_login,
           pvsa.creation_date,
           pvsa.created_by,
           pvsa.purchasing_site_flag,
           pvsa.rfq_only_site_flag,
           pvsa.pay_site_flag,
           pvsa.attention_ar_flag,
           pvsa.address_line1,
           pvsa.address_line2,
           pvsa.address_line3,
           pvsa.address_lines_alt,
           pvsa.city,
           pvsa.state,
           pvsa.zip,
           pvsa.hold_all_payments_flag,
           pvsa.hold_future_payments_flag,
           pvsa.hold_reason,
           pvsa.hold_unmatched_invoices_flag,
           pvsa.tax_reporting_site_flag,
           pvsa.attribute_category,
           pvsa.attribute1,
           pvsa.attribute2,
           pvsa.attribute3,
           pvsa.attribute4,
           pvsa.attribute5,
           pvsa.attribute6,
           pvsa.attribute7,
           pvsa.attribute8,
           pvsa.attribute9,
           pvsa.attribute10,
           pvsa.attribute11,
           pvsa.attribute12,
           pvsa.attribute13,
           pvsa.attribute14,
           pvsa.attribute15,
           pvsa.request_id,
           pvsa.program_application_id,
           pvsa.program_id,
           pvsa.program_update_date,
           pvsa.validation_number,
           pvsa.exclude_freight_from_discount,
           pvsa.bank_charge_bearer,
           pvsa.org_id,
           pvsa.check_digits,
           pvsa.address_line4,
           pvsa.allow_awt_flag,
           pvsa.awt_group_id,
           pvsa.pay_awt_group_id,
           pvsa.default_pay_site_id,
           pvsa.pay_on_code,
           pvsa.pay_on_receipt_summary_code,
           pvsa.global_attribute_category,
           pvsa.global_attribute1,
           pvsa.global_attribute2,
           pvsa.global_attribute3,
           pvsa.global_attribute4,
           pvsa.global_attribute5,
           pvsa.global_attribute6,
           pvsa.global_attribute7,
           pvsa.global_attribute8,
           pvsa.global_attribute9,
           pvsa.global_attribute10,
           pvsa.global_attribute11,
           pvsa.global_attribute12,
           pvsa.global_attribute13,
           pvsa.global_attribute14,
           pvsa.global_attribute15,
           pvsa.global_attribute16,
           pvsa.global_attribute17,
           pvsa.global_attribute18,
           pvsa.global_attribute19,
           pvsa.global_attribute20,
           pvsa.tp_header_id,
           pvsa.edi_id_number,
           pvsa.ece_tp_location_code,
           pvsa.pcard_site_flag,
           pvsa.match_option,
           pvsa.country_of_origin_code,
           pvsa.future_dated_payment_ccid,
           pvsa.create_debit_memo_flag,
           pvsa.supplier_notif_method,
           pvsa.email_address,
           nvl(pvsa.primary_pay_site_flag,
               'N') AS primary_pay_site_flag,
           pvsa.shipping_control,
           pvsa.selling_company_identifier,
           pvsa.gapless_inv_num_flag,
           pvsa.duns_number,
           pvsa.location_id,
           pvsa.party_site_id,
           pvsa.tolerance_id,
           pvsa.services_tolerance_id,
           NULL AS payment_method_lookup_code -- obsoleted donot use
          ,
           hrou.name AS org_name,
           pay_site.vendor_site_code AS default_pay_site_name,
           cor.territory_short_name AS country_of_origin_name,
           aag.name AS awt_group_name,
           pay_aag.name AS pay_awt_group_name,
           pos_vendor_util_pkg.get_le_name_by_liability_acct(pvsa.accts_pay_code_combination_id,
                                                             pvsa.org_id) AS entity_name,
           pos_vendor_util_pkg.get_le_id_by_liability_acct(pvsa.accts_pay_code_combination_id,
                                                           pvsa.org_id) AS entity_id,
           pvsa.retainage_rate,
           ads.distribution_set_name,
           poas.location_id AS ship_net_loc_id,
           ap_param.allow_awt_flag AS payable_tax_flag,
           pos_util_pkg.is_supp_ccr(1.0,
                                    '',
                                    pvsa.vendor_id) AS is_supp_ccr_str,
           pos_util_pkg.is_site_ccr(1.0,
                                    '',
                                    pvsa.vendor_site_id) AS is_site_ccr_str,
           pos_util_pkg.is_fv_enabled() AS is_fv_enabled_str,
           decode(pos_util_pkg.is_site_ccr(1.0,
                                           '',
                                           pvsa.vendor_site_id),
                  'T',
                  'ViewCcrActive',
                  'ViewCcrInactive') AS viewccrsupplier,
           decode(pos_util_pkg.is_site_ccr(1.0,
                                           '',
                                           pvsa.vendor_site_id),
                  'T',
                  'Y',
                  'N') AS site_ccr_chk,
           'hldUnvalInv' AS hold_unval_invoices,
           'HoldPay1' AS hold_all_invoices,
           'holdUnmtchInv1' AS hold_unmatch_inv,
           pos_util_pkg.is_ccr_site_active(1.0,
                                           '',
                                           pvsa.vendor_site_id) is_ccr_site_active_str,
           ap_param.create_awt_dists_type AS awt_option_type,
           hrl.location_code AS ship_to_address,
           decode(ap_vendor_pub_pkg.is_vendor_site_merged(pvsa.vendor_site_id),
                  'Y',
                  'EditDateDisabled',
                  'EditDateEnabled') AS is_date_edit_enabled,
           decode(pv.vendor_type_lookup_code,
                  'EMPLOYEE',
                  decode(pvsa.vendor_site_code,
                         'HOME',
                         fnd_message.get_string('POS',
                                                'POS_HT_SP_HOME'),
                         'OFFICE',
                         fnd_message.get_string('POS',
                                                'POS_HT_SP_OFFICE'),
                         'PROVISIONAL',
                         fnd_message.get_string('POS',
                                                'POS_HT_SP_PROVISIONAL'),
                         pvsa.vendor_site_code),
                  pvsa.vendor_site_code) sitename,
           terms.name AS terms_desc,
           fnduser1.user_name last_updated_user_name,
           fnduser2.user_name created_user_name
      FROM ap_supplier_sites_all    pvsa,
           hr_operating_units       hrou,
           ap_supplier_sites_all    pay_site,
           fnd_territories_vl       cor,
           ap_awt_groups            aag,
           ap_awt_groups            pay_aag,
           hz_locations             hzl,
           ap_distribution_sets     ads,
           po_location_associations poas,
           ap_system_parameters_all ap_param,
           hr_locations             hrl,
           ap_terms_tl              terms,
           fnd_user                 fnduser1,
           fnd_user                 fnduser2,
           ap_suppliers             pv
     WHERE pvsa.vendor_id = pv.Vendor_Id
       AND pv.vendor_id = pvsa.vendor_id
       AND poas.vendor_id(+) = pvsa.vendor_id
       AND poas.vendor_site_id(+) = pvsa.vendor_site_id
       AND hzl.location_id(+) = pvsa.location_id
       AND hrl.location_id(+) = pvsa.ship_to_location_id
       AND hrou.organization_id = pvsa.org_id
       AND pvsa.default_pay_site_id = pay_site.vendor_site_id(+)
       AND pvsa.country_of_origin_code = cor.territory_code(+)
       --在后台查询供应商地点时可将其先注释
       --AND mo_global.check_access(pvsa.org_id) = 'Y'
       AND pvsa.awt_group_id = aag.group_id(+)
       AND pvsa.pay_awt_group_id = pay_aag.group_id(+)
       AND pvsa.distribution_set_id = ads.distribution_set_id(+)
       AND pvsa.org_id = ap_param.org_id
       AND pvsa.terms_id = terms.term_id(+)
       AND terms.language(+) = userenv('LANG')
       AND terms.enabled_flag(+) = 'Y'
       AND fnduser1.user_id = pvsa.last_updated_by
       AND fnduser2.user_id = pvsa.created_by
       AND PV.VENDOR_NAME='中粮屯河股份有限公司'
  • 相关阅读:
    数据库操作,内外联查询,分组查询,嵌套查询,交叉查询,多表查询,语句小结
    重复控件Repeater和数据列表控件DataList
    网格视图控件GridView (2)
    用好VS2005之扩展membership服务(1)
    5.4 网格视图控件GridView (1)
    数据源控件
    ASP.NET程序中常用的三十三种代码
    在DataSet和DataReader之间选择
    自定义ASP.net 2.0 Membership的步骤,和entry 'AspNetSqlMembershipProvider' has already been added错误的解决
    INNER JOIN
  • 原文地址:https://www.cnblogs.com/huanghongbo/p/4521852.html
Copyright © 2011-2022 走看看