Application Development 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: 

Custom IDoc

Former Member
0 Kudos

Can someone please tell me how I can copy the existing debmas03 to say zdebmas03 and then add a custom segment containg five fields. Please provide the transaction codes for copying the existing IDoc, creating a new segment and then attaching the new segment to zdebmas03.

Thank you

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

Go thru this link [http://www.riyaz.net/blog/beginners-guide-to-ale-and-idocs-part-iii/|http://www.riyaz.net/blog/beginners-guide-to-ale-and-idocs-part-iii/]

8 REPLIES 8

Former Member
0 Kudos

Hi ,

WE30 COPY THE IDOC.

WE29 CREATE SEGMENT.

WE30 ADD THE SEGMENT TO IDOC.

Thanks,

vamshi.

GauthamV
Active Contributor
0 Kudos

Transactions :WE30,WE31.

In we30 use extension button to copy the existing one and use WE31

to create new segement and you can add it in WE30 transaction.

Former Member
0 Kudos

Hi,

follow the below steps to create extended idoc..

Define segments: WE31 "First create Custom segment here and release the segment

Create new basic idoc type: WE30 "enter zdebmas03 and selcect extended idoc and create and select a create new and enter debmas03 in copy of...

Link message type to IDOC basis type: WE82 "and create a link between the message type and idoc type and you custom extension...

Link Function module to IDOC basis type& extension : WE57 "and create a link between the Function module and idoc type and you custom extension same as debmas03...

Next is to find the user exit in the above function module and write logic to fill the segments..

Regards,

Prabhudas

Edited by: Prabhu Das on May 13, 2009 5:17 PM

Former Member
0 Kudos

Hi ,

Go thru this link [http://www.riyaz.net/blog/beginners-guide-to-ale-and-idocs-part-iii/|http://www.riyaz.net/blog/beginners-guide-to-ale-and-idocs-part-iii/]

0 Kudos

One more question: When a Custome IDoc is posted into SAP, how is it processed? In our case we want to add some additional fields (custom segment) to the standard debmas03. So when we post the IDoc do we have to write an ABAP program to process the customised IDoc or does SAP post the additional data as well as the standard fields? Thank you for all the information so far.

0 Kudos

When a Custome IDoc is posted into SAP, how is it processed?

 Process Code DEBM. check thru WE42

In our case we want to add some additional fields (custom segment) to the standard debmas03. So when we post the IDoc do we have to write an ABAP program to process the customised IDoc or does SAP post the additional data as well as the standard fields?

yes you will habe to write additional coding but not any program or something, Here you will have to find the customer Exit/ BADI for Posting Function module IDOC_INPUT_DEBITOR, as this is used in process code

Regards

Shital

0 Kudos

Hi,

With each Inbound Idoc there is a Inbound Process Code attached to it. This Inbound process code has a Function Module attached to it in which the processing is written when the Idoc hits the system.

Regards,

Sharath

Former Member
0 Kudos

Hi,

Do not go for creating entire new custom debmas03 IDOC as this will be lot of additional work, but do extend the standard to add your required fields. For Extending the IDOC Please refer below steps:


1)An Idoc can be extended using the transaction WE30.
             For example Z1DEBMAS01. Create the required custom
2) segments and insert at the required position to the
3) standard idoc type DEBMAS01. Assign your extenstion and basic idoc type in the tcodes WE82 and WE57.
4) Most Important, you will have to write Custom code for populating the Additional fields, Search for User Exits or BADIs for the same.

Regards

Shital