cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP FCC Field Fixed Length error: NullPointerException

0 Kudos

Hi Experts,

Scenario: SFTP FCC to IDOC

Version: SAP PI 7.4 single stack

We have an issue in File Content Conversion in SFTP adapter.

The commands we used is:

<node>.fieldFixedLengths

<node>.endSeparator

<node>.fieldNames

<node>.keyFieldValue

ignoreRecordsetName   --  true

The error is as shown in below image

Please do the needful.

Regards,

Sunitha

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

check the input file whether it is per FCC and has valid data in it.

0 Kudos

Hello Raghu,

Yes, the input file satisfies FCC.

Let me know do we need to use MTB here?

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

You need to use MTB if you have flat file to convert to XML.

Can you post the screenshot of MTB in the channel.

0 Kudos

Input File:

I17193809052016

A  V100288220160509B4           00000000458597      458597

B  V10028822016050901015004016       0000000000010015044006    20191231

A  V100288320160509B4           00000000429078      429123

B  V10028832016050903015003675       00000000000050PM15531     20181231

A  V100288420160509B1           00000000000734      000734

B  V1002884201605090201601327        0000100000000016GD022A02  20190228

B  V10028842016050903050066398       0000200000000015GD095B01  20181031

A  V100288520160509B1           00000000466635      466635

B  V10028852016050902050066406       0000020000000016GD007A04  20190131

.

.

.

A  V100291420160509B1           00000000537768      537769

B  V1002914201605090201679737        0000060000000015GS636A    20181130

F17193809052016

No modifications made in Modules tab.

former_member186851
Active Contributor
0 Kudos

FCC screenshots plz

0 Kudos
former_member186851
Active Contributor
0 Kudos

Try changing the Key field type to non case sensitive and check

0 Kudos

Same error Raghu.

DATA TYPE stucture:

The RecordType is coming only in HeaderLines and OrderLines. Do that RecordType has to come in HeaderFile and FooterFile also?

As the Key field name I gave as RecordType and in the commands only

HeaderLines.keyFieldValue               A

OrderLines.keyFieldValue                  B

In the input file, HeaderFile starts with I and Footer with F.

And let me know regarding MTB is that mandatory in SAP PO 7.4 version also?

Please do the needfull.

Regards,

Sunitha

manoj_khavatkopp
Active Contributor
0 Kudos

there is no need of MTB , FCC is sufficient here

please post complete FCC screenshots.

Add new filed RecordType in header and footer line and do the required changes in FCC

former_member186851
Active Contributor
0 Kudos

Yes Sunitha.

RecordType should be added as it is keyfield to identify the section.

and MTB is not requried as you already have FCC as per Manoj Suggestion.

0 Kudos

Hi Manoj/Raghu,

I have added the RecordType in DT and changed the FCC.

Now, the file is picking but the only HeaderFile and FooterFile are getting converted. HeaderLines and OrderLines are not converted to XML.

Please help with your inputs.

Regards,

Sunitha

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

What is the orderset sequence parameter configured in FCC?

manoj_khavatkopp
Active Contributor
0 Kudos

please paste the complete FCC screenshot

0 Kudos

Hi Raghu,

Is the sequence order mandatory here? If yes, i will rearrange the order.

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

I am telling about the recorset sequence,try with variable and see if its working.

manoj_khavatkopp
Active Contributor
0 Kudos

for headerlines and orderline you have key filedvalue as  A and B but in lenght for RecordType you have mentioned as 3 .

So either change the length to 1 or in keyfieldvalue add 2 spaces after you key value A  (2blank spaces after A) do the samefor B

0 Kudos

After changing it to "variable" , it is converting only Footer that too with random data

<?xml version="1.0" encoding="utf-8"?>

