Fonction SAP BAPI_RECORD_CHANGEPROPERTIES - Change Properties of Record

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DOCUMENTCLASS BAPISRMREC-DOCCLASS C 10 Record Location
DOC_CONTEXT BAPIDOCCONTEXT u 64 X SRM Context for Document Access
OBJECTID BAPISRMREC-GUID C 32 Internal ID of Record
OMIT_AUTHORITY_CHECK BAPISRMREC-BOOLEAN C 1 ' ' X Perform Authority Check Yes/No
WHOLE_DOCUMENT BAPISRMREC-BOOLEAN C 1 ' ' X For Whole Document 'X' or Only For One Version/Variant ' '

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

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

Functionality
Changes the attribute values of a record.
This function can be used to change particular attribute values of arecord.Attribute values that are not specified remain the same.
For attributes that have more than one possible value (for example,Keyword), the specified values are added. Old values are not deleted.

Example
* Add 2 new keywords to a record
wa_record_properties-NAME = 'SRM_KEYWORD'.
wa_record_properties-VALUE = 'BAPI'.
APPEND wa_record_properties TO record_properties.
wa_record_properties-NAME = 'SRM_KEYWORD'.
wa_record_properties-VALUE = 'Test'.
APPEND wa_record_properties TO record_properties.
CALL FUNCTION BAPI_RECORD_CHANGEPROPERTIES
EXPORTING
OBJECTID = 'FE55793BA8182177E10000000A1148F5'
DOCUMENTCLASS = 'SRM_REC00'
WHOLE_DOCUMENT = ' '
IMPORTING
RETURN = bapi_return
TABLES
PROPERTIES = record_properties

Notes
The authorization for changing record properties is required(authorization object S_SRMGS_PR).

Description
Result of the BAPI call

Description
Location of the record (content model) whose properties you want tochange. If the record is in the WebDAV, give this parameter an initialvalue.

Description
If you want to store the record in the WebDAV, you must specify the RMSand SPS (corresponding element type of the record) here. Otherwise, youdo not need to set this parameter.

Description
Internal ID of record for which the properties are to be changed

Description
This parameter determines whether the authority check will be performed.

Description
This parameter is optional.

  • If you enter an "X", you can change the attribute values of the entire
  • document (logical document).
    • If you enter an empty space, you can only change the attribute values
    • of the current version/variant of the record.
      You do not normally need to set this parameter, because in most casesyou only want to use the current version/variant. The logical documentonly includes system attributes and attribute values.

      Description
      This parameter is used as an import parameter.
      You enter the attributes for which you want to set a new attributevalue. Attributes and attribute values that are not specified remainthe same.
      If you enter new values for attributes that can have more than onevalue, these are added as an extension to the attribute. Old values arenot deleted.
      The table has the following columns:

      • NAME

      • Enter the name of an attribute in this column.
        The attributes of a record are defined in the content model, which youcan view using the Document Modeling Workbench (transaction DMWB).
        If you enter ' for the parameter WHOLE_DOCUMENT, theinstance attributes defined for the PHIO class of the record can bechanged.
        If you enter X ' for the parameter WHOLE_DOCUMENT, theinstance attributes defined for the LOIO class of the record can bechanged.
        • VALUE

        • Enter the new value for the attribute in this column usinginternal SAP representation.
          The data type of an attribute value can be determined using the DocumentModeling Workbench (transaction DMWB). For every attribute, you candouble-click to navigate to the corresponding data element and itsassociated domains. This means the data type and, if applicable, aconversion routine defined for the domain are known.

          Description
          Name-value pairs of the attributes to be deleted.