cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to flat file

Former Member
0 Kudos

Hi Experts,

i have scenario were i need to convert the standard IDOC into a flat file how shall i go

which is the best mapping pls provide me with the inputs its urg

regards

Metha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey,

You can import the Idoc in Xi

Create a structure for file

and use graphical mapping to map the Idoc structure with the file structure.

Steps fro ALE settings.

Steps for ALE settings:-

Steps for XI

Step 1)

Goto SM59.

Create new RFC destination of type 3(Abap connection).

Give a suitable name and description.

Give the Ip address of the R3 system.

Give the system number.

Give the gateway host name and gateway service (3300 + system number).

Go to the logon security tab.

Give the lang, client, username and password.

Test connection and remote logon.

Step 2)

Goto IDX1.

Create a new port.

Give the port name.

Give the client number for the R3 system.

Select the created Rfc Destination.

Step 3)

Goto IDX2

Create a new Meta data.

Give the Idoc type.

Select the created port.

Steps for R3.

Step 1)

Goto SM59.

Create new RFC destination of type 3(Abap connection).

Give a suitable name and description.

Give the Ip address of the XI system.

Give the system number.

Give the gateway host name and gateway service (3300 + system number).

Go to the logon security tab.

Give the lang, client, username and password.

Test connection and remote logon.

Step 2)

Goto WE21.

Create a port under transactional RFC.(R3->XI)

Designate the RFC destination created in prev step.

Step 3)

Goto SALE.

Basic settings->Logical Systems->Define logical system.

Create two logical systems(one for XI and the other for R3)

Basic settings->Logical Systems->Assign logical system.

Assign the R3 logical system to respective client.

Step 4)

Goto WE20.

Partner type LS.

Create two partner profile(one for XI the other for R3).

Give the outbound or inbound message type based on the direction.

Step 5)

Goto WE19

Give the basic type and execute.

fill in the required fields.

Goto IDOC->edit control records.

Give the following values.(Receiver port,partner no.,part type and sender Partner no. and type)

Click outbound processing.

Step 6)

Go to SM58

if there are any messages then there is some error in execution.

Goto WE02.

Check the status of the IDOC.

Goto WE47.

TO decode the status code.

Step 7)

Not mandatory.

Goto BD64.

Click on Create model view.

Add message type.

BD87 to check the status of IDOC.

In case if not authorized then go to the target system and check in SU53, see for the missing object

and assign it to the user.

SAP r3

sm59(status check)(no message)

WE02(status check)

WE05(status check)

BD87(status check)

WE42 process code

WE47 status info.

regards ,

Milan

Answers (9)

Answers (9)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

in most cases you cannot use message mapping to map IDOC to flat file

there is however a very easy to way to do it using abap mapping:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc...

in case you have some other IDOC - XI related questions please have a look at:

http://www.sap-press.com/product.cfm?account=&product=H1935

Regards,

michal

Former Member
0 Kudos

hi all,

thank you all who helped to resolve my issue

regards

Metha

Former Member
0 Kudos

Hi,

Use graphical mapping for the transformation and inorder to write a flat file at the receiver end, use the File Content Conversion feature available with File Adapter.

Regards

Shailesh

Former Member
0 Kudos

Hi metha sunil ,

The following r excellent websites containing PDF & PPT docs which will answer u'r question in detail along with screen-shots:

A Step-by-Step Guide on IDoc-to-File Using Business Service in the XI Integration Directory

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e07dcaa0-a92b-2a10-3a96-b3d942bd...

How to convert an IDoc-XML structure to a flat file and vice-versa in XI 3.0

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1...

Introduction to IDoc-XI-File scenario and complete walk through for starters.

IDOCs (Multiple Types) Collection in BPM

Former Member
0 Kudos

Hi,

The best mapping is Graphical mapping u have to inport the IDOC in IR under Imported Objects and in Mpping u have to inport the IDOC and the structure which u have created for file=

map them.

In Graphical u can also write business login with the ehlp of UDF.

New functions in the Graphical Mapping Tool SP13

The Use of "suppress" in the XI 3.0 Graphical Mapping Tool

Regards,

Phani

Former Member
0 Kudos

Hi,

Use graphical mapping.

Check this blog. It explains clearly.

Former Member
0 Kudos

hi metha sunil

The mapping you have to use depends upon the target reciver structure.Mostly we go for graphical mapping by making use of the standard functions

go thru the steps given in below blog:

Refer

File To IDOC - Part1 (SLD and Design):

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC&

File To IDOC - Part2 (Configuration):

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part2+(Configuration)&

File To IDOC - Part3 (Steps required in XI and R3):

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part3(StepsrequiredinXIandR3)&

regards

kummari

Edited by: kummari on Jul 23, 2008 7:07 AM

Edited by: kummari on Jul 23, 2008 7:09 AM

Former Member
0 Kudos

Hi Sunil,

plz search the forum you should get loads of info in this regard.

to begin with,

go thru

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sapR3%28Idocs%29ToXI--Steps+Summarized&

thanks,

latika.

Former Member
0 Kudos

you can use Message Mapping...

Do ALE Setting in Sender R/3 System and in SAP XI System.

*Sender R/3*

Create Logical System using BD 64.

Create Partner Profile

Create RFC Destination

Creater TRfc Port

SAP XI

Create RFC Destination

Create Port(IDX1)

Create IDoc Metadata (IDX2)

do the Design and Configuration in SAP XI.