Best Practices for setting up transfers between Safran and SAP

Modified on Fri, 13 Mar at 10:17 AM

TABLE OF CONTENTS


Introduction

The use case for transferring data between Safran and SAP (both directions) has been the oldest and arguably the most important one for some of the companies using the solution. The way to set up Configs will vary depending on the specifics of the use case. These have been listed in the following sections, where the challenge of each is described and how it is addressed in the Config.


This article requires some technical knowledge of both SAP and how to do mappings using IDE, and is not recommended for the "average user"...
It tries to capture some "best practices" and provide a map to how to get started with examples from real life..



Case 1: Safran as Source, SAP as Receiver

When exporting activities from Safran to SAP, setting up a mapping to the SAP Hostfield "ORD_OrderHeader" is critical for structuring data. The specific value passed is far less important than its uniqueness:

  • Work Order Creation: A new WorkOrder is created for every unique value in this field.
  • Operation Mapping: All activities sharing the same unique "ORD_OrderHeader" value are grouped as Operations under that specific WorkOrder, starting with "0010", and using increments or 10 (i.e. next one being "0020")

Note: If Safran is the "sole source of truth" for SAP, i.e. the flow of data is one-directional, then you can ignore the section called "Case 2" below.


Case 2: Using Safran Text Fields to "point" to SAP operations to update/create

