CREATE PUBLIC DATABASE LINK ..
CONNECT TO ..
IDENTIFIED BY ..
USING '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = )) (CONNECT_DATA = (SID = )))';
USING '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = )) (CONNECT_DATA = (SERVICE_NAME = )))';
Give knowledge from knowledge Glad to help by e-mail sunsujjanont@gmail.com
Friday, September 14, 2018
Wednesday, July 18, 2018
How to get TAX PR and PO
PR
select sum (nvl(recoverable_tax,0)+nvl(nonrecoverable_tax,0))
from po_req_distributions_all
where requisition_line_id = p_pr
PO
select sum (nvl(recoverable_tax,0)+nvl(nonrecoverable_tax,0))
from po_distributions_all
where po_header_id = p_po
Amount PR
select sum(unit_price*quantity + get_tax_pr(requisition_line_id))
from po_requisition_lines_all
where requisition_header_id = p_pr;
Amount PO
select (zl.unit_price*zl.tax_rate)/100
from zx_lines zl
where zl.internal_organization_id = p_org
and zl.trx_id = p_po_no
and zl.trx_line_id = (select pll.line_location_id
from
po_lines_all pod, po_line_locations_all pll
where
pod.po_line_id = pll.po_line_id(+)
and
pod.org_id= pll.org_id(+)
and
pod.po_header_id = zl.trx_id
and
pod.po_line_id = p_po_line
and rownum =
'1');
Oracle EBS Module Purchasing (PR and PO)
PR
- po_requisition_headers_all
-
po_requisition_lines_all
-
po_req_distributions_all
PO
-
po_headers_all
-
po_lines_all
-
po_distributions_all
-
po_line_locations_all
การ link table จะเป็นในรูปแบบ นี้ เป็นการหา ข้อมูล จาก เลข PO หรือจะ ดึง ข้อมูล โดยมีเลข PR ก็ได้
select prh.requisition_header_id, prh.segment1, prh.description
from po_headers_all po
,
po_lines_all pod
,
po_line_locations_all pll
,
po_distributions_all po_dis
,
po_req_distributions_all pr_dis
,
po_requisition_lines_all prd
,
po_requisition_headers_all prh
where po.po_header_id=pod.po_header_id(+)
and po.org_id=pod.org_id(+)
and pod.po_line_id
= pll.po_line_id(+)
and pod.org_id= pll.org_id(+)
and pll.line_location_id
= po_dis.line_location_id(+)
and po_dis.req_distribution_id
=pr_dis.distribution_id
(+)
and prd.requisition_line_id=pr_dis.requisition_line_id
and prh.requisition_header_id=prd.requisition_header_id
and po.po_header_id
= p_po_header_id;
Introduction
หลังจากที่ผมได้ย้ายงานเมื่อ
ปี 2016 เพื่อย้ายงานจากการทำงานด้าน
Oracle Form Report และ
implement ด้วย
มาสู่ July 2016 ผมก็ย้ายมาทำที่ให้
ในบริษัทที่ทำเกี่ยวกับด้วน Oracle Enterprise Business
System (EBS)
ทั้งหมด
ผมก็จะเริ่มทำการ ลง บทความเกี่ยวกับ Oracle EBS ต่อไปครับ โดยหลักๆ ผมทำไว้ดูเอง
เพื่ออีกหน่อยจะลืม ผมจะได้รู้ว่า เออ ทำอะไรไป ได้อะไรมาบ้าง สิ่งที่แชร์
อาจจจะมีประโยชน์ กับบางท่าน หรือไม่มี สุดแล้วแต่ ท่านจะทำไปใช้แล้ว
ช่วยให้ท่านสามารถ แก้ไขปัญหาได้
ขอบคุณครับ
Suebpong Sunsujjanont
Thursday, October 13, 2016
Error Oracle*Terminal cannot open fmrweb
Error Oracle*Terminal cannot open fmrweb
problem
- Error by copy .env file to location Form Config
solution
- create env file in console Enterprice management
Monday, August 3, 2015
การแก้ไขปัญหา Oracle + Toad :: You have no Oracle Clients Installed
Problem
ปัญหามีดังนี้ อยู่ดีๆ มาวันนึง TOAD 9.0.0.160 ที่เคยใช้ปกติ เกิดใช้ขึ้นมาไม่ได้ เสียอย่างนั้น โดย error message ที่เจอก็คือ
You have no Oracle Clients Installed
ถึงกับงงกันไปเลย ทั้งๆ ที่มันก็ไม่ได้มีอะไรผิดปกติ ตัว client มันก็ต้องมีอยู่แล้ว เพราะว่าใช้กันทุกวัน
OS ที่ใช้คือ Windows XP SP2
Solution
เมื่อเจอปัญหา ก็ลองไปค้นหาใน google ก็ไม่ได้เรื่องอะไรเลย ไม่เจออะไรนอกจากปัญหาที่เจอกัน ที่ไม่มีการแก้ไขอะไร
แต่พอดูไปเรื่อยๆ ก็ไปเจอกับบทความเกี่ยวกับการใช้ติดต่อไปยัง Oracle server โดยไม่ต้องติดตั้ง Oracle client มันก็เข้าทางเราเลย เพราะว่า เครื่องเราเป็น client เหมือนกัน และต้องการติดต่อไปยัง Server เท่านั้น และเรายังติดตั้ง Oracle client ไว้อีก
ดังนั้นมาดูวิธีการหน่อยว่าทำอย่างไร
1. ไป Download Oracle Instant Client จากที่นี่
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
แล้วก็เลือกตาม OS ที่ใช้งานกันเลย
โดยผมเลือกใช้
2. หลังจากที่ downalod มาแล้วก็ extract ออกมาซะ
ตัวอย่างที่ผมได้คือ
c:\instant_client\instantclient10_1
โดยใน folder จะประกอบไปด้วย file ต่างๆ เช่น oci.dll, ojdbc.jar เป็นต้น
3. ทำการ config environment variables ของระบบดังนี้
สำหรับ folder ที่เก็บ file tnsnames.ora ซึ่งถ้ามีอยู่แล้วก็กำหนดไปเลย เช่น
หมายเหตุ
ถ้าไม่มี file tnsnames.ora ก็สามารถสร้างขึ้นมาเองได้ครับ
4. ทำการทดสอบโดยเปิด TOAD ขึ้นมาดู จะพบว่าปัญหาจะหมดไปแล้ว
ปัญหามีดังนี้ อยู่ดีๆ มาวันนึง TOAD 9.0.0.160 ที่เคยใช้ปกติ เกิดใช้ขึ้นมาไม่ได้ เสียอย่างนั้น โดย error message ที่เจอก็คือ
You have no Oracle Clients Installed
ถึงกับงงกันไปเลย ทั้งๆ ที่มันก็ไม่ได้มีอะไรผิดปกติ ตัว client มันก็ต้องมีอยู่แล้ว เพราะว่าใช้กันทุกวัน
OS ที่ใช้คือ Windows XP SP2
Solution
เมื่อเจอปัญหา ก็ลองไปค้นหาใน google ก็ไม่ได้เรื่องอะไรเลย ไม่เจออะไรนอกจากปัญหาที่เจอกัน ที่ไม่มีการแก้ไขอะไร
แต่พอดูไปเรื่อยๆ ก็ไปเจอกับบทความเกี่ยวกับการใช้ติดต่อไปยัง Oracle server โดยไม่ต้องติดตั้ง Oracle client มันก็เข้าทางเราเลย เพราะว่า เครื่องเราเป็น client เหมือนกัน และต้องการติดต่อไปยัง Server เท่านั้น และเรายังติดตั้ง Oracle client ไว้อีก
ดังนั้นมาดูวิธีการหน่อยว่าทำอย่างไร
1. ไป Download Oracle Instant Client จากที่นี่
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
แล้วก็เลือกตาม OS ที่ใช้งานกันเลย
โดยผมเลือกใช้
- Instant Client for Microsoft Windows (32-bit)
- และเลือก version เลย จากที่ลองใช้งานนั้นในเครื่องผม ที่ทำงานได้คือ Version 10.1.0.5 Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications
2. หลังจากที่ downalod มาแล้วก็ extract ออกมาซะ
ตัวอย่างที่ผมได้คือ
c:\instant_client\instantclient10_1
โดยใน folder จะประกอบไปด้วย file ต่างๆ เช่น oci.dll, ojdbc.jar เป็นต้น
3. ทำการ config environment variables ของระบบดังนี้
สำหรับ folder ที่เก็บ file tnsnames.ora ซึ่งถ้ามีอยู่แล้วก็กำหนดไปเลย เช่น
Quote
TNS_ADMIN=c:\oracle\product\NETWORK\ADMIN
PATH=c:\instant_client\instantclient10_1;%PATH%
PATH=c:\instant_client\instantclient10_1;%PATH%
หมายเหตุ
- สร้าง TNS_ADMIN ใน User Variable
- แก้ไข PATH ใน System Variable
ถ้าไม่มี file tnsnames.ora ก็สามารถสร้างขึ้นมาเองได้ครับ
4. ทำการทดสอบโดยเปิด TOAD ขึ้นมาดู จะพบว่าปัญหาจะหมดไปแล้ว
Wednesday, July 22, 2015
Config Create Service Windows and New Instance Report Oracle 11g
Script Create Service Weblogic
SETLOCAL
set DOMAIN_NAME=FormsReports
set USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\FormsReports
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=true
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
Script Create Service Form
SETLOCAL
set DOMAIN_NAME=FormsReports
set USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\FormsReports
set SERVER_NAME=WLS_FORMS
set PRODUCTION_MODE=true
set ADMIN_URL=http://PST-PMISAPPSRV1.mbk-center.mbk:7001
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
Script Create Service Report
SETLOCAL
set DOMAIN_NAME=FormsReports
set USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\FormsReports
set SERVER_NAME=WLS_REPORTS
set PRODUCTION_MODE=true
set ADMIN_URL=http://PST-PMISAPPSRV1.mbk-center.mbk:7001
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
Uninstall Service
@echo off
SETLOCAL
set WL_HOME=D:\Oracle\Middleware\wlserver_10.3
rem *** Uninstall the service
"%WL_HOME%\server\bin\beasvc" -remove -svcname:"beasvc adf_domain_AdminServer"
ENDLOCAL
Create Instance Report Server
ORACLE_INSTANCE/bin/opmnctl createcomponent \
-adminUsername weblogic \
-adminHost ${ADMIN_HOST} \
-adminPort ${ADMIN_PORT} \
-oracleHome ${ORACLE_HOME} \
-oracleInstance ${ORACLE_INSTANCE} \
-instanceName $INSTANCE_NAME \
-componentName \
-componentType ReportsServerComponent
Example Script Create New Report Instance
opmnctl createcomponent -adminUsername weblogic -adminHost PST-PMISAPPSRV1 -adminPort 7001 -oracleHome D:\Oracle\Middleware\as_1 -oracleInstance D:\Oracle\Middleware\asinst_1 -instanceName asinst_1 -componentName ReportsServer_Promis -componentType ReportsServerComponent
Script Start Instance
opmnctl startproc ias-component=ReportsServer_Promis
Subscribe to:
Posts (Atom)
How to Create shell script to Start Database and Checking Table Space
#dr_check_db_ERPGF.sh #!/bin/bash #run ./dr_check_db_ERPGF.sh | tee dr_ERPGF.out echo -e "\n" echo -e "+++++ Start Check Dat...
-
Module PO ในระบบ Oracle EBS หลักๆ PR - po_requisition_headers_al l - po_requisition_lines_all - ...
-
select concurrent_program_id, program_application_id, printer, program_short_name, argument_text, print_style, user_print_st...
-
Register รายงาน Oracle Form บน Oracle E-Business การลงทะเบียน Form Select Application Developer-> Application -> Form Application Dev...