cancel
Showing results for 
Search instead for 
Did you mean: 

skip field in file content conversion (file adapter)

Former Member
0 Kudos

hy guys,

I have a log file and want to convert it into xml. that works fine.

the problem is: can I skip some fields that I do not need in the xml with file content conversion

the fields I want to skip are the same in every record of the log file.

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ralf,

You can only ignore lines in the begiining of the file using Document Offset option.

If you have the unwanted field in the end of the record and you are in SPS12 (PI 7.0), you can use the option additionalLasstFields in FCC parameters. have a look into the blog /people/sukumar.natarajan/blog/2007/06/12/content-conversion-in-sender-file-adapter--2-new-useful-parameters

Easier, is to ignore those fields in mapping.

Also, you can try to remove those fields using a shell script which can be called from the File adapter.

Regards,

Jai Shankar

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

yes, you can

ignore defining the parameters for those fields

regards

krishna

Former Member
0 Kudos

Hello,

what do you mean by ignoring parameters?

i have recordset structure: R,* and R.fieldNames: ACCOUNT,ACCWERT,UNWANTED,DATE

fieldSeparator is: ; and endSeparator: 'nl' (nothing more)

'UNWANTED' should not be in the xml. but if i leave it away in fieldNames it's wrongly interpreted, isn't it?

justin_santhanam
Active Contributor
0 Kudos

Ralf,

During content conversion its not possible to skip fields which u don't want.You can ignore particular row , but not particular field. In comm.channel u can see the optio Document.offset if you give 1 then the first line from input will not be considered for content conversion.

Best regards,

raj.

Shabarish_Nair
Active Contributor
0 Kudos

you cant ignore fields, but you can ignore nodes.

use - NameA.fixedLengthTooShortHandling and Cut option ref: http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Else in case you want to ignore the fields, then handle it in the mapping by not mapping them to the target message.

Former Member
0 Kudos

Hi Ralf,

I think, you should hanle this at message mapping only. Dont map the UNWANTED Field to the target field in the message type and also remove the field UNWANTED from FCC.

Regards,

Ramesh P

Message was edited by:

Ramesh Parashivamurthy

Shabarish_Nair
Active Contributor
0 Kudos

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12 see that for using the CUT option i mentioned earlier. But in your req. i gather it would be better to handle the same in the mapping cos you hav fields to be ignored.

Former Member
0 Kudos

Would have been nice if it worked with fcc.

So for the mapping i guess i have to use ib - design, define all the stuff.

What's the best mapping for log file --> xml leaving some fields out.

is it possible with xslt or is graphical better?

justin_santhanam
Active Contributor
0 Kudos

Ralf,

You can use Graphical Mapping . Juz don't map from the source to target for the fields that u don't need.

Best regards,

raj.

Former Member
0 Kudos

ok.

i'll try this now.

thanks for the moment.

Former Member
0 Kudos

Hi Ralf

>><i>can I skip some fields that I do not need in the xml with file content conversion</i>

Yes you can skip the fields.

Regards,

Ramesh P