SAP Reports / Programs

RPCFTPM2 SAP ABAP Report - !!!Do Not Use Any Longer; Use RPCFTPM3 Instead







RPCFTPM2 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter RPCFTPM2 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RPCFTPM2. "Basic submit
SUBMIT RPCFTPM2 AND RETURN. "Return to original report after report execution complete
SUBMIT RPCFTPM2 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: FIRMA = Company
Title: !!!Do Not Use Any Longer; Use RPCFTPM3 Instead
Text Symbol: S03 = Live runs
Text Symbol: S02 = Test runs
Text Symbol: S01 = All files
Text Symbol: 081 = Get file, backup
Text Symbol: 080 = Get file as per mask
Text Symbol: 032 = .
Text Symbol: 031 = failed. Try again
Text Symbol: 030 = Connection setup
Text Symbol: 005 = Free:
Text Symbol: 004 = DiskSpace:
Text Symbol: 003 = Drive:
Text Symbol: 002 = Company:
Text Symbol: 001 = Store/move target file for file:


INCLUDES used within this REPORT RPCFTPM2

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

HR_DK_FTP_PBS CALL FUNCTION 'HR_DK_FTP_PBS' DESTINATION 'HR_DK_PBS_FTP' EXPORTING command = 'LIST' sourcefile = space targetfile = space firma = firma TABLES itab = filetab EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 connection_not_defined = 13 connection_not_allowed = 14 OTHERS = 15.

HR_DK_FIND_FREE_SPACE CALL FUNCTION 'HR_DK_FIND_FREE_SPACE' EXPORTING firma = firma IMPORTING total_in_bytes = total_in_bytes total_in_megabytes = total_in_megabytes free_in_bytes = free_in_bytes free_in_megabytes = free_in_megabytes diskdrive = diskdrive text = sy-title EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 connection_not_defined = 13 connection_not_allowed = 14 OTHERS = 15.

HR_DK_SHOW_INFO CALL FUNCTION 'HR_DK_SHOW_INFO' EXCEPTIONS OTHERS = 1.

HR_DK_FTP_PBS CALL FUNCTION 'HR_DK_FTP_PBS' DESTINATION 'HR_DK_PBS_FTP' EXPORTING command = 'LIST' sourcefile = space targetfile = space firma = firma TABLES itab = filetab EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 OTHERS = 13.

HR_DK_FIND_FREE_SPACE CALL FUNCTION 'HR_DK_FIND_FREE_SPACE' EXPORTING firma = firma IMPORTING total_in_bytes = total_in_bytes total_in_megabytes = total_in_megabytes free_in_bytes = free_in_bytes free_in_megabytes = free_in_megabytes diskdrive = diskdrive text = sy-title EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 connection_not_defined = 13 connection_not_allowed = 14 OTHERS = 15.

HR_DK_SHOW_INFO CALL FUNCTION 'HR_DK_SHOW_INFO' EXPORTING always_show = 'X' EXCEPTIONS OTHERS = 1.

GUI_UPLOAD CALL FUNCTION 'GUI_UPLOAD' EXPORTING filename = filename * FILETYPE = 'ASC' * HAS_FIELD_SEPARATOR = ' ' * HEADER_LENGTH = 0 * IMPORTING * FILELENGTH = * HEADER = tables data_tab = itab EXCEPTIONS FILE_OPEN_ERROR = 1 FILE_READ_ERROR = 2 NO_BATCH = 3 GUI_REFUSE_FILETRANSFER = 4 INVALID_TYPE = 5 NO_AUTHORITY = 6 UNKNOWN_ERROR = 7 BAD_DATA_FORMAT = 8 HEADER_NOT_ALLOWED = 9 SEPARATOR_NOT_ALLOWED = 10 HEADER_TOO_LONG = 11 UNKNOWN_DP_ERROR = 12 ACCESS_DENIED = 13 DP_OUT_OF_MEMORY = 14 DISK_FULL = 15 DP_TIMEOUT = 16 OTHERS = 17 .

UPLOAD * CALL FUNCTION 'UPLOAD' * IMPORTING * filesize = filesize * cancel = cancel * TABLES * data_tab = itab * EXCEPTIONS * conversion_error = 1 * invalid_table_width = 2 * invalid_type = 3 * no_batch = 4 * unknown_error = 5 * gui_refuse_filetransfer = 6 * OTHERS = 7.

HR_DK_FTP_PBS CALL FUNCTION 'HR_DK_FTP_PBS' DESTINATION 'HR_DK_PBS_FTP' EXPORTING command = command sourcefile = source targetfile = target firma = firma TABLES itab = itab EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 OTHERS = 13.

GUI_DOWNLOAD CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING * BIN_FILESIZE = filename = filename * FILETYPE = 'ASC' * APPEND = ' ' * WRITE_FIELD_SEPARATOR = ' ' * HEADER = '00' * TRUNC_TRAILING_BLANKS = ' ' * WRITE_LF = 'X' * COL_SELECT = ' ' * COL_SELECT_MASK = ' ' IMPORTING filelength = filelength TABLES data_tab = itab EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22 .

DOWNLOAD * CALL FUNCTION 'DOWNLOAD' * EXPORTING ** BIN_FILESIZE = ' ' * codepage = 'IBM' ** FILENAME = ' ' ** filetype = 'IBM' ** ITEM = ' ' ** MODE = ' ' ** WK1_N_FORMAT = ' ' ** WK1_N_SIZE = ' ' ** WK1_T_FORMAT = ' ' ** WK1_T_SIZE = ' ' ** FILEMASK_MASK = ' ' ** FILEMASK_TEXT = ' ' ** FILETYPE_NO_CHANGE = ' ' ** FILEMASK_ALL = ' ' ** FILETYPE_NO_SHOW = ' ' ** SILENT = 'S' ** COL_SELECT = ' ' ** COL_SELECTMASK = ' ' * IMPORTING ** ACT_FILENAME = ** ACT_FILETYPE = * filesize = filesize ** CANCEL = * TABLES * data_tab = itab ** FIELDNAMES = * EXCEPTIONS * invalid_filesize = 1 * invalid_table_width = 2 * invalid_type = 3 * no_batch = 4 * unknown_error = 5 * gui_refuse_filetransfer = 6 * OTHERS = 7.

HR_DK_FTP_PBS CALL FUNCTION 'HR_DK_FTP_PBS' DESTINATION 'HR_DK_PBS_FTP' EXPORTING command = 'LIST' sourcefile = space targetfile = space firma = firma TABLES itab = filetab EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 OTHERS = 13.

SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING text = statustext EXCEPTIONS OTHERS = 1.

HR_DK_FTP_PBS CALL FUNCTION 'HR_DK_FTP_PBS' DESTINATION 'HR_DK_PBS_FTP' EXPORTING command = 'GET' sourcefile = realfilename targetfile = space firma = firma TABLES itab = statusfile EXCEPTIONS coulndt_open_source = 1 couldnt_open_target = 2 error_writing_target = 3 error_reading_source = 4 error_closing_file = 5 error_deleting_file = 6 couldnt_read_from_file = 7 error_creating_directory = 8 change_dir_failed = 9 change_maindir_failed = 10 open_sourcefile_failed = 11 open_targetfile_failed = 12 connection_not_defined = 13 connection_not_allowed = 14 OTHERS = 15.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RPCFTPM2 or its description.