SAP Function Modules

SRC_INFREC_KEY_SELECTION SAP Function module







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

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


Pattern for FM SRC_INFREC_KEY_SELECTION - SRC INFREC KEY SELECTION





CALL FUNCTION 'SRC_INFREC_KEY_SELECTION' "
  EXPORTING
    in_norm_chbox =             "
    in_subc_chbox =             "
    in_cons_chbox =             "
*   in_matsel_chbox = ' '       " sel_fields-read_flag
  TABLES
    in_infnr_range =            " infnr_range
    in_ven_range =              " lif_range
    in_ven_d_range =            " lif_range
    in_mat_range =              " mat_range
    in_mat_d_range =            " mat_range
    in_ekorg_range =            " eorg_range
    in_werks_range =            " wrk_range
    out_infrec_list =           " cif_infkey
*   out_infrec_all =            " cifsrcin
*   in_matwrk_key =             " pre01
*   in_mat_ma_range =           " mat_range
*   in_werks_ma_range =         " wrk_range
*   in_mtart_range =            " mart_range
*   in_mmsta_range =            " msta_range
*   in_dispo_range =            " disp_range
*   in_dismm_range =            " dism_range
*   in_abckz_range =            " abc_range
  EXCEPTIONS
    NO_SELECTIONS = 1           "
    .  "  SRC_INFREC_KEY_SELECTION

ABAP code example for Function Module SRC_INFREC_KEY_SELECTION





The ABAP code below is a full code listing to execute function module SRC_INFREC_KEY_SELECTION 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:
it_in_infnr_range  TYPE STANDARD TABLE OF INFNR_RANGE,"TABLES PARAM
wa_in_infnr_range  LIKE LINE OF it_in_infnr_range ,
it_in_ven_range  TYPE STANDARD TABLE OF LIF_RANGE,"TABLES PARAM
wa_in_ven_range  LIKE LINE OF it_in_ven_range ,
it_in_ven_d_range  TYPE STANDARD TABLE OF LIF_RANGE,"TABLES PARAM
wa_in_ven_d_range  LIKE LINE OF it_in_ven_d_range ,
it_in_mat_range  TYPE STANDARD TABLE OF MAT_RANGE,"TABLES PARAM
wa_in_mat_range  LIKE LINE OF it_in_mat_range ,
it_in_mat_d_range  TYPE STANDARD TABLE OF MAT_RANGE,"TABLES PARAM
wa_in_mat_d_range  LIKE LINE OF it_in_mat_d_range ,
it_in_ekorg_range  TYPE STANDARD TABLE OF EORG_RANGE,"TABLES PARAM
wa_in_ekorg_range  LIKE LINE OF it_in_ekorg_range ,
it_in_werks_range  TYPE STANDARD TABLE OF WRK_RANGE,"TABLES PARAM
wa_in_werks_range  LIKE LINE OF it_in_werks_range ,
it_out_infrec_list  TYPE STANDARD TABLE OF CIF_INFKEY,"TABLES PARAM
wa_out_infrec_list  LIKE LINE OF it_out_infrec_list ,
it_out_infrec_all  TYPE STANDARD TABLE OF CIFSRCIN,"TABLES PARAM
wa_out_infrec_all  LIKE LINE OF it_out_infrec_all ,
it_in_matwrk_key  TYPE STANDARD TABLE OF PRE01,"TABLES PARAM
wa_in_matwrk_key  LIKE LINE OF it_in_matwrk_key ,
it_in_mat_ma_range  TYPE STANDARD TABLE OF MAT_RANGE,"TABLES PARAM
wa_in_mat_ma_range  LIKE LINE OF it_in_mat_ma_range ,
it_in_werks_ma_range  TYPE STANDARD TABLE OF WRK_RANGE,"TABLES PARAM
wa_in_werks_ma_range  LIKE LINE OF it_in_werks_ma_range ,
it_in_mtart_range  TYPE STANDARD TABLE OF MART_RANGE,"TABLES PARAM
wa_in_mtart_range  LIKE LINE OF it_in_mtart_range ,
it_in_mmsta_range  TYPE STANDARD TABLE OF MSTA_RANGE,"TABLES PARAM
wa_in_mmsta_range  LIKE LINE OF it_in_mmsta_range ,
it_in_dispo_range  TYPE STANDARD TABLE OF DISP_RANGE,"TABLES PARAM
wa_in_dispo_range  LIKE LINE OF it_in_dispo_range ,
it_in_dismm_range  TYPE STANDARD TABLE OF DISM_RANGE,"TABLES PARAM
wa_in_dismm_range  LIKE LINE OF it_in_dismm_range ,
it_in_abckz_range  TYPE STANDARD TABLE OF ABC_RANGE,"TABLES PARAM
wa_in_abckz_range  LIKE LINE OF it_in_abckz_range .

