Overview
The Material BOM plugin maintains material bills of material in SAP. It calls the SAP function module CSAP_MAT_BOM_MAINTAIN once for every source record.
You can find the plugin in the SAP Targets group on the left panel of the Designer section. It is a target plugin: map fields from any source (Excel, database, SAP table, Python, and so on) to it.
CSAP_MAT_BOM_MAINTAIN is a standard SAP function module. It creates a BOM if none exists for the material, plant and BOM usage, and changes the existing BOM otherwise, including its header and items.
A project that contains the Material BOM plugin can't be run in simulation mode. See Simulation mode.
Connecting to SAP
Open the Connection section of the plugin and fill in Connection Parameters on one of three tabs.
Password Manager
- Select the SAP System. Entries come from the Password Manager.
- Select the Server Type: Application Server or Message Server.
The 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.
Application Server
Fill in Server Host, System Number, SAPRouter (optional), User, Password, Client, and Language.
Message Server
Fill in SID, Server Host, Logon Group, Server Service, SAPRouter (optional), User, Password, Client, and Language.
Connection settings
Expand Settings below the connection parameters to change the connection pool settings: IDLE_TIMEOUT, POOL_SIZE, and MAX_POOL_SIZE. The Notes button opens notes you can keep with the plugin.
After you fill in the parameters, click Connect. The plugin reads the interface of CSAP_MAT_BOM_MAINTAIN from SAP and builds its structure. All parameters that are not optional in the function module are placed on the canvas automatically; add the optional ones in the Fields section.
If you connect a saved project to a system where the interface of the function module differs, VeloXm shows the message "The structure of the FM is not the same as the structure of the plugin." and adapts the plugin structure: new parameters are added.
Fields
Open the Fields section to choose which parameters appear on the canvas. The parameters are grouped by type, and each tab appears only if the function module has parameters of that type:
| Tab | Content |
|---|---|
| Import | Single fields and structures sent to SAP, for example the material, plant, and BOM usage, and the BOM header. |
| Export | Values returned by SAP. Map them to a following plugin if needed. |
| Changing | Parameters that are both sent and returned. |
| Tables | Tables such as BOM items and long text lines. |
Use Select Fields on a structure or table to choose its fields, or Select All to add all of them.
Each field shows small badges for its settings: M (mandatory), D (default value), U (upper case), Z (leading zeros), and T (truncate).
Field settings
Click a field on the canvas to open its settings:
| Setting | Description |
|---|---|
| Default Value | Value used for the field. Choose No Default Value., Ignore Source. (always use the default value), or Only If Source Empty. |
| Convert To Upper Case | Converts the value to upper case. |
| Add Leading Zeros | Pads the value with leading zeros to the field length. |
| Truncate | Cuts values that are longer than the field length. |
Run-time behavior
For each source record, the plugin fills the selected parameters, converts the values to the SAP internal format, and calls CSAP_MAT_BOM_MAINTAIN. Import and export parameters are written to the log.
- The plugin makes one call per record. It doesn't call
BAPI_TRANSACTION_COMMITorBAPI_TRANSACTION_ROLLBACK;CSAP_MAT_BOM_MAINTAINsaves the BOM itself. Map or set a default value forFL_COMMIT_AND_WAITto control whether SAP waits for the update to finish. - Table parameters (for example the BOM items) are filled from the source as tables: a source with several rows for one record gives several table rows, for example several BOM items.
- Values returned by SAP in export, changing and table parameters can be mapped to a following plugin, for example to write results back to Excel.
- Before a run, VeloXm checks that the plugin is connected to SAP. If not, the run doesn't start ("Connect to SAP server.").
If SAP returns an error, the log row is marked as an error with the SAP message. For ABAP exceptions, the plugin reads the full message text, including the long text, from SAP (RPY_MESSAGE_COMPOSE). If SAP reports SYSTEM_PREPARE_ATTACH_GUI or SYSTEM_FINISH_ATTACH_GUI, the error refers to SAP Note 1258724 and the run stops.
Simulation mode
CSAP_MAT_BOM_MAINTAIN has no test-run parameter, so the Material BOM plugin doesn't support simulation mode. When a project contains this plugin, the Simulation checkbox in the Data Load section is cleared and disabled, for the whole project. Every run of such a project changes data in SAP, including the runs of the other target plugins in the project.
Test the plugin in a non-productive system first. To simulate the other targets of a project, run them in a separate project without the Material BOM plugin.
Log
The technical log of each record shows the plugin and SAP connector versions, the simulation flag, all import parameters sent to SAP and all export parameters returned. The log grid has no plugin-specific key column; use the SAP message and the technical log to identify the BOM.
Prerequisites
- SAP .NET Connector (NCo) installed on the computer that runs VeloXm.
- An SAP user that may call
CSAP_MAT_BOM_MAINTAINover RFC and has the authorizations to create and change material BOMs for the plants and BOM usages you load.
Our experienced team of experts has the capability to develop customized solutions to fit your individual needs.
Please contact us for more information on how we can help you.