Create CN
The following API structure tables list all the APIs and the respective API fields that are required to create CNs within the current version of SAP distribution targets. These APIs are listed in the order in which they are invoked.
CCAP_ECN_CREATE
This API creates a CN in SAP. It is characterized to create a CN that is valid for the create or change functions of documents, BOMs, and materials. It is also characterized to list material objects on the CN with alternate effective dates set to the current date. The Header Effective is initially set to a future Effective Date and the CN status is set to Active.
BOMs and Documents are not listed on the CN as part of the CN create process. Instead, they are listed on the CN when the CN is used to create or change these object types.
WC Attribute Name
API Segment
API Field
API Field Description
Value If Default
Source
Transform
Number
CHANGE_HEADER
CHANGE_NO
Change Number
N/A
Windchill
N/A
N/A
CHANGE_HEADER
FL_COMMIT_AND_ WAIT
Flag for Commit and Wait
X
Default
N/A
N/A
CHANGE_HEADER
STATUS
Status
"01" (Change number status - active)
Default
N/A
N/A
CHANGE_HEADER
VALID_FROM
Valid from Date
3001-01-01 (January, 01, 3001)
Default
N/A
Description
CHANGE_HEADER
DESCRIPT
Description
N/A
Windchill
N/A
Reason for Change
CHANGE_HEADER
REASON_CHG
Reason for Change
N/A
Windchill
N/A
N/A
OBJECT_BOM
ACTIVE
Active for BOM
X
Default
N/A
N/A
OBJECT_BOM
OBJ_REQU
Defines that the object be processed with object management records
X
Default
N/A
N/A
OBJECT_BOM
MGTREC_GEN
Defines that management records be created automatically
X
Default
N/A
N/A
OBJECT_MAT
ACTIVE
Active for Material
X
Default
N/A
N/A
OBJECT_MAT
OBJ_REQU
Defines that the object be processed with object management records
X
Default
N/A
N/A
OBJECT_MAT
MGTREC_GEN
Defines that management records be created automatically
X
Default
N/A
N/A
OBJECT_DOC
ACTIVE
Active for document
X
Default
N/A
N/A
OBJECT_DOC
OBJ_REQU
Defines that the object be processed with object management records
X
Default
N/A
N/A
OBJECT_DOC
MGTREC_GEN
Defines that management records be created automatically
X
Default
N/A
N/A
ALT_DATES (Repeatable Structure)
ALT_DATE1
Alternate date label
Set to the current date
Default
N/A
N/A
ALT_DATES (Repeatable Structure
VALID_FROM 1
Alternate date
Set to the current date
Default
N/A
Part Number
EFFECTIVITY
MATERIAL
Material number
N/A
Windchill
N/A
StartSerial Number Effectivity
EFFECTIVITY
SERIALNR_LOW
Starting serial effectivity value
N/A
Windchill
N/A
EndSerial Number Effectivity
EFFECTIVITY
SERIALNR_HIGH
Ending serial effectivity value
N/A
Windchill
N/A
N/A
OBJMGREC (Repeatable Structure)
ALT_DATE
Alternate date label
Set to the current date
Default
N/A
N/A
OBJMGREC (Repeatable Structure)
CHG_OBJTYP
Change object type
"4" - For Material Object Type
Default
N/A
Part
OBJMGREC (Repeatable Structure)
MATERIAL
Material Number
N/A
Windchill
N/A
1. The fields ALT_DATE and VALID_FROM are intentionally defaulted to the same value.
CCAP_ECN_MAINTAIN
This API is used to change a CN in SAP. This API is called after the CN is created and used in creating or changing BOMs or documents. The API is used to create alternate dates and assign those alternate dates to the document and BOM objects that are listed on the CN. Additionally, this API is used to set the CN header effective date value to the current date and set the CN status to inactive.
The following table provides details on this API.
Windchill Attribute Name
API Segment
API Field
API Field Description
Value If Default
Source
Transform
Number
CHANGE_HEADER
CHANGE_NO
Change Number
N/A
Windchill
N/A
N/A
CHANGE_HEADER
FL_COMMIT_AND_ WAIT
Flag for Commit and Wait
X
Default1
N/A
N/A
CHANGE_HEADER
STATUS
Status
“02” (Change number status - inactive)
Default
N/A
N/A
CHANGE_HEADER
VALID_FROM
Valid from date
Set to current date
Default2
Description
CHANGE_HEADER
DESCRIPT
Description
N/A
Windchill
N/A
N/A
CHANGE_HEADER_ CUS
XFLAG
Change header indicator
X
Default
N/A
Reason for Change
CHANGE_HEADER
REASON_CHG
Reason for Change
N/A
Windchill
N/A
Start Effectivity
ALT_DATES
ALT_DATE
Alternate Date
N/A
Windchill
N/A
Start Effectivity
ALT_DATES
VALID_FROM
Valid From Date
N/A
Windchill
N/A
N/A
HEADER
FL_SYNCH
Synchronization flag
“ “ (space)
Default
N/A
N/A
OBJECT_BOM
ACTIVE
Active for BOM
X
Default
N/A
N/A
OBJECT_BOM
OBJ_REQU
Defines that the object will be processed with object management records
X
Default
N/A
N/A
OBJECT_BOM
MGTREC_GEN
Defines that management records be created automatically
X
Default
N/A
N/A
OBJECT_MAT
ACTIVE
Active for Material
X
Default
N/A
N/A
OBJECT_MAT
OBJ_REQU
Defines that the object be processed with object management records
X
Default
N/A
N/A
OBJECT_MAT
MGTREC_GEN
Defines that management records be created automatically
X
Default
N/A
N/A
OBJECT_DOC
ACTIVE
Active for document
X
Default
N/A
N/A
OBJECT_DOC
OBJ_REQU
Defines that the object be processed with object management records3
X
Default
N/A
N/A
OBJECT_DOC
MGTREC_GEN
Manage-ment records are created automatically
X
Default
N/A
N/A
OBJMGREC (Repeat-able structure)
ALT_DATE
Alternate date
Set to start effectivity date for BOM and Doc
Default1
N/A
N/A
OBJMGREC (Repeat-able structure)
CHG_OBJTYP
Change object type
“1” – For BOM Object Type
“3” – For Doc Object Type
Default1
N/A
N/A
OBJMGREC (Repeat-able structure)
CHGTYPOBJ
Object change type
“004” for BOMs
“003” for Docs and Materials
Default1
N/A
N/A
OBJMGREC (Repeat-able structure)
BOM_USAGE
BOM usage
“1” For Production
Default1
N/A
Assembly Part Number
OBJMGREC (Repeat-able structure)
MATERIAL
Material number of BOM
N/A
Windchill
N/A
TargetID
OBJMGREC (Repeat-able structure)
PLANT
Plant number of BOM (if not supplied, the alternate date is effective for the non-plant specific BOM)
N/A
Windchill
Substring
N/A
OBJMGREC (Repeat-able structure)
BOM_CAT
BOM category
“M” for Material BOM
Default
N/A
N/A
OBJMGREC (Repeat-able structure)
BOM_USAGE
BOM usage
“1” for Production
Default
N/A
Doc Type
OBJMGREC (Repeat-able structure)
DOC_TYPE
Document type
N/A
Windchill
N/A
Doc Number
OBJMGREC (Repeat-able structure)
DOC_NUMBER
Document number
N/A
Windchill
N/A
Version
OBJMGREC (Repeat-able structure)
DOC_VERSION
Document version
N/A
Windchill
N/A
N/A
OBJMGREC (Repeat-able structure)
DOC_PART
Part Type
000
Default1
N/A
1. These default values are not included here because they have been included in the default tables of either the Document or BOM functional designs.
2. The fields ALT_DATE and VALID_FROM are intentionally defaulted to the same value.
3. Object Management Records only need to be created for the documents and BOMs listed on the CN.
CALO_INIT_API
This API should be invoked before the CCAP_ECN_CREATE and CCAP_ECN_MAINTAIN APIs are called to create an ECN or update its effectivity dates. 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
這是否有幫助?