on 08-24-2009 6:57 AM
Hi,
I have a scenarion in which i need to process even the empty file also.
So whenever the file is empty i need to create a empty file in destination also.
So i have already set the Processing mode to -->Process empty files.
The file will be picked up successfilly even if it is a empty also but during runtime at mapping it will throw an error
<SAP:P1>No interface determination found for outbound interface urn://ISUToTallyman.financialDetails_OB: Error while determining root tag of XML: BOM / charset detection failed</SAP:P1>
Did any1 went through the same problem?If yes Please suggest how...
Thanks & Regards,
Babu
SOLVED
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SOLVED
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think this is because of mandatory fields in your mapping...You can use mapWith Default function wherever there is a mandatory field.
regards,
Ramya Shenoy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
- Bypassing the IR/ESR is the option to eliminate this error, since your source message dosn't have any payload, mapping will trigger the exception, as far i know the option we have is to bypass the IR/ESR and use the DUMMY interface in case of empty files.
Regards,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Use Constant or Map with Default
Constant will always give the value to the target filed .
MapwithDefault will map the default value once the source field doesn't have value
Regards,
Jude
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
- Since you enable the option 'process enpty files' you can able to pick the empty files.
- In mapping if the source structure ( your root is of 0 occurence) is empty, then map the target field with constant value, as you need to do this in order to avoid the runtime exception in mapping and at receiver side use FCC as mentioned below.
For Eg:- Root(0..1)
filed1..
Root.filedSeparater-'0'
Root.endSeparator-'0'.
- The other option to process empty files is to byprass the Designing/IR part and configure with DUMMY interface.
Regards,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is there any mandatory field in your mapping?
Regards,
Sumit Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swarup,
When the source file is empty,you will get an empty inputstream in mapping.
When the input stream in mapping is empty or null... then it will throw an exception called Premature end of file.
I tried with what you guys told but still the same error i am getting.
If the source is not empty (i.e. atleast a single blank in the source side) then the mapping works fine with mapWithDefaultValue..
but the source is not coming so..
*Hi swarup my source and target have same structure..
*<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:financialDetails xmlns:ns1="urn://ISUToTallyman"> (0..unbounded)
<Records> (0..unbounded)
<Header>(0..unbounded)
<BatchDate/>
<TotalRecords/>
<CreditAmount/>
<DebitAmount/>
</Header>
<Records1>(0..unbounded)
<PrimaryKey/>
<ContrAccntNumber/>
<ElectricContractReference/>
<GasContractReference/>
<PostingDate/>
<DocumentNumber/>
<DocumentType/>
<DocumentDesc/>
<DocumentAmnt/>
<MainTransaction/>
<SubTransaction/>
<DocumentDueDate/>
<ClearingDocumentNumber/>
<ClearingReason/>
<ClearingAmnt/>
<ClearingDate/>
</Records1>
</Records>
</ns1:financialDetails>
</ns0:Message1>
</ns0:Messages>
I think when the source is empty(no contents at all then)the mapping will throw the error definetly..
Edited by: hlbabu123 on Aug 24, 2009 11:23 AM
Edited by: hlbabu123 on Aug 24, 2009 11:23 AM
i am getting the error
14:52:27 Start of test
Premature end of file. com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file. at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:253) at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:79) Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:251) ... 1 more Root Cause: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:251) at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:79) Premature end of file.
14:52:27 End of test
Hi,
Here in case of empty file the existing mapping will not work. You need to verify according to the condition in Receiver determination (something like Root != ' ') if this is true then divart it to receiver system and the related interface determination will get call.
Else process the file with bypass to mapping.
Create another Business Component and follow the steps mentioned in the blog
/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
Thanks
Swarup
Hi,
check this link it will help you http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
this helps in handling the empty files with 0 bytes.
Thanx
Sampath
HI
You need to remove some of the ns tag like
this <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">..
this </ns0:Message1>
this </ns0:Messages>
and this <ns0:Message1>
so you have to put your file as below filled data and tags only then upload as below . try with this
*<?xml version="1.0" encoding="UTF-8"?>
<ns0:financialDetails xmlns:ns0="urn://ISUToTallyman"> (0..unbounded)
<Records> (0..unbounded)
<Header>(0..unbounded)
<BatchDate/>
<TotalRecords/>
<CreditAmount/>
<DebitAmount/>
</Header>
<Records1>(0..unbounded)
<PrimaryKey/>
<ContrAccntNumber/>
<ElectricContractReference/>
<GasContractReference/>
<PostingDate/>
<DocumentNumber/>
<DocumentType/>
<DocumentDesc/>
<DocumentAmnt/>
<MainTransaction/>
<SubTransaction/>
<DocumentDueDate/>
<ClearingDocumentNumber/>
<ClearingReason/>
<ClearingAmnt/>
<ClearingDate/>
</Records1>
</Records>
</ns0:financialDetails>
Regards,
Sumit Gupta
Hi all
The Problem is when the source file is empty then the mapping will throw,
Unable to execute. Source document is empty
So i think there should be atleast some content in the source even some blank atleast.. If not it will throw the exception..
Is there some way in which we can insert some payload for the source externally if it is blank....
I tried with all options mentioned above still i couldn't fix it...
Hello,
Is there some way in which we can insert some payload for the source externally if it is blank....
I have two options that might resolve this issue along with the one i mentioned in my previouse post
1)using the module PayloadSwapBean, to replace the payload in source file at sender CC
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
2) Using custom adapter module and configure it at sender CC. In module check the payload size or content and replece it with the default payload, in case the payload id empty.
Regards,
Prasanna
Hi,
Why dont you try this:
Let the sender channel create an empty file. Now in the interface determination check for the condition: (SourceFileSize = 0). If this is the case, you do not select any mapping, else you select the mapping that you need.
Hope it helps.
Thanks and Regards,
Sanjeev Shekhar Singh.
Hi,
You had provided the FCC parameters and when empty file will be processed, the FCC conversion will not get any value to under XMl tags. And missing XML tags will create the exception.
In mapping handle the absence of field (XMl field tags) with api mapWithDefault and then try.
thanks
Swarup
Edited by: Swarup Sawant on Aug 24, 2009 8:07 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.