Error Handling ECRMREPL

27
Error Handling in SAP IS-U for the Replication of Utility Contracts and Technical Objects from CRM, and for Parked Documents

description

Error Handling ECRMREPL

Transcript of Error Handling ECRMREPL

Page 1: Error Handling ECRMREPL

Error Handling in SAP IS-U for the Replication of Utility Contracts and Technical Objects from CRM, and for Parked Documents

Page 2: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

© Copyright 2003 SAP AG. 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 SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors 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®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.

HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute 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.

MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.

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 product and service names mentioned are the trademarks of their respective companies.

2

Page 3: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Contents

1. Introduction .................................................................................................4 1.1. Objective ..................................................................................................4 1.2. Definition of Terms..................................................................................4

2. Scenario Overview ......................................................................................6 2.1. IS-U / CRM Integration – Data Model .....................................................6 2.2. Accelerated Move-In, Move-Out, Move-In/Out Entry: Data Model.......7

3. The IS-U Contract Monitor..........................................................................8 3.1. Calling Transaction ECRMREPL............................................................8 3.2. List Display for Replications Containing Errors ................................10 3.3. Detailed Display for Replication Containing Errors...........................11

3.3.1. Menu and Toolbar for Detailed Display ..............................................12 3.3.2. Detailed Display for CRM Contract Replication..................................13 3.3.3. Detailed Display for CRM Replication of a Connection Object ...........14 3.3.4. Detailed Display for CRM Replication of a Point of Delivery ..............15 3.3.5. Detailed Display for Parked Document...............................................16

3.4. Restart for Replication Containing Errors ..........................................17 3.5. Automatic Restart of Dependent Entries ............................................18 3.6. Workflow ECRMINFAILED ....................................................................19 3.7. Example: Restart Function Module ISU_CRMQ_RESTART_SAMPLE20

4. Appendix....................................................................................................22 4.1. Use..........................................................................................................22

4.1.1. Prerequisites.......................................................................................23 4.1.2. Task: Edit Container with Parameters ................................................24 4.1.3. Task: Trigger Change Run .................................................................27

3

Page 4: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

1. Introduction

1.1. Objective This cookbook describes the handling and interface of the IS-U error monitor (transaction ECRMREPL). The error monitor is used for processing incorrect replications of CRM utility contracts in an IS-U system. It is also used for processing incorrect parked documents during the accelerated entry of move-ins, move-outs and move-in/outs. This document focuses mainly on the following contexts:

• Technical objects in CRM and IS-U

• Contract items in CRM and contracts in IS-U

• Parked documents in IS-U

You are given an overview of the fundamental functions and the various options for accessing the error handling interface.

The new error processing functions are delivered with Add-On Support Package 13 for IS-U/CCS Release 4.64.

The following applies for replications of CRM utility contracts and technical objects:

The error monitor replaces the previous error handling through the two workflows WS20500133 ‘ Workflow for application log products’ and ‘WS20500160 ‘Replication CRM -> ISU incorrect’. See unit 4 for information on the previous error handling process.

1.2. Definition of Terms Connection object (IS-U) Generally a connection object is a building.

However, it can also be a property or any other equipment, such as a fountain or a construction site. The technical location in the plant maintenance (PM) component corresponds to the connection object. 0 .. n points of delivery can be allocated to a connection object.

Installed Base (IBase) Multi-level component structure for managing products at the customer, and managing internal products. The installation describes the structure of these products and their components (=> IBase components). The component can also refer to an individual object.

IBase components Component of an => IBase. In the following section the term component only refers to object components (individual objects).

Replication Rule-based distribution of data to sites.

Division (IS-U) Utility division (such as, electricity, gas, water)

Accelerated move-in, move-out, move-in/out entry The new transaction (EC70) for accelerated move-in, move-out and move-in/out entry, which is provided within the increased efficiency project (IS-U/CCS Release 4.64+)

4

Page 5: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Master data template Template that defines which master data is to be created automatically. The master data generator then generates master data from the master data template. Example: If products are sold during a sales promotion, the necessary master data is automatically created in the background using the master data template (for example, business partner and contract).

