Fonction SAP BAPI_SRM_DOC_CHANGEPROPERTIES - SRM BAPI: Set Document Attributes

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DOCUMENTCLASS BAPISRMDOC-DOCCLASS C 10 '' Location of Document
DOC_CONTEXT BAPIDOCCONTEXT u 64 X Access Context: RMS ID and SPS ID
DO_COMMIT BAPISRMDOC-BOOLEAN C 1 X 'X': Commit after Changing Attribute
OBJECTID BAPISRMDOC-GUID C 32 Internal Document ID
WHOLE_DOCUMENT BAPISRMDOC-BOOLEAN C 1 '' X On whole document 'X' or only on one entry 'Y'

Paramètre Reférence Type Long. Description
RETURN BAPIRET2 u 548 Return Parameter

Paramètre Reférence Long. Facultatif Description
PROPERTIES BAPIPROPTB 319 Properties to Set
PROPS_DELETE BAPIPROPTB 319 X Properties to Delete

Functionality
Set/change/delete attribute values of a document
You can use this function to change specific attribute values of adocument. Any non-specified attribute values remain the same. Thespecified values are added to any attributes that can have multiplevalues (such as keywords). Old values are not deleted.

Example
* Add new keyword 'BAPI' to a document
wa_properties-NAME  = 'SRM_KEYWORD'.
wa_properties-VALUE = 'BAPI'.
APPEND wa_properties TO lt_properties.
* delete keyword of value 'Test'
wa_properties-NAME  = 'SRM_KEYWORD'.
wa_properties-VALUE = 'Test'.
APPEND wa_properties TO props_delete.
CALL FUNCTION BAPI_RECORD_CHANGEPROPERTIES
  EXPORTING
    OBJECTID            = 'FE55793BA8182177E10000000A1148F5'
    DOCUMENTCLASS       = 'SRM_DOC04'
    WHOLE_DOCUMENT      = ' '
  IMPORTING
    RETURN              = bapi_return
  TABLES
PROPERTIES = lt_properties    
PROPS_DELETE = props_delete.

Notes
Some attributes are defined for the whole document and are valid for allversions. Some attributes are only defined and are valid for a specificversion. If you want to set attribute values for a whole document, theimport parameter must be set to 'X'.

Description
Result of the BAPI call:
'000': Everything OK
'001': Unexpected error
'002': Incorrect parameter used when calling the function module
'004': User has no authorization for this activity
'005': Document was not found
'006': A version of the document was not found
'007': A variant of the document was not found

Description
Storage location of the document (content model) in which the elementsare to be inserted.

Description
Context for accessing documents. If the document is stored on a WebDAVserver, you must specify the RMS ID and SPS ID in the document context.

Description
'X': Execute commit after attributes have been changed

Description
Unique ID of the document in a document class

Description
This parameter is optional.
If you set an "X", you can change the attribute values of the wholedocument (logical document).
If you set an empty space, you can only change the attribute values forthe current version/variant of the document.
You normally do not need to set this parameter, because in most casesyou want the attributes to refer to the current version/variant. Onlysystem attributes and their values are associated with the logicaldocument.

Default

Description
Name-value pairs of attributes to be set.

Description
Name-value pairs of attributes to be deleted.