Fonction SAP BAPI_CASE_ADDNOTES - Case: Insert Note

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
GUID BAPISCMGCASE-CASE_GUID C 32 Technical Case Key (Case GUID)

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

Paramètre Reférence Long. Facultatif Description
CASE_NOTES BAPINOTE 140 Notes to Be Inserted in Case
CASE_NOTE_IDS BAPINOTEID 8 Case Notes: Text IDs

Functionality
This BAPI method is used to insert new notes into an existing case.

Example
* Fill the table with case note ids
wa_case_note_id-ELEM_NO = 1.
wa_case_note_id-TDID = '0001'.
APPEND wa_case_note_id TO case_notes_ids.
wa_case_note_id-ELEM_NO = 2.
wa_case_note_id-TDID = '0002'.
APPEND wa_case_note_id TO case_notes_ids.
* Fill the table with note texts
wa_case_note-ELEM_NO = 1.
wa_case_note-TDFORMAT = 'AS'.
wa_case_note-TDLINE = 'Just a simple note.'.
APPEND wa_case_note TO case_notes.
wa_case_note-TDFORMAT = '*'.
wa_case_note-TDLINE = 'Contains two lines.'.
APPEND wa_case_note TO case_notes.
wa_case_note-ELEM_NO = 2.
wa_case_note-TDFORMAT = '*'.
wa_case_note-TDLINE = 'Internal note'.
APPEND wa_case_note TO case_notes.
wa_case_note-TDFORMAT = ''.
wa_case_note-TDLINE = 'Contains one line.'.
APPEND wa_case_note TO case_notes.
* Call the BAPI
CALL FUNCTION 'BAPI_CASE_ADDNOTES'
     EXPORTING
          GUID                = '40908A3045BF1A51E10000000A1550FF'

     IMPORTING
          RETURN              = return
     TABLES
          CASE_NOTE_IDS       = case_note_ids
          CASE_NOTES          = case_notes.

Notes
The following prerequisites must be met before this BAPI methodcan be used:

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

  • The following authorizations are required:
    • An authorization for changing cases (authorization object S_SCMG_CAS).
    • Description
      Result of the BAPI call.

      Description
      The GUID of a case where to notes are to be inserted.

      Description
      Texts of the notes which should be added to the case.
      The field ELEM-NO contains the sequence note number, which the currenttext belongs to. The text ID for this note is taken from the line withthe same ELEM_NO in the table CASE_NOTE_IDS.

      Description
      Text IDs of the notes to be added to a case.
      Field ELEM_NO must be unique and defines the sequence number of thenote. The text for this note is taken from the lines of the tableCASE_NOTES with the same ELEM_NO.
      The possible Text ID values are defined in the Case Customizing. Fordetailed information, see the documentation ubder node 'Create TextProfile' in the t/a SCASE_CUSTOMIZING.