CSM_SHOW_FILE 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 CSM_SHOW_FILE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SCSM_FILEINFO
Released Date:
Not Released
Processing type: Remote-Enabled
CALL FUNCTION 'CSM_SHOW_FILE' "
EXPORTING
filename = " char512 Complete File Name
* timeout = 10 " int4
* timeout = 10 " int4
* startline = 0 " int4
* endline = 0 " int4
* lines = 0 " int4
* startfilepos = 0 " char20
* guid = " csmsysguid Not Yet Used
* filetype = 'ASC' " char20
IMPORTING
filepos = " char20
lines_read = " int4
bytes_read = " char20
string = " string
* TABLES
* output_std = " ccmctltxttab
* error_std = " ccmctltxttab
* output_bin = " ccmctlbin
EXCEPTIONS
FILE_NOT_FOUND = 1 " File not found
TIMEOUT = 2 "
TIMEOUT = 2 "
COULD_NOT_READ_FILE = 3 " File could not be read
INTERNAL_ERROR = 4 "
NO_READ_PERMISSION = 5 "
. " CSM_SHOW_FILE
The ABAP code below is a full code listing to execute function module CSM_SHOW_FILE 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).
| ld_filepos | TYPE CHAR20 , |
| ld_lines_read | TYPE INT4 , |
| ld_bytes_read | TYPE CHAR20 , |
| ld_string | TYPE STRING , |
| it_output_std | TYPE STANDARD TABLE OF CCMCTLTXTTAB,"TABLES PARAM |
| wa_output_std | LIKE LINE OF it_output_std , |
| it_error_std | TYPE STANDARD TABLE OF CCMCTLTXTTAB,"TABLES PARAM |
| wa_error_std | LIKE LINE OF it_error_std , |
| it_output_bin | TYPE STANDARD TABLE OF CCMCTLBIN,"TABLES PARAM |
| wa_output_bin | LIKE LINE OF it_output_bin . |
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_filepos | TYPE CHAR20 , |
| ld_filename | TYPE CHAR512 , |
| it_output_std | TYPE STANDARD TABLE OF CCMCTLTXTTAB , |
| wa_output_std | LIKE LINE OF it_output_std, |
| ld_lines_read | TYPE INT4 , |
| ld_timeout | TYPE INT4 , |
| ld_timeout | TYPE INT4 , |
| it_error_std | TYPE STANDARD TABLE OF CCMCTLTXTTAB , |
| wa_error_std | LIKE LINE OF it_error_std, |
| ld_bytes_read | TYPE CHAR20 , |
| ld_startline | TYPE INT4 , |
| it_output_bin | TYPE STANDARD TABLE OF CCMCTLBIN , |
| wa_output_bin | LIKE LINE OF it_output_bin, |
| ld_string | TYPE STRING , |
| ld_endline | TYPE INT4 , |
| ld_lines | TYPE INT4 , |
| ld_startfilepos | TYPE CHAR20 , |
| ld_guid | TYPE CSMSYSGUID , |
| ld_filetype | TYPE CHAR20 . |
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 CSM_SHOW_FILE or its description.