Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Idoc Extentions

0 Likes
607

Hi Friends,

Any one can explain about "idoc extentions" its very urgent. I need to add one new segment to standard idoc and how can i populate date into those new segments.

Thanks in advance,

Ramesh.

Hi Friends,

Any one can explain about "idoc extentions" its very urgent. I need to add one new segment to standard idoc and how can i populate date into those new segments.

Thanks in advance,

Ramesh.

3 REPLIES 3
Read only

Former Member
0 Likes
557

hi,

Extension of Standard IDOC Type

Firstly of all, letu2019s talk out IDOC type. IDOC is the most important element in most of the interface applications, we use it to hold the real data which needs to be transfer between the business partners, IDOC Type is the definition of the structure of an IDOC.

SAP provides a lot of standard IDOC Types, normally we call them Standard Type. In this case, SAP has provided standard type DEBMAS06 for customer master, you can use transaction code WE30 to check its definition.

But DEBMAS06 canu2019t meet the requirement 100 percent, because the customer what some additional data fields which this IDOC Type canu2019t cover. So the project team decided to create an Extension based on this Standard Type, letu2019s say ZEX_DEBMAS06.

Create additional Segments

To create an Extension Type, we just insert one or more additional segment(s) under the proper segment(s) of the Basic Type. So firstly we need to define the additional segment(s) to hold the additional data.

In this case, we need to develop three additional segments:

 ZSMTP, to hold email address

 ZKNA1, to hold more address information

 ZKNVV, to hold more sales information

We use transaction WE31 to maintain segment definition. On the initial screen, just enter the segment name and click u2018Createu2019.

The system will bring you to the definition screen. Here you enter the description and the data fields of this new segment,

One Segment Type can have multiple Segment Definitions, you can consider one Segment Definition is one version of a Segment Type. The name of segment definition canu2019t be assigned manually, SAP will decide the name automatically by suffix three numeric characters behind the Segment type name.

After you have entered all of the information on the definition screen, just save it and go back, you will see that a Definition entry appears

This new created segment will not work till you release it. To release it, just goes to Edit  Set release. After you mark it as released, you can not update the definition any more. If you want to update, you must Cancel release firstly.

Follow the same way to create the other two additional segments,

As of now, the development of additional segments is finished.

Create Extension IDOC Type

After the additional segments have been developed, we can use them to create the Extension Type.

We use transaction WE30 to create an IDOC Type, to create an Extension, we need to tick the option u2018Extensionu2019,

After click the button u2018Createu2019, the system brings you to a popup window

Here you tick u2018Create newu2019 and type DEBMAS06 as the Linked basic type, also enter the description of your new Extension, and press Enter to continue.

You will get the IDOC definition screen, this is a hierarchy structure, just expand the top element, you will see the child elements.

Since our new segments ZSMTP and ZKNA1 needs to be append under the top element E1KNA1M, so click E1KNA1M, then click Create segment, a popup window will come out,

Enter the segment name which you want to append, and min/max number, click the green tick to continue, you will see the new segment has been inserted. Follow the same to insert the others. After these, you will see the Extension definition and till this, the Extension Type definition is finished.

Assign IDOC Type to Message Type

Before you can use the IDOC type youu2019ve just defined, you must assign it to a message type. Go to transaction WE82 to link the standard message type DEBMAS with basic type DEBMAS06 and extension ZEX_DEBMAS06 which is the one youu2019ve just defined.

might be this information is useful for u.......

regards,

praveena.

Read only

Former Member
0 Likes
557

hi ramesh,

Extending basic idoc type.

1. Extending basic idoc type also needs a basic study like what is permitted and what is not

permitted. Analyze the data and create a segment with the new fields and assign to the basic idoc

type. You also need to analyze the existing function modules associated with the idoc type and look if

there is any user exit available for the idoc type, then you can add segment to the idoc.

2. Create custom segments. You know how to create a segment we31. if u r assigning 2 fields to

this custom segment, first create data elements for the 2 fields and then create segment with the two

fields.

Create idoc extension.

1. Got to transaction we30, give a meaningful name for the idoc extension and select the radio

button extension and click on create. This extension name need not start with Z. system will ask you to

enter reference segment name, here u need to enter a the segment name to which u want to extend.

Then the system informs u that this segment is added as a child element.

i think this will help u

regards,

sindhu.

Read only

soumya_jose3
Active Contributor
0 Likes
557

Hi Ramesh,

Go to we30 and give a name for your extension and select the radiobutton 'Extension' and click on Create. For eg: if you want to extend the standard message type LOIWCS, give a name like, ZLOIWCS and select the radio button 'Extension' and click Create. Give the basic type which you want to extend in the next screen.In the screen that follows select the segment which you want to extend and click on the Create button .Give a name for the new segment extension. Thus after creating an extension double click the extension you have created just now and it will lead you to a screen where you can enter the fields for that segment. Add proper fields to the segment and Save it. Now you have created an extension. Through we82 assign your extension to the message type and basic type.

For populating your extended segment search for a user exit or a BADI in the standard program which sends the idoc and put ur code there.

Reward points if useful.

Regards,

Soumya.