SAP Function Modules

SIW_CLASSES_GET2 SAP Function module







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

Associated Function Group: SI17
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM SIW_CLASSES_GET2 - SIW CLASSES GET2





CALL FUNCTION 'SIW_CLASSES_GET2' "
  EXPORTING
    area =                      " iwbarea-area
  IMPORTING
    error_msg =                 " iwerrormsg
  TABLES
*   flags_in =                  " sdokpropty
    info_classes =              " iwclass       KEN: Classes
*   info_classes_text =         " sdokioclt
    .  "  SIW_CLASSES_GET2

ABAP code example for Function Module SIW_CLASSES_GET2





The ABAP code below is a full code listing to execute function module SIW_CLASSES_GET2 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_error_msg  TYPE IWERRORMSG ,
it_flags_in  TYPE STANDARD TABLE OF SDOKPROPTY,"TABLES PARAM
wa_flags_in  LIKE LINE OF it_flags_in ,
it_info_classes  TYPE STANDARD TABLE OF IWCLASS,"TABLES PARAM
wa_info_classes  LIKE LINE OF it_info_classes ,
it_info_classes_text  TYPE STANDARD TABLE OF SDOKIOCLT,"TABLES PARAM
wa_info_classes_text  LIKE LINE OF it_info_classes_text .


DATA(ld_area) = some text here

"populate fields of struture and append to itab
append wa_flags_in to it_flags_in.

"populate fields of struture and append to itab
append wa_info_classes to it_info_classes.

"populate fields of struture and append to itab
append wa_info_classes_text to it_info_classes_text. . CALL FUNCTION 'SIW_CLASSES_GET2' EXPORTING area = ld_area IMPORTING error_msg = ld_error_msg TABLES * flags_in = it_flags_in info_classes = it_info_classes * info_classes_text = it_info_classes_text . " SIW_CLASSES_GET2
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_error_msg  TYPE IWERRORMSG ,
ld_area  TYPE IWBAREA-AREA ,
it_flags_in  TYPE STANDARD TABLE OF SDOKPROPTY ,
wa_flags_in  LIKE LINE OF it_flags_in,
it_info_classes  TYPE STANDARD TABLE OF IWCLASS ,
wa_info_classes  LIKE LINE OF it_info_classes,
it_info_classes_text  TYPE STANDARD TABLE OF SDOKIOCLT ,
wa_info_classes_text  LIKE LINE OF it_info_classes_text.


ld_area = some text here

"populate fields of struture and append to itab
append wa_flags_in to it_flags_in.

"populate fields of struture and append to itab
append wa_info_classes to it_info_classes.

"populate fields of struture and append to itab
append wa_info_classes_text to it_info_classes_text.

SAP Documentation for FM SIW_CLASSES_GET2


This function returns all classes which correspond given area from
INCLUDE DESTINATION OBJECT DOKU ID TX ...See here for full SAP fm documentation




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