This case is only relevant for for bidirectional updates - i.e. when WorkOrders and Operations are allowed to be manually added in SAP and Activities manually added in Safran to update them.
When a project allows for the creation of Activities in both Safran and SAP, there is "no exclusive source of truth for a SAP schedule", Safran must "pinpoint" specific SAP operations to ensure data accuracy. This has currently been achieved in 2 ways for different use cases:

  1. By mapping dedicated Safran user fields (e.g., Text1 and Text2) to the the ORD_OrderId and OPR_Activity fields in SAP.
  2. By using the Safran Activity name as the "reference" to the WorkOrder/Activity using 12 digit code. E.g: 222222220010 (Where the first 8 characters, "22222222", references the WorkOrder number and "0010" the SAP Activity number. Note that this "split" of 12 characters into 8 + 4 can easily be achieved using two mapping formulas:
    ORD_OrderId uses formula: Sys.Left(Activity.Code, 8)
    OPR_Activity uses formula:  Sys.Right(Activity.Code, 4).
The SAP Host Fields "ORD_OrderId" and "OPR_Activity" allow Safran to target (update or create) specific Work Order and Activity combinations



Config example of mapping data from Safran to SAP

This is an example of a mapping used when transferring schedule from Safran to SAP:

RowILAP termDescriptionData typeDirect map to Host field (alias)Value Transformation Formula
1ORD_OrderHeaderSAP Interface Order IdentifierStringuf_text24 (Tekst AO-header)
2ORD_OrderidOrderStringuf_text5 (AO number)
3ORD_ShortTextDescriptionString
Sys.Truncate(uf_text24,40)
4ORD_OrderTypeOrder TypeString
"PM10"
5ORD_PlangroupPlanner groupString
uf_ref4=="HD" ? "SVM" : "SC"
6ORD_LocationLocationString
Sys.GetPartIndex(uf_out1,"§",1)
7ORD_PlanplantPlanning plantString
Sys.GetPartIndex(uf_out1,"§",0)
8ORD_PlantPlant for WorkCenterString
Sys.GetPartIndex(uf_out1,"§",0)
9ORD_MnWkCtrMain work centerString
Sys.GetPartIndex(uf_out3,"§",1)
10ORD_MaintplantMaintenance plantString
Sys.GetPartIndex(uf_out1,"§",0)
11ORD_SuperiorNetworkSubnetwork ofString
Sys.GetPart(uf_text6, "-", "L")
12ORD_SuperiorActivityActivityString
Sys.GetPart(uf_text6, "-", "R")
13ORD_WbsElemWBS ElementString
uf_ref1 + "." + uf_ref28
14ORD_LocWbsElemWBS ElementString
uf_ref1 + "." + uf_ref28
15ORD_StartDateBasic start dateString
(EarlyStart?.Hour == 0 && EarlyStart?.Minute == 0 && EarlyStart?.Second == 0) ? EarlyStart?.AddHours(5) : EarlyStart
16ORD_FinishDateBasic finish dateString
(EarlyFinish?.Hour == 0 && EarlyFinish?.Minute == 0 && EarlyFinish?.Second == 0) ? EarlyFinish?.AddHours(17) : EarlyFinish
17ORD_RevisionNumberRevision NumberString
uf_ref22 == "UK" ? Null : uf_ref22
18OPR_ControlKeyControl keyString
"PM01"
19OPR_ActivityOperation/Activity NumberStringuf_text17 (SAP operasjon)
20OPR_WorkCntrWork centerString
Sys.GetPartIndex(uf_out4,"§",1)
21OPR_PlantPlantString
Sys.GetPartIndex(uf_out1,"§",0)
22OPR_DescriptionOperation short textString
Sys.Truncate(Activity.Description,40)
23OPR_CalcKeyKey for calculationString
PlannedWorkHours > 0.0 ? 3 : 0
24OPR_WorkActivityWork involved in the activityString
Activity.ResourceAssignments?.Sum(x => x.PlannedHours ?? 0)
25OPR_ConstraintTypeStartConstraint on the basic start date for the activityString
"X"
26OPR_StartConsConstraint for activity start (Basic)String
(EarlyStart?.Hour == 0 && EarlyStart?.Minute == 0 && EarlyStart?.Second == 0) ? EarlyStart?.AddHours(5) : EarlyStart
27OPR_FinConstrConstraint for finish of activity (Basic)String
(EarlyFinish?.Hour == 0 && EarlyFinish?.Minute == 0 && EarlyFinish?.Second == 0) ? EarlyFinish?.AddHours(17) : EarlyFinish
28CNF_FinConfPartial/Final ConfirmationString
CurrentProgress == 100 ? "X" : ""
29CNF_CompleteIndicator: No Remaining Work ExpectedString
CurrentProgress == 100 ? "X" : ""
30CNF_ConfTextConfirmation textString
"ILAP update by AKSO"
31CNF_ActWorkActual workString
Activity.ActualWorkHours
32CNF_RemWorkRemaining workString
CurrentProgress == 0 ? PlannedWorkHours : (ActualWorkHours/(CurrentProgress/100)) - ActualWorkHours
33OPR_SystemStatusOperation System Status     (comma separated list)String
uf_ref5?? "PREP"
34OPR_CancelledOperation's Cancel StatusBooleanuf_flag4 (SAP CANC)

Table showing example of Safran to SAP sending config.


Note that the Receiving Config to SAP is automatically setting default mappings so is trivial to create.


Data Round-Trip: Returning WorkOrder and Operation IDs to Safran

In many cases it is useful for Safran to have knowledge of what WorkOrderId and OperationID SAP created on the transfer from Safran to SAP. This can be implemented making an IEA using the Safran to SAP transfer as a so called "Predecessor IEA", and will be automatically executed in sequence. For such an IEA it is critical that it has set its receiving Host System Parameter to "Only affect specified mappings", and only 2 fields are set. See next section for the example config.


Roundtrip Receiving Config SAP to Safran, example 1

 This receiving Safran Config example corresponds to the sender Config example in table above

RowILAP termDescriptionData typeDirect map to Host field (alias)Formula
1OPR_SystemStatusOperation System Status     (comma separated list)Stringuf_text40 (System status from SAP)
2ORD_OrderidOrderStringuf_text5 (AO number)
3OPR_ActivityOperation/Activity NumberStringuf_text17 (SAP operasjon)

Table showing example of SAP to Safran receiving config (roundtrip Safran -> SAP -> Safran).


Roundtrip Receiving Config SAP to Safran, example 2

This receiver Config example is relevant if Safran's activity code is used to "point" to WorkOrder and Activity in SAP (see earlier description of the two variants of "Case 2" in beginning of article)

RowILAP TermDescriptionData typeDirect map to Host field (alias)Formula
1ORD_UserStatusOrder User Statuses (comma separated list)Stringuf_text31 (User Status)
2ORD_SystemStatusOrder System Status     (comma separated list)Stringuf_text25 (System Status)
3OPR_SystemStatusOperation System Status     (comma separated list)Stringuf_text27 (Opr System Status)
4OPR_WorkActivityWork involved in the activityStringuf_dec2 (Plan Hrs(Estimates)/Length)
5CNF_ActWorkActual workStringuf_dec15 (EQ SAP EXP HRS)
6Code
StringnameActivity.Code?.Replace("-", "")

Table showing alternative example of SAP to Safran receiving config (roundtrip Safran -> SAP -> Safran).

 

Suggested future improvements

Revised Config Design Recommendations

The original configuration required (by design at the time of first using IDE) an identical number of rows for both sending and receiving systems. To map one Safran field to three SAP destination fields, the source field had to be repeated three times. Recent updates now allow the receiving configuration to "duplicate" a row and assign it to a different host field, making these repetitions unnecessary.

Key Improvements:

  • Streamline the Template: Remove all redundant "red" items (see screenshot). By duplicating rows only within the receiving config—specifically for the three "plant fields"—the sender template becomes much leaner.
  • Shift Logic to Receiver: Hard-coded and calculated values (like "Remaining Work") should be managed by the receiving config.

Impact:
Implementing these changes would reduce the sending configuration from 34 rows to approximately 16, simplifying the mapping process by half. Additionally, the row marked in red (2) can be deleted, as it is already covered by default mapping.


Screenshot showing the current setup in sending Config (from Safran)



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article