SAP TB_MT520_FILE_CREATE Function Module for Do not delete!









TB_MT520_FILE_CREATE is a standard tb mt520 file create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Do not delete! processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for tb mt520 file create FM, simply by entering the name TB_MT520_FILE_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: FTS1
Program Name: SAPLFTS1
Main Program: SAPLFTS1
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TB_MT520_FILE_CREATE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'TB_MT520_FILE_CREATE'"Do not delete!
EXPORTING
* PAR_UNIX = 'MT520' "Name der zu erstellenden Datei
* PAR_DTYP = '0' "Dateityp '0' für Temse '2' Filesystem
* PAR_DATU = SY-DATUM "Datum (Identifizierung in der DTA-Verwaltung)
PAR_LAUF = "ID (Identifizierung in der DTA-Verwaltung)
* PAR_CBXX = 'X' "Kennzeichen, ob Sammelfileerzeugung

TABLES
I_TBCO_SEC = "Übergabetabelle für Geschäftsdaten
* E_ERR_TAB = "Error Message Table
* E_DTAM520 = "Ausgabetabelle SWIFT-Format
* E_REFH = "

EXCEPTIONS
NO_SWIFTCODE = 1
.



IMPORTING Parameters details for TB_MT520_FILE_CREATE

PAR_UNIX - Name der zu erstellenden Datei

Data type: RLGRAP-FILENAME
Default: 'MT520'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_DTYP - Dateityp '0' für Temse '2' Filesystem

Data type: VTBSDOKU-FORDDTYP
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_DATU - Datum (Identifizierung in der DTA-Verwaltung)

Data type: VTBKORTMS-LAUFD
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_LAUF - ID (Identifizierung in der DTA-Verwaltung)

Data type: VTBKORTMS-LAUFI
Optional: No
Call by Reference: No ( called with pass by value option)

PAR_CBXX - Kennzeichen, ob Sammelfileerzeugung

Data type: VTBSDOKU-FORDCBXX
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TB_MT520_FILE_CREATE

I_TBCO_SEC - Übergabetabelle für Geschäftsdaten

Data type: TBCO_SEC
Optional: No
Call by Reference: No ( called with pass by value option)

E_ERR_TAB - Error Message Table

Data type: ERROR_TR
Optional: Yes
Call by Reference: Yes

E_DTAM520 - Ausgabetabelle SWIFT-Format

Data type: DTA_M3X
Optional: Yes
Call by Reference: No ( called with pass by value option)

E_REFH -

Data type: REFH
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_SWIFTCODE - Swiftcode des absendenden BUKRS nicht vorhanden

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TB_MT520_FILE_CREATE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_par_unix  TYPE RLGRAP-FILENAME, "   'MT520'
lt_i_tbco_sec  TYPE STANDARD TABLE OF TBCO_SEC, "   
lv_no_swiftcode  TYPE TBCO_SEC, "   
lv_par_dtyp  TYPE VTBSDOKU-FORDDTYP, "   '0'
lt_e_err_tab  TYPE STANDARD TABLE OF ERROR_TR, "   
lv_par_datu  TYPE VTBKORTMS-LAUFD, "   SY-DATUM
lt_e_dtam520  TYPE STANDARD TABLE OF DTA_M3X, "   
lt_e_refh  TYPE STANDARD TABLE OF REFH, "   
lv_par_lauf  TYPE VTBKORTMS-LAUFI, "   
lv_par_cbxx  TYPE VTBSDOKU-FORDCBXX. "   'X'

  CALL FUNCTION 'TB_MT520_FILE_CREATE'  "Do not delete!
    EXPORTING
         PAR_UNIX = lv_par_unix
         PAR_DTYP = lv_par_dtyp
         PAR_DATU = lv_par_datu
         PAR_LAUF = lv_par_lauf
         PAR_CBXX = lv_par_cbxx
    TABLES
         I_TBCO_SEC = lt_i_tbco_sec
         E_ERR_TAB = lt_e_err_tab
         E_DTAM520 = lt_e_dtam520
         E_REFH = lt_e_refh
    EXCEPTIONS
        NO_SWIFTCODE = 1
. " TB_MT520_FILE_CREATE




ABAP code using 7.40 inline data declarations to call FM TB_MT520_FILE_CREATE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single FILENAME FROM RLGRAP INTO @DATA(ld_par_unix).
DATA(ld_par_unix) = 'MT520'.
 
 
 
"SELECT single FORDDTYP FROM VTBSDOKU INTO @DATA(ld_par_dtyp).
DATA(ld_par_dtyp) = '0'.
 
 
"SELECT single LAUFD FROM VTBKORTMS INTO @DATA(ld_par_datu).
DATA(ld_par_datu) = SY-DATUM.
 
 
 
"SELECT single LAUFI FROM VTBKORTMS INTO @DATA(ld_par_lauf).
 
"SELECT single FORDCBXX FROM VTBSDOKU INTO @DATA(ld_par_cbxx).
DATA(ld_par_cbxx) = 'X'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!