Master data generator Program that generates master data from the master data template (such as, business partner and contract).

Utility contract (IS-U) Agreement between business partner and utility company, which refers to exactly one division.

Parked document The document created for the selected action, using the accelerated move-in, move-out, move-in/out entry

Point of delivery (IS-U) Location at which a utility service for a customer is supplied or determined. Generally, it is a customer apartment. The point of delivery is division-specific. The point of delivery is division-specific. A point of delivery has an external number (point of delivery ID) for an event. A point of delivery serves the following purposes: o communication during automatic data exchange (deregulation PoD) o the exchange of meter reading results (technical PoD) The following point of delivery categories exist for technical points of delivery during the exchange of meter reading results: o normal point of delivery category o virtual point of delivery category

5

Page 6: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

2. Scenario Overview

2.1. IS-U / CRM Integration – Data Model Figure 1 explains the connection between objects in IS-U and the corresponding objects in CRM. The integration solution ensures consistency between the objects in both systems. In this way, for example, changes to an IS-U contract lead to changes to the corresponding contract item in CRM, and vice versa.

Integration Data Model

ConnectionObjectInstallation

Contract

Premise

PoD

ContractAccount Bill

Billing

mySAP Utilities mySAP CRM

Business Partner

Business Partner

Business Agreement

ConnectionObject(IBase)

ContractItem

PoD(IBase)

Figure 1: Integration Data Model

Graphic 2 shows how our integration supports the replication.

Workflow WS20500160 ‘ECRMINFAILED’ manages the agent determination for processing a replication in which an error has occurred. The trigger event for the workflow is CRMIN_FAILED, from the BOR object ISUCRMCNT. The event is triggered if an error occurs whilst the system is processing the master data template. This guarantees that precisely one work item exists for a replication process.

Workflow WS20500160 places a work item with the text Error Handling for CRM Transaction <Transaction Number> in the SAP Business Workplace. You can access the error handling interface via the corresponding work item. You can also use the transaction ECRMREPL (IS-U error monitor) to manually call the error handling. Other functions are available via the transaction ECRMREPLM.

6

Page 7: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

CRM Inbound Queue

Error Trigger Event ISUCRMCNCT.Crmin_Failed

Workflow 20500160 Restart and delete DB product parameter entries and log

L

Yes

Restart Successful

Figu

2.2. AcceleratedData Model The Accelerated Move-In / Minterface for entering the foll

• Move-in

• Move-out

• Move-in/out for busine

7

N o

Yes

N

Workflow 20500160 Restart and delete DB MDG parameter entries and log

Trigger Event SUCRMCNCT.Crmin_Failed

re 2: Replication of CRM system in IS-U syst

Move-In, Move-Out, Move-I

ove-Out / Move-In/Out Entry transaction (EC70owing business transactions in the IS-U system

ss partner

Master Data Generator (MDG) Processing

En

RestarS

o

em

n/Ou

) provi:

Yes

Yes

d

t uccessful

Error

t Entry:

des you with a n

Interface

ECRMREP

ew

Page 8: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

• Move-in/out for premise

The new interface is particularly intended for the entry of frequently occurring standard situations in move-in/out processing, such as call center operations. Unlike the present interface (transaction Move-out (EC60)), the new interface does not cover all specific actions in move-in/out processing. In cases such as complicated move-in/outs for commercial and industrial customers, we recommend that you continue to use the present interface – for example, to map individual agreements with commercial and industrial customers in contract account.

The new interface only contains those fields that the agent must complete manually when entering a move-in, move-out or move-in/out. You can use Customizing to determine which fields are included. For more information, see the cookbook Efficient Processes IS-U/CCS – New Developments for Release IS-U/CCS 4.64 and 4.71, unit 8 Customer Service.

Creating Parked Documents When you save data that you entered in the accelerated entry interface, the system creates a parked document. You receive a message to inform you if the data is incorrect or incomplete. You can also create a parked document if errors arise. This document has the status Errors

