I_PRATaxRptgHistoryOK

DDL: I_PRATAXRPTGHISTORYOK SQL: IPVTAXRPTGHISTOK Type: view BASIC

PRA Tax Reporting History Oklahoma

I_PRATaxRptgHistoryOK (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

PRA Oklahoma Tax Reporting History · Cross Applications

I_PRATaxRptgHistoryOK is a Basic CDS View (Cube) that provides data about "PRA Tax Reporting History Oklahoma" in SAP S/4HANA. It reads from 1 data source (oiut5_taxhstp) and exposes 92 fields with key fields CompanyCode, SalesDate, Product, Well, WellCompletion. It has 27 associations to related views.

SAP API Hub

StateC1
Line of BusinessCross Applications
Application ComponentIS-OIL-PRA
CapabilitiesData Source in SQL Select, Data Provider for Analytical Queries, Data Source for Defining CDS Entities
PackageCross Applications for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
oiut5_taxhstp oiut5_taxhstp from

Associations (27)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Well _Well $projection.Well = _Well.Well
[0..1] I_WellCompletion _WellCompletion $projection.Well = _WellCompletion.Well and $projection.WellCompletion = _WellCompletion.WellCompletion
[0..1] I_MeasurementPoint _MeasurementPoint $projection.MeasurementPoint = _MeasurementPoint.MeasurementPoint
[0..1] I_PRAJointVenture _PRAJointVenture $projection.CompanyCode = _PRAJointVenture.CompanyCode and $projection.JointVenture = _PRAJointVenture.PRAJointVenture
[0..1] I_DivisionOfInterest _DivisionOfInterest $projection.CompanyCode = _DivisionOfInterest.CompanyCode and $projection.JointVenture = _DivisionOfInterest.JointVenture and $projection.DivisionOfInterest = _DivisionOfInterest.DivisionOfInterest
[0..1] I_DeliveryNetwork _DeliveryNetwork $projection.DeliveryNetwork = _DeliveryNetwork.DeliveryNetwork
[0..1] I_PRAContract _PRAContract $projection.PRAContract = _PRAContract.PRAContract
[0..1] I_VolumeType _VolumeType $projection.VolumeType = _VolumeType.VolumeType
[0..1] I_TaxClassification _TaxClassification $projection.Country = _TaxClassification.Country and $projection.PrimaryGeogrlLocation = _TaxClassification.PrimaryGeogrlLocation and $projection.TaxClassification = _TaxClassification.TaxClassification
[0..1] I_Indicator _HasSeveranceTaxPaytOblgn $projection.HasSeveranceTaxPaytOblgn = _HasSeveranceTaxPaytOblgn.IndicatorValue
[0..1] I_Indicator _SeveranceTaxRptgType $projection.SeveranceTaxRptgType = _SeveranceTaxRptgType.IndicatorValue
[0..1] I_PRAJointVenture _UnitJointVenture $projection.CompanyCode = _UnitJointVenture.CompanyCode and $projection.UnitJointVenture = _UnitJointVenture.PRAJointVenture
[0..1] I_Country _Country $projection.Country = _Country.Country
[0..1] I_PrimaryGeogrlLocation _PrimaryGeogrlLocation $projection.Country = _PrimaryGeogrlLocation.Country and $projection.PrimaryGeogrlLocation = _PrimaryGeogrlLocation.PrimaryGeogrlLocation
[0..1] I_Currency _Currency $projection.CompanyCodeCurrency = _Currency.Currency
[0..1] I_UnitOfMeasure _UnitOfMeasure $projection.BaseUnit = _UnitOfMeasure.UnitOfMeasure
[0..1] I_PRATaxOKExemptCode _TaxExemptCode1 $projection.TaxExemptCode1 = _TaxExemptCode1.TaxExemptCode
[0..1] I_PRATaxOKExemptCode _TaxExemptCode2 $projection.TaxExemptCode2 = _TaxExemptCode2.TaxExemptCode
[0..1] I_PRATaxOKExemptCode _TaxExemptCode3 $projection.TaxExemptCode3 = _TaxExemptCode3.TaxExemptCode
[0..1] I_PRATaxOKExemptCode _TaxExemptCode4 $projection.TaxExemptCode4 = _TaxExemptCode4.TaxExemptCode
[0..1] I_PRATaxOKExemptCode _TaxExemptCode5 $projection.TaxExemptCode5 = _TaxExemptCode5.TaxExemptCode
[0..1] I_PRAProduct _Product $projection.Product = _Product.Product
[0..1] I_TaxRptgRvslOrBkgOrAdjmtCode _TaxRptgRvslOrBkgOrAdjmt $projection.TaxRptgRvslOrBkgOrAdjmt = _TaxRptgRvslOrBkgOrAdjmt.TaxRptgRvslOrBkgOrAdjmt
[0..1] I_ProducerOrPurchaserCode _ProducerOrPurchaserCode $projection.ProducerOrPurchaserCode = _ProducerOrPurchaserCode.ProducerOrPurchaserCode
[0..1] I_PRATaxMstrDataRecgLvl _MasterDataRecordingLvl $projection.MasterDataRecordingLvl = _MasterDataRecordingLvl.MasterDataRecordingLvl
[0..1] I_PRATaxOkProductType _ProductType $projection.ProductType = _ProductType.ProductType

Annotations (14)

NameValueLevelField
EndUserText.label PRA Tax Reporting History Oklahoma view
Analytics.dataCategory #CUBE view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
Analytics.dataExtraction.enabled true view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName IPVTAXRPTGHISTOK view
AccessControl.authorizationCheck #CHECK view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.sapObjectNodeType.name PRAOklahomaTaxRptgHist view

Fields (92)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Company Code
KEY SalesDate sales_dt Sales Date / Month
KEY Product pdcd Full three char. product code (Major and Detail Products)
KEY Well wl_no Well ID number
KEY WellCompletion wc_no Well Completion Number
KEY MeasurementPoint mp_no Measurement point number
KEY JointVenture vname Volatility Name
KEY DivisionOfInterest doi_no Division of Interest (DOI)
KEY DeliveryNetwork dn_no Delivery network number
KEY PRAContract ct_no Contract Number
KEY VolumeType vl_type_cd Volume type code
KEY TaxClassification tax_cls Tax Class
KEY ProductionUnitNumber pun Tax 2.0 - OKGP15 - Production Unit Number
KEY TaxRptgRvslOrBkgOrAdjmt rev_book_adj_ind Tax 2.0 - Reversal/Booking/Reversal Adjustment/Adjustment
AllocationRatio Tax 2.0 - Allocation Percentage
ProducerOrPurchaserCode prod_purc_ind Producer or Purchaser
UnitJointVenture Unit Venture
HasSeveranceTaxPaytOblgn pay_fl Tax Severance Tax Calculation Payment Obligations Types
SeveranceTaxRptgType rpt_fl State Severance Tax Reporting Indicators
Country Country/Region Key
PrimaryGeogrlLocation Primary Geographical Location
BaseUnit uom Measurement unit
CompanyCodeCurrency _CompanyCode Currency Valuation Crcy
TaxRate Value tax rate
ProducerOrPurchaserNmbr Producer/Purchaser
ValuationDocumentNumber doc_no Val. document number
ValuationDocumentYear doc_year Mat. Doc. Year
TaxExemptCode1 exempt_code_1 Tax 2.0 OKGP - Entity Type 01 Exempt Code
TaxExemptCode2 exempt_code_2 Tax 2.0 OKGP - Entity Type 02 Exempt Code
TaxExemptCode3 exempt_code_3 Tax 2.0 OKGP - Entity Type 03 Exempt Code
TaxExemptCode4 exempt_code_4 Tax 2.0 OKGP - Entity Type 04 Exempt Code
TaxExemptCode5 exempt_code_5 Tax 2.0 OKGP - Entity Type 05 Exempt Code
MasterDataRecordingLvl master_level Tax 2.0 - Master Level
ExtProducerOrPurchaserNmbr prod_purch_no Tax 2.0 - Oklahoma Producer/Purchaser Number
ProductType ok_product_code Tax 2.0 - Oklahoma Product Code
TaxPayerIDByAgency taxpayer_number Tax 2.0 - Oklahoma Taxpayer Number
ReportingCompany fein_ssn Tax 2.0 - FEIN/SSN
ProductionDate production_date Tax 2.0 OK - Production Date (YYYYMM)
CreatedByUser Created By
CreationDateTime Created On Timestamp
GrossVolInBaseUnit gross_vol Gross Volume
GrossValInCoCodeCrcy gross_val Gross Value
TaxableVolInBaseUnit tax_vol Taxable Volume
TaxableValInCoCodeCrcy tax_val Taxable Value
TaxExmptVol1InBaseUnit exe_enttype1_vol Tax 2.0 - Exempt Entity Type 1 Volume
TaxExmptVal1InCoCdCrcy exe_enttype1_val Tax 2.0 - Exempt Entity Type 1 Value
TaxExmptVol2InBaseUnit exe_enttype2_vol Tax 2.0 - Exempt Entity Type 2 Volume
TaxExmptVal2InCoCdCrcy exe_enttype2_val Tax 2.0 - Exempt Entity Type 2 Value
TaxExmptVol3InBaseUnit exe_enttype3_vol Tax 2.0 - Exempt Entity Type 3 Volume
TaxExmptVal3InCoCdCrcy exe_enttype3_val Tax 2.0 - Exempt Entity Type 3 Value
TaxExmptVol4InBaseUnit exe_enttype4_vol Tax 2.0 - Exempt Entity Type 4 Volume
TaxExmptVal4InCoCdCrcy exe_enttype4_val Tax 2.0 - Exempt Entity Type 4 Value
TaxExmptVol5InBaseUnit exe_enttype5_vol Tax 2.0 - Exempt Entity Type 5 Volume
TaxExmptVal5InCoCdCrcy exe_enttype5_val Tax 2.0 - Exempt Entity Type 5 Value
EnhncdOilRcvryVolInBaseUnit eor_vol EOR Volume
EnhncdOilRcvryValInCoCdCrcy eor_val EOR Value
MktgCostInCoCodeCrcy mkt_cost Marketing Cost
MktgReimbmtCostInCoCodeCrcy mkt_cost_reimb Marketing Cost Reimbursement
GrossProdnTaxAmtInCoCodeCrcy gp_tax_amt Tax 2.0 - Gross Production Tax Amount
PetroleumExcsTxAmtInCoCdCrcy pe_tax_amt Tax 2.0 - Petroleum Excise Tax Amount
RevolvingFundTxAmtInCoCdCrcy rf_tax_amt Tax 2.0 - Revolving Fund Tax Amount
MarginProdgTxAmtInCoCdCrcy mp_tax_amt Tax 2.0 - Marginally Producing Tax Amount
KoiwaTribeTaxAmtInCoCodeCrcy kw_tax_amt Tax 2.0 - Kiowa Tax Amount
ArapahoTribeTaxAmtInCoCdCrcy Shoshone Arapaho Tax
OriginTransaction Source Transaction ID
_CompanyCode _CompanyCode
_Well _Well
_WellCompletion _WellCompletion
_MeasurementPoint _MeasurementPoint
_PRAJointVenture _PRAJointVenture
_DivisionOfInterest _DivisionOfInterest
_DeliveryNetwork _DeliveryNetwork
_PRAContract _PRAContract
_TaxClassification _TaxClassification
_UnitJointVenture _UnitJointVenture
_VolumeType _VolumeType
_HasSeveranceTaxPaytOblgn _HasSeveranceTaxPaytOblgn
_SeveranceTaxRptgType _SeveranceTaxRptgType
_UnitOfMeasure _UnitOfMeasure
_Currency _Currency
_Country _Country
_PrimaryGeogrlLocation _PrimaryGeogrlLocation
_TaxRptgRvslOrBkgOrAdjmt _TaxRptgRvslOrBkgOrAdjmt
_ProducerOrPurchaserCode _ProducerOrPurchaserCode
_MasterDataRecordingLvl _MasterDataRecordingLvl
_ProductType _ProductType
_TaxExemptCode1 _TaxExemptCode1
_TaxExemptCode2 _TaxExemptCode2
_TaxExemptCode3 _TaxExemptCode3
_TaxExemptCode4 _TaxExemptCode4
_TaxExemptCode5 _TaxExemptCode5
_Product _Product

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_PRATaxRptgHistoryOK.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IPVTAXRPTGHISTOK

CREATE VIEW I_PRATaxRptgHistoryOK AS
SELECT
  cast(bukrs as fis_bukrs preserving type ) AS CompanyCode,
  sales_dt AS SalesDate,
  pdcd AS Product,
  wl_no AS Well,
  wc_no AS WellCompletion,
  mp_no AS MeasurementPoint,
  vname AS JointVenture,
  doi_no AS DivisionOfInterest,
  dn_no AS DeliveryNetwork,
  ct_no AS PRAContract,
  vl_type_cd AS VolumeType,
  tax_cls AS TaxClassification,
  pun AS ProductionUnitNumber,
  rev_book_adj_ind AS TaxRptgRvslOrBkgOrAdjmt,
  cast(alloc_percent as oiu_vdm_allocation_percentage) AS AllocationRatio,
  prod_purc_ind AS ProducerOrPurchaserCode,
  cast(unit_vname as oiu_vdm_unit_venture preserving type) AS UnitJointVenture,
  pay_fl AS HasSeveranceTaxPaytOblgn,
  rpt_fl AS SeveranceTaxRptgType,
  cast('US' as land1_gp) AS Country,
  cast( '35' as oiu_pri_geo_loc ) AS PrimaryGeogrlLocation,
  uom AS BaseUnit,
  _CompanyCode.Currency AS CompanyCodeCurrency,
  cast(val_tax_rat as oiu_vdm_val_tax_rat) AS TaxRate,
  cast(other_party as oiu_vdm_producer_purchaser) AS ProducerOrPurchaserNmbr,
  doc_no AS ValuationDocumentNumber,
  doc_year AS ValuationDocumentYear,
  exempt_code_1 AS TaxExemptCode1,
  exempt_code_2 AS TaxExemptCode2,
  exempt_code_3 AS TaxExemptCode3,
  exempt_code_4 AS TaxExemptCode4,
  exempt_code_5 AS TaxExemptCode5,
  master_level AS MasterDataRecordingLvl,
  prod_purch_no AS ExtProducerOrPurchaserNmbr,
  ok_product_code AS ProductType,
  taxpayer_number AS TaxPayerIDByAgency,
  fein_ssn AS ReportingCompany,
  production_date AS ProductionDate,
  cast(oiu_cruser as fclm_bam_created_by) AS CreatedByUser,
  cast(oiu_timestamp as oiu_vdm_created_on_ts) AS CreationDateTime,
  gross_vol AS GrossVolInBaseUnit,
  gross_val AS GrossValInCoCodeCrcy,
  tax_vol AS TaxableVolInBaseUnit,
  tax_val AS TaxableValInCoCodeCrcy,
  exe_enttype1_vol AS TaxExmptVol1InBaseUnit,
  exe_enttype1_val AS TaxExmptVal1InCoCdCrcy,
  exe_enttype2_vol AS TaxExmptVol2InBaseUnit,
  exe_enttype2_val AS TaxExmptVal2InCoCdCrcy,
  exe_enttype3_vol AS TaxExmptVol3InBaseUnit,
  exe_enttype3_val AS TaxExmptVal3InCoCdCrcy,
  exe_enttype4_vol AS TaxExmptVol4InBaseUnit,
  exe_enttype4_val AS TaxExmptVal4InCoCdCrcy,
  exe_enttype5_vol AS TaxExmptVol5InBaseUnit,
  exe_enttype5_val AS TaxExmptVal5InCoCdCrcy,
  eor_vol AS EnhncdOilRcvryVolInBaseUnit,
  eor_val AS EnhncdOilRcvryValInCoCdCrcy,
  mkt_cost AS MktgCostInCoCodeCrcy,
  mkt_cost_reimb AS MktgReimbmtCostInCoCodeCrcy,
  gp_tax_amt AS GrossProdnTaxAmtInCoCodeCrcy,
  pe_tax_amt AS PetroleumExcsTxAmtInCoCdCrcy,
  rf_tax_amt AS RevolvingFundTxAmtInCoCdCrcy,
  mp_tax_amt AS MarginProdgTxAmtInCoCdCrcy,
  kw_tax_amt AS KoiwaTribeTaxAmtInCoCodeCrcy,
  cast(ca_tax_amt as oiu_vdm_shoshone_arapaho_tax) AS ArapahoTribeTaxAmtInCoCdCrcy,
  cast( '/PRA/RP_WORKPLACE' as fqm_origin_trans_id ) AS OriginTransaction
FROM oiut5_taxhstp
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_Well AS _Well ON Well = _Well.Well  -- association [0..1]
LEFT OUTER JOIN I_WellCompletion AS _WellCompletion ON Well = _WellCompletion.Well AND WellCompletion = _WellCompletion.WellCompletion  -- association [0..1]
LEFT OUTER JOIN I_MeasurementPoint AS _MeasurementPoint ON MeasurementPoint = _MeasurementPoint.MeasurementPoint  -- association [0..1]
LEFT OUTER JOIN I_PRAJointVenture AS _PRAJointVenture ON CompanyCode = _PRAJointVenture.CompanyCode AND JointVenture = _PRAJointVenture.PRAJointVenture  -- association [0..1]
LEFT OUTER JOIN I_DivisionOfInterest AS _DivisionOfInterest ON CompanyCode = _DivisionOfInterest.CompanyCode AND JointVenture = _DivisionOfInterest.JointVenture AND DivisionOfInterest = _DivisionOfInterest.DivisionOfInterest  -- association [0..1]
LEFT OUTER JOIN I_DeliveryNetwork AS _DeliveryNetwork ON DeliveryNetwork = _DeliveryNetwork.DeliveryNetwork  -- association [0..1]
LEFT OUTER JOIN I_PRAContract AS _PRAContract ON PRAContract = _PRAContract.PRAContract  -- association [0..1]
LEFT OUTER JOIN I_VolumeType AS _VolumeType ON VolumeType = _VolumeType.VolumeType  -- association [0..1]
LEFT OUTER JOIN I_TaxClassification AS _TaxClassification ON Country = _TaxClassification.Country AND PrimaryGeogrlLocation = _TaxClassification.PrimaryGeogrlLocation AND TaxClassification = _TaxClassification.TaxClassification  -- association [0..1]
LEFT OUTER JOIN I_Indicator AS _HasSeveranceTaxPaytOblgn ON HasSeveranceTaxPaytOblgn = _HasSeveranceTaxPaytOblgn.IndicatorValue  -- association [0..1]
LEFT OUTER JOIN I_Indicator AS _SeveranceTaxRptgType ON SeveranceTaxRptgType = _SeveranceTaxRptgType.IndicatorValue  -- association [0..1]
LEFT OUTER JOIN I_PRAJointVenture AS _UnitJointVenture ON CompanyCode = _UnitJointVenture.CompanyCode AND UnitJointVenture = _UnitJointVenture.PRAJointVenture  -- association [0..1]
LEFT OUTER JOIN I_Country AS _Country ON Country = _Country.Country  -- association [0..1]
LEFT OUTER JOIN I_PrimaryGeogrlLocation AS _PrimaryGeogrlLocation ON Country = _PrimaryGeogrlLocation.Country AND PrimaryGeogrlLocation = _PrimaryGeogrlLocation.PrimaryGeogrlLocation  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON CompanyCodeCurrency = _Currency.Currency  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON BaseUnit = _UnitOfMeasure.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_PRATaxOKExemptCode AS _TaxExemptCode1 ON TaxExemptCode1 = _TaxExemptCode1.TaxExemptCode  -- association [0..1]
LEFT OUTER JOIN I_PRATaxOKExemptCode AS _TaxExemptCode2 ON TaxExemptCode2 = _TaxExemptCode2.TaxExemptCode  -- association [0..1]
LEFT OUTER JOIN I_PRATaxOKExemptCode AS _TaxExemptCode3 ON TaxExemptCode3 = _TaxExemptCode3.TaxExemptCode  -- association [0..1]
LEFT OUTER JOIN I_PRATaxOKExemptCode AS _TaxExemptCode4 ON TaxExemptCode4 = _TaxExemptCode4.TaxExemptCode  -- association [0..1]
LEFT OUTER JOIN I_PRATaxOKExemptCode AS _TaxExemptCode5 ON TaxExemptCode5 = _TaxExemptCode5.TaxExemptCode  -- association [0..1]
LEFT OUTER JOIN I_PRAProduct AS _Product ON Product = _Product.Product  -- association [0..1]
LEFT OUTER JOIN I_TaxRptgRvslOrBkgOrAdjmtCode AS _TaxRptgRvslOrBkgOrAdjmt ON TaxRptgRvslOrBkgOrAdjmt = _TaxRptgRvslOrBkgOrAdjmt.TaxRptgRvslOrBkgOrAdjmt  -- association [0..1]
LEFT OUTER JOIN I_ProducerOrPurchaserCode AS _ProducerOrPurchaserCode ON ProducerOrPurchaserCode = _ProducerOrPurchaserCode.ProducerOrPurchaserCode  -- association [0..1]
LEFT OUTER JOIN I_PRATaxMstrDataRecgLvl AS _MasterDataRecordingLvl ON MasterDataRecordingLvl = _MasterDataRecordingLvl.MasterDataRecordingLvl  -- association [0..1]
LEFT OUTER JOIN I_PRATaxOkProductType AS _ProductType ON ProductType = _ProductType.ProductType  -- association [0..1]
;