DATA(ld_in_norm_chbox) = 'some text here'.
DATA(ld_in_subc_chbox) = 'some text here'.
DATA(ld_in_cons_chbox) = 'some text here'.

DATA(ld_in_matsel_chbox) = some text here

"populate fields of struture and append to itab
append wa_in_infnr_range to it_in_infnr_range.

"populate fields of struture and append to itab
append wa_in_ven_range to it_in_ven_range.

"populate fields of struture and append to itab
append wa_in_ven_d_range to it_in_ven_d_range.

"populate fields of struture and append to itab
append wa_in_mat_range to it_in_mat_range.

"populate fields of struture and append to itab
append wa_in_mat_d_range to it_in_mat_d_range.

"populate fields of struture and append to itab
append wa_in_ekorg_range to it_in_ekorg_range.

"populate fields of struture and append to itab
append wa_in_werks_range to it_in_werks_range.

"populate fields of struture and append to itab
append wa_out_infrec_list to it_out_infrec_list.

"populate fields of struture and append to itab
append wa_out_infrec_all to it_out_infrec_all.

"populate fields of struture and append to itab
append wa_in_matwrk_key to it_in_matwrk_key.

"populate fields of struture and append to itab
append wa_in_mat_ma_range to it_in_mat_ma_range.

"populate fields of struture and append to itab
append wa_in_werks_ma_range to it_in_werks_ma_range.

"populate fields of struture and append to itab
append wa_in_mtart_range to it_in_mtart_range.

"populate fields of struture and append to itab
append wa_in_mmsta_range to it_in_mmsta_range.

"populate fields of struture and append to itab
append wa_in_dispo_range to it_in_dispo_range.

"populate fields of struture and append to itab
append wa_in_dismm_range to it_in_dismm_range.

