Ansicht
Dokumentation

BAPI_CASE_DELETEELEMENTS - Delete Elements from Record

BAPI_CASE_DELETEELEMENTS - Delete Elements from Record

Fill RESBD Structure from EBP Component Structure   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This BAPI method is used to delete elements from a case record.

There are two ways of deleting a record element from the case: using the node ID or using the element identification (SPS UD and SP POID parameters). It is possible to use either of these alternatives or both of them at once.

Example

* Fill table with node IDs

CLEAR element_ident_recpos.

wa_element_ident_recpos-rec_nodeid = '4'.

APPEND wa_element_ident_recpos TO element_ident_recpos.

* Fill SP POID table

CLEAR element_ident_sp_poid.

wa_element_ident_sp_poid-ELEM_NO  = 1.

wa_element_ident_sp_poid-NAME  = '%SPS_ID%'.

wa_element_ident_sp_poid-VALUE = 'SCMG_SPS_DOCUMENT'.

APPEND wa_element_ident_sp_poid TO element_ident_sp_poid.

wa_element_ident_sp_poid-NAME  = 'DOC_ID'.

wa_element_ident_sp_poid-VALUE = 'SRM_DOC04 08808EFD85ED7F4B95C91EAAD00CB1BE'.

APPEND wa_element_ident_sp_poid TO element_ident_sp_poid.

wa_element_ident_sp_poid-NAME  = 'VARIANT'.

wa_element_ident_sp_poid-VALUE = '0'.

APPEND wa_element_ident_sp_poid TO element_ident_sp_poid.

wa_element_ident_sp_poid-NAME  = 'VERSION'.

wa_element_ident_sp_poid-VALUE = '0'.

APPEND wa_element_ident_sp_poid TO element_ident_sp_poid.

* Call the BAPI

CALL FUNCTION 'BAPI_CASE_DELETEELEMENTS'

     EXPORTING

          GUID                         = '40908A3045BF1A51E10000000A1550FF'

          SKIP_ERROR                   = 'X'

          NEW_VERSION                  = 'X'

          DELETE_ONLY_FIRST            = 'X'

     TABLES

          RETURN                       = return

          ELEMENT_IDENT_RECPOS         = element_ident_recpos

          ELEMENT_IDENT_SP_POID        = element_ident_sp_poid.

Notes

The following prerequisites must be met before this BAPI method can be used:

  • The case exists and contains the subcomponent "Record".

The following authorizations are required:

  • An authorization for changing cases (authorization object S_SCMG_CAS).

The tables ELEM_IDENT_RECORDS and ELEM_IDENT_SP_POID are processed one after the other in this order. Any overlaps can therefore lead to error messages.

Further information

See also the documentation for the Record BAPI method 'BAPI_RECORD_DELETEELEMENTS'.





Parameters

DELETE_ONLY_FIRST
ELEMENT_IDENT_RECPOS
ELEMENT_IDENT_SP_POID
GUID
NEW_VERSION
RETURN
SKIP_ERRORS

Exceptions

Function Group

SCMG_BAPI_CASE

CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 5081 Date: 20240523 Time: 101809     sap01-206 ( 40 ms )