0% found this document useful (0 votes)
66 views

Dynamicfileconfiguration

This function dynamically generates a file name based on input parameters and flags. It takes in a permit, filename, flag, variable, and container. It gets the dynamic configuration from the container, and sets the file name key within it based on whether the flag is P or I. The flag determines if a variable is prepended to the filename. It returns the permit or any exception message.

Uploaded by

RAMESH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Dynamicfileconfiguration

This function dynamically generates a file name based on input parameters and flags. It takes in a permit, filename, flag, variable, and container. It gets the dynamic configuration from the container, and sets the file name key within it based on whether the flag is P or I. The flag determines if a variable is prepended to the filename. It returns the permit or any exception message.

Uploaded by

RAMESH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

public String DynamicFileName(String pstrpermit, String pstrfilename, String pstrflag, String

pstrvar, Container container) throws StreamTransformationException{


/*User-Defined Function For Dynamic File Name Generation
Author: Ashirbani Lahiri (TCS)
Project: RUD
*/

try{

String filename="";

DynamicConfiguration conf1 = (DynamicConfiguration)


container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CON
FIGURATION);
DynamicConfigurationKey key1 =
DynamicConfigurationKey.create("http://sap.com/xi/XI/System","FileName");

if(pstrflag.equals("P"))

filename = pstrvar+pstrfilename;

if(pstrflag.equals("I"))

filename = pstrvar+pstrfilename;

conf1.put(key1,filename);

return pstrpermit;

catch(Exception e)

String exception = e.toString();


return exception;

You might also like