SAP Function Modules

ISU_M_SAMPLE_CONVERT_OPEN SAP Function module - Example for Creating Import File from Text File - Step OPEN







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

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


Pattern for FM ISU_M_SAMPLE_CONVERT_OPEN - ISU M SAMPLE CONVERT OPEN





CALL FUNCTION 'ISU_M_SAMPLE_CONVERT_OPEN' "Example for Creating Import File from Text File - Step OPEN
* EXPORTING
*   x_firma =                   " emg_firma     Company (Client) for Migration
*   x_object =                  " emg_object    Migration Object
  IMPORTING
    y_action_file =             " emg_wmode     Processing Type
* TABLES
*   xt_interval_1 =             " emg_convert_selopt  Structure of a Ranges Table for a Selection Option
*   xt_interval_2 =             " emg_convert_selopt  Structure of a Ranges Table for a Selection Option
*   xt_interval_3 =             " emg_convert_selopt  Structure of a Ranges Table for a Selection Option
*   xt_header_tab =             "
*   xt_add_data_1 =             "
*   xt_add_data_2 =             "
*   xt_add_data_3 =             "
*   xt_add_data_4 =             "
*   xt_add_data_5 =             "
    .  "  ISU_M_SAMPLE_CONVERT_OPEN

ABAP code example for Function Module ISU_M_SAMPLE_CONVERT_OPEN





The ABAP code below is a full code listing to execute function module ISU_M_SAMPLE_CONVERT_OPEN 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_y_action_file  TYPE EMG_WMODE ,
it_xt_interval_1  TYPE STANDARD TABLE OF EMG_CONVERT_SELOPT,"TABLES PARAM
wa_xt_interval_1  LIKE LINE OF it_xt_interval_1 ,
it_xt_interval_2  TYPE STANDARD TABLE OF EMG_CONVERT_SELOPT,"TABLES PARAM
wa_xt_interval_2  LIKE LINE OF it_xt_interval_2 ,
it_xt_interval_3  TYPE STANDARD TABLE OF EMG_CONVERT_SELOPT,"TABLES PARAM
wa_xt_interval_3  LIKE LINE OF it_xt_interval_3 ,
it_xt_header_tab  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_xt_header_tab  LIKE LINE OF it_xt_header_tab ,
it_xt_add_data_1  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_xt_add_data_1  LIKE LINE OF it_xt_add_data_1 ,
it_xt_add_data_2  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_xt_add_data_2  LIKE LINE OF it_xt_add_data_2 ,
it_xt_add_data_3  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_xt_add_data_3  LIKE LINE OF it_xt_add_data_3 ,
it_xt_add_data_4  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_xt_add_data_4  LIKE LINE OF it_xt_add_data_4 ,
it_xt_add_data_5  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_xt_add_data_5  LIKE LINE OF it_xt_add_data_5 .

DATA(ld_x_firma) = 'Check type of data required'.
DATA(ld_x_object) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_interval_1 to it_xt_interval_1.

"populate fields of struture and append to itab
append wa_xt_interval_2 to it_xt_interval_2.

"populate fields of struture and append to itab
append wa_xt_interval_3 to it_xt_interval_3.

"populate fields of struture and append to itab
append wa_xt_header_tab to it_xt_header_tab.

"populate fields of struture and append to itab
append wa_xt_add_data_1 to it_xt_add_data_1.

"populate fields of struture and append to itab
append wa_xt_add_data_2 to it_xt_add_data_2.

"populate fields of struture and append to itab
append wa_xt_add_data_3 to it_xt_add_data_3.

"populate fields of struture and append to itab
append wa_xt_add_data_4 to it_xt_add_data_4.

"populate fields of struture and append to itab
append wa_xt_add_data_5 to it_xt_add_data_5. . CALL FUNCTION 'ISU_M_SAMPLE_CONVERT_OPEN' * EXPORTING * x_firma = ld_x_firma * x_object = ld_x_object IMPORTING y_action_file = ld_y_action_file * TABLES * xt_interval_1 = it_xt_interval_1 * xt_interval_2 = it_xt_interval_2 * xt_interval_3 = it_xt_interval_3 * xt_header_tab = it_xt_header_tab * xt_add_data_1 = it_xt_add_data_1 * xt_add_data_2 = it_xt_add_data_2 * xt_add_data_3 = it_xt_add_data_3 * xt_add_data_4 = it_xt_add_data_4 * xt_add_data_5 = it_xt_add_data_5 . " ISU_M_SAMPLE_CONVERT_OPEN
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_y_action_file  TYPE EMG_WMODE ,
ld_x_firma  TYPE EMG_FIRMA ,
it_xt_interval_1  TYPE STANDARD TABLE OF EMG_CONVERT_SELOPT ,
wa_xt_interval_1  LIKE LINE OF it_xt_interval_1,
ld_x_object  TYPE EMG_OBJECT ,
it_xt_interval_2  TYPE STANDARD TABLE OF EMG_CONVERT_SELOPT ,
wa_xt_interval_2  LIKE LINE OF it_xt_interval_2,
it_xt_interval_3  TYPE STANDARD TABLE OF EMG_CONVERT_SELOPT ,
wa_xt_interval_3  LIKE LINE OF it_xt_interval_3,
it_xt_header_tab  TYPE STANDARD TABLE OF STRING ,
wa_xt_header_tab  LIKE LINE OF it_xt_header_tab,
it_xt_add_data_1  TYPE STANDARD TABLE OF STRING ,
wa_xt_add_data_1  LIKE LINE OF it_xt_add_data_1,
it_xt_add_data_2  TYPE STANDARD TABLE OF STRING ,
wa_xt_add_data_2  LIKE LINE OF it_xt_add_data_2,
it_xt_add_data_3  TYPE STANDARD TABLE OF STRING ,
wa_xt_add_data_3  LIKE LINE OF it_xt_add_data_3,
it_xt_add_data_4  TYPE STANDARD TABLE OF STRING ,
wa_xt_add_data_4  LIKE LINE OF it_xt_add_data_4,
it_xt_add_data_5  TYPE STANDARD TABLE OF STRING ,
wa_xt_add_data_5  LIKE LINE OF it_xt_add_data_5.

ld_x_firma = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_interval_1 to it_xt_interval_1.
ld_x_object = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_interval_2 to it_xt_interval_2.

"populate fields of struture and append to itab
append wa_xt_interval_3 to it_xt_interval_3.

"populate fields of struture and append to itab
append wa_xt_header_tab to it_xt_header_tab.

"populate fields of struture and append to itab
append wa_xt_add_data_1 to it_xt_add_data_1.

"populate fields of struture and append to itab
append wa_xt_add_data_2 to it_xt_add_data_2.

"populate fields of struture and append to itab
append wa_xt_add_data_3 to it_xt_add_data_3.

"populate fields of struture and append to itab
append wa_xt_add_data_4 to it_xt_add_data_4.

"populate fields of struture and append to itab
append wa_xt_add_data_5 to it_xt_add_data_5.

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