‎2006 Nov 16 6:39 AM
hi friends,
1.I have created segment and attached this to IDOC and extended idoc
i have done message link also
now should i write some code some where;
if so plz tell me where to write the code.some told we have to write in userexit
thanks in advance
regards
raj
‎2006 Nov 16 6:40 AM
what exactly u r trying 2 do?
build a new idoc or add a fld 2 the existing idoc?
let us know in detail
regds
kiran
‎2006 Nov 16 6:44 AM
‎2006 Nov 16 7:03 AM
Hi Raj,
yes u need to write the code in the userexit to populate the fields added in the new segemnt whcih u created.For each messagetype there will be function module.So u have know the function module and then u need to check the userexit.in the function module ,under each segment u can find userexit.U need to check the proper exit and then u need to write the code there.Also please go through the below thread link.
regards,
nagaraj
‎2006 Nov 16 7:21 AM
Process to add the new field to the existing idoctype..
1. Decide you are adding to the Basic type or extension in we 30.
2. Choose the segment you want to add in we31.
3. cancel the release and do the modifications - > check - > generate and set release again.
4. simialrly in we31 also.
5. code the respective EXITS to populate your field.
6. You can transport them from we31 / we30 directly by choosing your IDOC type & Segment type.
Hope this is helpful.
regds
kiran
‎2006 Dec 16 8:06 AM
For diff IDOC type there r different FM's which will populate the segments in the IDOC, all the SAP segements will be taken care by the SAP std code in those FM's for the custom segements .. SAP has provided a user exit whiihc will be triggered after each and every SAP segment .. so in ur FM search with "Customer-Function" and see how this FM is used .. i mean whether after each and every segment or not because there r 2 exits in the FM one is called after each and every segment and one is before creating the IDOC.. so find out the one whihc is called after each and every egment population... if u have extended a segement KNa1mf then in that exit u have put a condition that if the segement name is "KNa1mf" then populate ur extended segement..similarly do it in the same exit for all the extended segments...
and after coding u have to identify the enhancement where this FM is used and that enhancement has to be saved and exits has to be activated in or to work ur code and populate the extended segments..
FM 's: - MASTERIDOC_CREATE_* FM to create IDOC's for all outbound Messages
Tcodes useful :- CMOD, SMOD
Award if helpful...
THanks
Prasad