cancel
Showing results for 
Search instead for 
Did you mean: 

Creating message type in XI with imported objects

Former Member
0 Kudos

Hi,

I have imported an Idoc Structure into XI.

Now I need to create a message type with structure from imported Idoc + some additional fields.

Can some one tell me how to go about this. Because once I drag and drop the imported Idoc structure, I doesn't allow me to add any more fields during message type creation.

Is there a different to way to achieve this.

Best Regards,

Kiran

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Kiran,

the Integration Builder supports two ways of modelling an interface. The first way is to build the required datatypes from scratch (with the datatype editor) then define (fault) message types using these datatypes and finally define the message interface.

The second way is to use an externally defined structure by importing an IDoc or RFC from an R/3 or an external DTD/XSD/WSDL from filesystem. Then define your Message Interface using the messages from the imported objects.

Currently there is nearly no support for mixing these two approaches as you have in mind (taking an externally defined structure as starting point, then enhance this structure within the Integration Builder).

The best workaround I can suggest to you, is import the IDoc, take the XSD which is displayed for it, download it to your local file system, edit it there (with notepad when you are an XSD expert, with some other tool like XML Spy otherwise) and upload the modified file as External Definition.

BTW: For this procedure you do not necessarily need to upload the IDoc to the Repository. As far as I know the R/3 also offers the possibility to generate an XSD representation for an IDoc (do not remember the exact way to go there).

Greetings Stephan

Former Member
0 Kudos

HI Kiran,

Just a suggestion. There are three ways to do what u are trying to do.

1. IF u have two message types, then in the message mapping, goto the third tab and import the IDoc and the message type for the receiver MT. when u go to the first tab now , you will have one message, with two message type incorporated.

2. You can have have Just one message type with idoc as one of the segment. But if your IDoc is nested and has a lot of hierarchy then this data strcuture becomes complicated.

3. As you have said you are using ABAP Proxy, and if u use IDoc meatadata you might get this lots of nested structure so it's better if you just create one reciver data type. This is just a sugestion.

Hope this helps

Regards

Vijaya

Former Member
0 Kudos

Hi,

Could you tell us in more detail, as to why you would want to add additional fields in the message type?

How many ever fields you add to the message type, in the end, only the fields present in the idoc in the R/3 system will be mapped, and only their values will be populated.

The extra fields that you created will anyway be dropped.

So, if you need to create new data types and populate their values, i guess, it should be done in the R/3 system.

Regards,

Smitha.

Former Member
0 Kudos

You can try to use nested Data type in which, you create a new data type in XI. this new data type will have all the additional fields that you want to add. after those fields you can have one more field in that Data type and set its type to IDOC datatype which you want.

thus you will have

<MT1>

<additionalFields1>

</additionalFields1>

<additionalFields2>

</additionalFields2>

<StandardIDOC>

...

...

...

</StandardIDOC>

</MT1>

Additionaly you can export the IDOC's XSD from XI and then modify that XSD in any XML editor like XMLspy. and after modification reimport that XSD in XI again.

Former Member
0 Kudos

Hi Kiran,

1. The IDoc strcuture can be used as it is. You do not have to create Message type for IDoc structure.

2. The Idoc matadeta cannot be changed once it's imported into SAP XI.

3. If you have IDoc strcutre and you need any other field, one option is to create another data type for these fields. Create a message tpye for data type. Then import both the IDoc structure and the message type u created for mapping.

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

Thanks for your response.

My idea is to create a message interface with the idoc fields + additionla fields.

As mentioned in step 3, i have created a data type for the additonal fields and also a message type.

But while creating the message interface how to have more than one message type in that?.

Regards,

Kiran

Former Member
0 Kudos

Hi,

What I said above would be applicable for a file to idoc scenario.

But your requirement is valid for an idoc to file kind of a scenario.

What you could do is, to create a data type, after importing the idoc as an xsd, and to this data type, you could add the extra fields.

This new data type can be used to create your message type.

Regards,

Smitha.

Former Member
0 Kudos

Hi Smitha,

Thanks for the reply.

In my scenario I will not be using a Idoc adapter but I would use the ABAP proxy to push data from CRM to XI.

Instead of creating the message interface from scratch, just thought of using the the available Idoc structure, import it and enhance this structure to contain the additional required fields on the XI side.

I would try out the solution specified in the second response.

Best Regards,

Kiran

former_member187339
Active Contributor
0 Kudos

Hi,

For Idoc there is no need of MT. Idoc itself will be used in message mapping.

Regards

Suraj