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)

Module PO ในระบบ Oracle EBS หลักๆ

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

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...