cancel
Showing results for 
Search instead for 
Did you mean: 

Processing length specific file in XI

Former Member
0 Kudos

Hi All,

Is it possible to process lenghth specific file in XI.

Can any one gives some idea how to do that.

If I have a very big file like this and want to test mapping by taking that file as input.

Is it possible or do we need to convert that file into XML format and need to test it..

Regards,

venu.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

<b>XI understands only XML</b> content and so, no matter what info you pass to XI, <b>it has to be in the XML format</b>.

If your file contains the source in any format other than XML format, then <b>content conversion will have to be performed by your File adapter</b>.

For info on how content conversion is done in file adapter, I would suggest that you go through these blogs and links,

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

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

Hope this helps,

Regards,

Bhavesh

Hope this helps,

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I'm very thank full to u.

I have gone through the 1818 venkats blog it was very good but i got following doubts in processing this scenario.

1)I uderstood H1 is header one time(1) , sub1 and sub2 are repeating items many times(*) .In that case the generated file is diffrent from the file example he's given

I think i need to give different file right?

2)Could u guide me how to do data type design for this scenario.

Regards,

venu.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

If you want to try a file content conversion , I would suggest that you go through this link on SAP help first.

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

Though a bit theorotical, it will explain in detail the File COntent Conversion process.

The Document Name is used to speicfy the name of the Message that is to be created. This is mandatory.

Recordset name is optional and is used to provide more struture to your document.

KEy Field name is used to specify tyhe field that undiquely identify ever record.

Like wise, the end separator is 'nl' to specify that a NEW LINE is to be used as the separator between records.

In the case of the blog by Venkat, the source datatype that you will have to create will have to be of the format that his final XML output shows.

DO let me know if you need any other input.

Regards,

Bhavesh

PS Do award points for useful answers

Former Member
0 Kudos

Hi Bhavesh,

Do I need file content conversion in receiver file adapter also?(File-to_file)

Regards,

venu.

Former Member
0 Kudos

Hi Venu,

Though the question was to Bhavesh, i thought i will just answer it.

You need file content conversion at the receiver file adapter end only if you want to convert the XML file into text file.

Regards,

abhy

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

Just to add to what Abhy had told.

XI undersatnds and generates only XML messages.

So, if your input file is a text file, then content conversion is performed on your sender File Adapter.

Also, if you want your output file to be in a text file, then as XI will produce the output in XML format, you will have to perform content conversion in your receiver file adapter. But, if you want your output to be in a XML format, then content conversion is not needed.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh/Abhy,

Thank u veru much for both of u.

I'm trying to execute venkats varying structure file.

I'm executing .dat file

Sender adapter recors structure i have given H1,1,sub1,*,sub2, *

receiver adapter side i have given H1,sub1,su2 only.

Both adapters are running fine but the errro is execution failed.

file is not been created at receiver system

I have a doubt whether I'm doing any wrong on receiver adapter side.

Regards,

venu

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

<i>//I'm executing .dat file</i>

The extension of your file does not matter. Only the content in it matters.

Can you go into your RWB and ADAPTER MONITORING and tell us the status of your sender and receiver file adapter. Are they in green or red?? If in red, what error are they showing.

Next, go to SXMB_MONI and check whether your file is picked and also, check the incoming payload. Has it been changed into XML strucute that is expected.

Using this info, the error that you are facing can be traced out.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Venu,

In the receiver system if the file has to be created you have to specify how the fields has to be seperated.

if u mention the field seperator as semi colon then in the output file the fields will be seperated by semicolon.

tell me if you have any problem with the creation of file,since i have done a similar scenario i can help u out.

Former Member
0 Kudos

Hi Bavesh/Balakrishnan,

Thank u both of u.

Sender Adaper and Receiver adaper are in green color.

Error in SXMB_MONI.Saying runtime exception.

General doubt not on above scenario.

....................................

Is there any restriction on size of file processing for XI, means any performance issue , bcz i need to tell business people not give more than the particular size

Regards,

venu

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

