SAP Function Modules

AIC2_DATA_SELECT SAP Function module







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

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


Pattern for FM AIC2_DATA_SELECT - AIC2 DATA SELECT





CALL FUNCTION 'AIC2_DATA_SELECT' "
  EXPORTING
*   i_flg_internal = 'X'        " raic1-flg
    i_compr_vrsn =              " imch-compr_vrsn
    i_inv_prog =                " imchie-inv_prog
    i_appr_year =               " imchie-appr_year
*   i_from_pos = SPACE          " imchie-prog_pos
    i_logsystem_calling =       " imch-logsystem
    is_value_selection =        " bapi1057ca
*   i_partner_role = SPACE      " bapi1057c0-partn_role
  IMPORTING
    es_error_message =          " hier_mess
    e_logsystem_sending =       " imch-logsystem
  TABLES
*   it_charact_to_ignore =      " bapi1057cc
*   it_scales_to_ignore =       " bapi1057cs
    et_ext_data =               " bapi1057cd
*   et_error_messages =         " hier_mess
    .  "  AIC2_DATA_SELECT

ABAP code example for Function Module AIC2_DATA_SELECT





The ABAP code below is a full code listing to execute function module AIC2_DATA_SELECT 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_es_error_message  TYPE HIER_MESS ,
ld_e_logsystem_sending  TYPE IMCH-LOGSYSTEM ,
it_it_charact_to_ignore  TYPE STANDARD TABLE OF BAPI1057CC,"TABLES PARAM
wa_it_charact_to_ignore  LIKE LINE OF it_it_charact_to_ignore ,
it_it_scales_to_ignore  TYPE STANDARD TABLE OF BAPI1057CS,"TABLES PARAM
wa_it_scales_to_ignore  LIKE LINE OF it_it_scales_to_ignore ,
it_et_ext_data  TYPE STANDARD TABLE OF BAPI1057CD,"TABLES PARAM
wa_et_ext_data  LIKE LINE OF it_et_ext_data ,
it_et_error_messages  TYPE STANDARD TABLE OF HIER_MESS,"TABLES PARAM
wa_et_error_messages  LIKE LINE OF it_et_error_messages .


DATA(ld_i_flg_internal) = some text here

SELECT single COMPR_VRSN
FROM IMCH
INTO @DATA(ld_i_compr_vrsn).


SELECT single INV_PROG
FROM IMCHIE
INTO @DATA(ld_i_inv_prog).


SELECT single APPR_YEAR
FROM IMCHIE
INTO @DATA(ld_i_appr_year).


SELECT single PROG_POS
FROM IMCHIE
INTO @DATA(ld_i_from_pos).


SELECT single LOGSYSTEM
FROM IMCH
INTO @DATA(ld_i_logsystem_calling).

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

DATA(ld_i_partner_role) = some text here

"populate fields of struture and append to itab
append wa_it_charact_to_ignore to it_it_charact_to_ignore.

"populate fields of struture and append to itab
append wa_it_scales_to_ignore to it_it_scales_to_ignore.

"populate fields of struture and append to itab
append wa_et_ext_data to it_et_ext_data.

"populate fields of struture and append to itab
append wa_et_error_messages to it_et_error_messages. . CALL FUNCTION 'AIC2_DATA_SELECT' EXPORTING * i_flg_internal = ld_i_flg_internal i_compr_vrsn = ld_i_compr_vrsn i_inv_prog = ld_i_inv_prog i_appr_year = ld_i_appr_year * i_from_pos = ld_i_from_pos i_logsystem_calling = ld_i_logsystem_calling is_value_selection = ld_is_value_selection * i_partner_role = ld_i_partner_role IMPORTING es_error_message = ld_es_error_message e_logsystem_sending = ld_e_logsystem_sending TABLES * it_charact_to_ignore = it_it_charact_to_ignore * it_scales_to_ignore = it_it_scales_to_ignore et_ext_data = it_et_ext_data * et_error_messages = it_et_error_messages . " AIC2_DATA_SELECT
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_es_error_message  TYPE HIER_MESS ,
ld_i_flg_internal  TYPE RAIC1-FLG ,
it_it_charact_to_ignore  TYPE STANDARD TABLE OF BAPI1057CC ,
wa_it_charact_to_ignore  LIKE LINE OF it_it_charact_to_ignore,
ld_e_logsystem_sending  TYPE IMCH-LOGSYSTEM ,
ld_i_compr_vrsn  TYPE IMCH-COMPR_VRSN ,
it_it_scales_to_ignore  TYPE STANDARD TABLE OF BAPI1057CS ,
wa_it_scales_to_ignore  LIKE LINE OF it_it_scales_to_ignore,
ld_i_inv_prog  TYPE IMCHIE-INV_PROG ,
it_et_ext_data  TYPE STANDARD TABLE OF BAPI1057CD ,
wa_et_ext_data  LIKE LINE OF it_et_ext_data,
ld_i_appr_year  TYPE IMCHIE-APPR_YEAR ,
it_et_error_messages  TYPE STANDARD TABLE OF HIER_MESS ,
wa_et_error_messages  LIKE LINE OF it_et_error_messages,
ld_i_from_pos  TYPE IMCHIE-PROG_POS ,
ld_i_logsystem_calling  TYPE IMCH-LOGSYSTEM ,
ld_is_value_selection  TYPE BAPI1057CA ,
ld_i_partner_role  TYPE BAPI1057C0-PARTN_ROLE .


ld_i_flg_internal = some text here

"populate fields of struture and append to itab
append wa_it_charact_to_ignore to it_it_charact_to_ignore.

SELECT single COMPR_VRSN
FROM IMCH
INTO ld_i_compr_vrsn.


"populate fields of struture and append to itab
append wa_it_scales_to_ignore to it_it_scales_to_ignore.

SELECT single INV_PROG
FROM IMCHIE
INTO ld_i_inv_prog.


"populate fields of struture and append to itab
append wa_et_ext_data to it_et_ext_data.

SELECT single APPR_YEAR
FROM IMCHIE
INTO ld_i_appr_year.


"populate fields of struture and append to itab
append wa_et_error_messages to it_et_error_messages.

SELECT single PROG_POS
FROM IMCHIE
INTO ld_i_from_pos.


SELECT single LOGSYSTEM
FROM IMCH
INTO ld_i_logsystem_calling.

ld_is_value_selection = 'Check type of data required'.

ld_i_partner_role = some text here

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