Screen parameter information for ABAP program which update single and multiple HTML/text files




File / directory selection

Single File
Select this radio button and enter file path if you just want to update a single file

Directory
Select this radio button and enter directory path if you want to update all files within a directory (including sub directories)


Find and replace details

Find source
Insert file path of text you want to find in the file being updated

New source
Insert file path to text to be added, inserted or deleted

Exclude if line contains
Do not update specific line if it contaisn the following text

Dont update if file contains
Dont update file if it contains the following text

No Changes until found
Do not update any lines of the file until the following text has been found, once it has update any further matches

Stop when find
Once the following text has been found, do not update any more lines

The string will be replaced by the file path of the data file but excluding the following component of it
If You want to add a link to the files which points to the same file name but a different path insert the string into the new date file and it will be replaced with the current file path minus the following section of it.

Therefor if you want to update a number of files within the directory c:/temp/ with links to themselves on the domain www.SAP Development you would enter the following information:
Directory = c:/webdirectory/
<FILENAME> = c:/webdirectory/

...and the code in the new source file would look somthing like this:
<a href="www.trailsap.com/<FILENAME>"> Click here to vist this page</a>

therefor the result when updating file c:/webdirectory/index.htm would be
<a href="www.trailsap.com/?topic=index"> Click here to vist this page</a>


File / directory selection

Insert line above
Inserts new line above line containing 'find source' text

Insert line below
Inserts new line below line containing 'find source' text

Replace line
Replaces containing 'find source' text with 'new source' text

Insert before string
Insert 'new source' text into same line but before the 'find source' text string

Insert after string
Insert 'new source' text onto same line but after the 'find source' text string



Related Articles

ABAP code for program to manipulate HTML and text files
Updating single and multiple HTML/text files using an SAP program