cancel
Showing results for 
Search instead for 
Did you mean: 

EDI to Flatfile Conversion

Former Member
0 Kudos

Hi all!

I am new in SAP XI. And i am researching on how will I convert EDI (SLSRPT) to a flatfile. Can everybody advise me on how will I handle this?

I can convert EDI to XML using Seeburger Adapter, and from XML, I will convert it to Flatfile. The conversion will take place in SAP XI. Can i use graphical mapping for this one?

Kindly advise.

Thank you!

Fred

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI All!

SAP experts, need your advise..

I have here an XML that can be converted into csv flatfile,

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

- <ns0:MT_SLSRPTFlat xmlns:ns0="http://pg.com/xi/tom/connect/edi">

- <SLI>

<PERIO>20080112</PERIO>

<EAN>737052056760</EAN>

<ILN>4327926000003</ILN>

<SALES>1</SALES>

<TURNO>12.9</TURNO>

<PERFL>W</PERFL>

<SUBSFL>X</SUBSFL>

<SALUN>ST</SALUN>

<CURRENCY>EUR</CURRENCY>

<STOCK>0000000000</STOCK>

<STOUN>ST</STOUN>

</SLI>

- <SLI>

<PERIO>20080112</PERIO>

<EAN>737052056852</EAN>

<ILN>4330599000003</ILN>

<SALES>4</SALES>

<TURNO>41.8</TURNO>

<PERFL>W</PERFL>

<SUBSFL>X</SUBSFL>

<SALUN>ST</SALUN>

<CURRENCY>EUR</CURRENCY>

<STOCK>0000000000</STOCK>

<STOUN>ST</STOUN>

</SLI>

- <SLI>

<PERIO>20080112</PERIO>

<EAN>737052057101</EAN>

<ILN>4331275000003</ILN>

<SALES>1</SALES>

<TURNO>12.9</TURNO>

<PERFL>W</PERFL>

<SUBSFL>X</SUBSFL>

<SALUN>ST</SALUN>

<CURRENCY>EUR</CURRENCY>

<STOCK>0000000000</STOCK>

<STOUN>ST</STOUN>

</SLI>

The expected output flatfile should look like this, (with fixed field lengths)

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

20080112;737052056760 ;4327926000003; 1; 12.90;W;X;ST ;EUR;0000000000;ST ;

20080112;737052056852 ;4327926000003; 4; 41.80;W;X;ST ;EUR;0000000000;ST ;

20080112;737052057101 ;4327926000003; 1; 12.90;W;X;ST ;EUR;0000000000;ST ;

What do i need to configure in the Integration Directory?

Is it only Receiver File Adapter with File Content Conversion?

What is the specific parameters do i need to configure on the file adapter?

Please advise.

Thank you very much!

Fred

justin_santhanam
Active Contributor
0 Kudos

Fred,

You need to configure only Receiver File adapter with Content Conversion. Please give the below parameters, I tested it's working fine as per your reqmt.

Recordset Structure SLI

SLI.addHeaderLine 3

SLI.headerLine PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

SLI.fieldSeparator ;

SLI.endSeparator 'nl'

Hope it helps!

raj.

Former Member
0 Kudos

Hi Raj!

Thanks fot the information.

May i ask how did you test it?

Have you obtained the .csv file?

Kindly advise.

Thank you!

Fred

justin_santhanam
Active Contributor
0 Kudos

Yes,

I created the scenario and tested it. I got the output as what u expected.

raj.

Former Member
0 Kudos

Hi!

i've encountered discrepancies on my output.

Instead of one .csv file, i've produced many files, in which, one file consists of one line.

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

20080112;737052056760 ;4327926000003; 1; 12.90;W;X;ST ;EUR;0000000000;ST ;

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

20080112;737052056852 ;4327926000003; 4; 41.80;W;X;ST ;EUR;0000000000;ST ;

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

20080112;737052057101 ;4327926000003; 1; 12.90;W;X;ST ;EUR;0000000000;ST ;

The output should be one file, containing all lines.

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

20080112;737052056760 ;4327926000003; 1; 12.90;W;X;ST ;EUR;0000000000;ST ;

20080112;737052056852 ;4327926000003; 4; 41.80;W;X;ST ;EUR;0000000000;ST ;

20080112;737052057101 ;4327926000003; 1; 12.90;W;X;ST ;EUR;0000000000;ST ;

Kindly advise if whether there are changes in configurations that i should made.

Thank you!

justin_santhanam
Active Contributor
0 Kudos

Fred,

Here is my source and target files.

Source

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

<ns0:MT_EDI xmlns:ns0="urn:hdmc:samplescenarios">

<Test>

<SLI>

<PERIO>20080112</PERIO>

<EAN>737052056760</EAN>

<ILN>4327926000003</ILN>

<SALES>1</SALES>

<TURNO>12.9</TURNO>

<PERFL>W</PERFL>

<SUBSFL>X</SUBSFL>

<SALUN>ST</SALUN>

