VeloX Docs

SAP plugins

Change Master

Create and update SAP change masters (change numbers) in ECC and S/4HANA.

Overview

The Change Master plugin creates new change masters (engineering change numbers) in SAP or updates existing ones. It supports SAP ECC and SAP S/4HANA.

You can find the plugin in the SAP Targets group on the left panel of the Designer section. It works as a target: you map fields from a source plugin (Excel, database, SAP table, Python, and so on) to the change master fields.

Connecting to SAP

Open the Connection section of the plugin and fill in Connection Parameters. You can connect in three ways:

  • Password Manager: select the SAP System and the Server Type. The entries come from the Password Manager.
  • Application Server: enter Server Host, System Number, SAPRouter (optional), User, Password, Client, and Language.
  • Message Server: enter SID, Server Host, Logon Group, Server Service, SAPRouter, User, Password, Client, and Language.

A Password Manager entry should have the following keys in its Options: App Server Host, Client, Language, SAP Router, System Number, System ID. You can take all of them from the SAP System options template.

See SAP Read Table for details and screenshots of each connection type.

Before you click Connect, select:

Option Values
Target system ECC or S/4HANA. This selects the SAP function module the plugin calls (see Run-time behavior).
Action Create New Change Master or Update Existing Change Master

Then click Connect. The plugin reads the interface of the SAP function module and builds the field structure.

After the connection, and every time you change Target system or Action, the plugin checks what the target system supports:

  • For S/4HANA, it checks that BAPI_ECN_MAINTAIN exists and is remote-enabled. If not, it shows Function Module not found. The selected function is only supported in S/4HANA.
  • Objects that the selected function module does not have are disabled on the Objects tab. For example, CHANGE_HEADER_CUS (customer header fields) is available only for ECC, because BAPI_ECN_MAINTAIN has no such parameter.
  • The plugin checks whether RFC_DISPLAY_CHANGE_MASTER is available. It is needed only to open change masters from the log (see Log).

On the first connection, Add Leading Zeros is turned on for CHANGE_NO.

Connection settings

The Settings tab contains the connection pool settings IDLE_TIMEOUT, POOL_SIZE, and MAX_POOL_SIZE. Use Notes to keep project notes with the plugin.

Fields and mapping

Open the Fields section and click Select Fields. The fields are grouped on three tabs:

Tab Content
Head data Change header fields, for example CHANGE_NO, DESCRIPT, STATUS, and VALID_FROM.
Objects Object type indicators (which object types the change number can be used for), Alternative Dates, Object Mgmt Records, Validity, and Longtexts.
Return Data Values returned after processing, such as the change number CHANGE_NO.

Select the fields you need, or click Select All. For table objects, click Add Row to add more rows to map.

The head data fields come from the SAP structure AENR_API01. The Objects tab contains:

Object Content
CHANGE_HEADER_CUS Customer-specific header fields. ECC only.
Object type indicators (for example OBJECT_BOM, OBJECT_MAT, OBJECT_DOC) One structure per object type. Fields such as ACTIVE, LOCKED, OBJ_REQU (object management record required), MGTREC_GEN, GEN_NEW, and GEN_DIALOG.
Alternative Dates (ALT_DATES) Alternative dates of the change number.
Object Mgmt Records (OBJMGREC) Object management records.
Validity (EFFECTIVITY) Effectivity (validity) data.
Longtexts Long text lines. TDSPRAS (language), TDFORMAT, and TDLINE are mandatory.
LIST_OF_ECNS List of change numbers assigned to a leading change master.

Map the fields from any source plugin using drag and drop. Mandatory fields must be mapped or have a default value.

Checks before the load

When you start the load, the plugin checks the mapping and stops with a message if something is missing:

  • The plugin is not connected: Connect to SAP server.
  • A mandatory field is not mapped and has no default value.
  • Create: DESCRIPT, STATUS, and VALID_FROM must be mapped or have a default value.
  • Create: if you map fields of an object type, you must also map or set its ACTIVE flag (Select an Active flag for Object Type ...).
  • Update: CHANGE_NO must be mapped (Change Number is not specified.), and at least one other field must be mapped (Specify at least one field for update.).