Follow-Up Processing for Parked Documents After you have saved the parked document, the follow-up processing begins (the creation of specific move-outs and/or move-ins in the system). A prerequisite for the follow-up processing is that the parked document data must be free of errors.

The move-in and move-out documents are not created immediately. This is done using the master data generator and contract models (see the section “Customizing Settings”). The advantage of this is that the agent does not have to wait until the move-in or move-out has been created, but can continue with his/her work as soon as the parked document has been saved.

Changing Parked Documents You can use the Accelerated Move-in, Move-Out and Move-In/Out function to change parked documents with the status New or Errors. These are the documents for which the follow-up processing has not yet been triggered.

You can use the IS-U error monitor transaction (ECRMREPL) to change parked documents with the status Processing contains errors.

If the parked document status is Completed, the system has already created a move-in or move-out document. If subsequent changes are necessary, change the corresponding move-in or move-out document or the corresponding master data. This applies for the following cases:

• You want to change the move-in or move-out date

• You want to reverse the move-in or move-out.

3. The IS-U Contract Monitor

3.1. Calling Transaction ECRMREPL You can call the IS-U Contract Error Monitor either via the transaction code ECRMREPL, or in the Business Workplace via the corresponding work item for the incorrect replication of a CRM transaction or a parked document. If you call the transaction code, you access via a selection interface.

The selection interface is structured differently, depending on whether a CRM connection and/or the accelerated move-in, move-out, move-in/out entry is activated in your system.

8

Page 9: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

The interface is configured as following for the different system usages:

• Only accelerated move-in, move-out, move-in/out entry: Figure 3

• Only CRM connection: Figure 4

• CRM connection and accelerated move-in, move-out, move-in/out entry: Figure 5

Fig. 3: Initial Interface for Accelerated Move-In, Move-Out, Move-In/Out Entry

Fig. 4: Initial Interface for CRM Connection

9

Page 10: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Fig. 5: Initial Interface for CRM Connection and Accelerated Move-In, Move-Out,

Move-In/Out Entry

3.2. List Display for Replications Containing Errors The system displays the list of incorrect replications of CRM transactions and parked documents, depending upon the previous selection (see figure 6). As default, the system sorts the replications in the list according to the date and time that the error occurred. You can make another selection by marking a column and using or .

To display the details for an incorrect replication of a CRM transaction or a parked document, double-click on the corresponding line, or select the line and use the Display button.

10

Page 11: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Figure 6: List Display for Replications Containing Errors

The system shows the following information in the list columns:

1. Column: Status of CRM transaction replication or parked document replication (Status) A red traffic light indicates that an error occurred during the replication. A yellow

traffic light indicates that a replication attempt already exists for the replication, and that this transaction was inserted in the queue without starting the master data generator.

2. Column: Transaction No. The transaction number is either the transaction number created during the

replication of CRM transaction items, or the parked document number.

3. Column: Item (Item) The item for the transaction number created when replicating CRM contract items.

This column is only completed if a CRM transaction exists.

4. Column: Transaction A short text in the Transaction column specifies for which object the replication is

being executed.

5. Column: Error date The date of the replication attempt that contains errors

6. Column: Error time The time of the replication attempt that contains errors

7. Column: Queue Number (QueueNo) The current entry in the queue for this replication.

The entry with the lowest number in the queue is displayed with a yellow traffic light.

8. Column: Installation The installation created in IS-U is displayed in the Installation column.

3.3. Detailed Display for Replication Containing Errors The detail display of an incorrect replication of a CRM transaction or parked document is divided into three subareas:

Header Data

Parameters from Master Data

Template

Error Log

11

Page 12: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

The system displays the general data for the replication in the header data, such as the status of the replication, the queue number within the transaction, the IS-U product (the master data template), and error time information. In the case of contract replications, the CRM product and contract details are included in addition to the CRM transaction.

For a parked document, the business partner, contract account and premise are also specified.

If it is possible to restart the replication, the master data template parameters can be changed. For all other queue entries for the corresponding transaction, they are only shown in display mode.

In the lower area of the detailed display, the error log is displayed. This is loaded after each unsuccessful restart.

