cancel
Showing results for 
Search instead for 
Did you mean: 

Getting payload is empty error

former_member593220
Participant
0 Kudos

Hi Experts,

Apologies for raising same kind of same question like existing blogs..!

I have gone through all most all the posts similar to this issue, but not able to find out root cause for my issue.

PI is picking the .txt file from FTP, but in MONI it is getting fail by throughing  the below error message.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Request Message Mapping

  -->

- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Category>Application</SAP:Category>

  <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

  <SAP:P1>com/sap/xi/tf/_MM_EQUIPMENT_HOURS_RECORDING_LEGAC~</SAP:P1>

  <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>

  <SAP:P3>Premature end of file.</SAP:P3>

  <SAP:P4 />

  <SAP:AdditionalText />

  <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_EQUIPMENT_HOURS_RECORDING_LEGAC~; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Premature end of file.</SAP:Stack>

  <SAP:Retry>M</SAP:Retry>

  </SAP:Error>

Am using FCC parameters in Sender File adapter. Below are the parameters which am using in FCC tab

Recordset Name: Equipment_time

Recordset Structure : Header,1,Item,*

Recordset Sequence : Ascending

Keyfield name: key

Keyfield type : String (case sensitive)

Header.fieldFixedLenghts :  8,8,50,4

Header.endSeparator   : 'nl'

Header.fieldSeparator  : ,

Header.fieldSeparator : Document_Date,Posting_Date,Document_Text,Controlling_Area

Header.keyFieldValue  : 1

Header.keyFieldInStructure : ignore

Item.fieldFixedLengths  : 10,15,5,15,3,50,10,6,10,10,8,24

Item.endSeparator  : 'nl'

Item.fieldSeparator  : ,

Item.fieldNames: Cost_Element,Amount,Currency,Quantity,Unit,LineItem_Text,Cost_Center_Sender,Internal_Order_Sender,WBS_Element_Sender,Cost_Center_Receiver,Internal_Order_Receiver,WBS_Element_Receiver

Item.keyFieldValue  : 2

Item.keyFieldInStructure  : ignore

Below is the .txt file which am using for testing

20140123,20140125,V,4354

Fr2312,12345,INR,234564,veo,ForFR,France,34354,Hello,798797,veol,PolandVeo

Could any body please tell me what could be the reason for this issue.?

Thanks in advance..!

--

Warm Regards

Raj

Accepted Solutions (1)

Accepted Solutions (1)

Muniyappan
Active Contributor
0 Kudos

Hi Raj,

Can  you please remove below entries in FCC and check?


Header.fieldFixedLenghts :  8,8,50,4

Item.fieldFixedLengths  : 10,15,5,15,3,50,10,6,10,10,8,24


Regards,

Muni

former_member593220
Participant
0 Kudos

Hi Botha & Muni,

Still am getting the same error, I couldn't able to see the payload in MONI. I have tried by removing the FieldLengths parameters from FCC also..

Any other way to test it further..?

Thank you.!

--

With Warm Regards

Raj

Muniyappan
Active Contributor
0 Kudos

can you please paste the Data type structure here?

Former Member
0 Kudos

Hi Raj,

Put your keyfield value as first field in your file. Try below entries in your FCC

Header.endSeparator : 'nl'

Header.fieldSeparator : ,

Header.fieldNames : Header,Document_Date,Posting_Date,Document_Text,Controlling_Area

Header.keyFieldValue : 1

Header.keyFieldInStructure : add

Item.endSeparator : 'nl'

Item.fieldSeparator : Item,Cost_Element,Amount,Currency,Quantity,Unit,LineItem_Text,Cost_Center_Sender,Internal_Order_Sender,WBS_Element_Sender,Cost_Center_Receiver,Internal_Order_Receiver,WBS_Element_Receiver

Item.keyFieldValue : 2

Item.keyFieldInStructure : add

File:

1,20140123,20140125,V,4354

2,Fr2312,12345,INR,234564,veo,ForFR,France,34354,Hello,798797,veol,PolandVeo

This will convert your FCC to below XML structure:

If you don't need <Header> and <Item> field, don't map those fields in your mapping.If you want to use fixedfield length check this link SAPTechnical.COM - File Content Conversion

Regards,

Praveen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Raj,

I think, your picking up the file from FTP location where sender system is not yet completed writing the file, please us the option in File sender channel -  Advanced  - "MSecs  to wait Before Modification Check " as 1000 Sec.

It might help you.


former_member593220
Participant
0 Kudos

Hi Praveen,

Thank a lot for your time..!

Below is my source structure for which am using FCC parameters.

Can you suggest me, can't we do the parameters without using below 2 parameters.?

Header.keyFieldValue : 1

Header.keyFieldInStructure : add

Item.keyFieldValue : 2

Item.keyFieldInStructure : add

For instance, my file is like..

20140123,20140125,V,4354

Fr2312,12345,INR,234564,veo,ForFR,France,34354,Hello,798797,veol,PolandVeo

Fr2413,67890,USD,345678,veo,ForGR,Germany,4645,Hello,987651,veol,USVeo

Thank you.!

--

With Warm Regards

Raj

Muniyappan
Active Contributor
0 Kudos

this is a mismatch between your FCC and your Message type(DT).

in the Data type under Item you have field Employee_Number but in the FCC it is missing.

can you please make sure that DT/MT and FCC has same fields?

Former Member
0 Kudos

Hi Raj,

I'm afraid it's not possible without using keyfield value for Header,1,Item,* structure. Please check below links

Regards,

Praveen

former_member593220
Participant
0 Kudos

Hi Praveen & Muni,

Thanks for your inputs, I will try in the same way. And let you people know the test result..

Thank you.!

--

With Warm Regards

Raj

former_member593220
Participant
0 Kudos

Hi Praveen,

I have tested interface by using below FCC parameters

Header.endSeparator : 'nl'

Header.fieldSeparator : ;

Header.fieldNames : Header,Document_Date,Posting_Date,Document_Text,Controlling_Area

Header.keyFieldValue : 1

Header.keyFieldInStructure : ignore

Item.endSeparator : 'nl'

Item.fieldSeparator : Item,Cost_Element,Amount,Currency,Quantity,Unit,LineItem_Text,Employee_Number,Cost_Center_Sender,Internal_Order_Sender,WBS_Element_Sender,Cost_Center_Receiver,Internal_Order_Receiver,WBS_Element_Receiver

Item.keyFieldValue : 2

Item.keyFieldInStructure : ignore

But still am getting the same issue saying that..

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Request Message Mapping

  -->

- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Category>Application</SAP:Category>

  <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

  <SAP:P1>com/sap/xi/tf/_MM_EQUIPMENT_HOURS_RECORDING_LEGAC~</SAP:P1>

  <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>

  <SAP:P3>Premature end of file.</SAP:P3>

  <SAP:P4 />

  <SAP:AdditionalText />

  <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_EQUIPMENT_HOURS_RECORDING_LEGAC~; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Premature end of file.</SAP:Stack>

  <SAP:Retry>M</SAP:Retry>

  </SAP:Error>

Can you please guide me with this..?

--

With Warm Regards

Raj

former_member593220
Participant
0 Kudos

Hi Praveen,

Tested this interface successfully.. The reason for the issue is I didn't included the Header and Item key values in FCC parameters.

After including these parameters the message processed by IS.

Thanks a lot for your support..!

Awarded with Points..!

--

With Warm Regards

Raj

Former Member
0 Kudos

Hi Raj,

Have a look at the links below. Suggest having a look at them.

It might be that the content convertion you are doing is incorrect.

Regards,

Jannus Botha