Skip to Content

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

/wp-content/uploads/2012/10/1_151478.jpg

Table Details

MOD_TIME
Component Typing Method Data Type Length Short Description
DIRNAME TYPES CHAR 120 name of directory. (possibly t
NAME TYPES CHAR 120 name of entry. (possibly trunc
TYPE TYPES CHAR 10          ” type of entry.
LEN TYPES NUMC 8          ” length in bytes.
OWNER TYPES CHAR 8          ” owner of the entry.
MTIME TYPES NUMC 6 last modification date, second
FMODE TYPES CHAR 9 Like “rwx-r-x–x”: protection
USEABLE TYPES CHAR 1
SUBRC TYPES CHAR 4
ERRNO TYPES CHAR 3
ERRMSG TYPES CHAR 40
MOD_DATE TYPES DATS 8
TYPES CHAR 8 HH:MM:SS
SEEN TYPES CHAR 1
CHANGED TYPES CHAR 1

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

/wp-content/uploads/2012/10/2_151479.jpg

Change the Associated Type to CHAR120.

Tables Parameter

/wp-content/uploads/2012/10/4_151480.jpg

Add the structure ‘ZBC_S_RSFILLST’ in the Associated type.

Source Code Parameter

/wp-content/uploads/2012/10/5_151490.jpg

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:

/wp-content/uploads/2012/10/6_151491.jpg

Click Execute

/wp-content/uploads/2012/10/7_151492.jpg

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply