SAP Function Modules

KW_DOCUMENT_PROPERTY_SET SAP Function module







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

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


Pattern for FM KW_DOCUMENT_PROPERTY_SET - KW DOCUMENT PROPERTY SET





CALL FUNCTION 'KW_DOCUMENT_PROPERTY_SET' "
  EXPORTING
*   possible_notetypes =        " spro_help_notetype_tab
    mode = 'C'                  " char1         Single-Character Flag
*   language = SY-LANGU         " sy-langu      SAP R/3 System, Current Language
*   change_title =              " char1         Single-Character Flag
*   change_notetype =           " char1         Single-Character Flag
*   change_file_extension = 'X'  " char1        Single-Character Flag
*   add_file_extension = 'X'    " char1         Single-Character Flag
    application = 'CU'          " char6         Character field of length 6
*   project_id =                " tproject-project_id  Project Name
  IMPORTING
    cancel =                    " char1         Single-Character Flag
    document_class =            " sdokobject-class  Document Class
    import_file =               " char1         Single-Character Flag
  CHANGING
    document_title =            " hier_texts-text  R/2 Table
    file_extension =            " char5         R/2 Table
    notetype =                  " tnoteepr      Valid Document Types
    .  "  KW_DOCUMENT_PROPERTY_SET

ABAP code example for Function Module KW_DOCUMENT_PROPERTY_SET





The ABAP code below is a full code listing to execute function module KW_DOCUMENT_PROPERTY_SET 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_cancel  TYPE CHAR1 ,
ld_document_class  TYPE SDOKOBJECT-CLASS ,
ld_import_file  TYPE CHAR1 .


DATA(ld_document_title) = some text here
DATA(ld_file_extension) = 'Check type of data required'.
DATA(ld_notetype) = 'Check type of data required'.
DATA(ld_possible_notetypes) = 'Check type of data required'.
DATA(ld_mode) = 'Check type of data required'.
DATA(ld_language) = 'Check type of data required'.
DATA(ld_change_title) = 'Check type of data required'.
DATA(ld_change_notetype) = 'Check type of data required'.
DATA(ld_change_file_extension) = 'Check type of data required'.
DATA(ld_add_file_extension) = 'Check type of data required'.
DATA(ld_application) = 'Check type of data required'.

SELECT single PROJECT_ID
FROM TPROJECT
INTO @DATA(ld_project_id).
. CALL FUNCTION 'KW_DOCUMENT_PROPERTY_SET' EXPORTING * possible_notetypes = ld_possible_notetypes mode = ld_mode * language = ld_language * change_title = ld_change_title * change_notetype = ld_change_notetype * change_file_extension = ld_change_file_extension * add_file_extension = ld_add_file_extension application = ld_application * project_id = ld_project_id IMPORTING cancel = ld_cancel document_class = ld_document_class import_file = ld_import_file CHANGING document_title = ld_document_title file_extension = ld_file_extension notetype = ld_notetype . " KW_DOCUMENT_PROPERTY_SET
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_document_title  TYPE HIER_TEXTS-TEXT ,
ld_cancel  TYPE CHAR1 ,
ld_possible_notetypes  TYPE SPRO_HELP_NOTETYPE_TAB ,
ld_file_extension  TYPE CHAR5 ,
ld_document_class  TYPE SDOKOBJECT-CLASS ,
ld_mode  TYPE CHAR1 ,
ld_notetype  TYPE TNOTEEPR ,
ld_import_file  TYPE CHAR1 ,
ld_language  TYPE SY-LANGU ,
ld_change_title  TYPE CHAR1 ,
ld_change_notetype  TYPE CHAR1 ,
ld_change_file_extension  TYPE CHAR1 ,
ld_add_file_extension  TYPE CHAR1 ,
ld_application  TYPE CHAR6 ,
ld_project_id  TYPE TPROJECT-PROJECT_ID .


ld_document_title = some text here
ld_possible_notetypes = 'Check type of data required'.
ld_file_extension = 'Check type of data required'.
ld_mode = 'Check type of data required'.
ld_notetype = 'Check type of data required'.
ld_language = 'Check type of data required'.
ld_change_title = 'Check type of data required'.
ld_change_notetype = 'Check type of data required'.
ld_change_file_extension = 'Check type of data required'.
ld_add_file_extension = 'Check type of data required'.
ld_application = 'Check type of data required'.

SELECT single PROJECT_ID
FROM TPROJECT
INTO ld_project_id.

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