SAP Function Modules

SAMPLE_INTERFACE_00503105 SAP Function module







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

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


Pattern for FM SAMPLE_INTERFACE_00503105 - SAMPLE INTERFACE 00503105





CALL FUNCTION 'SAMPLE_INTERFACE_00503105' "
  EXPORTING
    fif_date_period =           " vbreve-accpd
    fif_start_date =            " sy-datum
    fif_end_date =              " sy-datum
    fif_xvbak_vbeln =           " vbak-vbeln
    fif_xvbap_posnr =           " vbap-posnr
  TABLES
    fit_xvbreve =               " vbrevevb
    fit_t009b =                 " t009b
    fit_zvbreve =               " vbrevevb
    .  "  SAMPLE_INTERFACE_00503105

ABAP code example for Function Module SAMPLE_INTERFACE_00503105





The ABAP code below is a full code listing to execute function module SAMPLE_INTERFACE_00503105 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_fit_xvbreve  TYPE STANDARD TABLE OF VBREVEVB,"TABLES PARAM
wa_fit_xvbreve  LIKE LINE OF it_fit_xvbreve ,
it_fit_t009b  TYPE STANDARD TABLE OF T009B,"TABLES PARAM
wa_fit_t009b  LIKE LINE OF it_fit_t009b ,
it_fit_zvbreve  TYPE STANDARD TABLE OF VBREVEVB,"TABLES PARAM
wa_fit_zvbreve  LIKE LINE OF it_fit_zvbreve .


SELECT single ACCPD
FROM VBREVE
INTO @DATA(ld_fif_date_period).

DATA(ld_fif_start_date) = '20210129'.
DATA(ld_fif_end_date) = '20210129'.

SELECT single VBELN
FROM VBAK
INTO @DATA(ld_fif_xvbak_vbeln).


SELECT single POSNR
FROM VBAP
INTO @DATA(ld_fif_xvbap_posnr).


"populate fields of struture and append to itab
append wa_fit_xvbreve to it_fit_xvbreve.

"populate fields of struture and append to itab
append wa_fit_t009b to it_fit_t009b.

"populate fields of struture and append to itab
append wa_fit_zvbreve to it_fit_zvbreve. . CALL FUNCTION 'SAMPLE_INTERFACE_00503105' EXPORTING fif_date_period = ld_fif_date_period fif_start_date = ld_fif_start_date fif_end_date = ld_fif_end_date fif_xvbak_vbeln = ld_fif_xvbak_vbeln fif_xvbap_posnr = ld_fif_xvbap_posnr TABLES fit_xvbreve = it_fit_xvbreve fit_t009b = it_fit_t009b fit_zvbreve = it_fit_zvbreve . " SAMPLE_INTERFACE_00503105
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_fif_date_period  TYPE VBREVE-ACCPD ,
it_fit_xvbreve  TYPE STANDARD TABLE OF VBREVEVB ,
wa_fit_xvbreve  LIKE LINE OF it_fit_xvbreve,
ld_fif_start_date  TYPE SY-DATUM ,
it_fit_t009b  TYPE STANDARD TABLE OF T009B ,
wa_fit_t009b  LIKE LINE OF it_fit_t009b,
ld_fif_end_date  TYPE SY-DATUM ,
it_fit_zvbreve  TYPE STANDARD TABLE OF VBREVEVB ,
wa_fit_zvbreve  LIKE LINE OF it_fit_zvbreve,
ld_fif_xvbak_vbeln  TYPE VBAK-VBELN ,
ld_fif_xvbap_posnr  TYPE VBAP-POSNR .


SELECT single ACCPD
FROM VBREVE
INTO ld_fif_date_period.


"populate fields of struture and append to itab
append wa_fit_xvbreve to it_fit_xvbreve.
ld_fif_start_date = '20210129'.

"populate fields of struture and append to itab
append wa_fit_t009b to it_fit_t009b.
ld_fif_end_date = '20210129'.

"populate fields of struture and append to itab
append wa_fit_zvbreve to it_fit_zvbreve.

SELECT single VBELN
FROM VBAK
INTO ld_fif_xvbak_vbeln.


SELECT single POSNR
FROM VBAP
INTO ld_fif_xvbap_posnr.

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