<ns:MT_OutboundDeliveryConfirmation xmlns:ns="http://guerbet-group.com/pi/LS/OTC/3PL_DHL/OutboundDeliveryConfirmation">

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>ooterF</FileFooterCode>

  <FooterDate>ile.keyF</FooterDate>

  </FooterFile>

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>ooterF</FileFooterCode>

  <FooterDate>ile.fiel</FooterDate>

  </FooterFile>

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>FSTAHe</FileFooterCode>

  <FooterDate>ader.fie</FooterDate>

  </FooterFile>

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>ooterF</FileFooterCode>

  <FooterDate>ile.fiel</FooterDate>

  </FooterFile>

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>ooterF</FileFooterCode>

  <FooterDate>ile.endS</FooterDate>

  </FooterFile>

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>ooterF</FileFooterCode>

  <FooterDate>ile.keyF</FooterDate>

  </FooterFile>

  <FooterFile>

0 Kudos

Yes Manoj, I have tried that by adding 2 spaces afer A and B in command lines, then it is coming as error like javException: error in line 4(before HeaderLines)

former_member186851
Active Contributor
0 Kudos

Did you change the length as per Manojs comment?

0 Kudos

Yes, i have added the spaces after A and B. then the error is:

Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation(line no 4 missing structure() before type HeaderLines)

former_member186851
Active Contributor
0 Kudos

Instead of adding spaces why dont you change the lenght to 1 as it is going to be 1 only.

Guess this will make it work.

manoj_khavatkopp
Active Contributor
0 Kudos

in your input file the 4 line which has data like 000.......100105 this line comes under which structure ?? if its headerline only then there is inconsistency between ur fcc and inputfe cross check this

0 Kudos

I have changed the Adapter to FILE(nfs) and used FCC for test purpose, with all above mentioned changes and also changed the Record set Sequence to "Variable", this has gone success.

<HeaderFile>

  <RecordType>I</RecordType>

  <FileHeaderCode>091150</FileHeaderCode>

  <HeaderDate>20160831</HeaderDate>

  </HeaderFile>

  <HeaderLines>

  <RecordType>A</RecordType>

  <WarehouseCode>V1</WarehouseCode>

  <DeliveryNoteNumber>800023</DeliveryNoteNumber>

  <Date>20160831</Date>

  <DeliveryNoteType>ZALF</DeliveryNoteType>

  <BillToCode>1000030</BillToCode>

  <ShipToCode>100003</ShipToCode>

  </HeaderLines>

  <OrderLines>

  <RecordType>B</RecordType>

  <WarehouseCode>V1</WarehouseCode>

  <DeliveryNoteNumber>800023</DeliveryNoteNumber>

  <Date>31082016</Date>

  <DeliveryNoteLine>010</DeliveryNoteLine>

  <ProductCode>11482</ProductCode>

  <QuantitySold>0000001</QuantitySold>

  <QuantityFree>0000000</QuantityFree>

  <BatchNumber>0000003549</BatchNumber>

  <ExpiryDate>20170314</ExpiryDate>

  </OrderLines>

  <HeaderLines>

  <RecordType>A</RecordType>

  <WarehouseCode>V1</WarehouseCode>

  <DeliveryNoteNumber>800023</DeliveryNoteNumber>

  <Date>20160831</Date>

  <DeliveryNoteType>ZALF</DeliveryNoteType>

  <BillToCode>1000030</BillToCode>

  <ShipToCode>100003</ShipToCode>

  </HeaderLines>

  <OrderLines>

  <RecordType>B</RecordType>

  <WarehouseCode>V1</WarehouseCode>

  <DeliveryNoteNumber>800023</DeliveryNoteNumber>

  <Date>31082016</Date>

  <DeliveryNoteLine>010</DeliveryNoteLine>

  <ProductCode>11482</ProductCode>

  <QuantitySold>0000001</QuantitySold>

  <QuantityFree>0000000</QuantityFree>

  <BatchNumber>0000003549</BatchNumber>

  <ExpiryDate>20170314</ExpiryDate>

  </OrderLines>

  <OrderLines>

  <RecordType>B</RecordType>

  <WarehouseCode>V1</WarehouseCode>

  <DeliveryNoteNumber>800023</DeliveryNoteNumber>

  <Date>31082016</Date>

  <DeliveryNoteLine>010</DeliveryNoteLine>

  <ProductCode>11482</ProductCode>

  <QuantitySold>0000000</QuantitySold>

  <QuantityFree>0000001</QuantityFree>

  <BatchNumber>0000003549</BatchNumber>

  <ExpiryDate>20170314</ExpiryDate>

  </OrderLines>

  <FooterFile>

  <RecordType>F</RecordType>

  <FileFooterCode>091150</FileFooterCode>

  <FooterDate>20160831</FooterDate>

  </FooterFile>

