Skip to Content

How to create the destination file name dynamically with time stamp?

We can create the destination file names like CSV,TXT,XML with dynamic date names in SAP BODS.

Create a job with Script > Data flow

Capture1.JPG

Script Code:

$G_CurrentDate= sysdate();

print($G_CurrentDate);

$G_Filename = ‘Dynamic_File_Name_’||substr(sysdate(),0,10)||’.csv’;

print($G_Filename);

Declare the variable $G_CurrentDate as date and $G_Filename as varchar.

Place this variable $G_Filename in the File name of the File Format Editor

Create the Global Variables:

Capture2.JPG

Create the data flow with the following:

Capture5.JPG

Create a file format Editor

Choose the directories for destination file path.

Capture4.JPG

Be the first to leave a comment
You must be Logged on to comment or reply to a post.