Enterprise Administration > Implementing Windchill ESI > Implementing Windchill ESI in an SAP Environment > SAP API Structures > Create and Update Equipment Using ZRFC
  
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.
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