cancel
Showing results for 
Search instead for 
Did you mean: 

File Content conversion - IDOC to Fixed length File

Former Member
0 Kudos

Hi,

Scenario : SAP R/3(IDOC) -> XI -> Fixed Length file

IDOC is sending from SAP R/3, XI has to do the mapping and send a Fixed length File to /tmp in XI.

When I am using the message Protocol as "File" in the Receiver communication channel, XML file is writing to /tmp. When I am using "File Content Conversion" as a message protocol,Empty File is writing. Can anybody tell me why empty file is creating. Can we use File content Conversion in this scenario. Is there any additional parameter or settings required?

Receiver communication channel settings:

Message Protocol: File Content Conversion

File type : Binary

Recordstructure : MT_V_PER01

Name Value

-


MT_V_PER01.fieldFixedLengths 25,35

MT_V_PER01.fieldNames PERSNR,NAME

File Data Type : DT_V_PER01,

Message type : MT_V_PER01

IDOC type : WP_PER01.

Expecting your expert advice.

Thanks

vineesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vineesh,

I would suggest not to use fieldFixedLengths. You Better check for the length of the String in the mapping itself and assign proper value to the nodes. Then in the File Content Conversion use MT_V_PER01.fieldSeparator as '0'. Mostly This will solve your problem.

Regards,

Sundar.

Former Member
0 Kudos

Hi Moorthy,Sundar,

I've tried the options, but still I am getting an empty file. I am using XI/PI7.0. As per the SAP documentation "File Content Conversion" Parameter is used to convert an XML file to a text file.

In this case convert an IDOC to a text file. Do I need to use ABAP Mapping program.

Any one has tried to convert an IDOC to text file without using the ABAP mapping program. Is it possible to convert an IDOC to text file by using "File Content Conversion". Please let me know your advice.

Thanks

Vineesh

moorthy
Active Contributor
0 Kudos

Yes, it is possible. If you don't have mapping now, introduce message mapping with source structure as Idoc and Target Structure as Flat File Structure. to make it easier. It is not required to have ABAP mapping. I.e You can use any of these mappings-

1) Message Mappign Graphical

2) Java Mapping

3) XSLT Mapping

4) ABAP Mapping.

SOmetimes it is not required to use mapping , it depends on the requirements.

For know about content-

http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

also-

/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

Regards,

Moorthy

Former Member
0 Kudos

Hi Vineesh,

Could you please post your Target Message Structure and the Payload which comes after Mapping (you could get it from Moni in Request Message Mapping Step.).

Regards,

Sundar

Former Member
0 Kudos

Hi Moorthy, sundar

I have solved the Problem. I didn't maintain substructure in the Data type. Now it is working fine.

Previously

DT_V_PER01

PERSNR element xsd:string 1

NAME element xsd:string 1

Now changed to

DT_V_PER01

DT_WPP01 element DT_WPP01

PERSNR element xsd:string 1

NAME element xsd:string 1

Thank you very much for your help!

Thanks

vineesh

moorthy
Active Contributor
0 Kudos

HI,

You can use File Content Conversion for this,.

It is generating empty file, may be because of file content conversion error . SO first check RWB->MEssage Montioring->Message Display Tool ->Audit Log ..check this.

I think problem with content conversion. IT will guide you to analyse the error.

Normally in the file content conversion for fixed field lengths, problem is you need to pass all the fields with actual lengths as mentioned in the datatype. If you don;t have value for some fields still you need to pass that many empty spaces...

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

I am getting success messages in Audit log as below:

2006-09-29 12:08:53 Success Trying to put the message into the send queue.

2006-09-29 12:08:53 Success Message successfully put into the queue.

2006-09-29 12:08:53 Success The message was successfully retrieved from the send queue.

2006-09-29 12:08:53 Success The message status set to DLNG.

2006-09-29 12:08:53 Success The message was successfully transmitted to endpoint http://nslcxi08:8010/sap/xi/engine?type=entry using connection AFW.

2006-09-29 12:08:53 Success The message status set to DLVD.

2006-09-29 12:08:53 Success The message was successfully delivered.

I have checked the Payload maindocument,the IDOC structure contains data.

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

- <WP_PER01>

- <IDOC BEGIN="1">

- <EDI_DC40 SEGMENT="1">

........

<IDOCTYP>WP_PER01</IDOCTYP>

<MESTYP>WP_PER</MESTYP>

<STDMES>WP_PER</STDMES>

<SNDPOR>SAPLCD</SNDPOR>

<SNDPRT>LS</SNDPRT>

<SNDPRN>LCDCLNT210</SNDPRN>

<RCVPOR>LXDCLNT250</RCVPOR>

<RCVPRT>LS</RCVPRT>

<RCVPRN>LXDCLNT250</RCVPRN>

</EDI_DC40>

- <E1WPP01 SEGMENT="1">

......

<PERSNR>0000100006</PERSNR>

- <E1WPP02 SEGMENT="1">

<NAME>Consumer</NAME>

</E1WPP02>

</E1WPP01>

</IDOC>

</WP_PER01>

Thanks

Vineesh

moorthy
Active Contributor
0 Kudos

If it is success in the message monitoring , you can check the RWB->Adapter Monitoring and respective file communication channel, But it will also give you success as it is creating a zero byte file.

Check the log from Visual Admin.

Also restarting the Adapter engine may help you ..

Regards,

moorthy