How-To Add A New Billing Variant
How-To Add A New Billing Variant
©
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.
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.
Javascript® is a registered trademark of Sun Microsystems, Inc., used under license for technology
invented and implemented by Netscape.
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.
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.
1 Created
Table of Content
1 Introduction ................................................................................................................... 4
2 Examples ........................................................................................................................ 5
Table of Figures
Table of Tables
Glossary
Attention
Note
In general the billing engine loads and executes the billing step sequence independent from the
availability of the variant programs. If a specific variant program is missing during the runtime (only if
this specific step has to be executed), the engine will stop the process. Therefore, it is important to
implement all used and not already implemented variants or exclude their usage in transaction
/WATP/MOB_CNNCT_UBS (if the execution is not necessary to reach the correct result!).
The class has to implement the public interface IVariantIF if the variant type is IF/ELSE/ENDIF,
or the interface IVariant in all other cases.
The class has to use the class attribute VariantIdentifier, which is necessary to identify the right
implementation for the right variant program.
The used methods and data types are very similar to the DDIC types in IS-U/CCS. Therefore, a detailed
functional description should not be necessary.
In order to simplify the development of new variant programs, you can use
PLG.OSB.BE.Variants.ISU_VARIANTBASE as base class. Some useful members have already been
implemented and a method of the SAP includes IEVARBASIC and IEVARMAC.
The objective of this example is to create a new IF variant, which selects the IF path only if at least two
of three parameters are true.
FUNCTION ISU_ZIFOR123.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(X_OP) TYPE ISU2A_VARIANT_PARAMETERS
*" REFERENCE(X_SS) TYPE ISU2A_SS
*" CHANGING
*" REFERENCE(XY_IF) TYPE ISU2A_IF_TAB
*" REFERENCE(XY_OBJ) TYPE ISU2A_BILLING_DATA
*"----------------------------------------------------------------------
if WPARA1-STRING3 = 'X'.
LCOUNT = LCOUNT + 1.
endif.
if WPARA2-STRING3 = 'X'.
LCOUNT = LCOUNT + 1.
endif.
if WPARA3-STRING3 = 'X'.
LCOUNT = LCOUNT + 1.
endif.
if LCOUNT >= 2.
WIF-EXECUTE = 'X'.
endif.
ENDFUNCTION.
[VariantIdentifier("ZIFOR123")]
public class ISUBV_ZIFOR123 : IVariantIF
{
public void ExecuteVariant(ISU2A_VARIANT_PARAMETERS X_OP, ISU2A_SS X_SS,
ISU2A_REDUCED_BILLING_DATA X_RED, ref ISU2A_BILLING_DATA XY_OBJ,
ref ISU2A_DATA_COLLECTOR XY_SOBJ, ref ISU2A_IF_TAB XY_IF)
{
int lCount = 0;
if (WPARA1.STRING3 == "X")
lCount++;
if (WPARA2.STRING3 == "X")
lCount++;
if (WPARA3.STRING3 == "X")
lCount++;
if(lCount >= 2)
WIF.EXECUTE = "X";
XY_IF.Add(WIF);
}
}
5. Add a generic registration of your Z-variants into the static constructor of your billing engine
implementation. This method will register all classes inside the corresponding assembly with a
valid interface together with the corresponding variant identifier.
RegisterVariants(typeof(ZZBillingEngine).Assembly);