cancel
Showing results for 
Search instead for 
Did you mean: 

Variable substitution or dynamic configuration

Former Member
0 Kudos

Hi,

I am doing Proxy sender to File receiver scenario. I have message payload like,

MTtest1..... 0..1

date.... 0..1

item....0...unbound

I want to create a text file with the name SAP<date>.

I am using a variable substitution method, date: payload: MTtest1, 1, date, 1

Target directory: SAP%date%

I am getting the filename correctly, But this creates a blank line in the top of the file. Please suggest me how to overcome this issue.

If a send the date at the end, how the it must be written in variable substitution method.

If I need to use dynamic configuration, please tell me how to do that, i saw few blogs, but i am not able to get it.

Thanks and Regards,

Sri

Accepted Solutions (1)

Accepted Solutions (1)

former_member206760
Active Contributor
0 Kudos

dear arunsuri,

modify your structure like this...

MTtest1..... 0..1

+item....0...unbound

++date.... 0..1

then write var subs like : payload : MTtest1,1,item,1,date,1

in FCC

item.fieldnames :abc,xyz,date

item.fieldfixedLengths:say 5,4,0

item.fixedLengthTooShortHandling:Cut

this will not allow ur date field to come in the output file

Edited by: Tarang Shah on Mar 25, 2009 8:03 AM

Answers (1)

Answers (1)

former_member181985
Active Contributor
0 Kudos

what is your file structure, flat or XML?

>I am using a variable substitution method, date: payload: MTtest1, 1, date, 1

>Target directory: SAP%date%

This doesnt create an blank line in the target payload.

Even if you use dynamic configuration also it doesnt create. No need to go for Dynamic Configuration for your case.....

Former Member
0 Kudos

Hi,

It is from XML to a flatfile. The date field is not included in the flat file, because of which i am getting a blank in the notepad file.

former_member181985
Active Contributor
0 Kudos

Search forum this type of problem has been answered. You have to change File Content conversion logic a bit.

Can you paste the FCC conversion parameters used..........

Edited by: Praveen Gujjeti on Mar 25, 2009 9:42 AM

Former Member
0 Kudos

Ya i tried searching, File content conversion will not remove blank line. They are sugesting to use dynamic configuration which i am not familiar with.

former_member181985
Active Contributor
0 Kudos

Can you paste the FCC conversion parameters used..........

jagesh_lakdawala
Active Participant
0 Kudos

Dear Arunsri,

Better to use Dynamic Confi method becs its recommended by SAP also.

Please Follow the below steps.

(1)Create the UDF and pass Filename as an Input parameter as shown here.

___________________________________________________________________

public String Set_Output_File_Name(String var_Filename, String var_Directory, Container container) throws StreamTransformationException{

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

conf.put(key, var_Filename);

return "TRUE";

________________________________________________________________-

(2)In File receiver adapter configuration, select the Adapter Specific message attributes and in that select the Filename Option.

Regards

jagesh

Former Member
0 Kudos

Hi Jagesh Lakdawala ,

We are using a report program to trigger the proxy. We are not using any mapping in the XI side.

Will this Dynamic configuration works in this case.

Thanks,

Sri

former_member181985
Active Contributor
0 Kudos

Dynamic configuration will not work since you dont have a mapping case.