SAP Function Modules

EXIT_SAPLSLL_LEG_PRER3_002 SAP Function module







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

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


Pattern for FM EXIT_SAPLSLL_LEG_PRER3_002 - EXIT SAPLSLL LEG PRER3 002





CALL FUNCTION 'EXIT_SAPLSLL_LEG_PRER3_002' "
  EXPORTING
    is_api_gen_data =           " /sapsll/api_vd_dat_r3_s
  IMPORTING
    ev_no_standard_select =     "
  TABLES
    ir_api_vd_lifnr =           " /sapsll/api_vd_lifnr_r3_s
    ir_api_vd_matnr =           " /sapsll/api_vd_matnr_r3_s
    ir_api_vd_werks =           " /sapsll/api_vd_werks_r3_s
    ir_api_vd_esokz =           " /sapsll/api_vd_esokz_r3_s
    ir_api_vd_land1 =           " /sapsll/api_vd_land1_r3_s
    ct_api_vd_lifmat =          " /sapsll/api_vd_lifmat_r3_s
    ct_messages =               " bapiret2
    .  "  EXIT_SAPLSLL_LEG_PRER3_002

ABAP code example for Function Module EXIT_SAPLSLL_LEG_PRER3_002





The ABAP code below is a full code listing to execute function module EXIT_SAPLSLL_LEG_PRER3_002 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_ev_no_standard_select  TYPE STRING ,
it_ir_api_vd_lifnr  TYPE STANDARD TABLE OF /SAPSLL/API_VD_LIFNR_R3_S,"TABLES PARAM
wa_ir_api_vd_lifnr  LIKE LINE OF it_ir_api_vd_lifnr ,
it_ir_api_vd_matnr  TYPE STANDARD TABLE OF /SAPSLL/API_VD_MATNR_R3_S,"TABLES PARAM
wa_ir_api_vd_matnr  LIKE LINE OF it_ir_api_vd_matnr ,
it_ir_api_vd_werks  TYPE STANDARD TABLE OF /SAPSLL/API_VD_WERKS_R3_S,"TABLES PARAM
wa_ir_api_vd_werks  LIKE LINE OF it_ir_api_vd_werks ,
it_ir_api_vd_esokz  TYPE STANDARD TABLE OF /SAPSLL/API_VD_ESOKZ_R3_S,"TABLES PARAM
wa_ir_api_vd_esokz  LIKE LINE OF it_ir_api_vd_esokz ,
it_ir_api_vd_land1  TYPE STANDARD TABLE OF /SAPSLL/API_VD_LAND1_R3_S,"TABLES PARAM
wa_ir_api_vd_land1  LIKE LINE OF it_ir_api_vd_land1 ,
it_ct_api_vd_lifmat  TYPE STANDARD TABLE OF /SAPSLL/API_VD_LIFMAT_R3_S,"TABLES PARAM
wa_ct_api_vd_lifmat  LIKE LINE OF it_ct_api_vd_lifmat ,
it_ct_messages  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_ct_messages  LIKE LINE OF it_ct_messages .

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

"populate fields of struture and append to itab
append wa_ir_api_vd_lifnr to it_ir_api_vd_lifnr.

"populate fields of struture and append to itab
append wa_ir_api_vd_matnr to it_ir_api_vd_matnr.

"populate fields of struture and append to itab
append wa_ir_api_vd_werks to it_ir_api_vd_werks.

"populate fields of struture and append to itab
append wa_ir_api_vd_esokz to it_ir_api_vd_esokz.

"populate fields of struture and append to itab
append wa_ir_api_vd_land1 to it_ir_api_vd_land1.

"populate fields of struture and append to itab
append wa_ct_api_vd_lifmat to it_ct_api_vd_lifmat.

"populate fields of struture and append to itab
append wa_ct_messages to it_ct_messages. . CALL FUNCTION 'EXIT_SAPLSLL_LEG_PRER3_002' EXPORTING is_api_gen_data = ld_is_api_gen_data IMPORTING ev_no_standard_select = ld_ev_no_standard_select TABLES ir_api_vd_lifnr = it_ir_api_vd_lifnr ir_api_vd_matnr = it_ir_api_vd_matnr ir_api_vd_werks = it_ir_api_vd_werks ir_api_vd_esokz = it_ir_api_vd_esokz ir_api_vd_land1 = it_ir_api_vd_land1 ct_api_vd_lifmat = it_ct_api_vd_lifmat ct_messages = it_ct_messages . " EXIT_SAPLSLL_LEG_PRER3_002
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_ev_no_standard_select  TYPE STRING ,
ld_is_api_gen_data  TYPE /SAPSLL/API_VD_DAT_R3_S ,
it_ir_api_vd_lifnr  TYPE STANDARD TABLE OF /SAPSLL/API_VD_LIFNR_R3_S ,
wa_ir_api_vd_lifnr  LIKE LINE OF it_ir_api_vd_lifnr,
it_ir_api_vd_matnr  TYPE STANDARD TABLE OF /SAPSLL/API_VD_MATNR_R3_S ,
wa_ir_api_vd_matnr  LIKE LINE OF it_ir_api_vd_matnr,
it_ir_api_vd_werks  TYPE STANDARD TABLE OF /SAPSLL/API_VD_WERKS_R3_S ,
wa_ir_api_vd_werks  LIKE LINE OF it_ir_api_vd_werks,
it_ir_api_vd_esokz  TYPE STANDARD TABLE OF /SAPSLL/API_VD_ESOKZ_R3_S ,
wa_ir_api_vd_esokz  LIKE LINE OF it_ir_api_vd_esokz,
it_ir_api_vd_land1  TYPE STANDARD TABLE OF /SAPSLL/API_VD_LAND1_R3_S ,
wa_ir_api_vd_land1  LIKE LINE OF it_ir_api_vd_land1,
it_ct_api_vd_lifmat  TYPE STANDARD TABLE OF /SAPSLL/API_VD_LIFMAT_R3_S ,
wa_ct_api_vd_lifmat  LIKE LINE OF it_ct_api_vd_lifmat,
it_ct_messages  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_ct_messages  LIKE LINE OF it_ct_messages.

ld_is_api_gen_data = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ir_api_vd_lifnr to it_ir_api_vd_lifnr.

"populate fields of struture and append to itab
append wa_ir_api_vd_matnr to it_ir_api_vd_matnr.

"populate fields of struture and append to itab
append wa_ir_api_vd_werks to it_ir_api_vd_werks.

"populate fields of struture and append to itab
append wa_ir_api_vd_esokz to it_ir_api_vd_esokz.

"populate fields of struture and append to itab
append wa_ir_api_vd_land1 to it_ir_api_vd_land1.

"populate fields of struture and append to itab
append wa_ct_api_vd_lifmat to it_ct_api_vd_lifmat.

"populate fields of struture and append to itab
append wa_ct_messages to it_ct_messages.

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