Change Part
The following API structure tables list all the APIs and the respective API fields that are required to change a material master record within the current version of SAP. These APIs are listed in the order in which they are invoked.
BAPI_MATERIAL_SAVEREPLICA
This API is used to change all the material data in SAP. It should be called for each material to be changed in each plant. The API does not process multiple materials in multiple organizations with one API invocation.
All data is not sent for a change so that data maintained by the distribution target user is not overwritten. The following table provides details on this API.
* 
The BAPI_MATERIAL_SAVEREPLICA function passes data in English. Additional characterization is required to render other supported languages.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default
Source
Transform
Number
HEADDATA
MATERIAL
Material
N/A
Windchill
N/A
PartType
HEADDATA
MATL_TYPE
Material Type
N/A
Windchill
Cross Reference
N/A
HEADDATA
BASIC_VIEW
Basic Data View
X (Indi-cator)
Default
N/A
N/A
HEADDATA
IND_SECTOR
Industry Sector
M (Mechanical Engineering)
Default
N/A
N/A
HEADDATA
MRP_VIEW
MRP View
X (Indicator)
Default
N/A
defaultUnit
CLIENTDATA
BASE_UOM
Base Unit Of Measure
N/A
Windchill
Cross Reference
defaultUnit
CLIENTDATAX
BASE_UOM
Base Unit Of Measure
X
Default
N/A
NA
MATERIAL DESCRIPTION
LANGU
Language Key
TIBCO
Default lookup
name
MATERIAL DESCRIPTION
MATL_DESC
Material Description
N/A
Windchill
N/A
N/A
MATERIAL DESCRIPTION
LANGU_ISO
Language ISO
EN
Windchill
N/A
TargetID
PLANTDATA
PLANT
Plant
N/A
Windchill
Sub-string
org
PLANTDATAX
PLANT
Plant
N/A
Windchill
Sub-string
N/A
PLANTDATA
MRP_TYPE
MRP Type
ND
Default
N/A
N/A
PLANTDATAX
MRP_TYPE
MRP Type
X
Default
N/A
Source
PLANTDATA
PROC_TYPE
Procurement Type
N/A
Windchill
Cross Reference
N/A
PLANTDATAX
PROC_TYPE
Procurement Type
X (Indicator)
Default
N/A
NA
PLANTDATA
CO_PRODUCT
Co_Product indicator
Windchill
Cross Reference
NA
PLANTDATAX
CO_PRODUCT
Co_Product indicator
Windchill
Cross Reference
1. The MPR view is only required when the Procurement Type (Source) is changed.
2. The Procurement type in the PLANTDATA STRUCTURE is required if changing the Procurement Type (Source)
3. Procurement type in the PLANTDATAX STRUCTURE is required if changing the Procurement Type (Source)
CCAP_REV_LEVEL_MAINTAIN
This API creates a new revision level for the material changed with BAPI_MATERIAL_SAVEREPLICA. The revision level creation is tracked with a change number defined from Windchill PDMLink. The change master record for the change number must exist in SAP before running this API. The following table provides details on this API.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default
Source
Transform
Change number
HEADER
CHANGE_NO
Change Number
N/A
Windchill
N/A
N/A
HEADER
FL_COMMIT_AND_WAIT
Flag for Commit and Wait
X
Default
N/A
Number
HEADER
MATERIAL
Material
N/A
Windchill
* 
This should be the same value at that used for the BAPI_MATERIAL_SAVEREPLICA
N/A
Version
HEADER
REV_LEVEL_NEW
New Revision Level
N/A
Windchill
N/A
CALO_INIT_API
This API should be invoked before the CCAP_REV_LEVEL_MAINTAIN API is called to update a part revision level. It is not necessary to pass any data into this function module. The defaults written into the API when it is done executing meet theWindchill ESI requirements. The following table illustrates the defaults passed in automatically upon execution of this API and provides details on it.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default
Source
Transform
N/A
N/A
N/A
N/A
N/A
N/A
N/A
BAPI_TRANSACTION_COMMIT
This API is used to commit a transaction to the SAP distribution target. If the return message generated from the BAPI_MATERIAL_SAVEREPLICA execution is a success, then this API is executed.
When this API is executed, all part data, sent from Windchill PDMLink, is committed to the MARA and MARC (if plant data sent) SAP database tables.
For more information on howWindchill ESI interprets the results of the SAP API calls, see the Windchill Enterprise Systems Integration Customizer's Guide - SAP (Руководство по настройке Windchill Enterprise Systems Integration — SAP).
* 
No data is passed through the BAPI_TRANSACTION_COMMIT function module but it is necessary to call the module to release the material in the event that invalid data is passed through. Refer to theWindchill Enterprise Systems Integration Customizer's Guide - SAP (Руководство по настройке Windchill Enterprise Systems Integration — SAP) for an explanation of how SAP APIs are called in sequence to execute eachWindchill ESI business function.
The following table provides details on this API
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default
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. This API is executed if the return message generated from the BAPI_MATERIAL_SAVEREPLICA function is not a success. When this API is executed, all part data sent fromWindchill PDMLink is rolled back and if plant data is sent, not committed to the MARA and MARC SAP database tables. Refer to theWindchill Enterprise Systems Integration Customizer's Guide - SAP (Руководство по настройке Windchill Enterprise Systems Integration — SAP) for an explanation of howWindchill ESI interprets the results of the SAP API calls.
* 
No data is passed through the BAPI_TRANSACTION_ROLLBACK function module but it is necessary to call the module. For more information on how SAP APIs are called in sequence to execute eachWindchill ESI business function, see the Windchill Enterprise Systems Integration Customizer's Guide - SAP (Руководство по настройке Windchill Enterprise Systems Integration — SAP).
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default
Source
Transform
N/A
N/A
N/A
N/A
N/A
N/A
N/A
e
Было ли это полезно?