SAP Function Modules

SPROJECT_SEARCH_CU SAP Function module







SPROJECT_SEARCH_CU is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name SPROJECT_SEARCH_CU into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PROJECT_EVALUATION
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SPROJECT_SEARCH_CU - SPROJECT SEARCH CU





CALL FUNCTION 'SPROJECT_SEARCH_CU' "
* EXPORTING
*   return_all_data =           " char1
*   project_id_default =        " spro_head-project_id
*   show_progress =             " char1
*   is_solar_project =          " char1         Single-Character Flag
*   variant =                   " raldb_vari    Variant Name
  TABLES
    list_of_found_activities =   " sact_list    Project Analysis Results List
    list_of_resources =         " tstareevt     Analysis Status Resources
    list_of_keywords =          " tstakeevt     Analysis Status Keywords
    list_of_notetypes =         " tnoteevt      Documentation Types in Analysis
    list_of_memos =             " tstahtevt     Analysis Status Comment
  EXCEPTIONS
    SELECTION_CANCELLED = 1     "
    .  "  SPROJECT_SEARCH_CU

ABAP code example for Function Module SPROJECT_SEARCH_CU





The ABAP code below is a full code listing to execute function module SPROJECT_SEARCH_CU including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_list_of_found_activities  TYPE STANDARD TABLE OF SACT_LIST,"TABLES PARAM
wa_list_of_found_activities  LIKE LINE OF it_list_of_found_activities ,
it_list_of_resources  TYPE STANDARD TABLE OF TSTAREEVT,"TABLES PARAM
wa_list_of_resources  LIKE LINE OF it_list_of_resources ,
it_list_of_keywords  TYPE STANDARD TABLE OF TSTAKEEVT,"TABLES PARAM
wa_list_of_keywords  LIKE LINE OF it_list_of_keywords ,
it_list_of_notetypes  TYPE STANDARD TABLE OF TNOTEEVT,"TABLES PARAM
wa_list_of_notetypes  LIKE LINE OF it_list_of_notetypes ,
it_list_of_memos  TYPE STANDARD TABLE OF TSTAHTEVT,"TABLES PARAM
wa_list_of_memos  LIKE LINE OF it_list_of_memos .

DATA(ld_return_all_data) = 'Check type of data required'.

DATA(ld_project_id_default) = some text here
DATA(ld_show_progress) = 'Check type of data required'.
DATA(ld_is_solar_project) = 'Check type of data required'.
DATA(ld_variant) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_list_of_found_activities to it_list_of_found_activities.

"populate fields of struture and append to itab
append wa_list_of_resources to it_list_of_resources.

"populate fields of struture and append to itab
append wa_list_of_keywords to it_list_of_keywords.

"populate fields of struture and append to itab
append wa_list_of_notetypes to it_list_of_notetypes.

"populate fields of struture and append to itab
append wa_list_of_memos to it_list_of_memos. . CALL FUNCTION 'SPROJECT_SEARCH_CU' * EXPORTING * return_all_data = ld_return_all_data * project_id_default = ld_project_id_default * show_progress = ld_show_progress * is_solar_project = ld_is_solar_project * variant = ld_variant TABLES list_of_found_activities = it_list_of_found_activities list_of_resources = it_list_of_resources list_of_keywords = it_list_of_keywords list_of_notetypes = it_list_of_notetypes list_of_memos = it_list_of_memos EXCEPTIONS SELECTION_CANCELLED = 1 . " SPROJECT_SEARCH_CU
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_return_all_data  TYPE CHAR1 ,
it_list_of_found_activities  TYPE STANDARD TABLE OF SACT_LIST ,
wa_list_of_found_activities  LIKE LINE OF it_list_of_found_activities,
ld_project_id_default  TYPE SPRO_HEAD-PROJECT_ID ,
it_list_of_resources  TYPE STANDARD TABLE OF TSTAREEVT ,
wa_list_of_resources  LIKE LINE OF it_list_of_resources,
ld_show_progress  TYPE CHAR1 ,
it_list_of_keywords  TYPE STANDARD TABLE OF TSTAKEEVT ,
wa_list_of_keywords  LIKE LINE OF it_list_of_keywords,
ld_is_solar_project  TYPE CHAR1 ,
it_list_of_notetypes  TYPE STANDARD TABLE OF TNOTEEVT ,
wa_list_of_notetypes  LIKE LINE OF it_list_of_notetypes,
ld_variant  TYPE RALDB_VARI ,
it_list_of_memos  TYPE STANDARD TABLE OF TSTAHTEVT ,
wa_list_of_memos  LIKE LINE OF it_list_of_memos.

ld_return_all_data = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_list_of_found_activities to it_list_of_found_activities.

ld_project_id_default = some text here

"populate fields of struture and append to itab
append wa_list_of_resources to it_list_of_resources.
ld_show_progress = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_list_of_keywords to it_list_of_keywords.
ld_is_solar_project = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_list_of_notetypes to it_list_of_notetypes.
ld_variant = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_list_of_memos to it_list_of_memos.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SPROJECT_SEARCH_CU or its description.