SAP Function Modules

SPROJECT_GET_CLASS_TEMPLATE SAP Function module







SPROJECT_GET_CLASS_TEMPLATE 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_GET_CLASS_TEMPLATE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM SPROJECT_GET_CLASS_TEMPLATE - SPROJECT GET CLASS TEMPLATE





CALL FUNCTION 'SPROJECT_GET_CLASS_TEMPLATE' "
  EXPORTING
    class =                     " spro_head-class
*   language = SY-LANGU         " sy-langu
  IMPORTING
    template_data =             " spro_class_data
* TABLES
*   template_status =           " spro_all_status_tab
*   template_priority =         " spro_all_priority_tab
*   template_resource =         " spro_all_resource_tab
*   template_keyword =          " spro_all_keyword_tab
*   template_notetype =         " spro_all_notetype_tab
*   template_devtypes =         " iobjstruc2    Development Object Types for a Project
*   template_tabstrips =        " projtabstripst
    .  "  SPROJECT_GET_CLASS_TEMPLATE

ABAP code example for Function Module SPROJECT_GET_CLASS_TEMPLATE





The ABAP code below is a full code listing to execute function module SPROJECT_GET_CLASS_TEMPLATE 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:
ld_template_data  TYPE SPRO_CLASS_DATA ,
it_template_status  TYPE STANDARD TABLE OF SPRO_ALL_STATUS_TAB,"TABLES PARAM
wa_template_status  LIKE LINE OF it_template_status ,
it_template_priority  TYPE STANDARD TABLE OF SPRO_ALL_PRIORITY_TAB,"TABLES PARAM
wa_template_priority  LIKE LINE OF it_template_priority ,
it_template_resource  TYPE STANDARD TABLE OF SPRO_ALL_RESOURCE_TAB,"TABLES PARAM
wa_template_resource  LIKE LINE OF it_template_resource ,
it_template_keyword  TYPE STANDARD TABLE OF SPRO_ALL_KEYWORD_TAB,"TABLES PARAM
wa_template_keyword  LIKE LINE OF it_template_keyword ,
it_template_notetype  TYPE STANDARD TABLE OF SPRO_ALL_NOTETYPE_TAB,"TABLES PARAM
wa_template_notetype  LIKE LINE OF it_template_notetype ,
it_template_devtypes  TYPE STANDARD TABLE OF IOBJSTRUC2,"TABLES PARAM
wa_template_devtypes  LIKE LINE OF it_template_devtypes ,
it_template_tabstrips  TYPE STANDARD TABLE OF PROJTABSTRIPST,"TABLES PARAM
wa_template_tabstrips  LIKE LINE OF it_template_tabstrips .


DATA(ld_class) = some text here
DATA(ld_language) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_template_status to it_template_status.

"populate fields of struture and append to itab
append wa_template_priority to it_template_priority.

"populate fields of struture and append to itab
append wa_template_resource to it_template_resource.

"populate fields of struture and append to itab
append wa_template_keyword to it_template_keyword.

"populate fields of struture and append to itab
append wa_template_notetype to it_template_notetype.

"populate fields of struture and append to itab
append wa_template_devtypes to it_template_devtypes.

"populate fields of struture and append to itab
append wa_template_tabstrips to it_template_tabstrips. . CALL FUNCTION 'SPROJECT_GET_CLASS_TEMPLATE' EXPORTING class = ld_class * language = ld_language IMPORTING template_data = ld_template_data * TABLES * template_status = it_template_status * template_priority = it_template_priority * template_resource = it_template_resource * template_keyword = it_template_keyword * template_notetype = it_template_notetype * template_devtypes = it_template_devtypes * template_tabstrips = it_template_tabstrips . " SPROJECT_GET_CLASS_TEMPLATE
IF SY-SUBRC EQ 0. "All OK 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_template_data  TYPE SPRO_CLASS_DATA ,
ld_class  TYPE SPRO_HEAD-CLASS ,
it_template_status  TYPE STANDARD TABLE OF SPRO_ALL_STATUS_TAB ,
wa_template_status  LIKE LINE OF it_template_status,
ld_language  TYPE SY-LANGU ,
it_template_priority  TYPE STANDARD TABLE OF SPRO_ALL_PRIORITY_TAB ,
wa_template_priority  LIKE LINE OF it_template_priority,
it_template_resource  TYPE STANDARD TABLE OF SPRO_ALL_RESOURCE_TAB ,
wa_template_resource  LIKE LINE OF it_template_resource,
it_template_keyword  TYPE STANDARD TABLE OF SPRO_ALL_KEYWORD_TAB ,
wa_template_keyword  LIKE LINE OF it_template_keyword,
it_template_notetype  TYPE STANDARD TABLE OF SPRO_ALL_NOTETYPE_TAB ,
wa_template_notetype  LIKE LINE OF it_template_notetype,
it_template_devtypes  TYPE STANDARD TABLE OF IOBJSTRUC2 ,
wa_template_devtypes  LIKE LINE OF it_template_devtypes,
it_template_tabstrips  TYPE STANDARD TABLE OF PROJTABSTRIPST ,
wa_template_tabstrips  LIKE LINE OF it_template_tabstrips.


ld_class = some text here

"populate fields of struture and append to itab
append wa_template_status to it_template_status.
ld_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_template_priority to it_template_priority.

"populate fields of struture and append to itab
append wa_template_resource to it_template_resource.

"populate fields of struture and append to itab
append wa_template_keyword to it_template_keyword.

"populate fields of struture and append to itab
append wa_template_notetype to it_template_notetype.

"populate fields of struture and append to itab
append wa_template_devtypes to it_template_devtypes.

"populate fields of struture and append to itab
append wa_template_tabstrips to it_template_tabstrips.

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_GET_CLASS_TEMPLATE or its description.