If you selected an object type but mapped none of its fields, the plugin shows an information message and continues.

Field options

Option Description
Default Value A value for the field. Choose No Default Value., Ignore Source. (always use the default value), or Only If Source Empty. (use the default value only if the source value is empty).
Convert To Upper Case Convert the value to upper case.
Add Leading Zeros Pad the value with leading zeros.
Remove Zeros Return fields only: remove leading zeros from the returned value.

Run-time behavior

For both Create and Update, the target system decides which function module saves the change master:

Target system Function modules
ECC CCAP_ECN_MAINTAIN, after CALO_INIT_API
S/4HANA BAPI_ECN_MAINTAIN, after CALO_INIT_API, followed by BAPI_TRANSACTION_COMMIT

For each source record, the plugin:

  1. Fills the head data, object types, tables, and long texts from the mapping.
  2. Calls CALO_INIT_API to initialize the SAP API data and log, and then the maintain function module in the same SAP session.
  3. On ECC, CCAP_ECN_MAINTAIN commits itself with FL_COMMIT_AND_WAIT. On S/4HANA, the plugin calls BAPI_TRANSACTION_COMMIT with WAIT only if BAPI_ECN_MAINTAIN returned no errors.
  4. Returns the change number in the CHANGE_NO return field.

The plugin leaves FL_SYNCH empty, so the change master is not re-created from scratch with the new data.

Long texts

  • Long text lines longer than 132 characters are split into several lines.
  • In SAP, the first long text line holds the change number description. If the first line in the logon language does not start with the description, the plugin adds the description (40 characters) as the first line.
  • Long texts are stored with text ID AENR.

Create

The plugin creates a change master for each source record.

If you map CHANGE_NO when creating and the change number already exists in SAP, the existing change master can be overwritten.

Update

The plugin needs the change number from the source. It reads the existing change master and merges it with your mapped data:

  • If STATUS, VALID_FROM, or DESCRIPT are empty, the plugin takes the values from the existing record and writes a warning to the log.
  • Object types that you did not map keep their current settings.
  • If you do not map long texts, the existing long texts are kept.
  • The other header fields that you did not map are taken from the existing record. The in-date and out-date rules (INDATE_RULE, OUTDATE_RULE) are cleared.

To read the existing change master, the plugin calls CCAP_ECN_HEADER_READ, CS_H2M_ECN_GET_DETAILS, and RFC_READ_TEXT.

If the change number is missing in the source, the record fails with the message Change Number not found in source.

Simulation

In simulation mode, the plugin runs the function module without a commit, so no data is saved in SAP. On ECC it sets FL_NO_COMMIT_WORK in CCAP_ECN_MAINTAIN. On S/4HANA it skips BAPI_TRANSACTION_COMMIT.

Log

The log shows the system type, action type, and simulation flag for each record. The log grid has a Change Number column and a Change Number Description column. Click the change number to open the change master in SAP. This requires SAP GUI and the function module RFC_DISPLAY_CHANGE_MASTER in the target system.

The technical log contains the plugin and SAP connector versions, the import and export parameters of the maintain function module, and the sections for reading an existing change master during Update.

If SAP returns error messages, the record is marked as an error with the SAP messages (and the parameter name, if SAP returns it). On ECC, CCAP_ECN_MAINTAIN reports errors as exceptions. The exception text is written to the log row and the technical log.

Prerequisites

  • SAP Connector for .NET (SAP NCo) installed on the computer that runs VeloXm.
  • An SAP user with RFC access and authorization to create and change change masters.
  • For S/4HANA: BAPI_ECN_MAINTAIN in the target system.
  • Optional: SAP GUI and RFC_DISPLAY_CHANGE_MASTER to open change masters from the log.

Our experienced team of experts has the capability to develop customized solutions to fit your individual needs.

We understand that each situation is unique and thus can provide services tailored to those requirements. Our goal is to provide the best possible service and to ensure the most successful outcome for the project.

Please contact us for more information on how we can help you.

Esc