SAP BAPI_CASE_GETNOTES Function Module for Get Case Notes









BAPI_CASE_GETNOTES is a standard bapi case getnotes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Case Notes processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bapi case getnotes FM, simply by entering the name BAPI_CASE_GETNOTES into the relevant SAP transaction such as SE37 or SE38.

Function Group: SCMG_BAPI_CASE
Program Name: SAPLSCMG_BAPI_CASE
Main Program: SAPLSCMG_BAPI_CASE
Appliation area:
Release date: 19-May-2004
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_CASE_GETNOTES pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BAPI_CASE_GETNOTES'"Get Case Notes
EXPORTING
GUID = "Technical Case Key (Case GUID)
* TEXT_ID = "Text ID of Notes
* DATE_FROM = "Search Start Date
* DATE_TO = "Date when search ends
* CREATED_BY = "User who Created Notes
* SEARCH_TERM = "Search Term in Text
* IM_DB_READ = IF_SRM=>FALSE "Boolean
* IM_FREE_OBJECTS = IF_SRM=>FALSE "Boolean

IMPORTING
RETURN = "Return Parameters

TABLES
NOTE_HEADERS = "Header Information for Found Notes
NOTE_CONTENTS = "Content of Found Case Notes
.



IMPORTING Parameters details for BAPI_CASE_GETNOTES

GUID - Technical Case Key (Case GUID)

Data type: BAPISCMGCASE-CASE_GUID
Optional: No
Call by Reference: No ( called with pass by value option)

TEXT_ID - Text ID of Notes

Data type: BAPINOTEHEADER-TDID
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATE_FROM - Search Start Date

Data type: BAPINOTEHEADER-TDFDATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATE_TO - Date when search ends

Data type: BAPINOTEHEADER-TDFDATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CREATED_BY - User who Created Notes

Data type: BAPINOTEHEADER-TDFUSER
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEARCH_TERM - Search Term in Text

Data type: BAPINOTE-TDLINE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_DB_READ - Boolean

Data type: BAPISRMREC-BOOLEAN
Default: IF_SRM=>FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_FREE_OBJECTS - Boolean

Data type: BAPISRMREC-BOOLEAN
Default: IF_SRM=>FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_CASE_GETNOTES

RETURN - Return Parameters

Data type: BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_CASE_GETNOTES

NOTE_HEADERS - Header Information for Found Notes

Data type: BAPINOTEHEADER
Optional: No
Call by Reference: Yes

NOTE_CONTENTS - Content of Found Case Notes

Data type: BAPINOTE
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_CASE_GETNOTES Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_guid  TYPE BAPISCMGCASE-CASE_GUID, "   
lv_return  TYPE BAPIRET2, "   
lt_note_headers  TYPE STANDARD TABLE OF BAPINOTEHEADER, "   
lv_text_id  TYPE BAPINOTEHEADER-TDID, "   
lt_note_contents  TYPE STANDARD TABLE OF BAPINOTE, "   
lv_date_from  TYPE BAPINOTEHEADER-TDFDATE, "   
lv_date_to  TYPE BAPINOTEHEADER-TDFDATE, "   
lv_created_by  TYPE BAPINOTEHEADER-TDFUSER, "   
lv_search_term  TYPE BAPINOTE-TDLINE, "   
lv_im_db_read  TYPE BAPISRMREC-BOOLEAN, "   IF_SRM=>FALSE
lv_im_free_objects  TYPE BAPISRMREC-BOOLEAN. "   IF_SRM=>FALSE

  CALL FUNCTION 'BAPI_CASE_GETNOTES'  "Get Case Notes
    EXPORTING
         GUID = lv_guid
         TEXT_ID = lv_text_id
         DATE_FROM = lv_date_from
         DATE_TO = lv_date_to
         CREATED_BY = lv_created_by
         SEARCH_TERM = lv_search_term
         IM_DB_READ = lv_im_db_read
         IM_FREE_OBJECTS = lv_im_free_objects
    IMPORTING
         RETURN = lv_return
    TABLES
         NOTE_HEADERS = lt_note_headers
         NOTE_CONTENTS = lt_note_contents
. " BAPI_CASE_GETNOTES




ABAP code using 7.40 inline data declarations to call FM BAPI_CASE_GETNOTES

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single CASE_GUID FROM BAPISCMGCASE INTO @DATA(ld_guid).
 
 
 
"SELECT single TDID FROM BAPINOTEHEADER INTO @DATA(ld_text_id).
 
 
"SELECT single TDFDATE FROM BAPINOTEHEADER INTO @DATA(ld_date_from).
 
"SELECT single TDFDATE FROM BAPINOTEHEADER INTO @DATA(ld_date_to).
 
"SELECT single TDFUSER FROM BAPINOTEHEADER INTO @DATA(ld_created_by).
 
"SELECT single TDLINE FROM BAPINOTE INTO @DATA(ld_search_term).
 
"SELECT single BOOLEAN FROM BAPISRMREC INTO @DATA(ld_im_db_read).
DATA(ld_im_db_read) = IF_SRM=>FALSE.
 
"SELECT single BOOLEAN FROM BAPISRMREC INTO @DATA(ld_im_free_objects).
DATA(ld_im_free_objects) = IF_SRM=>FALSE.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!