3.3.1. Menu and Toolbar for Detailed Display The toolbar in the detailed display, for a replication that contains errors, differs according to replication object. The detailed display for the contract replication shows a different menu or application toolbar to the corresponding menu lines for the point of delivery or the detail display for the parked document.

Another factor that is decisive in determining which functions are available is whether or not it is possible to restart the replication, and whether queue entries exist for this replication.

A change document is written for all replication objects, when working in the detailed display. You can view the change document via the menu path Environment -> Change Document.

Figure 7 shows the menu and application toolbar for the detailed display, with all the functions that are available for transaction ECRMREPL.

Figure 7: Menu and Application Toolbar for Detailed Display The following prerequisites apply for the availability of buttons and menu entries for replication objects:

• Restart This button is only displayed if a restart is possible for the current entry. This is, for example,

12

Page 13: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

only the case for the last entry for a replication (the highest queue number for the transaction). If a dependent entry exists for the highest queue number, then the Restart button is displayed.

• Dependency This button is only displayed if a dependent entry exists for the current entry.

For a CRM transaction this applies, for example, if a contract and a connection object were replicated together and an error occurred during the replication of the connection object. In this case, the contract can only be replicated when the dependent connection object has been successfully replicated.

This is the case for a parked document when, for example a move-out and/or business partner changes exist for a move-in.

• (SAP Business Workplace) This button is always displayed. It takes you to the SAP Business Workplace.

• Installation This button is displayed if a CRM contract replication or a parked document exists. When replicating technical objects, it is only displayed when precisely one installation can be allocated. This button takes you to the data environment for the installation.

• Premise This button is displayed if a CRM contract replication or a parked document exists. When replicating technical objects, it is only displayed when precisely one premise can be allocated. This button takes you to the data environment for the premise.

• Billing Reversal This button is only displayed for contract replication. You can use this button to reverse a billing or invoicing document that exists for a move-in or move-out.

• (Scroll to Previous Entry) This button is always displayed. You can, however, only scroll to the previous entry if an entry with a lower queue number exists.

• (Scroll to Next Entry) This button is always displayed. You can, however, only scroll to the next entry if an entry with a higher queue number exists.

3.3.2. Detailed Display for CRM Contract Replication Figure 8 shows the detailed display for the replication of a contract item from CRM into an IS-U system.

The following functions are available in the menu and toolbars:

• (Scroll to previous entry) or (Scroll to next entry) to scroll to the previous or the next queue entry

• Billing Reversal

• Installation or Premise to go to the data environment for the installation or premise

• (SAP Business Workplace) to go to the SAP Business Workplace

• Restart is available for the last queue entry, as long as no dependent entries exist (in this case, the button is displayed for dependent entries).

The following information is available in the header data:

• the status of the replication containing errors

13

Page 14: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

• CRM transaction and item

• CRM product

• IS-U product (the master data template)

• Queue number within the transaction

• Contract account

• Contract specifications (contract start and end dates)

• Error time data

Figure 8: Detailed Display for Contract Replication

3.3.3. Detailed Display for CRM Replication of a Connection Object Figure 9 shows the detailed display for the replication of a connection object from CRM into an IS-U system.

The following functions are available in the menu and toolbars:

• (Scroll to previous entry) or (Scroll to next entry) to scroll to the previous or the next queue entry

• (SAP Business Workplace) to go to the SAP Business Workplace

14

Page 15: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

• Restart is available for the last queue entry, as long as no dependent entries exist (in this case, the button is displayed for dependent entries).

The following information is available in the header data:

• the status of the replication containing errors

• Queue number within the transaction

• IS-U product (the master data template)

• Error time data

Figure 9: Detailed Display for Connection Object Replication

3.3.4. Detailed Display for CRM Replication of a Point of Delivery Figure 10 shows the detailed display for the replication of a point of delivery from CRM into an IS-U system.

The following functions are available in the menu and toolbars:

• (Scroll to previous entry) or (Scroll to next entry) to scroll to the previous or the next queue entry

• (SAP Business Workplace) to go to the SAP Business Workplace