In your SXMB_MONI, can you check these things,

1. Incoming payload -- Can you check if the incoming payload has been changed in the XML format that you wanted it to be after content conversion in the File Adapter.

2. Likewise, can you check the output of your mapping and see if it is in the way you expected.

I think one reason for your exception maybe because the source XML does not match with the Source Data Type that you have defined.

<i>Is there any restriction on size of file processing for XI, means any performance issue , bcz i need to tell business people not give more than the particular size</i>

I am not sure about this, but will try to find out and get back to you.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bavesh,

Incoming payload is as what i expected..

but the the errror in incoming payload is

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

If u don't mind can u pls clarify the diffrence among the following things in mapping

Insert subelement

Insert Attribute

Insert rows

So that i can check weather i have done correct or not

Following structure i'm maintaining for the file

"V00",10,"venu",144857,77,29

"A11","ARC",240904,20050,9

"A12","ARC",12345,990,9

"A27","Va2440094"

ns:FILEINPUTCSV xmlns:ns="urn://f1send">

- <FILEINPUTCSV>

- <H1>

<F1>"V00"</F1>

<F2>10</F2>

<F3>"venu"</F3>

<F4>144857</F4>

<F5>77</F5>

<F6>29</F6>

</H1>

- <sub1>

<S11>"A11"</S11>

<S12>"ARC"</S12>

<S13>240904</S13>

<S14>20050</S14>

<S15>9</S15>

</sub1>

- <sub2>

<S21>"A27"</S21>

<S22>"Va2440094"</S22>

</sub2>

</FILEINPUTCSV>

</ns:FILEINPUTCSV>

Can u suggest based on this..

Regards,

venu.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

Consider,

<b><src>

<a action = "attribute">

<b> </b>

<c> </c>

</a>

</src></b>

<b>Insert Subelement :</b>

This is used when you want to add a child node.Used when you want to add the element b from a.

<b>Insert Element.</b>This is used to add a sibling node. used when you want to add the element c from the element b.

<b>Insert Attribute</b>

For a, action is an attribute.

Also,

in the source that you have given,

"V00",10,"venu",144857,77,29

"A11","ARC",240904,20050,9

"A12","ARC",12345,990,9

"A27","Va2440094"

<b>The 2nd and 3 rd row should be

"A11","ARC",240904,20050,9

"A11","ARC",12345,990,9</b>

The first field is the key field that wil identify that all these belong to the same row / level and they should be the same.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bavesh,

Still I'm getting runtime exception in mapping transfermation.

-


Following is the file

"V00",10,"venu",144857,77,29

"A11","ARC",240904,20050,9

"A12","ARC",12345,990,9

"A27","Va2440094"

-


Following is the payload in SXMB_MONI view

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

- <ns:FILEINPUTCSV xmlns:ns="urn://f1send">

- <Root>

- <H1>

<F1>"V00"</F1>

<F2>10</F2>

<F3>"venu"</F3>

<F4>144857</F4>

<F5>77</F5>

<F6>29</F6>

</H1>

- <sub1>

<KF>"A11"</KF>

<S12>"ARC"</S12>

<S13>240904</S13>

<S14>20050</S14>

<S15>9</S15>

</sub1>

- <sub2>

<KF>"A12"</KF>

<S22>"ARC"</S22>

<S23>12345</S23>

<S24>990</S24>

<S25>9</S25>

</sub2>

- <sub3>

<KF>"A27"</KF>

<S32>"Va2440094"</S32>

</sub3>

</Root>

</ns:FILEINPUTCSV>

..........................................................

Following is the error in SXMB_MONI

<?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>Application</SAP:Category>

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

<SAP:P1>com/sap/xi/tf/_FILE_TO_FILE_CSV_</SAP:P1>

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

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>During the application mapping com/sap/xi/tf/_FILE_TO_FILE_CSV_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

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

</SAP:Error>

........................................................

Following is the Adapter configuration

Document Name FILEINPUTCSV

DocumentNamespace urn://f1send

