Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

How to remove a classification class when creating a new version or a copy of a document?

(Glühbirne) Just empty the characteristic values is possible with Pref:

# Clear the value of the defined characters in the target new version of the document
# sap.plm.document.newVersion.<dtype>.charvalue.clear = Char1;Char2;Char3
 
# Clear the value of the defined characters in the target document
# plm.document.copyas.<destination_dtype>.charvalue.clear = Char1;Char2;Char3

 

Ignoring an entire class is only possible via BAdI:

New Version

BAdI: /DSCSAG/DOCUMENT_01
Methode: doc_clone_classif_before

Example code
METHOD  /dscsag/if_ex_document_01 ~doc_clone_classif_before.

* The class PLM_LEGACY must no longer exist in the DIR after a 
* document creation with template, since the PLM_LEGACAY class 
* is to be seen as documentation of the data migration.

  DELETE characteristicvalues
   WHERE classtype = '017' AND
         classname = 'PLM_LEGACY'.

  DELETE classallocations
   WHERE classtype = '017' AND
         classname = 'PLM_LEGACY'.
ENDMETHOD.

 

Copy as

BAdI: /DSCSAG/DOCUMENT_02
Methode: doc_create_from_src_before

Example code
METHOD /dscsag/if_ex_document_02~doc_create_from_src_before .

* The class PLM_LEGACY must no longer exist in the DIR after a 
* document creation with template, since the PLM_LEGACAY class 
* is to be seen as documentation of the data migration.

 DELETE characteristicvalues_new
   WHERE classtype = '017' AND
         classname = 'PLM_LEGACY'.

  DELETE classallocation_new
   WHERE classtype = '017' AND
         classname = 'PLM_LEGACY'.

ENDMETHOD.


Cloning

BAdI: /DSCSAG/ADV_ASSEMBLY

Methode: ADV_CLONE_BEFORE()

 

  • No labels