former_member186851
Active Contributor
0 Kudos

So the same is not working in SFTP?

0 Kudos

Yes Raghu,

In SFTP, Recordset Sequence option is missing

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

Guess that is the problem.

Try with MTB and see if its working.remove FCC completely.

0 Kudos

In FCC also, If we use the spaces after A and B in FCC command lines(this should be done as per clients requirement), the flat file is getting converted to XML but there is an IDOC parsing error like below:

Error before sending due to idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: An IDocConversionException occurred while parsing IDoc-XML for type <DELVRY03>:
state=READING_FIELD_VALUE_TAG, charPosition=915, lineNumber=1, columnNumber=916


Any clue?


Please help with your inputs.


Regards,

Sunitha

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

This is an error in IDOC XML,check the value at the mentioned position.

manoj_khavatkopp
Active Contributor
0 Kudos

I wonder why recordset sequence is missing i guess its because you are using low SP ?

and the above error is due to data issue due to which it is failing in IDOC_AAE channel , however to ignore data issue in PI trying adding additional parameter FieldValidationEnabled=false in reciever idoc channel. once done try resending new message.

former_member186851
Active Contributor
0 Kudos

Should we suggest her raise a OSS note Manoj?

Even if the SP is low this is a basic functionality right

manoj_khavatkopp
Active Contributor
0 Kudos

Raghu,

Not sure if this parameter is avilable with latest SP or not ?? beacuse intially MTB was the only option to have content conversion with SFTP adapter and with latest SP of SFTP they included FCC as part of message protocol .

First need to check if this is missing in latest SP , if yes the. can raise OSS so that SAP can consider to bring this parameter with the next release.

Br,

Manoj

0 Kudos

For this sceanrio, If I use SFTP(FCC) with same settings as FILE(nfs) the NullPointerException is encountered.

Exception received: java.lang.NullPointerException


Is this exception is due to Recordset Sequence parameter is missing in SFTP FCC?


Our SAP PI system details:

Service Pack 12

Release NW731EXT_17_REL


Do I need to raise an OSS note?


Please let me know with your valuable inputs.

Message was edited by: Sunitha Bai

former_member186851
Active Contributor
0 Kudos

Hello Sunitha,

Can you please try with MTB once.

manoj_khavatkopp
Active Contributor
0 Kudos

Before Concluding that this error is due to the missing parameter can you please try with below file as input with SFTP adapter FCC only.

I17193809052016

A  V100288220160509B4           00000000458597      458597

B  V10028822016050901015004016       0000000000010015044006    20191231

F17193809052016

If this is due to the missing parameter then as suggested you may go for MTB , but just wanted to inform you that their is no parameter in MTB to remove recordset as you have in FCC (ignoreRecordsetName   --  true) this is the only negative point for MTB. But however there are few workaround by which you can handle this.

For All MTB Parameters refer :

To handle RecordSet :

  • Change your data type such that the recordset is present.
  • You can create XSLT mapping to remove recordset deploy in your PI server then call that using one more MTB.

                 For more info check: http://scn.sap.com/message/16919854#16919854                                                           

  • Write a java mapping to remove recordset and call this java as the first mapping in your operation mapping .

Personally i would prefer the second option for deploying XSLT mapping which is quite easy and can be reused whenever you are using MTB.

If possible can you raise OSS note for the parameter in FCC lets hope SAP comes out with some suggestion to handle this in FCC.

Br,

Manoj

Answers (0)