cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion

Former Member
0 Kudos

Hi all.

I have a scenario where a file is read using file adapter.I am using content conversion.

The file has 3 different sub structures.

The key identifying the substrucuture is not the first field, it is the second field.In this case the file adpater is unable to create an XML file.

If i place the key field as the first field in the substructure and change the content conversion accordingly it works.

The problem is...I will get the file from legacy system

where tke key is not first field.Is there anyway to make this work?Your help is highly appreciated.

Thanks in advance

kumar

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

What is the first field then?

maybe "if the first field is not important"

you could combine as a key "first & second" field?

but it could only be a solution if the first one is not important..

BTW

give us a few lines of the sample file maybe someone will think of something then:)

Regards,

michal

Former Member
0 Kudos

HI Michal

Thanks.

The first field is a random number generated by the legacy application.This application was developed 2 years ago, now we are trying to use the same file.

the line width in the file is very long to paste here,

so i will give a sample file.

45dsxxxxxxxxxxxxxxx

46uaxxxxxxxxxxxxxxx

the first two digits are first field i.e 45,46

the second field ds,ua are the key fields.

xxxxxxxx are reamining fields.

Best regards

kumar

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

In my opinion you have 3 options:

1. create your own "xi java proxy" that you will pick up the file and you'll be able to parse it as you want and pass the content to XI - this way you'll have all the monitoring features that XI gives you

2. create an "application" that will cut the first two chars from each line of the file (and for instance put the file into an FTP folder for the XI to pick it up)

but this solution will be rather hard to maintain as you will have a small application that someone may forget to:

- start - after a backup for instance

- you will have to have to documentation to it maintanined together with the XI documentation - so that new XI developers will now what that program does in case of any changes

3. to change the outbound file of the old application.

maybe there are just a few lines of code that you could change to have the file without the "random generated number" prefix

Regards,

michal

Former Member
0 Kudos

Hi,

There is a forth option. Create a module an assign to the outbound adapter. The modules are a method of including a user exit ( in XI2.0 they were called dispatcher processes ). Check the help for modules in

http://help.sap.com/saphelp_nw04/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/content.htm

You will need to ensure that the order for processing of the modules is correct for the direction of the adapter.

Cheers,

Mark

Former Member
0 Kudos

Hi

Its working even though the key field is not the first field.

Thanks a lot

kumar