• Restart is available for the last queue entry, as long as no dependent entries exist (in this case, the button is displayed for dependent entries).

The following information is available in the header data:

• the status of the replication containing errors

15

Page 16: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

• Queue number within the transaction

• IS-U product (the master data template)

• Error time data

Figure 10: Detailed Display for Point of Delivery Replication

3.3.5. Detailed Display for Parked Document Figure 11 shows the detail display for parked documents.

The following functions are available in the menu and application toolbars:

• (Scroll to previous entry) or (Scroll to next entry) to scroll to the previous or the next queue entry

• (SAP Business Workplace) to go to the SAP Business Workplace

• Installation or Premise to go to the data environment for the installation or premise

• Restart: The Restart button is available for the last queue entry, as long as no dependent entries exist (in this case, the button for dependent entries is displayed).

The following information is available in the header data:

16

Page 17: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

• The status of the replication containing errors

• Parked document

• Master data template

• Queue number within the transaction

• Installation

• Error time data

Figure 11: Detailed Display for Parked Document

3.4. Restart for Replication Containing Errors When restarting a replication that contains errors, the master data generator is called, along with the parameters that may have been changed in the detailed view. The replication is restarted generically, depending upon the replication object. This means that when you restart a contract replication, a restart function module is called that is different to, for example, the restart for points of delivery, connection objects or parked documents.

The different function modules are stored in the ECRM_FBREST table. The table key is the field MD_ORIGOBJ, which is stored in the table EVER_CRMQ for each queue entry. In this way, for example, the incorrect replication of a point of delivery in the queue has the entry ‘EPOD’ in the field

17

Page 18: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

EVER_CRMQ-MQ_ORIGOBJ. The function module ISU_CRMQ_RESTART_POD is called via this entry during the restart.

If the table in the IS-U system is initial, it is initialized with the values from table 1 for the first restart attempt.

The table ECRM_FBREST has the delivery class ‘E’, which allows customer-specific maintenance. This allows the customer to develop his/her own function module, which , for example, supports a device installation during replication. The function module ISU_CRMQ_RESTART_SAMPLE acts as a template for the development of customer-specific restart function modules. The syntax of the function module is specified in section 3.7.

When a restart is successful, the detailed display is changed into a pure display transaction. Menu bars and push buttons are hidden. It is still possible to return (select F3) to the list of replications containing errors. When you call the detailed display from a workflow, the workflow is exited.

If the restart is not successful, then the current replication transaction is reloaded in the detailed display.

MD_ORIGOBJ FB_RESTART ISU_CRMQ_CONTRACT_RESTART

CONN ISU_CRMQ_RESTART_SAMPLE

CONT ISU_CRMQ_CONTRACT_RESTART

EPOD ISU_CRMQ_RESTART_POD

RGEN ISU_CRMQ_RESTART_RGEN

MVIN ISU_ECAMIO_RESTART_MVIN

MOUT ISU_ECAMIO_RESTART_MOUT

BUCA ISU_ECAMIO_RESTART_BUCA

Table 1: Contents of Table ECRM_FBREST

3.5. Automatic Restart of Dependent Entries Dependent entries for a replication containing errors mean that a direct connection exists to other replications containing errors.

For example, this is the case when the following situations occur:

• IS-U/CRM Integration: A contract and a connection object were replicated together, and an error occurred during the replication of the connection object. In this case, the contract can only be replicated when the dependent connection object has been successfully replicated.

• IS-U/CRM Integration: During the separate replication of a connection object and point(s) of delivery, an error occurred when replicating the connection object. In this case, a point of delivery can only be replicated when the dependent connection object has been successfully replicated.

• IS-U/CRM Integration: The start date of the contract was changed during the replication of contract changes. In this case, the replication can only take place after the date changes.

18

Page 19: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

• Parked Document: For a move-in entry, the business partner must be changed / created, as well as the installations being changed. You must change / create the business partner before you change the installation.

• Parked Document: During a move-in/out for a premise, a move-out and a move-in are entered for the premise. The move-out must occur before the move-in. The move-in is dependent upon the move-out.

