Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Type of Object – Enhancement

Description – Retrieve list of files from the OS level that match the import parameters

Function module - ZSUBST_GET_FILE_LIST

Function Group  - ZSAUS (Repository Switch Tools)

In Standard Function Module 'SUBST_GET_FILE_LIST', length of directory and filename to 75 characters.

In this Function Module we can give maximum length of directory and filename to 120 characters and retrieve the list of files from the OS level that match the import parameter.

Step 1 : Need to create a structure with name ZBC_S_RSFILLST

Table Details

MOD_TIME
ComponentTyping MethodData TypeLengthShort Description
DIRNAMETYPESCHAR120name of directory. (possibly t
NAMETYPESCHAR120name of entry. (possibly trunc
TYPETYPESCHAR10         " type of entry.
LENTYPESNUMC8         " length in bytes.
OWNERTYPESCHAR8         " owner of the entry.
MTIMETYPESNUMC6last modification date, second
FMODETYPESCHAR9Like "rwx-r-x--x": protection
USEABLETYPESCHAR1
SUBRCTYPESCHAR4
ERRNOTYPESCHAR3
ERRMSGTYPESCHAR40
MOD_DATETYPESDATS8
TYPESCHAR8HH:MM:SS
SEENTYPESCHAR1
CHANGEDTYPESCHAR1

Step 2: Create Function Group - ZBC_SAUS

Description: Repository Switch Tools

Step 3: Create a Function Module with name 'ZBC_SUBST_GET_FILE_LIST' copying from Standard Function Module 'SUBST_GET_FILE_LIST'

Import Parameter

Change the Associated Type to CHAR120.

Tables Parameter

Add the structure 'ZBC_S_RSFILLST' in the Associated type.

Source Code Parameter

Change the field length DIRNAME and NAME to 120 in the structure of FILE.

SAVE and ACTIVATE.

This Function Module is mainly use in the Interface object.

Example of the usage:

Click Execute

1 Comment