cancel
Showing results for 
Search instead for 
Did you mean: 

how to add source file name as one of the target field value in File to Proxy Scenario without Mapping

manikandan_shanmugam3
Active Participant
0 Kudos

HI All,

Scenario : Flat file to Proxy without mapping in PO

PO 7.4 Single stack

Requirement: Source file name has to be added as one of the target field value in proxy message:

I am just converting flat file as an XML using FCC and passing the xml as proxy message in to ECC without performing Mapping. Business want us to add one more field in target proxy structure and pass source file name in that.

Is there any other way than UDF to achive the requirement?

Regards,

Mani

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member202642
Participant
0 Kudos

Hi Manikandan,

For this you have to use message mapping as you want to put the name of file in a field.

This is the easiest way to achieve this.

Regards,

Aamir

RaghuVamseedhar
Active Contributor
0 Kudos

Manikandan,

Simple solution is to have message mapping (with UDF DynamicConfiguration). You have to convince yourself that, mapping is required .

iaki_vila
Active Contributor
0 Kudos

Hi Manikandan,

I think there is no standar module to do this and Mark wanted to say that you should write a module to do that.

I think you can create OS batch file to get file name and to to including it in the file and in this way to follow Mark 1 suggestion and your partner won't need to change anything.

Regards.

manigram
Active Participant
0 Kudos

Hello,

Enable the "Filename" properties in  adapter specific messages attribute in sender file adapter.

Use the below code in UDF and pass the "MyFileName" value in target field.

DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");

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

String MyFileName = dynamicconfiguration.get(key);

Regards,

Manigandan

yasam
Explorer
0 Kudos

hi Manigandan,

This code is working or not please can you confirm my self having same requirement.

Regards

Y Raghu

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Manikandan,

Well, for one you could (in increasing complexity):

1. include the filename inside the flatfile.

2. If this is not feasible, message mapping would be an option. But if you really do not want mapping, 3. you need to use an adapter module.

Regards,

Mark

manikandan_shanmugam3
Active Participant
0 Kudos

Hi Mark,

Can you please let me know module configuration as client is not fine for option 1 one and I do not want to go for option 2 to create mapping program for just because of one filed.

Regards,

Mani

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Manikandan,


I'm afraid there is no standard module to cater for your requirement. You need to code it and deploy in application server.

Regards,

Mark