<CURRENCY>EUR</CURRENCY>

<STOCK>0000000000</STOCK>

<STOUN>ST</STOUN>

</SLI>

<SLI>

<PERIO>20080112</PERIO>

<EAN>737052056852</EAN>

<ILN>4330599000003</ILN>

<SALES>4</SALES>

<TURNO>41.8</TURNO>

<PERFL>W</PERFL>

<SUBSFL>X</SUBSFL>

<SALUN>ST</SALUN>

<CURRENCY>EUR</CURRENCY>

<STOCK>0000000000</STOCK>

<STOUN>ST</STOUN>

</SLI>

<SLI>

<PERIO>20080112</PERIO>

<EAN>737052057101</EAN>

<ILN>4331275000003</ILN>

<SALES>1</SALES>

<TURNO>12.9</TURNO>

<PERFL>W</PERFL>

<SUBSFL>X</SUBSFL>

<SALUN>ST</SALUN>

<CURRENCY>EUR</CURRENCY>

<STOCK>0000000000</STOCK>

<STOUN>ST</STOUN>

</SLI>

</Test>

</ns0:MT_EDI>

Target

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR

20080112;737052056760;4327926000003;1;12.9;W;X;ST;EUR;0000000000;ST

20080112;737052056852;4330599000003;4;41.8;W;X;ST;EUR;0000000000;ST

20080112;737052057101;4331275000003;1;12.9;W;X;ST;EUR;0000000000;ST

After comparing my source and your source strcuture, the only difference is, I have one more root element in my source. Can u bring all your SLI's into other node as my source?

raj.

Former Member
0 Kudos

Hi Raj,

Thank you for your reply.

SO, you mean, i should add root element on my source?

SO that, all of my SLI's are placed on that root?

Thanks!

Fred

justin_santhanam
Active Contributor
0 Kudos

Fred,

SLI's must come under root. Just look at my source structure, I have Test as the root node. Similarly have some root element and keep all the SLI's under the root.

raj.

Former Member
0 Kudos

ok, do i need to change my configurations on the Content Conversion Parameters?

Including the root element?

Recordset Structure: Test

Test.addHeaderLine : etc..

justin_santhanam
Active Contributor
0 Kudos

Fred,

No need to change any configurations. Change the source structure alone!

raj.

ravi_raman2
Active Contributor
0 Kudos

Fred,

Yes ..seeburger ..right way to go.

As for the Sequence you are right. pretty straight...........

EDI to XML(xsd supplied by seeburger), XML to flatfile or html direct using graphical mapping or ...xslt...to html

Regards

Ravi Raman

Former Member
0 Kudos

Hi everyone!

Thanks for the information.

Basically, this is my scenario.

I have an EDI (slsrpt and desadv) which is to be converted to a flatfile. The flatfile is a <.csv>

The sample output flatfile was indicated below:

PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR;ARKTX

20071020;737052020198 ;4333342000008; 1; 9.95;W;X;ST ;EUR;0000000000;ST ;

20071020;737052056852 ;4333342000008; 1; 14.50;W;X;ST ;EUR;0000000000;ST ;

Can you advise what is the step by step procedure on how will I start the configurations in SAP XI? (e.g. in Integration Repository and Integration Builder)

Thank you for your support!

I'll appreciate it.

Fred

Edited by: Fred Lampa on Jan 7, 2008 5:53 AM

Former Member
0 Kudos

Hi Fred Lampa,

As I said You need to follow the steps which is specified by me in the first response. Have you done all of them.

1)Also you have not told me which adapter you are going to use whether its AS2,X400 etc so that is the question mark for me?

2) You have not explained whether u r haveing seeburger BIC tools and std mapping ?

3) Do you have std mapping with you? and have u deployed on XI server.

You have not read all my thread response which I told you to read it has all the configuration steps mentioned for the adapter module tab which is required to convert the EDI-XML and XML-EDI format I suggest you read first.

Let me clear with all of my doubts so that I can understand what you have done till now and which will help me in giving the better solutions.

As far as file concern it is CSV file so you need to use the file content conversion at the file receiver channel.

Follow the below weblog:

Receiver FCC no need of Endseparator

/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

Receiver-

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

Thnx

Chriag

Reward Points to helpful answers.

Former Member
0 Kudos

Hi Chirag!

Thank you for your continuos informaton.

I am going to use AS2 adapter.

I have Seeburger BIC mapping tool that will convert an edi to xml. Also, i have the std mapping for my message type.

Also, I already created a mapping in Intergration Repository.

I think the next step is to configure the Integration Directory.

How will I do this?

What will be my next step?

Thank you for your continued advise.

I appreciate it a lot.

Fred

Former Member
0 Kudos

Hi,

How are you getting the data to XI over the WAN?

Configuration which has to be done:

We need to give the AS2ID in the party identifier tab,AS2ID that is entered here will be used for identifying the sender and receiver of the document.

1)The value of the Agency field must be Seeburger.

2)The value of the Schema field must be AS2ID.

