Fonction SAP /CUM/BAPI_CUDESIGN_MAINTAIN - CU: BAPI maintain CU design

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
IS_CUDESIGN /CUM/BAPI_CUDESIGN_I u 320 CU: CU design
I_BUFFER_CU_MASTER FLAG C 1 SPACE X CU: Fill CU master data buffer
I_CHECK_CHARVAL FLAG C 1 SPACE X CU: Check characteristic values
I_MODE /CUM/CUI_MODE C 1 'D' CU: CU instance creation mode
I_PROCESS_CUI FLAG C 1 'X' X CU: Process CU instances

Paramètre Reférence Type Long. Description
E_DESNUM /CUM/DESNUM C 12 CU: Design number
RETURN BAPIRET2 u 548 Return Parameter

Paramètre Reférence Long. Facultatif Description
ET_RETURN BAPIRET2 548 X Return Parameter
IT_AFCU /CUM/BAPI_AFCU_I 364 CU: CU instance
IT_CUI_AUSP /CUM/BAPI_CUI_AUSP 256 CU: Classification output for CU instances
IT_VCUI /CUM/BAPI_VCUI_I 192 CU: BAPI structure for virtual CUI

Functionality
This BAPI is used for maintaining a CU design. A CU design consist of adesign header and a hierarchy of CU instances (CUI's). This hierarchymust contain at least the top CUI which must be a virtual CUI. The CUIhierarchy must be consistent.
If a new CUI is created or added it must have an internal number(INTCUNR) (CUGUID) and the internal number of te superior CUI(SUPCUNR).
If an existing CUI is maintained the fields CUGUID and SUPCUGUID must befilled. All virtual CUI's must have the flag VIRTUAL. If a CUI containsa BOM-CU then all necessary items CU's must also be defined. Whencreating a new design all CUI's must have the flag VBKZ set to 'I'. Whenmaintaing a CU design the CUI's can have different update flag dependingon if a new CUI is added or is changed or should be deleted. All CUI'snot contained in the table IT_AFCU will be deleted from DB. An existingCUI must be filled with CUGUID and SUPCUGUID.
While changing a design all fields in the header without the technicalfields must be filled. If one field is not filled then it will becleared in DB. The kind of maintainance will be defined in the fieldVBKZ.
A design can only be deleted if the status allows it. In particular adesign can not be deleted if an order was created from it.
For each CUI also the charcteristics must be filled in the tableIT_CUI_AUSP. For each virtual CUI's addittionally there must be oneentry in the table IT_VCUI. In both table the fields INTCUNR (resp.CUGUID) must be filled to get the link to the CUI.

Example