cancel
Showing results for 
Search instead for 
Did you mean: 

Data in payload out of sequence

Former Member
0 Kudos

Hi,

I have 10 fields between source and target but only 7 are mapped so other fields are optional and will need to be mapped later when necessary. Right now, the fields in the payloads are getting populated out of sequence. Meaning, if first field is 10 character and the data in the file for first first field is only coming with 7 chars, then the first field is taking additional 3 chars from the next field column in the data file. In the file adapter, I have simple configuration with Fields.fieldNames, Fields.lastFieldsOptional, Fields.fieldFixedLengths and Fields.fieldSeparator. How can I correct this? Do I need to make changes in the content conversion? Should I change the min-max length in data type or in the file adapter?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If your data is of fixed length then use Fields.fieldFixedLengths only. Do not use Fields.fieldSeparator with it.

Secondly cross check in FCC if you have given the field names in same sequence as they are in your data type.

As a final step refresh the cache and then try again.

Regards,

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

I have given already Fields.fieldFixedLengths and I'm not using Fields.fieldSeparator. I have given all the fields as they are in the data type but not all fields are coming in with data as some fields are optional. Also, The very first field is 10 chars but only 7 chars are coming in so the payload is populating with the 10 chars which are part of the next field in sequence. I hope I am explaining it clearly.

Thanks,

Former Member
0 Kudos

Actually in your question you mentioned that you are using both fixed length and fiedSeparator that's why I said so..

This kind of problem happens due to very small mistakes which some times become difficult to point out. What I can suggest you

1. Make sure all objects are active in IR & ID

2. Debug your mapping fields and see the queue if you are getting the full length in mapping itself.

3. Refresh the cache because may be before your fixed length was different and lately you changed it.

4. Make sure CC is active with latest changes.

All above mentioned points are very small but it is worth to check them again.

Former Member
0 Kudos

Hi,

Thanks for your reply. It is correct that I am using fieldNames, fieldFixedLengths, fieldSeparator and lastFieldsOptional. These are the only parameters I am using. When I removed lastFieldsOptional parameter, I am getting error in the adapter and the problem of out of sequence is still there. I checked all the data types and mapping. They are simply one-to-one mapping with all fields mapped.

Former Member
0 Kudos

> Thanks for your reply. It is correct that I am using fieldNames, fieldFixedLengths, fieldSeparator and lastFieldsOptional.

As I said before, if you have fixed length values then don't use fieldSeparator coz it has no meaning when you are using fieldFixedLengths.

Basically you need to provide..

xml.fieldNames

xml.fieldFixedLengths

xml.endSeparator = 'nl'

xml.fixedFieldTooShortHandling = Cut or ignore (see below mentioned link for more info)

Replace "xml" with your segment names.

http://help.sap.com/saphelp_nw04/helpdata/EN/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

http://help.sap.com/saphelp_nw04/helpdata/EN/d2/bab440c97f3716e10000000a155106/content.htm

Go thorough these links to know more options of FCC.

Former Member
0 Kudos

Hi Sarvesh,

Thank you for your kind advise. I got it working somehow now. I used fieldNames and fieldSeparator and now the data is populating but not all fields are coming in payloads. Please let me know how to correct this.

Thanks,

Sangita

deepak_shah
Contributor
0 Kudos

Hi

check whether the corresponding source field are occuring in source struct for the target which are not coming.

You mentioned that some of the fields are not being used. so are these fields that are not coming in sources

you can simply map the unused fields to empty constant for them to occur in tagert..

- Deepak.

Former Member
0 Kudos

Hi,

From source, some fields are not coming in with data and in target, I have mapped some unused fields to empty constants but still all fields are not coming in the xml structure of payloads.

Thanks.

Former Member
0 Kudos

Hi,

Just one thing, that either you are going to use all fields or some fields from source in your mapping but while picking the data you have to mention all the field names in FCC.

So please make sure if you are mentioning all the field names in the FCC.

Regards,

Sarvesh

Former Member
0 Kudos

I have all fields in the FCC and have these parameters: name.fieldNames (all field names), name.fieldSeparator and name.endSeparator still don't see all the fileds in xml.

Former Member
0 Kudos

Provide your full source structure with occurrence.

Former Member
0 Kudos

Hi,

Thank you for your help and advice. Here is the structure and occurrences of source structure. The target structure is same as the source structure except that field 3 and field 7 are not sending any data so I have mapped constants in the target fields.

FieldNames_DT Complex Type null

Names1 Element 1 false

Fields Element 1 false

Field1 Element xsd:string 0..1 false minLength="0"; maxLength="5"

Field2 Element xsd:date 0..1 false

Field3 Element xsd:string 0..1 false minLength="0"; maxLength="4"

Field4 Element xsd:string 0..1 false minLength="0"; maxLength="4"

Field5 Element xsd:decimal 0..1 false totalDigits="10"; fractionDigits="2"

Field6 Element xsd:string 0..1 false minLength="0"; maxLength="10"

Field7 Element xsd:string 0..1 false minLength="0"; maxLength="8"

Field8 Element xsd:string 0..1 false minLength="0"; maxLength="2"

Field9 Element xsd:string 0..1 false minLength="0"; maxLength="1"

Field10 Element xsd:string 0..1 false minLength="0"; maxLength="2"

Former Member
0 Kudos

Can you tell me what is

Names1 Element 1 false

Fields Element 1 false

Secondly provide the source XML structure. I mean I want to see the hierarchy level. For example

<MT_test>

<Records>

Field1

Field2

.

.

.

</Records>

</MT_test>

Former Member
0 Kudos

The structure is very simple and all mappings are 1:1 but sometimes some fields does not send data and sometimes they do. Below is the structure.

<MT_Source>

<Record>

<Rows>

Field1

Field2

Field3

Field4

Field5

Field6

Field7

Field8

Field9

Field10

</Rows>

</Record>

<MT_Target>

<Record>

<Rows>

Field1

Field2

Field3

Field4

Field5

Field6

Field7

Field8

Field9

Field10

</Rows>

</Record>

Thanks

Former Member
0 Kudos

Yes, structure is pretty simple. I would suggest you to delete the Communication Channel activate the changes and then recreate it. This could be cache issue.

Secondly make sure in your source text file all fields are coming with valid data.

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

There is no cache issue as cache was refreshed and checked several times, also as I mentioned, sometimes not all fields send data and sometimes they do.

Thanks,

Sangita

Answers (0)