Every partner is assigned the WAN no which is provided by the WAN service provider. That WAn no we need to configure in the party identifier tab.

Under the party identifiere tab

Agency will be seeburger

Scheme=AS2ID

Name = WAN network no of the partner who is sending the file

Few changes in the module parameter tab.

localejbs/CallBicXIRaBean bic

CallSapAdapter 0

Module configuration:

bic= destSourceMsg = MainDocument

bic= destTargetMsg = MainDocument

bic= mappingName= See_E2X_EDIFACT_ORDERS_UN_D93A

Receiver end I have told you to go for FCC if its file adapter.

Thnx

Chirag

Former Member
0 Kudos

Hi Chirag!

Data will come from GXS van to Seeburger AS2 adapter of XI.

GXS van ---> Seeburger AS2 Adapter

Kindly advise.

Thank you!

Fred

Former Member
0 Kudos

Hi Fred Lampa,

Ok got it...is WAN no is provided by the WAN provider for every partner.

Then you just have to follow the configuration which is told by me in my previous response.

If you would like to test the scenario then you can test it using the simple file adapter and put the same configuration in file adapter module tab and put the EDI file on diretory.

Thnx

Chirag.

Former Member
0 Kudos

Hi everyone!

I would like to know if SAP XI has the capability to directly post EDI orders in SAP R/3 wherein IDocs are placed. If yes, how? (Please describe the process in detail)

In normal EDI implementation (AI, 3rd party translator used), batchjobs are created to be able to post EDI orders. The AI/3rd party translator are sending the IDocs after conversion from customer format order file to the specified UNIX directory in SAP and batchjobs will post these as EDI orders that can be viewed in WE02/WE05.

In SAP XI direct connection case, all IDocs received are automatically posted in SAP R/3 without having a batchjob executing this. However, orders are not successfully posted as there is an *authorization issue*** (user/system/technology posting EDI orders are not allowed to create an EDI order) so we need to determine which user/system/technology are executing the job (posting of IDocs to an EDI order).

Please advise. Thank you very much!

Fred

Former Member
0 Kudos

Hi,

For the same requirement you need to follow the below steps:

1) First deploye the Std seeburger mapping provided by see burger on XI

2) If you are using the AS2 adapter then you have to install the AS2 server on XI server.

3) Once you install the std seeburger on SAP XI server you will see the AS2,X400,OFTPS,VAN adapter on XI ID.

5) You need to call the std mapping in the adapter module which does the conversion from EDI to XML and XML to EDI.

If you wanted to know more about seebuger and the configuration then refer the below breif into about seeburger and the reply to many of my threads.

Seeburger adapters like OFTPS,AS2,X400 are used for B2B scenario where the file is coming through WAn network or mailbox. As XI dont have capability to convert the EDIFACT format file to XML the same work will be done by seeburger adapters.

The SEEBURGER Business Integration Converter (BIC) is an any-to-any format converter, used to translate EDI data and legacy data formats into XML and vice versa. It can also be used for complex, high performance XML-to-XML mappings or to interface to existing JDBC data sources.

Supported EDI formats include:

• ANSI

• EDIFACT

• INHOUSE

• IDOC

• XML Schema

• XML DTD

• CSV

• Delimited Data

• positional data

• SWIFT

• EANCOM

and many more.

See for converting the EDI XML to EDI and XML-EDI you need to have a seeburger mapping program at the adapter module which does the conversion. For this module you need a BIC tool of seeburger which provides the different module program for EDI to XML and XML-EDI. This program needs to be deployed on XI and through adapter it has to be called for conversion.

Refer this forum which is replied by me which talka about the configuration which need to be done for AS2 adapter. This is very helpful:

Seeburger info:

AS2 info:

/people/bla.suranyi/blog/2006/06/08/sap-xi-supports-edifact

/people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield

/people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield

http://www.stylusstudio.com/edi/XML_to_X12.html

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b0b355ae-0501-0010-3b83-8f2...

/people/bla.suranyi/blog/2006/06/08/sap-xi-supports-edifact

http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf

http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf

http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf

http://www.seeburger.com

http://www.seeburger.com/fileadmin/com/pdf/AS2_General_Overview.pdf

http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf

http://www.seeburger.com/fileadmin/com/pdf/SEEBURGER_SAP_Adapter_engl.pdf

http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf

http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf

http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt

http://www.sap.com/asia/company/events/nwtechdays/presentation/australia-slides/Pre-Built_Integratio...

http://www.seeburger.com

http://www.seeburger.it/fileadmin/it/pdf/2005_04_sapphire_Ferrero_transcript.pdf

http://www.seeburger.com/fileadmin/com/pdf/Butler_Group_SEEBURGER_Technology_Audit.pdf

http://www.sap.com/france/company/events/2006/02-01-Automotive-Seeburger.pdf

http://h41123.www4.hp.com/presentations/ISUG/XISeeBurger.ppt

Thnx

Chirag

Reward points if it helps.