0% found this document useful (0 votes)
60 views8 pages

How-To Extend Billing Engines Master Data and Runtime Data

Uploaded by

alaa mchakkah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views8 pages

How-To Extend Billing Engines Master Data and Runtime Data

Uploaded by

alaa mchakkah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

How-to Extend Billing Engines Master

Data and Runtime Data


©
Copyright 2014 PROLOGA GmbH. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without
the express permission of PROLOGA GmbH. The information contained herein may be changed without
prior notice.

Some software products marketed by PROLOGA GmbH and its distributors may contain proprietary
software components of other software vendors.

Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks
of Microsoft Corporation.

IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®,
OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®,
Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA
and/or other countries.

Oracle® is a registered trademark of Oracle Corporation.

UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group.

Citrix®, ICA®, Program Neighbourhood®, Meta frame®, WinFrame®, Video Frame®, and MultiWin® are
trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of the W3C®, World Wide Web
Consortium, Massachusetts Institutes of Technology.

Java® is a registered trademark of Sun Microsystems, Inc.

Javascript® is a registered trademark of Sun Microsystems, Inc., used under license for technology
invented and implemented by Netscape.

MaxDB® is a trademark of MySQL OFF, Sweden.

SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com, and other SAP products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in
several other countries all over the world.

All other products and service names mentioned are the trademarks of their respective companies.

These materials are provided by PROLOGA GmbH for informational purposes only, without representation
or warranty of any kind and PROLOGA GmbH shall not be liable for errors or omissions with respect to
the materials. These materials are subject to change without notice. The only warranties for PROLOGA
products and services are those that are set forth in the express warranty statements accompanying such
products and services, if any. Nothing herein should be construed as constituting an additional warranty.
National product specifications may vary.

The original text of this document has been written in German. An English language translation has been
provided as courtesy. In case of any conflict, it is agreed that the German version is the official original
version and text and shall prevail in all respects and that no translated language shall be offered as
evidence of the meaning of the German original.

© PROLOGA GmbH Page 2 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1
Document History

Before you start the implementation, make sure you have the
latest version of this document.

The following table provides an overview of the most important document changes.

Version Important Changes

1 Created

Table 1: Most important document changes

Table of Content

1 Introduction ................................................................................................................... 4
2 Master Data .................................................................................................................... 5
3 Runtime Data.................................................................................................................. 6
4 Usage in Billing Engine ................................................................................................... 7
4.1 Example for Proof Data ...................................................................................................... 7
4.2 Example for Runtime Billing Data......................................................................................... 7

Table of Tables

Table 1: Most important document changes ..................................................................................... 3


Table 2: Standard Structures for Billing, Tax and Proof...................................................................... 5

Glossary

Attention

Note

© PROLOGA GmbH Page 3 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1
1 Introduction

The OSB Billing Engine is the name for the logic to process billing and invoicing without a connection to
SAP, directly on the mobile device (also called offline billing).

Apart from the reading results (values/meter reading notes) all billing relevant registers are needed to
run the offline billing/invoicing process. This includes the following types of data:
 Master data
o Billling
o Proof
o Tax
 Runtime data

The three types of master data are shared by all orders/invoices. For tax and proof the newest version
can always be used.

The billing master data need to be in the same version as they were at the point of creation in the CSS
system. That is why, the invoice has a property named BillingMDVersion: Because of that, the Billing
Engine can get the correct data.

The runtime data are order specific and created during the order download. They also contain the
simulation data. Orders, which have runtime data, can only be billed offline. Therefore, they are called
offline orders.

Master data as well as runtime data can have a significant size. In order to minimize the transfer volume
and duration, these data are stored in a special format (MMP) and are sent as a zipped blob to the mobile
device.

This document describes an easy way to add customer-specific data to all four types of Billing Engines.
data.

© PROLOGA GmbH Page 4 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1
2 Master Data

The standard structures for billing, tax and proof master data are defined in the class
/WATP/CL_MOB_CONNECT_MDATA:

Type Structure name Customer structure name

Billing SMOB_MD_BILLINGSCHEMA CUSTDATA


Tax SMOB_MD_TAXDATA CUSTDATA
Proof SMOB_MD_PROOFDATA CUSTDATA
Table 2: Standard Structures for Billing, Tax and Proof

