cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress values from PAyload

Sharadha1
Active Contributor
0 Kudos
52

Hi,

I am doing RFC-File scenario. The file should be named dynamically which is determined at the backend RFC. I am passing the name also in the internal table which is passed from RFC.I am setting the file name only in the first line.

I am able to use variable substitution to name the file dynamically from the payload .But i do not want the file name to appear inside the file along with the data. How can i suppress it.

For ex: the data in my file comes as below with the filename as 'File1',

'File1','Name1','Empno1','DOB1',

,'Name2','EMPno2',DOB2',

,'Name3','Empno3','DOB3',

How can i suppress the first column?

Regards,

Sharadha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey

Please have a look at the following blog and see if it helps

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

Thanx

Aamir

Answers (1)

Answers (1)

Former Member
0 Kudos

don't map file name in target structure.

if you dont need this field, remove it from your target strucure

to set file name dynamically refer

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

get the filename using above UDF and map to root of target. so you dont even need file name field at target, but you will be able to pass file name

Sharadha1
Active Contributor
0 Kudos

Thanks Mugdha.

But this blog describes to transfer the file name between sender and receiver file adapter.

I am not able to achieve this since i am doing RFC-file scenario..

can you please explain how can this be achieved in my case,

Regards,

Sharadha

Former Member
0 Kudos

Develope UDF like

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

conf.put(key,a);

String ourSourceFileName = conf.get(key);

return ourSourceFileName;

Pass filename field from your RFC to this UDF, and map it to root node of target structure as you will not create filename field at target.

Also select Adapter Spcific message Attributes--> FileName in receiver file adapter