petroleum astm d1250-80 sp09

Upload: jusril-a-hidayat

Post on 14-Apr-2018

471 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    1/13

    21.11.2008

    BCP 1.0A

    ASTM D 1250-80 /MPMS Chapter 11.1

    High performance ABAP

    solution to calculate volume

    correction factors and base

    densities for crude oil and

    petroleum products

    Version 02 (SP09)

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    2/13

    ASTM D1250-80 2/13

    Notes:

    Copyright 2008 QuantityWare GmbH. All rights reserved.

    SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and servicesmentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG inGermany and in several other countries all over the world. All other product and service names mentioned

    are the trademarks of their respective companies.

    Microsoft, Windows, SQL-Server, Powerpoint and Outlook are registered trademarks of MicrosoftCorporation.

    These materials and the information therein are subject to change without notice. These materials areprovided by the company QuantityWare GmbH for informational purposes only. There is no impliedrepresentation or warranty of any kind, and QuantityWare GmbH shall not be liable for errors or omissionswith respect to the materials provided. The only warranties for the products and services of QuantityWareGmbH are those set forth in the express warranty statements accompanying such products and services, ifany. No statement within this document should be construed as constituting an additional warranty.

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    3/13

    ASTM D 1250-80 3/13

    Contents

    BCP 1.0A ....................................................................................................................................... 1

    ASTM D 1250-80 / MPMS CHAPTER 11.1 .................................................................................. 1Notes: ............................................................................................................................... 2Contents ........................................................................................................................... 3Introduction ....................................................................................................................... 41. Installation..................................................................................................................... 52. Installation Components ............................................................................................... 6

    Function Group /QTYW/D1250_80_Q ................................................................. 6Customizing ......................................................................................................... 6Test Program ....................................................................................................... 6Service Programs ................................................................................................ 6

    3. Implementation of ASTM D 1250-80 ............................................................................ 73.1. Overview ....................................................................................................... 73.2. Handling of Calculations that are out of range ............................................. 83.3. Customizing .................................................................................................. 93.4. Changing current productive system standard calculation ......................... 10

    4. Installation Test .......................................................................................................... 125. Integration into SAP - QCI desktop calculator ............................................................ 13

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    4/13

    ASTM D1250-80 4/13

    Introduction

    This solution is an implementation of Standard ASTM D 1250-80 including the tables 59A,B,D

    and 60A,B,C,D (for a base temperature of 20 degree Celsius) by QuantityWare GmbH based on

    the product Bulk Calculations Petroleum Version 1.0A (BCP 10A).

    The solution runs only in a SAP ABAP environment in which IS-Oil has been implemented.

    This solution can be accessed by the SAP Quantity Conversion Interface (QCI) and is controlled

    by the provided conversion groups.

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    5/13

    ASTM D 1250-80 5/13

    1. Installation

    The technical implementation is provided as a part of a QuantityWare support package.

    Please follow the standard SAP instructions for importing service packages into your system via

    transaction SPAM.

    SAP Oil and Gas must be installed

    QuantityWares BCP 10A must be installed.

    Customizing settings, which are needed in every client in which this standard will be used, are

    included in the delivery package.

    On releases based upon SAP 4.72 and below, the related customizing transport (defined in

    Note000006) must be imported into all necessary clients, or distributed to them from client 000.

    On releases based upon SAP ERP 2005 (ECC 6.00) or newer, BC Set /QTYW/BCP_10A must

    be activated in the relevant clients.

    Please refer to the QuantityWare BCP 10A Installation Guide for more information.

    WARNING: If you import the customizing template into a pre-existing client, any

    pre-existing entries listed within the template (transport or BC-Set) will be

    OVERWRITTEN!

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    6/13

    ASTM D1250-80 6/13

    2. Installation Components

    Function Group /QTYW/D1250_80_Q

    Standard ASTM D 1250-80

    This Function Group contains all procedures (also called tables) defined in the standard and

    interface functions to call the tables from the QCI including using the German rounding rules.

    Customizing

    Conversion groups for all functions (tables) are included (See chapter 3.3 for a detailed list).

    Test Program

    /QTYW/D1250_80_ABAP_TEST Test of the procedures

    Service Programs

    /QTYW/CHANGE_1980_C_ABAP Change conversion groups between

    1980 C 1980 ABAP implementation

    /QTYW/CHANGE_1980_2004 Change conversion groups between

    ASTM 1980 ASTM 2004 ABAP

    /QTYW/CONVGRP_RESTORE Restore conversion groups from backup

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    7/13

    ASTM D 1250-80 7/13

    3. Implementation of ASTM D 1250-80

    3.1. Overview

    So far, the only available implementation of ASTM D 1250-1980 for an SAP Oil & Gas

    environment is based on the source program codes (in the language C) originally provided

    by the American Petroleum Institute (API) - using an interface program provided by SAP AG.

    Although ASTM 1980 has been superseded by ASTM 2004, use of this standard can still be

    justified in certain business scenarios (e.g. local legal requirements, contractual agreements

    between business partners).

    QuantityWare recommends all customers to move to the latest version of the

    ASTM D1250-xx standard (where xx refers to a year at the time of writing, 07)

    as soon as is feasible. A new installation should not even consider using the

    1980 routines, unless business requirements necessitate usage.

    QuantityWare provides the implementation of ASTM 1980 in ABAP for the following reasons:

    To avoid operating systems dependencies

    To avoid hardware dependencies

    To increase calculation performance

    To stabilize calculation reliability.

    The original standard has been published in the document

    Petroleum Measurement Tables

    Volume Correction Factors

    Volume X Background, Development and Program Documentation

    This document provides example coding of the standards tables in FORTRAN, however this

    standard is based on fix point arithmetic.

    To attain the highest degree of accuracy within such an implementation, it is important to handle

    the scale of the numeric data in such a way that the largest factor of possible significant digits is

    returned.A C source code implementation of such functions is available from the American

    Petroleum Institute as mentioned above, however this coding contains several modifications

    (deviations from the original FORTRAN implementation procedure) in order to achieve a higher

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    8/13

    ASTM D1250-80 8/13

    accuracy of calculation results. Although the FORTRAN codes represent the printed standard,

    the use of a modified implementation (as realized by the API c-codes) is common in the

    Petroleum industry.

    The differences in results between such implementations can appear in the last digit of the

    rounded Volume Correction Factor (VCF) or in the last digit of the rounded Base Density.

    To be in line with this business practice, QuantityWare has included the same modifications as

    found in the API 1980 c-codes in their ABAP solution, in order to exactly reproduce the practical

    industry standard results.

    The implementation of Fixed Point Arithmetic differs between the compilers and runtime

    libraries. Therefore it is not possible to always guarantee exactly the same results by using

    different compilers or operating systems.

    By using the SAP language ABAP, host or used operating system dependencies no longer

    exist. The calculation developed in ABAP will always provide the same results.

    The implementation of ASTM D 1250-80 by QuantityWare in ABAP provides exactly the same

    results as the implementation of the C API codes based on Microsoft Visual C 6.0 - which is

    based on 32 bit technology.

    Finally, QuantityWare has performed calculations over the full ranges of all tables using the

    ABAP functions and an installation of the API codes - more than 77 million calculations.

    No differences were found.

    3.2. Handling of Calculations that are out of range

    The ASTM D 1250-80 table ranges are limited. Some customers have changed implementation

    coding to allow the ranges to be extended.The original standard and the API C codes do not allow any calculations to be made out of

    range - they return negative values and a negative return code.

    This inflexibility is not acceptable in a business-based production environment where the

    measurement data available may be out of range, but is still valid.

    The QuantityWare implementation will always perform a calculation and return a meaningful

    result. In case ofout of range calculations a flag will be stored in the various material

    documents indicating that the result has been calculated outside of the printed ASTM 1980

    table ranges. The field is named/QTYW/OUT_RANGE and is stored in the material document

    tables (e.g. MSEGO1).

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    9/13

    ASTM D 1250-80 9/13

    3.3. Customizing

    The provided conversion groups are described in document Conversion Groups by

    QuantityWare. Within the Petroleum Measurement Cockpit, you can display all configuration

    data for this implementation.

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    10/13

    ASTM D1250-80 10/13

    3.4. Changing current productive system standard calculation

    The QCI calculation engine is controlled by the conversion groups. The conversion groups are

    assigned to materials on plant or network level. Assigning a new conversion group to each plant

    in production can be very time consuming. Therefore, when considering a change of standards

    (i.e. from ASTM D1250-80 to ASTM D1250-04), we recommend changing the conversion

    groups assignment to the desired standard implementation i.e. changing the settings of the

    existing and already assigned conversion groups. In this way, an existing conversion group will

    simply use the target standard. All assignments in the application and the existing documents

    will not be touched.

    QuantityWare provides three reports to assist in changing the settings of existing conversion

    groups.

    A full backup of all conversion groups in all clients will be performed and incremented if

    necessary before any changes are committed. The user will be asked to include all changes

    into a standard SAP CTS transport of copies. All changes are logged and the log can be

    displayed in any of these reports. An authorization check is executed to prevent misuse.

    All changes can be reset based on the integrated backup functionality.

    Below you will find a short overview of the procedures.

    For further information, please refer to the online documentation of the report concerned.

    /QTYW/CHANGE_1980_2004

    This report finds all conversion groups based (or after the change, formerly based) on standard

    ASTM 1980. It also finds all conversion groups of ASTM 2004 that have been shipped by

    QuantityWare.

    The settings can be easily changed to use either of the two standards.

    /QTYW/CHANGE_1980_C_ABAP

    This report will only work with conversion groups assigned to ASTM D 1250-1980.

    It will allow you to change the settings between those conversion groups which use the

    American Petrol Institute C Implementation or the implementation in ABAP provided by

    QuantityWare.

    The handling is the same as in the report described above.

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    11/13

    ASTM D 1250-80 11/13

    /QTYW/CONVGRP_RESTORE

    This report allows you to restore the original conversion group settings.

    It can restore selected conversion groups or make a full restore of all conversion groups of the

    current client.

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    12/13

    ASTM D1250-80 12/13

    4. Installation Test

    QuantityWare provides test report /QTYW/D1250_80_ABAP_TEST.You can check the

    consistency of the QuantityWare BCP10A ASTM D1250-80 installation and settings by

    executing multiple calculations.

    The test program follows the design of all test programs delivered by QuantityWare.

    It contains:

    A test of the tables

    A test by Conversion Group

    A test of the installation that includes both tests (default setting)

    You can also list the test examples for all Conversion Groups

  • 7/27/2019 Petroleum ASTM D1250-80 SP09

    13/13

    ASTM D 1250-80 13/13

    5. Integration into SAP - QCI desktop calculator

    This implementation is fully integrated into the SAP QCI and thus into all logistics processes

    such as those of the SAP Traders & Schedulers Workbench (TSW). The desktop calculator

    (transaction O3QCITEST) can be used to calculate ASTM D 1250-80 product quantities for all

    of the conversion groups delivered with this implementation.