All three types contain a list of the structure SMOB_GENERIC_1 in the CUSTDATA field. This structure
contains an identifier as well as several data fields of different types and two lists of the structure
SMOB_GENERIC_0 (from class /WATP/CL_MOB_CONNECT_BASE). SMOB_GENERIC_0 contains the same
fields as SMOB_GENERIC_1, except of the list.

Using these structures, you can transfer complex data from CCS to the mobile client without worrying
about transport structures/logic.

You can fill these structures during the master data creation by:

 Deriving the class /WATP/CL_MOB_CONNECT_MDATA


 Redefining the matching method (FILL_EXTDATA_BILLING, FILL_EXTDATA_PROOF or
FILL_EXTDATA_TAX) and filling the generic structure
 Updating table /WATP/TTMOBCCNFG: Write the name of your derived class in the field
MDATA_CLASS to ensure that your coding is called while creating the master data

It is also possible to define a customer-specific structure and


append it as a blob to the master data (field EXTDATA). However,
this way is more complicated and changes can easily cause
problems. Therefore, this way is not described within this
document.

© PROLOGA GmbH Page 5 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1
3 Runtime Data

The standard structure for the runtime data is defined in class /WATP/CL_MOB_CONNECT_EXPORT and is
called SMOB_RT_BILLINGDATA. This structure contains a field called CUSTDATA, which has the same
type as for the master data.
You can fill this structure during the order download by:
 Deriving the class /WATP/CL_MOB_CONNECT_EXPORT
 Redefining the method FILL_EXTDATA_BILLING and filling the generic structure.
 Updating table /WATP/TTMOBCCNFG: Write the name of your derived class in the field
EXPORT_CLASS to ensure that the coding is called while creating the master data.

© PROLOGA GmbH Page 6 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1
4 Usage in Billing Engine

To use the extended master data in the billing engine see example below. For billing and tax master data
it is the same procedure.

4.1 Example for Proof Data

1. Create a class that derives from SMOB_MD_PROOFDATA and override InitializeCustomData.

public class ZSMOB_MD_PROOFDATA : SMOB_MD_PROOFDATA


{
public override void InitializeCustomData(PMOB_GENERIC_1 aCUSTDATA)
{
base.InitializeCustomData(aCUSTDATA);
//Here you can save specific data from aCUSTDATA.
}
}

2. Register the new class.

public partial class ZZBillingEngine : BillingEngine


{
static ZZBillingEngine()
{
RegisterVariants(typeof(ZZBillingEngine).Assembly);
RegisterBillingValidation(typeof(ZZBillingEngine).Assembly);
RegisterInvoiceValidation(typeof(ZZBillingEngine).Assembly);
RegisteredMRValidations(typeof(ZZBillingEngine).Assembly);

OSBMasterData.MDTypeProof = typeof(ZSMOB_MD_PROOFDATA);
//OSBMasterData.MDTypeBilling = ...
//OSBMasterData.MDTypeTax = ...
}

3. Repeat these steps for SMOB_MD_BILLINGSCHEMA and/or SMOB_MD_TAXDATA if necessary.

4.2 Example for Runtime Billing Data

1. Create a class that derives from SMOB_RT_BILLINGDATA and override InitializeCustomData.

public class ZSMOB_RT_BILLINGDATA : SMOB_RT_BILLINGDATA


{
public override void InitializeCustomData(PMOB_GENERIC_1 aCUSTDATA)
{
base.InitializeCustomData(aCUSTDATA);
//Here you can save specific data from aCUSTDATA.
}
}

© PROLOGA GmbH Page 7 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1
2. Register the class.

public partial class ZZBillingEngine : BillingEngine


{
static ZZBillingEngine()
{
RegisterVariants(typeof(ZZBillingEngine).Assembly);
RegisterBillingValidation(typeof(ZZBillingEngine).Assembly);
RegisterInvoiceValidation(typeof(ZZBillingEngine).Assembly);
RegisteredMRValidations(typeof(ZZBillingEngine).Assembly);

OSBMasterData.MDTypeProof = typeof(ZSMOB_MD_PROOFDATA);
//OSBMasterData.MDTypeBilling = ...
//OSBMasterData.MDTypeTax = ...
BillingEngine.RTTypeBilling = typeof(ZSMOB_RT_BILLINGDATA);
}

© PROLOGA GmbH Page 8 of 8


Mobile On-Site Billing How-to Extend Billing Engines Master Data and Runtime Data
Document Version 1

You might also like