Recordsetname Root

Recordsetstructure H1,1,sub1,,sub2,,sub3,*

Recordsets per msg *

Key Field name KF

H1.fieldNames F1,F2,F3,F4,F5,F6

H1.fieldSeparator ,

H1.endSeparator 'nl'

H1.processFieldNames fromConfiguration

sub1.fieldNames KF,S12,S13,S14,S15

sub1.fieldSeparator ,

sub1.endSeperator 'nl'

sub1.processFieldNames fromConfiguration

sub2.fieldNames KF,S22,S23,S24,S25

sub2.fieldSeparator ,

sub2.endSeparator 'nl'

sub2.processFieldNames fromConfiguration

sub3.fieldNames KF,S32

sub3.fieldSeparator ,

sub3.endSeparator 'nl'

sub3.processFieldNames fromConfiguration

H1.keyFieldValue "V00"

sub1.keyFieldValue "A11"

sub2.keyFieldValue "A12"

sub3.keyFieldValue "A27"

Exactly where I'm doing.

Do we need to check any service pack updates..If that case how to check whate exactly need to check and where I need to check. In system status I'm not getting all components updation like Adapters, Integration servers..etc

Regards,

venu.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

Can you do one thing. Can you just do content conversion your sender file adapter and in the receiver file adapter no content conversion and see if your output file is generated in the XML format. if this is working, then we can isolate the problem to your Receiver Content Conversion.

Next, can you check your Source DataType that you have created against the XML after conversion that is created. Are the namespace and structure matching.

I think these 2 steps can help us trace the error out.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bavesh,

In this File-to-File scenario, above menttioned is the content conversion related to sender file adapter.

I have cross checked according ur suggestion that Source data type and XML after conversion that is created is the same name space also showing correctly.

I have read one XI document related to file adapter, in that they have mentioned "Due to an 'issue' within XI structure creation the execution of mapping program fails with a runtime exception,even if it seems that source structure is OK. this is caused by message type prefix(ns).this should be fixed in Sp04(Feature pack) , what is it could u tell me how can I find whether my basis guys fixed this are not.

Regards,

venu

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

I am not sure about this issue. It would be better if you do a service market place note search on this.

Which SP are you on??

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bavesh,

what basis guys are saying XI3.0 sp09 is more than XI2.0 sp14.I'm not convinced with it.Is it right argument?

Once they told we have installed sp14, now saying sp09 xi3.0 for all components.

How to search this in the system , which component is having which service pack.

Regards,

venu.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

From your XI home PAge, go tyo Administration And you will find the Software Build Information for your Directory, Repositoy and Runtime. In that you will also find the SP your XI is on.

Regards,

Bhavesh

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

There is nothing like maximum size of a file..You need to upgrade your java heap size accordingly and there are specific notes in service market place for doing XI settings to process huge files.If you are having GB size files etc..then you might need to scale your hardware accordingly or you can use abap mapping instead of java mapping as it drastically increases performance and doesnot give stack overflow in mapping runtime.

Former Member
0 Kudos

Hi Venu,

While doing content conversion you have to mention the field names in header of data type: fieldNames. Hence if the key field is not present it will throw an error in adapter monitoring, FIELD NOT FOUND.

To make note mapping cannot be performed with a flat file as XI understands only XML. Hence content conversion required.

Please go thru these links for step by step procedure to do the same:

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

This blog will clearly explain how to create the data type for this scenario.

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

I hope I have answered your query.

Regards,

Abhy

former_member91687
Active Contributor
0 Kudos

Hi Venu,

If you have a text dociment in which you have the information, this can be processed in XI by converting into XML format. This can be implemented by choosing "file content conversion" in your sender communication channel, where you would have chosen file adapter. Depending on the format of the text document you have various parameters available which you can use to recognise ans hence convert your flat file to an XML structure. To know how this can be achieved go through this link which gives all the necessary details.

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm

If you want the ouput back as a flat file this too can be achieved by converting back from your XML structure to the format you desire.

Regards,

Chandra