Create and Update Equipment Using ZRFC
The following API structure tables list all the APIs and the respective API fields that are required to create and update equipment within the current version of SAP distribution targets. These APIs are listed in the order in which they are invoked.
/PTC/ZRFC_CREATE_EQUIPMENT
SAP does not provide any APIs to create equipment. This custom RFC has been developed using the BDC method provided by SAP.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default Used
Source
Transform
Windchill Attribute Name
API Structure
API Field
API Field Description
Value (if Default Used)
Source
Transform
ToolingNumber
Import parameter
EQUIPMENTN UMBER
Equipment Number
N/A
Windchill
N/A
N/A
Import parameter
EQUIPMENTC ATEGORY
EQUIPME NT CATEGOR Y
P
TIBCO
N/A
N/A
Import parameter
TASKLISTUSA GE
TASKLIST USAGE
009
TIBCO
N/A
N/A
Import parameter
CONTROLKEY
CONTROL KEY
1
TIBCO
N/A
Name
DESCRIPTION
DESCRIPT ION
N/A
Windchill
N/A
ZRFC_MODIFY_EQUIPMENT
SAP does not provide any APIs to modify equipment. This custom RFC has been developed using the BDC method provided by SAP.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default Used
Source
Transform
Tooling Number
Import parameter
EQUIPMENTN UMBER
Equipment Number
N/A
Windchill
N/A
Create and Update Equipment Using BAPI
BAPI NAME: BAPI_EQUI_CREATE
This is a standard BAPI used for creating a single Equipment. The newly created Equipment fields are updated only to the GENERAL and SPECIFIC views. To update the Equipment’s task list usage (009 is set for Routing ) RFC_CALL_TRANSACTION_USING is used.
* 
The BAPI_EQUI_CREATE requires an explicit commit using BAPI_TRANSACTION_COMMIT.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default Used
Source
Transform
Tooling number of the Tool for which the category is “Fixture”
External number
Equipment number
Windchill
Tooling name
DATA_GENERAL
DESCRIPTION
Equipment description
Windchill
DATA_SPECIFIC
EQUICATGRY
Equipment category. “P” stands for PRT
“P”
TIBCO
Default lookup
DATA_GENERALX
Flag for DESCRIPTION
Equipment description
“X”
TIBCO
Default lookup
DATA_SPECIFICX
Flag for EQUICATGRY
Equipment category
“X”
TIBCO
Default lookup
RFC_CALL_TRANSACTION_USING
This is an RFC used to call an SAP transaction (in the background) and to update the transaction fields. The following table contains the TEST DATA for this RFC to update an EQUIPMENT, by calling the IE02 (Equipment Change) transaction code.
FIELD DESCRIPTION
FIELD NAME
VALUES
IMPORT PARAMETERS:
TRANCODE
IE02
MODE
N
(‘N’ for No-screen-display;
‘E’ for Display-only-error-screens-if-any
‘A’ for all screen display)
Note: To invoke this RFC from a third-party software, the MODE value should be ‘N’.
TABLES:
BT_DATA
There are 7 records for the BT_DATA and all the records need to be in the same order.
1
PROGRAM
SAPMIEQ0
DYNPRO
0100
DYNBEGIN
X
FNAM
RM63E-EQUNR
FVAL
For example. EQJAN10
* 
You must enter the equipment number here.
2
PROGRAM
SAPMIEQ0
DYNPRO
0100
DYNBEGIN
(PASS A SPACE VALUE HERE)
FNAM
BDC_OKCODE
FVAL
/00
3
PROGRAM
SAPMIEQ0
DYNPRO
0101
DYNBEGIN
X
FNAM
ITOB-SHTXT
FVAL
CHD FROM RFC....1
* 
You must enter the equipment short description here.
4
PROGRAM
SAPMIEQ0
DYNPRO
0101
DYNBEGIN
(PASS A SPACE VALUE HERE)
FNAM
BDC_OKCODE
FVAL
=T\05
5
PROGRAM
SAPMIEQ0
DYNPRO
0101
DYNBEGIN
X
FNAM
EFHM-PLANV
FVAL
009 (This is task list usage) This value is Defaulted by TIBCO using default lookup.
6
PROGRAM
SAPMIEQ0
DYNPRO
0101
DYNBEGIN
FNAM
EFHM-STEUF
FVAL
1 (Default lookup by TIBCO)
* 
You must enter the equipment control key here.
7
PROGRAM
SAPMIEQ0
DYNPRO
0101
DYNBEGIN
(PASS A SPACE VALUE HERE)
FNAM
BDC_OKCODE
FVAL
=BU
BAPI NAME: BAPI_EQUI_CHANGE
This is a standard BAPI used to update a single Equipment. The newly created Equipment fields are updated to the GENERAL and SPECIFIC views only. However, you can use other assisting API’s to update the other required parameters.
* 
The BAPI_EQUI_CREATE requires an explicit commit using BAPI_TRANSACTION_COMMIT.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default Used
Source
Transform
Tooling number of the Tool for which the category is “Fixture”
External number
Equipment number
Windchill
Tooling name
DATA_GENERAL
DESCRIPTION
Equipment description
Windchill
DATA_SPECIFIC
EQUICATGRY
Equipment category. “P” stands for PRT
“P”
TIBCO
Default lookup
DATA_GENERALX
Flag for DESCRIPTION
Equipment description
“X”
TIBCO
Default lookup
DATA_SPECIFICX
Flag for EQUICATGRY
Equipment category
“X”
TIBCO
Default lookup
Creating and Changing Control Characteristics
By default, ESI services will not process control characteristics. The relevant attribute on the distribution target has to be set in order for control characteristics (associated to a part, to a process plan or to an operation) to be processed.
With the distribution target attributes for publishing control characteristics and for publishing alternate parts set, control characteristics associated to an alternate part will be processed as well.
With the distribution target attributes for publishing control characteristics and for publishing substitute parts set, control characteristics associated to a substitute part will be processed as well.
With the distribution target attribute Publish Control Characteristics when Publishing a Process Plan set to Yes, control characteristics associated to an operation will be processed as well, when processing the holding process plan. This happens regardless of the value of the distribution target attribute for publishing control characteristics associated to a part, even if those control characteristics are also associated to a part.
Control characteristics have to be associated to a part or to a manufacturing object (such as a process plan or an operation) in order for ESI services to process them. In order for a control characteristic associated to an operation to be processed, the control characteristic must be associated to its owner.
When processing control characteristics, the quality links that associate a control characteristic to a part, a process plan or an operation are processed as well.
Control characteristics may or may not be associated to model items.
Model items associated to control characteristics will be processed only for newly created or changed control characteristics. Also, only those attributes that are relevant for a given type of model item will be processed.
Attempting to publish a control characteristic whose model item’s EPM document is no longer associated to the owner of the control characteristic will result in a failure.
A control characteristic would be rendered as an unchanged object if it is republished after simply changing its description. In order for the control characteristic to be processed as a changed object, a new version of the object should be released.
Creating Control Characteristic Associations to Operations
The following API structure tables list all the APIs and the respective API fields that are required to create routings with Inspection characteristic within the current version of SAP distribution targets. These APIs are listed in the order in which they are invoked.
BAPI_Routing_Create
This BAPI is used to create Routings with having Operations associated with MICs (Control characteristic link with Operation). The invocation of BAPI_Routing_Create is followed by the BAPI_Transaction_Commit or BAPI_Transaction_Rollback based on success or failure of the call.
* 
Note the following:
This BAPI requires an explicit COMMIT WORK. So, the BAPI_TRANSACTION_COMMIT needs to be called along with for database updations (Function module Sequence call)
The creation will always be one time for a particular Routing i.e. you have to pass the values for the tables TASK, OPERATION & INSPCHARACTERISTIC in the single run. It is not possible to first to create the routing & then to transfer/create the MIC association.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value (if Default used)
Source
Transform
Process plan number
TASK
TASK_LIST_G ROUP
Task list group number
N/A
Windchill
N/A
Change Number
TASK
CHANGE_NO
Change number (ECN)
N/A
Windchill
N/A
TASK
TASK_LIST_U SAGE
Task list usage
N/A
TIBCO
Get value from ESIDefaults.properties
TASK
TASK_LIST_S TATUS
Task list status
4
TIBCO
Get value from ESIDefaults.properties
Lot
TASK
LOT_SIZE_FR OM
Lot size from
N/A
Windchill
N/A
TASK
LOT_SIZE_TO
Lot size to
N/A
N/A
N/A
Distribution Target /Plant
TASK
PLANT
Plant of the Task list
N/A
Windchill
N/A
Description
TASK
DESCRIPTION
Short description of the Task list
N/A
Windchill
N/A
Process plan number
OPERATION
TASK_LIST_GROUP
Task list group number
N/A
Windchill
N/A
Sequence Line Number
OPERATION
SEQUENCE_NO
Sequence number
N/A
Windchill
N/A
Change Number
OPERATION
CHANGE_NO
Change number
N/A
Windchill
N/A
Operation Label
OPERATION
ACTIVITY
Operation number
N/A
Windchill
N/A
ErpValidati onCode
OPERATION
CONTROL_KEY
Control Key for the operation
N/A
Windchill/TIBCO
Cross reference
Work Center
OPERATION
WORK_CNTR
Work center of the Operation
N/A
Windchill
N/A
Distribution Target /Plant
OPERATION
PLANT
Operation Plant
N/A
Windchill
N/A
OPERATION
STANDARD_TEXT_KEY
Standard text key
N/A
Description
OPERATION
DESCRIPTION
Operation description
N/A
Windchill
BaseUnitOf Measure
OPERATION
OPERATION_MEASURE_UNIT
Operation unit of measurement
N/A
Windchill/TIBCO
Cross reference
OPERATION
DENOMINATOR
Denominator value
N/A
TIBCO
N/A
OPERATION
NOMINATOR
Nominator value
N/A
TIBCO
N/A
Quantity
OPERATION
BASE_QUANTITY
Operation base quantity
N/A
Windchill
N/A
Process plan number
INSPCHARACTERISTIC
TASK_LIST_GROUP
Task list group number
N/A
Windchill
N/A
Sequence Line Number
INSPCHARACTERISTIC
SEQUENCE_NO
Sequence number
N/A
Windchill
N/A
Operation Label
INSPCHARACTERISTIC
ACTIVITY
Operation number
N/A
Windchill
N/A
INSPCHARACTERISTIC
INSPCHAR
Inspection Characteristic Number. (The number that explicitly identifies an inspection characteristic within an operation in an inspection plan)
N/A
SAP/ZRFC
N/A
INSPCHARACTERISTIC
VALID_FROM
Valid from date of the MIC association with Routing's operation
Current system date
TIBCO
Convert to SAP date format
Change Number
INSPCHARACTERISTIC
CHANGE_NO
Engineering Change number (ECN)
N/A
Windchill
N/A
Model Item Reference
INSPCHARACTERISTIC
QUANTITATIVE_IND
The indicator for Quantitative type
X
TIBCO
Get value from ESIDefaults.properties
CC Number
INSPCHARACTERISTIC
MSTR_CHAR
Number to uniquely identify a MIC
N/A
Windchill
N/A
Distribution Target /Plant
INSPCHARACTERISTIC
PMSTR_CHAR
Plant of the Master Inspection Characteristics (MIC)
N/A
Windchill
N/A
INSPCHARACTERISTIC
CHA_MASTER_IMPORT_MODUS
Mode for Reference to Master Inspection Characteristic
N/A
TIBCO
Get value from ESIDefaults.properties
CC Description
INSPCHARACTERISTIC
CHAR_DESCR
Inspection Characteristic description
N/A
Windchill
N/A
INSPCHARACTERISTIC
UP_TOL_LMT_IND
Indicator for Upper specification limit
X
TIBCO
Get value from ESIDefaults.properties
INSPCHARACTERISTIC
LW_TOL_LMT_IND
Indicator for Lower specification limit
X
TIBCO
Get value from ESIDefaults.properties
INSPCHARACTERISTIC
TARGET_VAL_CHECK_IND
Indicator for Target value
X
TIBCO
Get valueESIDefaults.properties
Model Item Reference /No Of Decimal places
INSPCHARACTERISTIC
DEC_PLACES
Number of decimal places for accuracy
N/A
Windchill
N/A
Model Item Reference / Unit of Measurement
INSPCHARACTERISTIC
MEAS_UNIT
Unit-of-Measurement
Windchill/TIBCO
Cross referenced from ESILookups.properties
Model Item Reference / Target Value
INSPCHARACTERISTIC
TARGET_VAL
Target value
N/A
Windchill
N/A
Model Item Reference / Upper Target Value
INSPCHARACTERISTIC
UP_TOL_LMT
Upper specification limit
N/A
Windchill
N/A
Model Item Reference / Lower Target Value
INSPCHARACTERISTIC
LW_TOL_LMT
Lower specification limit
N/A
Windchill
N/A
BAPI_TRANSACTION_COMMIT
This API is used to commit a transaction to the SAP system. If the return message generated from executing the BAPI_ROUTING_CREATE API is a success, then this API will be executed. When this API is executed, all MIC data sent from Windchill PDMLink are committed to the QMSP database table. Refer to the Windchill Enterprise Systems Integration Customizer's Guide - SAP for an explanation of howWindchill ESI interprets the results of the SAP API calls. The following table provides details on this API.
* 
No data is passed through the BAPI_TRANSACTION_COMMIT function module but it is necessary to call the module to release the material in case invalid data is passed through. There are no variations of data inputs for this API for different data requirements. Refer to Windchill Enterprise Systems Integration Customizer's Guide - SAP for an explanation of how SAP APIs are called in sequence to execute each business function.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value (if Default used)
Source
Transform
N/A
HEADER
Wait
Wait
X
Default
N/A
BAPI_TRANSACTION_ROLLBACK
This API is used to rollback a transaction to the SAP distribution target. If the return message generated from the BAPI_ROUTING_CREATE function is not a success then this API will be executed. When this API is executed, all MIC data sent from Windchill PDMLink is rolled back. Refer to the Windchill Enterprise Systems Integration Customizer's Guide - SAPfor an explanation of how Windchill ESI interprets the results of the SAP API calls. The following table provides details on this API.
* 
No data is passed through the BAPI_TRANSACTION_ROLLBACK function module but it is necessary to call the module. Refer to the Windchill Enterprise Systems Integration Customizer's Guide - SAP for an explanation of how SAP APIs are called in sequence to execute each Windchill ESI business function.
Changing or Deleting Control Characteristic Links With Operations
The following API structure table lists the API fields that are required to create/change/delete MIC associations with Routing operations within the current version of SAP distribution targets.
/PTC/ZRFC_MAINTAIN_MAT_SPEC
SAP does not provide any standard APIs to create/change/delete MIC associations with Routing operations (Transaction code: CA02). This custom RFC has been developed using the BDC method provided by SAP, which records the screen and its' fields, which are used to fill the values on the screen.
* 
This custom-RFC is developed and tested in standard SAP IDES system instances (ECC 6.0, ECC 6.06, ECC6.07, and ECC6.08). The RFC fails if there is a difference in the screens or screen-flows (if any in your SAP systems).
Although this BAPI is not declared as “commit required” by SAP, from external system for multi threading mode, it is required to call BAPI_TRANSACTION_COMMIT to end the session otherwise locking errors may occur.
Further details on the RFC can be seen at the RFC DOCUMENTATION.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value (if Default used)
Source
Transform
Process plan number
GROUP_NUMBER
Task list group number
N/A
Windchill
N/A
Distribution Target /Plant
ROUTING_PLANT
Plant of the Task list
N/A
Windchill
N/A
KEY_DATE
Valid from date
Current system date
TIBCO
Convert to SAP Date format
Change Number
CHANGE_NUMBER
Change number (ECN)
N/A
Windchill
N/A
DEL_INSP_CHAR
Indicator for Disassociating Inspection characteristic with Operations
X
TIBCO
Get value from ESIDefaults.properties
UPD_INSP_CHAR
Indicator for updating the Inspection characteristic association with Operations
X
TIBCO
Get value from ESIDefaults.properties
INS_INSP_CHAR
Indicator for newly associating Inspection characteristic with Operations
X
TIBCO
Get value from ESIDefaults.properties
Sequence Line Number
T_DELETE_INSP_CHAR
SEQUENCE_NO
Sequence number
N/A
Windchill
N/A
Operation Label
T_DELETE_INSP_CHAR
OPERATION
Operation number
N/A
Windchill
N/A
T_DELETE_INSP_CHAR
CHARACTERISTIC_NUMBER
Inspection Characteristic Number. (The number that explicitly identifies an inspection characteristic within an operation in an inspection plan)
N/A
SAP/ZRFC
CC Number
T_DELETE_INSP_CHAR
MIC
Number to uniquely identify a MIC
N/A
Windchill
N/A
Distribution Target /Plant
T_DELETE_INSP_CHAR
PLANT_MIC
Plant of the MIC
N/A
Windchill
N/A
T_DELETE_INSP_CHAR
VERSION
Version of the MIC
000001
TIBCO
Get value from ESIDefaults.properties
Sequence Line Number
T_UPDATE_INSP_CHAR
SEQUENCE_NO
Sequence number
N/A
Windchill
N/A
Operation Label
T_UPDATE_INSP_CHAR
OPERATION
Operation number
N/A
Windchill
N/A
T_UPDATE_INSP_CHAR
CHARACTERISTIC_NUMBER
Inspection Characteristic Number. (The number that explicitly identifies an inspection characteristic within an operation in an inspection plan)
N/A
SAP/ZRFC
CC Number
T_UPDATE_INSP_CHAR
MIC
Number to uniquely identify a MIC
N/A
Windchill
N/A
Distribution Target /Plant
T_UPDATE_INSP_CHAR
PLANT_MIC
Plant of the MIC
N/A
Windchill
N/A
T_UPDATE_INSP_CHAR
VERSION
Version of the MIC
000001
TIBCO
Get value from ESIDefaults.properties
Model Item Reference / Upper Target Value
T_UPDATE_INSP_CHAR
UP_TOL_LMT
Upper specification limit
N/A
Windchill
N/A
Model Item Reference / Target Value
T_UPDATE_INSP_CHAR
TARGET_VALUE
Target value
N/A
Windchill
N/A
Model Item Reference / Lower Target Value
T_UPDATE_INSP_CHAR
LW_TOL_LMT
Lower specification limit
N/A
Windchill
N/A
Model Item Reference / No Of Decimal places
T_UPDATE_INSP_CHAR
DEC_PLACES
Number of decimal places for accuracy
N/A
Windchill
N/A
Sequence Line Number
T_INSERT_INSP_CHAR
SEQUENCE_NO
Sequence number
N/A
Windchill
N/A
Operation Label
T_INSERT_INSP_CHAR
OPERATION
Operation number
N/A
Windchill
N/A
T_INSERT_INSP_CHAR
CHARACTERISTIC_NUMBER
Inspection Characteristic Number. (The number that explicitly identifies an inspection characteristic within an operation in an inspection plan)
N/A
SAP/ZRFC
CC Number
T_INSERT_INSP_CHAR
MIC
Number to uniquely identify a MIC
N/A
Windchill
N/A
Distribution Target /Plant
T_INSERT_INSP_CHAR
PLANT_MIC
Plant of the MIC
N/A
Windchill
N/A
T_INSERT_INSP_CHAR
VERSION
Version of the MIC
000001
TIBCO
Get value from ESIDefaults.properties
Model Item Reference / Upper Target Value
T_INSERT_INSP_CHAR
UP_TOL_LMT
Upper specification limit
N/A
Windchill
N/A
Model Item Reference / Target Value
T_INSERT_INSP_CHAR
TARGET_VALUE
Target value
N/A
Windchill
N/A
Model Item Reference / Lower Target Value
T_INSERT_INSP_CHAR
LW_TOL_LMT
Lower specification limit
N/A
Windchill
N/A
Model Item Reference / No Of Decimal places
T_INSERT_INSP_CHAR
DEC_PLACES
Number of decimal places for accuracy
N/A
Windchill
Creating and Deleting Control Characteristic Associations with Parts
The following API structure table lists the API fields that are required to create or delete MIC associations with a Material specification (or Part) within the current version of SAP distribution targets.
/PTC/ZRFC_MAINTAIN_MAT_SPEC
SAP does not provide any standard APIs to create/update/delete MIC associations with a Material specification (Transaction code: QS61). This custom RFC has been developed using the BDC method provided by SAP, which records the screen and its' fields, which are used to fill the values on the screen.
* 
This custom-RFC is developed and tested in standard SAP IDES system instances (ECC 5.0 & ECC 6.0). The RFC fails if there is a difference in the screens or screen-flows (if any in your SAP systems).
Although this ZRFC is not declared as “commit required”, from external system for multi threading mode, it is required to call BAPI_TRANSACTION_COMMIT to end the session otherwise locking errors may occur.
Further details on the RFC can be seen at the RFC DOCUMENTATION.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value (if Default used)
Source
Transform
Part
MATERIAL
Material specification (Part number)
N/A
Windchill
N/A
DELETE_MIC
Indicator to delete MIC association with material specification
X
TIBCO
Get value from ESIDefaults.properties
INSERT_MIC
Indicator to create MIC association with material specification
X
TIBCO
Get value from ESIDefaults.properties
Distribution Target/Plant
T_DELETE_MIC
PLANT_MIC
Plant of the Master Inspection Characteristics (MIC)
N/A
Windchill
N/A
T_DELETE_MIC
MIC
Number to uniquely identify a MIC
N/A
Windchill
N/A
T_DELETE_MIC
VERSION
MIC version number
000001
TIBCO
Get value from ESIDefaults.properties
T_DELETE_MIC
PLANT_MIC
Plant of the Master Inspection Characteristics (MIC)
N/A
Windchill
N/A
T_DELETE_MIC
MIC
Number to uniquely identify a MIC
N/A
Windchill
N/A
T_DELETE_MIC
VERSION
MIC version
000001
TIBCO
Get value from ESIDefaults.properties
Was this helpful?