"populate fields of struture and append to itab
append wa_in_abckz_range to it_in_abckz_range. . CALL FUNCTION 'SRC_INFREC_KEY_SELECTION' EXPORTING in_norm_chbox = ld_in_norm_chbox in_subc_chbox = ld_in_subc_chbox in_cons_chbox = ld_in_cons_chbox * in_matsel_chbox = ld_in_matsel_chbox TABLES in_infnr_range = it_in_infnr_range in_ven_range = it_in_ven_range in_ven_d_range = it_in_ven_d_range in_mat_range = it_in_mat_range in_mat_d_range = it_in_mat_d_range in_ekorg_range = it_in_ekorg_range in_werks_range = it_in_werks_range out_infrec_list = it_out_infrec_list * out_infrec_all = it_out_infrec_all * in_matwrk_key = it_in_matwrk_key * in_mat_ma_range = it_in_mat_ma_range * in_werks_ma_range = it_in_werks_ma_range * in_mtart_range = it_in_mtart_range * in_mmsta_range = it_in_mmsta_range * in_dispo_range = it_in_dispo_range * in_dismm_range = it_in_dismm_range * in_abckz_range = it_in_abckz_range EXCEPTIONS NO_SELECTIONS = 1 . " SRC_INFREC_KEY_SELECTION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_in_norm_chbox  TYPE STRING ,
it_in_infnr_range  TYPE STANDARD TABLE OF INFNR_RANGE ,
wa_in_infnr_range  LIKE LINE OF it_in_infnr_range,
ld_in_subc_chbox  TYPE STRING ,
it_in_ven_range  TYPE STANDARD TABLE OF LIF_RANGE ,
wa_in_ven_range  LIKE LINE OF it_in_ven_range,
ld_in_cons_chbox  TYPE STRING ,
it_in_ven_d_range  TYPE STANDARD TABLE OF LIF_RANGE ,
wa_in_ven_d_range  LIKE LINE OF it_in_ven_d_range,
ld_in_matsel_chbox  TYPE SEL_FIELDS-READ_FLAG ,
it_in_mat_range  TYPE STANDARD TABLE OF MAT_RANGE ,
wa_in_mat_range  LIKE LINE OF it_in_mat_range,
it_in_mat_d_range  TYPE STANDARD TABLE OF MAT_RANGE ,
wa_in_mat_d_range  LIKE LINE OF it_in_mat_d_range,
it_in_ekorg_range  TYPE STANDARD TABLE OF EORG_RANGE ,
wa_in_ekorg_range  LIKE LINE OF it_in_ekorg_range,
it_in_werks_range  TYPE STANDARD TABLE OF WRK_RANGE ,
wa_in_werks_range  LIKE LINE OF it_in_werks_range,
it_out_infrec_list  TYPE STANDARD TABLE OF CIF_INFKEY ,
wa_out_infrec_list  LIKE LINE OF it_out_infrec_list,
it_out_infrec_all  TYPE STANDARD TABLE OF CIFSRCIN ,
wa_out_infrec_all  LIKE LINE OF it_out_infrec_all,
it_in_matwrk_key  TYPE STANDARD TABLE OF PRE01 ,
wa_in_matwrk_key  LIKE LINE OF it_in_matwrk_key,
it_in_mat_ma_range  TYPE STANDARD TABLE OF MAT_RANGE ,
wa_in_mat_ma_range  LIKE LINE OF it_in_mat_ma_range,
it_in_werks_ma_range  TYPE STANDARD TABLE OF WRK_RANGE ,
wa_in_werks_ma_range  LIKE LINE OF it_in_werks_ma_range,
it_in_mtart_range  TYPE STANDARD TABLE OF MART_RANGE ,
wa_in_mtart_range  LIKE LINE OF it_in_mtart_range,
it_in_mmsta_range  TYPE STANDARD TABLE OF MSTA_RANGE ,
wa_in_mmsta_range  LIKE LINE OF it_in_mmsta_range,
it_in_dispo_range  TYPE STANDARD TABLE OF DISP_RANGE ,
wa_in_dispo_range  LIKE LINE OF it_in_dispo_range,
it_in_dismm_range  TYPE STANDARD TABLE OF DISM_RANGE ,
wa_in_dismm_range  LIKE LINE OF it_in_dismm_range,
it_in_abckz_range  TYPE STANDARD TABLE OF ABC_RANGE ,
wa_in_abckz_range  LIKE LINE OF it_in_abckz_range.

ld_in_norm_chbox = 'some text here'.

"populate fields of struture and append to itab
append wa_in_infnr_range to it_in_infnr_range.
ld_in_subc_chbox = 'some text here'.

"populate fields of struture and append to itab
append wa_in_ven_range to it_in_ven_range.
ld_in_cons_chbox = 'some text here'.

"populate fields of struture and append to itab
append wa_in_ven_d_range to it_in_ven_d_range.

ld_in_matsel_chbox = some text here

"populate fields of struture and append to itab
append wa_in_mat_range to it_in_mat_range.

"populate fields of struture and append to itab
append wa_in_mat_d_range to it_in_mat_d_range.

"populate fields of struture and append to itab
append wa_in_ekorg_range to it_in_ekorg_range.

"populate fields of struture and append to itab
append wa_in_werks_range to it_in_werks_range.

"populate fields of struture and append to itab
append wa_out_infrec_list to it_out_infrec_list.

"populate fields of struture and append to itab
append wa_out_infrec_all to it_out_infrec_all.

"populate fields of struture and append to itab
append wa_in_matwrk_key to it_in_matwrk_key.

"populate fields of struture and append to itab
append wa_in_mat_ma_range to it_in_mat_ma_range.

"populate fields of struture and append to itab
append wa_in_werks_ma_range to it_in_werks_ma_range.

"populate fields of struture and append to itab
append wa_in_mtart_range to it_in_mtart_range.

"populate fields of struture and append to itab
append wa_in_mmsta_range to it_in_mmsta_range.

"populate fields of struture and append to itab
append wa_in_dispo_range to it_in_dispo_range.

"populate fields of struture and append to itab
append wa_in_dismm_range to it_in_dismm_range.

"populate fields of struture and append to itab
append wa_in_abckz_range to it_in_abckz_range.

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