cancel
Showing results for 
Search instead for 
Did you mean: 

How to ignore the empty file using Receiver file adapter with Coma separato

Former Member
0 Kudos

Hi,

I am trying to create the .csv file at the receiver but when there is no data I wan to ignore the file even I do not want to create the file with comma also (I just went and check in my file system created with commas)

Source1 -> T1

T1

-> S1

->Field1

-> Field2

Because I am using receiver side FCC populating with empty node

Based on condition T1 is populating when condition fails I am populating target T1 and structure elements are mapped with constant.

Ex: Target payload when condition failed below data is populating ..

In this I want to ignore creating the file.

<T1>

<S1>

<Field1/>

<Field2/>

</S1>

</T1>

Here Is the my content conversion parameters,

S1.fieldNames - Field1,Field2

S1.fieldSeparator - ,

S1.endSeprator u2013 u2018nlu2019

I used processing tab u2018Ignoreu2019 option id did not worked. Appreciate your help.

Regards,

Venu.

Accepted Solutions (0)

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Venu,

Can you try not to populate the message at the mapping level? If you do that in the mapping level then you won't be creating a file.

Thanks!

Former Member
0 Kudos

I tried that way using Root node T1 level I added the mapping condition then I am getting the communication channel level error 'Unknow structure' lik that...becuase I am using FCC with field separator definitely it will expect the all the Structure and fileds.

justin_santhanam
Active Contributor
0 Kudos

Venu,

So you are saying you went to Signature(7.1) or Messages(7.0/3.0) in the Message mapping and changed the occurrences of the message to 0..1 - correct?

If you haven't done that- then you have to do it. You shouldn't be doing it on the root node, instead after changing the occurrences you have to apply the logic.

Hope it make sense. Give a try and let us know if it works.

Thanks!

Former Member
0 Kudos

Hi Raj,

I went my receiver mapping signature tab I chagned occurance from 1 to 0..1

then my mapping got lossed now message type level I put the condition. When my condition not satisfy I am not creatin gthe target node itself.(I mean here message type) Messages ->message1 only is creating..

but in SXMB_MONI below error I am getting..

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

- <!-- Request Message Mapping

-->

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

<SAP:Category>XIServer</SAP:Category>

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

<SAP:P1>Split mapping created no messages</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:Stack>Split mapping created no messages</SAP:Stack>

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

</SAP:Error>

Thanks for your response.

Regards,

Venu.

Former Member
0 Kudos

and I have chagned Operation mapping also occurance 1 to 0..1 ..becuase I am using PI 7.1

Former Member
0 Kudos

hi raj,

I just added the condition Root node level instead of putting condition at message type level then it went message succesfully from sxmb_moni.

but when we go the File communication channael level below error I am getting..

Adapter Framework caught exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)'

when there is no payload how do we get success status receiver file communication channel.

Regards,

Venu.

Former Member
0 Kudos

Hi,

Copy ur payload from the SXMB_MONI and test in operation mapping.

In operation mapping, even if u r nt creating target message based on some condition... still the Messages,Message1 elements should appear.

Check if it is coming or not.

If it is coming then again do once end to end testing.

Let us know the result.

Babu.

Former Member
0 Kudos

Hi Babu,

I just checked it's creating the Messages,Message1 interface mapping. and I am creating the message type under Message1 other wise Split mapping error is throwing. but I am not creating the my Rood node then SXMB_MONI success but communcation chennel is throwing unknow structure...this I want to element

...

I am looking how do we igonre the file when the condition is not satisfied Root node using Receiver FCC.

Thanks,

Venu.

Former Member
0 Kudos

Hi Venu,

Repeat the node one more time in MM and map it to constant. => This will always generate a target mapping.

So, when you filter the regular messages in MM ( as you did earlier where CC reported error mesg ), this constant will always generate a empty mesg, which will be filtered out in the condition that you set in receiver CC ( empty mesg - Ignore ).

In regular cases where there is target message created out of multi MM, the empty mesg will be ignored and rest will be sent as usual.

So you should be able to bypass the error mesg. Try this and let us know if that works ..

Also check following for more information.

Venkat.

Former Member
0 Kudos

I tried that only my problem is I am createing the file with comma. I do not want create even File because traget I am creating only message type root node I am not createing.

Right now I am in PI 7.1 and SP -7 and I am thinnking need to go for new Suppot pack then empty file hadling will support. When Root node is not createin that means should not effiect the Commcuniation channel but it's effecting the communication channel..ok if I populate the empty constant then file with creating comma ..if any body PI 7.1 and SP more then 7 they can confirm ....