cancel
Showing results for 
Search instead for 
Did you mean: 

how to use NameA.endSeparator

Former Member
0 Kudos

Hi,

I'm working on PI 7.0.

I send a file to the adapter like this:

123~4

567~8

i have the following parameters

nameA.fieldSeparator: ~

nameA.fieldNames: text1,text2,text3,text4

nameA.endSeparator: nl

ignoreRecordsetName: true

If i leave out the endSeparator the xml message in the integration looks exactly the same.

Question:

what parameters should i use to properly use endSeparator? (say for instance i want to use # as endSeparator)?

Should i change the fieldnames string?

I'm asking because the file might have empty fields and it comes in the integration engine wrong if the last field is empty.

Please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can use any thing as you want

if endSeparator = newline, then

nameA.endSeparator = 'nl'

nameA.fieldSeparator =~

nameA.fieldNames = field1,field2,field3,field4

if endSeparator = #, then

nameA.endSeparator = #

nameA.fieldSeparator =~

nameA.fieldNames = field1,field2,field3,field4

No need to change the fieldnames.

Former Member
0 Kudos

Hi,

I know i can use anything string as endSeparator. Say i use #.

Now my file was like

123~4

Using the end separator # it will look like

123~4#

Correct?

Whatever setting i tried sofar the #-sign always ends up in the XML, i.e 4#

What i want to happen is that the system recognizes the # as end of line and gives me a 4 in the message, instead of 4#.

Former Member
0 Kudos

Hi,

It gives 4 only instead of 4#, because this # is the end separator, based on the # only it knows the row is over here so it takes the new row from that.

Former Member
0 Kudos

Hi Venkataramesh,

What you describe is what should be happening and what i expected, based on the help file from SAP.

What really happens though is that the # sign ends up in the XML.

The problem i have is that if i start leaving fields out form the file i send in

(i might send 1~3 instead of 123~4) the XML message in the integration engine is missing a tag.

The last one to be precise.

Hi Gabriel,

This also happens if I use the solution that you propose (using the fromConfiguration)

So i'm afraid my problem is still not solved.

Former Member
0 Kudos

write '0x23' for # as endSeparator.

Edited by: Mugdha Kulkarni on May 21, 2008 11:02 AM

Former Member
0 Kudos

Hi,

I tried the hexadecimal notation but it still gives the same result: if i put # after the last column, the # sign gets in the xml message.

Still no definitive answer i'm afraid.

Former Member
0 Kudos

Check these two parameters.

Use the following parameters if you want to influence the behavior of the conversion routine for inbound structures that deviate from the configuration.

1. NameA.missingLastfields

If the inbound structure has less fields than specified in the configuration then the XML outbound structure is created as follows:

○ ignore

Outbound structure only contains the fields in the inbound structure

○ add

Outbound structure contains all fields from the configuration; the fields missing in the inbound structure are empty.

○ error

Conversion is terminated due to the incomplete inbound structure. An error message is displayed.

2. NameA.additionalLastFields

If the inbound structure has more fields than specified in the configuration then the XML outbound structure is created as follows:

○ ignore

Outbound structure only contains the fields in the inbound structure

○ error

Conversion is terminated due to the incomplete inbound structure. An error message is displayed.

The default value is ignore. If you have defined the NameA.fieldFixedLengths parameter, the default value is error.

If you have defined the NameA.fieldFixedLengths parameter and do not set either of the parameters described above, apart from the default values, the conversion routine works the same as described under Handling Structure Deviations.

Only once you set one of the two parameters will the other parameter be evaluated with its default value.

To ensure a well-defined runtime behavior for variable inbound structures, we recommend that you always set both parameters.

Former Member
0 Kudos

Using the end separator # it will look like

123~4#

is your file looks like

1234#5678#....

if so then your endseperator will work.

Gaurav Jain

Former Member
0 Kudos

Hi Deepthi,

Thx, but again it does not work as you say, and as SAP says in the helpfile.

I'll ask the admin guy if maybe there is something msising form the installation or something.

And i'll also try this out on a different system, but that might take a while to implement.

Unless anybody else has a new approach i will not spend much more time on this in the next week or so.

Thx all for trying to help.

GabrielSagaya
Active Contributor
0 Kudos

nameA.fieldSeparator =~

nameA.endSeparator ='nl'

nameA.fieldNames =text1,text2,text3,text4

nameA.processFieldNames fromConfiguration

nameA.lastFieldsOptional Yes

nameA.missingLastFields Add

nameA.additionalLastFields ignore

ignoreRecordsetName: true