Enterprise Administration > Implementing Windchill ESI > Implementing Windchill ESI in an SAP Environment > SAP API Structures > Change Document > BAPI_DOCUMENT_CREATENEWVRS2
  
BAPI_DOCUMENT_CREATENEWVRS2
This API is required to create a new document version. It is assumed that before any document changes are made, a new document version is created. Thus, this API is executed before each document change. The following table provides details on this API.
Windchill Attribute Name
API Structure
API Field
API Field Description
Value If Default
Source
Transform
Doc Type
HEADER
REFDOCUMENTTYPE
Document Type
N/A
Windchill
N/A
Doc Number
HEADER
REFDOCUMENTNUMBER
Document Number
N/A
Windchill
N/A
N/A
HEADER
REFDOCUMENTPART
Document Part
000
Default
N/A
Previous Version
HEADER
REFDOCUMENTVERSION
Ref Document Version
N/A
Windchill
N/A
Version
HEADER
NEWDOCUMENTVERSION
New Document Version
N/A
Windchill
N/A
N/A
HEADER
STATUSEXTERN
Status
FR
Default
N/A
N/A
HEADER
COPYORIGINALS
Copy Originals
\u00201
Default
N/A
N/A
HEADER
COPYDOCBOM
Copy Document BOM
\u0020 1
Default
N/A
N/A
COPY OBJECT LINKS
OBJECTTYPE
Copy all object links
*
* 
This value is an asterisk
Default
N/A
1. For the COPYORIGINALS and COPYDOCBOM fields, it is necessary to pass in a blank space because the API defaults in an “X” which would ultimately copy originals into the new versions created. It is critical to the design that a " " blank space is copied into these fields. The value "\u0020" is the UTF-8 format of a space.