• Parked Document: During a business partner move-in/out a move-out, move-in and a business partner change are entered. The move-out and business partner change must take place before the move-in. The move-in is dependent upon the move-out and business partner change. The move-out and business partner changes are, on the other hand, independent of each other.

If dependent entries exist for a replication containing errors, then they too are restarted following a successful restart.

The detailed display of the IS-U Navigator then switches to the dependent entry. If the dependent entry is successfully restarted, the detailed display changes to a purely display transaction for the dependent entry.

3.6. Workflow ECRMINFAILED As well as being able to call the navigator via the transaction ECRMREPL, you can also process replications that contain errors via workflow WS20500160 ‘ECRMINFAILED’. You can use the agent determination via this workflow.

The trigger event for the workflow is CRMIN_FAILED, from the BOR object ISUCRMCNT. The event is triggered if an error occurs whilst the system is processing the master data template. This ensures that precisely one work item exists for a replication of a CRM transaction or a parked document.

Workflow WS20500160 places a work item with the text Error Handling for Replication Transaction <Transaction Number> in the SAP Business Workplace. You can access the error handling interface via the corresponding work item.

The workflow has a parallel branch, which waits for event ISUCRMCNCT. END_WF_ERRORHANDLING This event exits the workflow. It is triggered if a restart has been successfully carried out in the IS-U Navigator. In this case, the work item for the incorrect replication of a CRM transaction or a parked document is deleted. If another error occurs, due to a dependent entry, then a new work item is created for the new replication transaction.

19

Page 20: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Error Handling for Replication

Task TS20500376

Wait for Event:

Error Handling Obsolete

ISUCRMCNCT.END_WF_ERRORHANDLING

Workflow Complete

Parallel Section:

Error Handling, Start or Obsolete ?

Start Event ISUCRMCNCT.CRMIN_FAILED

Figure 12: Process for Workflow WS20500160

3.7. Example: Restart Function Module ISU_CRMQ_RESTART_SAMPLE FUNCTION isu_crmq_restart_sample.

*"----------------------------------------------------------------------

*"*"Lokale Schnittstelle:

*" IMPORTING

*" VALUE(X_OBJECT_GUID) TYPE GUID_16

*" VALUE(X_DEBUG) TYPE KENNZX OPTIONAL

*" EXPORTING

*" REFERENCE(Y_EVER_CRMQ) TYPE EVER_CRMQ

*" REFERENCE(Y_WORKFLOW_CONTAINER) TYPE ECRMCONT_T

*" REFERENCE(Y_NEW_KEYS_TAB) TYPE ISU_PROD_NEWOBJECT_KEYS_TAB

*" REFERENCE(Y_RESTART_OK) TYPE KENNZX

*" EXCEPTIONS

*" SYSTEM_ERROR

*"----------------------------------------------------------------------

DATA l_ever_crmq TYPE ever_crmq.

DATA l_container TYPE ecrmcont_t.

DATA l_mdg_container TYPE ccmcont_t.

DATA l_new_keys_tab TYPE isu_prod_newobject_keys_tab.

20

Page 21: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

*data L_ERRORLOG type CL_EZLOG.

IF x_debug = 'X'.

BREAK-POINT.

ENDIF.

CLEAR y_restart_ok.

CALL FUNCTION 'ISU_CRMQ_RESTART_BEGIN'

EXPORTING x_object_guid = x_object_guid

IMPORTING y_ever_crmq = l_ever_crmq

y_container = l_container

* Y_CONTRACT_STATUS =

y_new_keys_tab = l_new_keys_tab

EXCEPTIONS action_failed = 1

OTHERS = 2.

IF sy-subrc <> 0.

* queue-entry not found: handled by empty y_ever_crmq

ELSE.

y_ever_crmq = l_ever_crmq.

IF NOT l_ever_crmq-prodid IS INITIAL.

l_mdg_container[] = l_container[].

CALL FUNCTION 'ISU_PRODUCT_IMPLEMENT'

EXPORTING x_prodid = l_ever_crmq-prodid

x_container = l_mdg_container

x_raise_no_event = 'X'

