Show TOC

 Online Detection Based on Fixed Structure Input

 

Online detection based on the Web services FraudDetectionRequest_In and FraudDetectionConfirmation_Out works as follows:

  1. In an external SAP or non-SAP system, a user requests online detection. The capability to make this request must be integrated in a business process that runs in the external system.

  2. The request is passed to the SAP Fraud Management system via a connection between the external system and the SAP Fraud Management system. The request contains the investigation object, detection objects, and all of the other information required for a fraud detection run.

  3. The detection strategy named in the request (or determined by a BAdI in the SAP Fraud Management system) is called to run the online detection. Since the detection objects to work with are already available, the selection parameters and selection view of the detection strategy are ignored.

  4. A mapping procedure in each of the detection methods of the detection strategy transfers the information from the online detection request to temporary tables in the SAP HANA database. The detection method can access the data in these tables.

  5. If necessary, an alert is generated in SAP Fraud Management. This alert can be investigated in the same way as any other alert to potential fraud. Simulation mode is also supported. In this case, alert information is returned to the external application. But no alert is generated in SAP Fraud Management.

  6. A confirmation message is returned via the Web service FraudDetectionConfirmation_Out to the external application. Since the Web service communication is stateless, the external application must be able to respond to the arrival of the confirmation message.

What Is a Mapping Procedure?

A mapping procedure is an SQLScript procedure in the SAP HANA database of SAP Fraud Management.

You enter a mapping procedure in the definition of a detection method. Every method that may be used for online detection must have its own mapping procedure. A detection strategy may be used for online detection only if all of the detection methods assigned to it have mapping procedures.

The application uses a mapping procedure to transfer the investigation object, the detection objects, and other information needed for a detection run into temporary tables in SAP HANA.

Implementing a Mapping Procedure

SAP provides mapping procedures for all content that SAP develops and delivers itself. If you plan to set up online detection for a customer data model that you have introduced into SAP Fraud Management yourself, then you must implement mapping procedures for your detection methods on your own.

This section provides the information that you need to implement your own mapping procedures.

Sample Mapping Procedure

SAP delivers the following mapping procedure, which you can use as a sample for implementing your own mapping procedures:

  • SAP HANA package: sap.hana-app-fra.cm.dt

  • Procedure name: PR_AUTO_AGE_MAPPER

Use the SAP HANA studio to display the sample mapping procedure. Do not modify any standard SAP procedures.

A mapping procedure must be implemented as an SAP HANA SQLScript procedure.

Standard Interface of a Mapping Procedure

When you implement a mapping procedure, you must fulfill the standardized interface of the procedure. The Web service provides the transformation features to map between the input data of the online detection and the standard parameters of a mapping procedure.

Input Parameters

The following input parameters are required:

  • IT_ONLINE_DET_INV_OBJ: Contains the investigation object for the online detection run.

    In the XML request, this parameter corresponds to the <InvestigationObjectKey> and <AdditionalID> elements.

    Field in Parameter

    Contents

    INVEST_OJB_TYPE

    The investigation object type, as specified in XML element <InvestigationObjectTypeCode>

    INVEST_OBJ_ID_1, INVEST_OBJ_ID_2, INVEST_OBJ_ID_3

    The key values of the investigation object, as specified in the XML elements <InvestigationObjectID>, <InvestigationObjectID2>, and <InvestigationObjectID3>

    INVEST_OBJ_ADD_ID_1, INVEST_OBJ_ADD_ID_2, INVEST_OBJ_ADD_ID_3, INVEST_OBJ_ADD_ID_4, INVEST_OBJ_ADD_ID_DATE

    The values of the enrichment fields, as specified in the XML elements <InvestigationObjectAdditionalID><InvestigationObjectAdditionalID4> and <InvestigationObjectAdditionalDate>

  • IT_ON_DET_INV_OBJ_PAR: Contains supplementary parameters, as exposed by your implementation of the mapping procedure.

    In the XML request, these parameters correspond to the <Parameter> elements at the same level as the investigation object specifications.

    Field in Parameter

    Contents

    PARAMETER_KEY

    The name of a parameter at the level of the investigation object. The name must match the name expected by the mapping procedure.

    PARAMETER_VALUE

    The value of the parameter.

  • IT_ONLINE_DET_DET_OBJ: Contains the set of detection objects that belong to the investigation object.

    In the XML request, these parameters correspond to the <DetectionObjectKey> elements.

    Field in Parameter

    Contents

    DETECT_OBJ_TYPE

    The detection object type, as specified in the XML element <DetectionObjectTypeCode>.

    DETECT_OBJ_ID_1DETECT_OBJ_ID_5

    The key values of a detection object, as specified in XML elements DetectionObjectIDDetectionObjectID5.

  • IT_ON_DET_DET_OBJ_PAR: Contains supplementary parameters, as exposed by your implementation of the mapping procedure.

    In the XML request, these parameters correspond to the <Parameter> elements that may be associated with each detection object.

    Field in Parameter

    Contents

    PARAMETER_KEY

    The name of a parameter at the level of the separate detection objects. The name must match the name expected by the mapping procedure.

    PARAMETER_VALUE

    The value of the parameter.

Output Parameters

You must implement an output parameter called ET_DATA. This parameter must provide values to the input parameters of the detection method for which the mapping procedure has been defined.

The names of the parameters in ET_DATA must match the names of the input parameters of the detection method.