You are on page 1of 6

FUNCLOC_LOAD_DOKU - REPLICATION OF FUNCTIONAL LOCATIONS: PREREQUISITES

AND GENERAL INFORMATION

This document describes the technical details of the replication of functional locations
from SAP ERP to SAP CRM.

On replication, functional locations in SAP ERP are represented as objects of an installed


base in SAP CRM. If the functional locations have an underlying structure, this structure
is represented as a hierarchy in the installed base. You cannot create new functional
locations or change the structure of functional locations in SAP CRM.

Changes made to the assignment of equipment to functional locations in SAP CRM can
be uploaded to SAP ERP. This is possible for changes made to the installed base structure
using cut and paste, and not the Install and Dismantle buttons (since dismantling a piece
of equipment, for example, creates a structure gap that cannot be represented in SAP
ERP).

The download function is activated when you activate the implementation of the
Business Add-In CRM_FUNCLOC_LOAD.

For the upload, you must also activate the adapter object DNL_EQUI_HIER in SAP CRM,
in transaction R3AC1.

SCOPE OF FUNCTIONALITY

A two-way data transfer between SAP ERP and SAP CRM is supported:

Initial Load

This is the first data transfer. It can be repeated as often as required, and overwrites
existing data in SAP CRM.

The following data is downloaded:

Functional location ID

Description

Long text

Manufacturer
Delta Load

This load transfers newly-created and changed functional locations from SAP ERP to SAP
CRM. It also transfers changes to the assignment of equipment to functional locations.

FLOW LOGIC

The middleware flow is used to transfer functional locations from SAP ERP to SAP CRM.
As a result, specific determining factors and a defined process flow are predetermined.

The process flow is as follows:

The functional location B-Doc is validated in the CRM validation module


CRM_FUNCLOC_VALIDATE.

The B-Doc switches to functional location/installed base handling, which runs through
the following steps:

Mapping functional locations to objects

The functional locations from SAP ERP are created as objects in the SAP CRM system.
The functional location attributes are transferred to the attributes of the set types of the
objects.

Linking to an installed base

If no higher-level functional location exists in SAP CRM, a new installed base is created.
The functional location is inserted in the installed base as an object.

If a higher-level functional location exists in SAP CRM, the newly transferred functional
location is inserted as an object below the existing functional location object in the
relevant installed base.

If the higher-level functional location is not yet downloaded, then an entry for the newly
transferred functional location in made in the SAP CRM table IBFUNCLOC_ORPHAN. This
enables the functional location to be assigned to the higher-level functional location, if
the latter is transferred to SAP CRM at a later point in time.

If equipment installed at a functional location is downloaded from SAP ERP, and the
functional location is also downloaded correctly, then the equipment is installed in the
installed base below the functional location object. If the equipment is repositioned, this
change flows up to SAP ERP according to the details of the equipment upload.

Linking to an installed base component


Since objects are components of an installed base, an installed base component is
created for the object. Both objects are linked to one another so that the installed base
components point to the object.

If there are partners for the equipment, these partners are assigned to the installed base
component, as long as there is no partner determination procedure assigned to the
object category. If there is an address for the piece of equipment, the address is
assigned to the installed base component.

Restructuring of objects

The table IBFUNCLOC_ORPHAN is checked to determine whether any lower-level


functional locations exist in SAP CRM for the functional location that has just been
transferred. This situation can occur, since the data forwarded by the middleware is not
serialized.

If this is the case, the components of the lower-level functional locations are moved to
the installed base for the higher-level functional location. If this leads to empty installed
bases because the installed bases were only used as containers until the higher-level
functional location was replicated, the status of these installed bases is set to Delete.

STORAGE AS AN OBJECT

In the standard system, SAP ERP functional locations are created as objects of
the Functional Location (0403) object family in the category Functional Location (0403).
The attributes are mapped in the following set types:

Attribute Description

TAR3_ID Internal Functional Location ID (may be equal to visible ID)

TAR3_STRUCTURE_CODE Structure Indicator

TAR3_CATEGORY Category of Technical Asset

TAR3_TYPE Type of Technical Asset

TAR3_TYPE

Attribute Description

MANUFACTURER_ID Manufacturer

MANUFACT_COUNTRY Country of Manufacture


MANUFACT_MODEL Model Description

MANUFACT_PART Manufacturer Part Number

MANUFACT_SERIALNO Manufacturer Serial Number

CONSTRUCTION_DATE Date of Manufacture

CONSTRUCTION_DATE

The long text for functional locations is replicated in the following long text type for
objects:

Long text (IFLOT) -> Basic text (BASE)

CONSTRUCTION_DATE

Ensure that the Customizing settings are maintained for the available text types for
product type Material.

Mapping the System Status

Download is supported for the following system statuses of functional locations. In all
cases, the status is recorded in the object.

Deleted

Object deactivated

At customer site

SAP ERP is the leading system for the system status. It is not possible to maintain the
system status in SAP CRM.

Mapping Business Partners

The business partners are stored in the corresponding installed base component.

To avoid errors during mapping, you should ensure that the respective partner
determination procedures (either for the installed base or for the object category)
conform to the partner functions of the functional location in SAP ERP.

Identification of the Objects and Significance of the Logical System


The logical object key in SAP CRM consists of the following:

Object identification: OLTP functional location ID

Object family: 0403 (set in Customizing)

Logical system: OLTP system

The semantic of the logical system plays an important role. The logical system describes
the original system of the objects. If a functional location is loaded from SAP ERP, it is
automatically given the system ID of the SAP ERP system as the logical system, and is
therefore treated as an externalobject in SAP CRM. This means that the attributes of the
object cannot be changed in SAP CRM. Protection against changes can be further refined
by giving not only the entire object, but also individual attributes of the object a logical
system. The following attributes have a logical system:

Description (short texts)

Long texts

Set types

Relationships

The logical system for the relevant attribute is determined by the system from which the
functional locations are received.

Note:

If you use several SAP ERP systems that replicate to one CRM system, you should ensure
that the number ranges of the functional locations in the SAP ERP systems do not
overlap, or you should create different object families for them. Otherwise this can lead
to errors during processing.

TECHNICAL DATA AND FACTS

The flow runs via the SAP CRM adapter framework and is configured there.

Replication object: FUNCLOC

B-Doc type: CRM_FL_DMBDOC

CRM validation module: CRM_FUNCLOC_VALIDATE


For more information about configuration, see SAP Library for SAP Customer
Relationship Management in SAP Help Portal at http://help.sap.com ->SAP Customer
Relationship Management -> Data Exchange and Mobile Technologies -> CRM
Integration Services -> Adapter and Site Types -> Adapter -> The Adapter Framework.

FUNCTION MODULES AND BUSINESS ADD-INS

The validation coding for functional location mapping is contained in the IB_CRM_INT
package. The initial module for the validation logic and processing of the functional
location BDoc is: CRM_CREATE_IBASE_FROM_FUNCLOC.

The Business Add-In CRM_FUNCLOC_LOAD belongs to the IB_CRM_INT package. This


Business Add-In offers you options for influencing the mapping of objects. For more
information, see Business Add-In: Creation of Objects by Functional Location
Download.

CRM CUSTOMIZING

Use the activity Define Default Settings for the Replication of Functional Locations to
customize the load.

You might also like