SAP ANST_SEARCH_NOTES Function Module for Note Search Main Function Module









ANST_SEARCH_NOTES is a standard anst search notes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Note Search Main Function Module 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 anst search notes FM, simply by entering the name ANST_SEARCH_NOTES into the relevant SAP transaction such as SE37 or SE38.

Function Group: ANST_SEARCH_NOTES
Program Name: SAPLANST_SEARCH_NOTES
Main Program: SAPLANST_SEARCH_NOTES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ANST_SEARCH_NOTES 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 'ANST_SEARCH_NOTES'"Note Search Main Function Module
EXPORTING
* I_SEARCHTERM = "Search Term for Automatic Note Search
* I_SORT_ORDER = 'A' "
* I_CONVERT_IMPLSTAT = 'X' "
* I_METHOD = 1 "
* I_RANGE = "Character field, length 64
* I_RFC = "Logical Destination (Specified in Function Call)
* I_SRCH_L = 'D' "Language Key
* I_RES_L = SY-LANGU "Language Key
* I_APPL = "Application Component
* I_CATEGORY = 'C' "
* I_RELEASED_AFTER = '19900101' "
* I_OUTPUT = "
* I_MAXNO = 10 "
* I_SORT_CRIT = 'N' "

IMPORTING
ET_NOTES = "Correction Notes Return Table
E_NUMBER_ALL = "
E_ERR_TEXT = "

TABLES
IT_APPL = "Range

EXCEPTIONS
RFC_ERROR = 1 NO_OSS_RFC = 2 INTERNAL_ERROR = 3
.



IMPORTING Parameters details for ANST_SEARCH_NOTES

I_SEARCHTERM - Search Term for Automatic Note Search

Data type: SEARCHELEM
Optional: Yes
Call by Reference: Yes

I_SORT_ORDER -

Data type: C
Default: 'A'
Optional: Yes
Call by Reference: Yes

I_CONVERT_IMPLSTAT -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_METHOD -

Data type: I
Default: 1
Optional: Yes
Call by Reference: Yes

I_RANGE - Character field, length 64

Data type: CHAR64
Optional: Yes
Call by Reference: Yes

I_RFC - Logical Destination (Specified in Function Call)

Data type: RFCDEST
Optional: Yes
Call by Reference: Yes

I_SRCH_L - Language Key

Data type: LANGU
Default: 'D'
Optional: Yes
Call by Reference: Yes

I_RES_L - Language Key

Data type: LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: Yes

I_APPL - Application Component

Data type: CSSKOMP
Optional: Yes
Call by Reference: Yes

I_CATEGORY -

Data type: C
Default: 'C'
Optional: Yes
Call by Reference: Yes

I_RELEASED_AFTER -

Data type: D
Default: '19900101'
Optional: Yes
Call by Reference: Yes

I_OUTPUT -

Data type: C
Optional: Yes
Call by Reference: Yes

I_MAXNO -

Data type: I
Default: 10
Optional: Yes
Call by Reference: Yes

I_SORT_CRIT -

Data type: C
Default: 'N'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for ANST_SEARCH_NOTES

ET_NOTES - Correction Notes Return Table

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

E_NUMBER_ALL -

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

E_ERR_TEXT -

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

TABLES Parameters details for ANST_SEARCH_NOTES

IT_APPL - Range

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

EXCEPTIONS details

RFC_ERROR -

Data type:
Optional: No
Call by Reference: Yes

NO_OSS_RFC -

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ANST_SEARCH_NOTES 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:
lt_it_appl  TYPE STANDARD TABLE OF ANST_RANGE, "   
lv_et_notes  TYPE SEARCH_SRV_RESULT_T, "   
lv_rfc_error  TYPE SEARCH_SRV_RESULT_T, "   
lv_i_searchterm  TYPE SEARCHELEM, "   
lv_i_sort_order  TYPE C, "   'A'
lv_i_convert_implstat  TYPE C, "   'X'
lv_i_method  TYPE I, "   1
lv_i_range  TYPE CHAR64, "   
lv_i_rfc  TYPE RFCDEST, "   
lv_i_srch_l  TYPE LANGU, "   'D'
lv_no_oss_rfc  TYPE LANGU, "   
lv_e_number_all  TYPE I, "   
lv_i_res_l  TYPE LANGU, "   SY-LANGU
lv_e_err_text  TYPE STRING, "   
lv_internal_error  TYPE STRING, "   
lv_i_appl  TYPE CSSKOMP, "   
lv_i_category  TYPE C, "   'C'
lv_i_released_after  TYPE D, "   '19900101'
lv_i_output  TYPE C, "   
lv_i_maxno  TYPE I, "   10
lv_i_sort_crit  TYPE C. "   'N'

  CALL FUNCTION 'ANST_SEARCH_NOTES'  "Note Search Main Function Module
    EXPORTING
         I_SEARCHTERM = lv_i_searchterm
         I_SORT_ORDER = lv_i_sort_order
         I_CONVERT_IMPLSTAT = lv_i_convert_implstat
         I_METHOD = lv_i_method
         I_RANGE = lv_i_range
         I_RFC = lv_i_rfc
         I_SRCH_L = lv_i_srch_l
         I_RES_L = lv_i_res_l
         I_APPL = lv_i_appl
         I_CATEGORY = lv_i_category
         I_RELEASED_AFTER = lv_i_released_after
         I_OUTPUT = lv_i_output
         I_MAXNO = lv_i_maxno
         I_SORT_CRIT = lv_i_sort_crit
    IMPORTING
         ET_NOTES = lv_et_notes
         E_NUMBER_ALL = lv_e_number_all
         E_ERR_TEXT = lv_e_err_text
    TABLES
         IT_APPL = lt_it_appl
    EXCEPTIONS
        RFC_ERROR = 1
        NO_OSS_RFC = 2
        INTERNAL_ERROR = 3
. " ANST_SEARCH_NOTES




ABAP code using 7.40 inline data declarations to call FM ANST_SEARCH_NOTES

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.

 
 
 
 
DATA(ld_i_sort_order) = 'A'.
 
DATA(ld_i_convert_implstat) = 'X'.
 
DATA(ld_i_method) = 1.
 
 
 
DATA(ld_i_srch_l) = 'D'.
 
 
 
DATA(ld_i_res_l) = SY-LANGU.
 
 
 
 
DATA(ld_i_category) = 'C'.
 
DATA(ld_i_released_after) = '19900101'.
 
 
DATA(ld_i_maxno) = 10.
 
DATA(ld_i_sort_crit) = 'N'.
 


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!