cancel
Showing results for 
Search instead for 
Did you mean: 

I have an idoc i want to convert this data to XML how?

Former Member
0 Kudos

I have an idoc i want to convert this data to XML how?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey,

You mean to say IDOC data or IDOC structure..

IF its the IDOC structure..just import that into your IR imporetd objects and drag into ur message mapping editor..and there see the SRC(source code) this will give you the XML structure of your IDOC..

Thanks,

Vijaya.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Check the following FM:-

IDOCS_OUTPUT_IN_XML_FORMAT

IDX_IDOC_TO_XML

IDOC_XML_DISPLAY

IDOC_XML_TRANSFORM

TABLEFRAME_IDOC_XML1

TABLEPROC_IDOC_XML1

Thanks

Vikranth

Former Member
0 Kudos

Hi,

Follow the procedure

*IDOC to XML Convertion using ALE Interface*

*1)* Send an outbound IDOC data(MATMAS) to a flat file(XML) on client1(SENDER).

  • Create File Port (WE21) of XML Type for outbound file.

  • Specify the Physical directory and file under the Outbound File tab

  • Maintain Distribution Model (BD64) for sender ->receiver system.

  • Create Partner Profile (WE20) for logical system.

  • You can use this program RBDSEMAT (t/code BD10) to generate IDoc MATMAS file(s).

_ Then you can FTP the file(s) to receiver system.

*2)* Upload the flat file as an IDOC on the inbound sytem

which is Client2(RECIEVER).

  • Create File Port (WE21) for inbound file.

  • Maintain Distribution Model (BD64) for receiver -> sender system.

  • Create Partner Profile (WE20) for logical system.

  • You can use this program RSEINB00 to upload IDoc MATMAS file(s).

A sample scenario for idoc generation

Sending System(Outbound ALE Process)

Tcode SALE ? for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 ? Create Model View

Tcode BD82 ? Generate partner Profiles & Create Ports

Tcode BD64 ? Distribute the Model view

Message Type MATMAS

Tcode BD10 ? Send Material Data

Tcode WE05 ? Idoc List for watching any Errors

Receiving System(Inbound ALE )

Tcode SALE ? for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 ? Check for Model view whether it has distributed or not

Tcode BD82 -- Generate partner Profiles & Create Ports

Tcode BD11 Getting Material Data

Tcode WE05 ? Idoc List for inbound status codes

ALE IDOC Steps

Sending System(Outbound ALE Process)

Tcode SALE ?3 for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 !V Create Model View

Tcode BD82 !V Generate partner Profiles & Create Ports

Tcode BD64 !V Distribute the Model view

This is Receiving system Settings

Receiving System(Inbound ALE )

Tcode SALE ?3 for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 !V Check for Model view whether it has distributed or not

Tcode BD82 -- Generate partner Profiles & Create Ports

Tcode BD11 Getting Material Data

Tcode WE05 !V Idoc List for inbound status codes

Message Type MATMAS

Tcode BD10 !V Send Material Data

Tcode WE05 !V Idoc List for watching any Errors

STEP 1)a Goto Tcode SALE

Click on Sending & Receiving Systems-->Select Logical Systems

Here Define Logical Systems---> Click on Execute Button

go for new entries

-System Name : ERP000

-Description : Sending System

-System Name : ERP800

-Description : Receiving System

press Enter & Save

it will ask Request

if you want new request create new Request orpress continue for transfering the objects

B) goto Tcode SALE

Select Assign Client to Logical Systems-->Execute

000--> Double click on this

Give the following Information

-Client : ERP 000

-City :

-Logical System

-Currency

-Client role

Save this Data

Step 2) For RFC Creation

Goto Tcode SM59-->Select R/3 Connects

Click on Create Button

RFC Destination Name should be same as partner's logical system name and case sensitive

to create the ports automatically while generating the partner profiles

give the information for required fields

RFC Destination : ERP800

Connection type: 3

Description

Target Host : ERP000

System No:000

lan : EN

Client : 800

User : Login User Name

Password:

save this & Test it & RemortLogin

STEP 3) Goto Tcode BD64 -- click on Change mode button

click on create moduleview

short text : xxxxxxxxxxxxxx

Technical Neme : MODEL_ALV

save this & Press ok

select your just created modelview Name :'MODEL_ALV'.

goto add message type

Model Name : MODEL_ALV

sender : ERP000

Receiver : ERP800

Message type :MATMAS

save & Press Enter

STEP 4) Goto Tcode BD82

Give Model View : MODEL_ALV

Partner system : ERP800

execute this by press F8 Button

it will gives you sending system port No :A000000015(Like)

STEP 5) Goto Tcode BD64

select the modelview

goto >edit>modelview-->distribute

press ok & Press enter

STEP 6) goto Tcode : BD10 for Material sending

Material : mat_001

Message Type : MATMAS

Logical System : ERP800

and Execute

STEP 7)goto Tcode : BD11 for Material Receiving

Material : 100-300

Message Type : MATMAS

and Execute --> 1 request idoc created for message type Matmas

press enter

Here Master Idoc set for Messge type MATMAS-->press Enter

1 Communication Idoc generated for Message Type

Now go to the physical directory and check your idoc converted as an XML File.

Thanks

Vikranth

Former Member
0 Kudos

Hi

If you need this funtionality in R/3 itself, Simply follow the steps in the below blog:

/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm

If its in XI: You have to configure the IR & ID objects and trigger an idoc from WE19 from your source R/3.

This should solve ur problem.

Thanks

Kiran

Former Member
0 Kudos

Hi,

Please try to explain your question clearly.

If you want to convert IDOc in R/3 system to XML

1) If you want to save your idoc as an XML in some directory, You need to create the xml port in R/3 system. It is the standard functionality of R/3. the xml file will be saved in directory you mention in your port.

2) To send XML idoc from R/3 to XI. -- you dont need to do anything just trigger IDoc using WE19 ans send it to XI. Sender IDoc will convert it to XML automatically.

3) You can also use ABAP, JAVA or XSLT code to convert FLat Idoc to xml.

Kulwinder

Reward if helpful

Former Member
0 Kudos

Go to the XI sever and type SE37 -


> and give the F.M

IDoc_xml_transform -


> and execute this

and give the IDoc number then we will get the XML data.