Liquid UI - WS Reference Library

readfile()


Purpose

With readfile(), you can read the content from files.

Once you open an external file using the openfile command, you can use the readfile command to read a record into a variable in the WS environment. The following file type is supported:

  • .csv


Syntax

readfile("filename");

Options

The readfile() command does not take any options.


Example

The following scenario demonstrates the readfile() command usage:

The SAP Easy Access screen appears, as shown below:

Press Enter key. The data from the file appears in the fields as shown in the following figure:


Script

readfile('file.txt',{"z_first_&V[idx]":true,"z_second_&V[idx]":true,"z_third_&V[idx]":true});

Script Details