* X_NO_BPCONTACT =

* X_CONTRACTDATA =

* X_NO_ENV_SELECT =

* X_INDUSTRY =

IMPORTING y_logid = y_ever_crmq-mdg_log

* Y_SCRIPT_INFO_TAB =

* Y_IDE_STARTED =

y_mdg_completed = y_restart_ok

CHANGING

xy_new_keys_tab = l_new_keys_tab

* XY_DONE_NODE_TAB =

EXCEPTIONS

general_fault = 1

input_error = 2

ambiguous_environment = 3

OTHERS = 4.

IF sy-subrc <> 0.

* input or processing error

21

Page 22: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

CLEAR y_restart_ok.

ENDIF.

IF NOT l_new_keys_tab IS INITIAL.

y_new_keys_tab[] = l_new_keys_tab[].

ENDIF.

IF NOT l_ever_crmq-prodid IS INITIAL.

y_ever_crmq-prodid = l_ever_crmq-prodid.

ENDIF.

* ENDIF.

ELSE. "IF NOT l_ever_crmq-prodid IS INITIAL.

*

ENDIF.

ENDIF. "CALL FUNCTION 'ISU_CRMQ_RESTART_BEGIN'

ENDFUNCTION.

4. Appendix

4.1. Use The system activates this function if an error occurs when processing an MDT . Firstly, the system triggers the FollowUpNecessary event (additional processing required for log) of the ISUPRODLOG BOR object type (product log for IS-U).

FollowUpNecessary is the triggering event for the workflow template 20500133.

This workflow template contains the activities Edit Container with Parameters and Trigger Change Run.

For more information, see the units on the individual activities.

The figure below shows the context.

22

Page 23: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

An error occurred when processingwithin the master data generator

Triggering Events:

Object cat.: ISUPRODLOG Event: FollowUpNecessary

Master Data Generator

1. Edit container with parameters

Workflow-Template: 20500133

2. IS-U Products Trigger realignment run

Figure 13: Flow of Workflow Template 20500133

4.1.1. Prerequisites Once the FollowUpNecessary event from BOR object type ISUPRODLOG has been activated, and subsequent processing triggered, you must activate the event linkage in workflow template 20500133. To do this, proceed as follows: ...

1. Choose Tools → ABAP Workbench → Development → Workflow → Definition Tools → Tasks/Task Groups → Display.

Figure 14: Display Task

23

Page 24: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

2. In the Task Type field, select Workflow-Muster. In the Task field, enter the name of the

workflow template. Select (Display).

Figure 15: Activate Event Linkage

3. To activate the event you must first select it and then choose Edit → Event → Activate / Deactivate Linkage

By activating the event linkage, you guarantee that the workflow starts if an error occurs within the master data generator. You must also ensure that the activities contained in the workflow have been allocated to an agent.

4.1.2. Task: Edit Container with Parameters This task informs the agent, of any errors that occur during processing. The following screen shows the application log, which is displayed for the agent.

24

Page 25: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Figure 16: Screen displaying the application log

Once the agent knows why the system canceled processing, he/she can then change the unprocessed MDT parameters in a second session. This ensures that no errors occur when processing is rerun. The agent can also make parallel changes to data in the IS-U. This ensures that errors do not occur during processing.

25

Page 26: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

Error Processing for Product CW_NEWCUST_01

Figure 17: Screen showing parameters

When the agent has ensured that no other errors can occur, he/she must save the parameters.

26

Page 27: Error Handling ECRMREPL

Fehlerbearbeitung in SAP IS-U

27

Figure 18: Completion of Processing

This interim enquiry was inserted to allow the agent to interrupt the processing and to continue at a later date. To do this, choose Cancel.

4.1.3. Task: Trigger Change Run Once the task Edit Container with Parameters has been processed, the system automatically starts a new work item. As part of this new process, the system calls the MDG, with the changed parameters from the master data template. If no errors occur then error processing is terminated. However, if an error occurs then the system recalls the FollowUpNecessary event from the ISUPRODLOG BOR object type, and restarts the error processing. Error processing continues until the master data template is processed without error.