SAP DX_SPLIT_FILE_NAME Function Module for









DX_SPLIT_FILE_NAME is a standard dx split file name SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 dx split file name FM, simply by entering the name DX_SPLIT_FILE_NAME into the relevant SAP transaction such as SE37 or SE38.

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



Function DX_SPLIT_FILE_NAME 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 'DX_SPLIT_FILE_NAME'"
EXPORTING
P_FILENAME = "
P_SPLITTYPE = "
* P_NUM_REC = "
* P_NUM_LINE = "
* P_OBJECT_LINE = "
P_RECORD_COUNT = "
* P_TOT_RECORD_NO = "Number of Objects per File

IMPORTING
H_XFILENAME = "

CHANGING
FILE_RECORD_COUNT = "
FILE_LINE_COUNT = "
FILE_EXT = "File extension
* LINE_INDICATOR = "

TABLES
* T_SPLIT_FILE = "
* T_RAWDATA = "

EXCEPTIONS
INVALID_SPLITTYPE = 1 ERROR_WRONG_SPLITFILES_NUM = 2
.



IMPORTING Parameters details for DX_SPLIT_FILE_NAME

P_FILENAME -

Data type: DXFILEN-FILENAME
Optional: No
Call by Reference: Yes

P_SPLITTYPE -

Data type: DXATTRIB3-SPLITTYPE
Optional: No
Call by Reference: Yes

P_NUM_REC -

Data type: DXATTRIB3-OBJECTNO
Optional: Yes
Call by Reference: Yes

P_NUM_LINE -

Data type: DXATTRIB3-LINESNO
Optional: Yes
Call by Reference: Yes

P_OBJECT_LINE -

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

P_RECORD_COUNT -

Data type: DXATTRIB3-OBJECTNO
Optional: No
Call by Reference: Yes

P_TOT_RECORD_NO - Number of Objects per File

Data type: DXATTRIB3-OBJECTNO
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for DX_SPLIT_FILE_NAME

H_XFILENAME -

Data type: DXFILEN-FILENAME
Optional: No
Call by Reference: Yes

CHANGING Parameters details for DX_SPLIT_FILE_NAME

FILE_RECORD_COUNT -

Data type: DXATTRIB3-OBJECTNO
Optional: No
Call by Reference: Yes

FILE_LINE_COUNT -

Data type: DXATTRIB3-LINESNO
Optional: No
Call by Reference: Yes

FILE_EXT - File extension

Data type: N
Optional: No
Call by Reference: Yes

LINE_INDICATOR -

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

TABLES Parameters details for DX_SPLIT_FILE_NAME

T_SPLIT_FILE -

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

T_RAWDATA -

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

EXCEPTIONS details

INVALID_SPLITTYPE -

Data type:
Optional: No
Call by Reference: Yes

ERROR_WRONG_SPLITFILES_NUM -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for DX_SPLIT_FILE_NAME 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_p_filename  TYPE DXFILEN-FILENAME, "   
lv_h_xfilename  TYPE DXFILEN-FILENAME, "   
lt_t_split_file  TYPE STANDARD TABLE OF DXFILEN, "   
lv_file_record_count  TYPE DXATTRIB3-OBJECTNO, "   
lv_invalid_splittype  TYPE DXATTRIB3, "   
lt_t_rawdata  TYPE STANDARD TABLE OF SDXWBTEDAT, "   
lv_p_splittype  TYPE DXATTRIB3-SPLITTYPE, "   
lv_file_line_count  TYPE DXATTRIB3-LINESNO, "   
lv_error_wrong_splitfiles_num  TYPE DXATTRIB3, "   
lv_file_ext  TYPE N, "   
lv_p_num_rec  TYPE DXATTRIB3-OBJECTNO, "   
lv_p_num_line  TYPE DXATTRIB3-LINESNO, "   
lv_line_indicator  TYPE NUM4, "   
lv_p_object_line  TYPE DXATTRIB3-LINESNO, "   
lv_p_record_count  TYPE DXATTRIB3-OBJECTNO, "   
lv_p_tot_record_no  TYPE DXATTRIB3-OBJECTNO. "   

  CALL FUNCTION 'DX_SPLIT_FILE_NAME'  "
    EXPORTING
         P_FILENAME = lv_p_filename
         P_SPLITTYPE = lv_p_splittype
         P_NUM_REC = lv_p_num_rec
         P_NUM_LINE = lv_p_num_line
         P_OBJECT_LINE = lv_p_object_line
         P_RECORD_COUNT = lv_p_record_count
         P_TOT_RECORD_NO = lv_p_tot_record_no
    IMPORTING
         H_XFILENAME = lv_h_xfilename
    CHANGING
         FILE_RECORD_COUNT = lv_file_record_count
         FILE_LINE_COUNT = lv_file_line_count
         FILE_EXT = lv_file_ext
         LINE_INDICATOR = lv_line_indicator
    TABLES
         T_SPLIT_FILE = lt_t_split_file
         T_RAWDATA = lt_t_rawdata
    EXCEPTIONS
        INVALID_SPLITTYPE = 1
        ERROR_WRONG_SPLITFILES_NUM = 2
. " DX_SPLIT_FILE_NAME




ABAP code using 7.40 inline data declarations to call FM DX_SPLIT_FILE_NAME

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 DXFILEN INTO @DATA(ld_p_filename).
 
"SELECT single FILENAME FROM DXFILEN INTO @DATA(ld_h_xfilename).
 
 
"SELECT single OBJECTNO FROM DXATTRIB3 INTO @DATA(ld_file_record_count).
 
 
 
"SELECT single SPLITTYPE FROM DXATTRIB3 INTO @DATA(ld_p_splittype).
 
"SELECT single LINESNO FROM DXATTRIB3 INTO @DATA(ld_file_line_count).
 
 
 
"SELECT single OBJECTNO FROM DXATTRIB3 INTO @DATA(ld_p_num_rec).
 
"SELECT single LINESNO FROM DXATTRIB3 INTO @DATA(ld_p_num_line).
 
 
"SELECT single LINESNO FROM DXATTRIB3 INTO @DATA(ld_p_object_line).
 
"SELECT single OBJECTNO FROM DXATTRIB3 INTO @DATA(ld_p_record_count).
 
"SELECT single OBJECTNO FROM DXATTRIB3 INTO @DATA(ld_p_tot_record_no).
 


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!