‎2006 May 29 5:00 PM
hi,
i have extended a idoc with few segements and i am trying to add a few segements to the idoc in the BADI how to specify the hirarchy.
cheers
‎2006 May 29 5:05 PM
Hi Rajani,
Go through the following links:
http://help.sap.com/saphelp_erp2005/helpdata/en/dc/6b82a343d711d1893e0000e8323c4f/frameset.htm
REgards,
Ravi
‎2006 May 29 5:07 PM
hai,
thanks for the reply but the run time how do you insert the new Zsegment because it is giving me the error while creating the IDoc.
chhers.
‎2006 May 29 5:10 PM
Which Function module are you working with?
Or which IDOc are you extending??
REgards,
Ravi
‎2006 May 29 5:10 PM
Hi,
I don't think you can alter a IDOC at runtime, you will have to define the segments in WE31 and add the same in WE30 to the IDOC in whichever hierarchy you want.
Can you explain a little more, what do you want to do in the BADI?
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 May 29 5:16 PM
hi ravi,
i have extended the idoc WBBDLD04 into extended type . now in the runtime for the BADi i am using only the Segements of the BASIC type WBBDLD04 is coming but the segments which i have created in the NEW extended idoc is not coming so how would i build the idoc in that case in the badi.
cheers
‎2006 May 29 5:28 PM
Hi,
Have you done the assignment of the extended IDOC to the message in WE82?
Are there any other parameters in the BADI, which are pointing to the extended part of the IDOC?
The extended might not be part of the same parameter of the BADI.
Which BADI is this?
Regards,
Ravi
NOte : Please mark the helpful answers
‎2006 May 29 5:28 PM
Hi Kumar,
I don't think you are in the correct badi.
Can you let us know which FM calls your badi??
Or atleast the process code attached to the msg type??
Regards,
Ravi
‎2006 May 29 5:34 PM
hi,
the BADi name is ASSORTMENTLIST_UPD it is of haiving the idoc data in structure IDOC_INFO when i add any segements should i increase the number of segement counter
cheers
‎2006 May 29 6:22 PM
Yes .. U need to increment the counter .. see the sample code available in the BADI for the method CHANGE_IDOC
TYPES: BEGIN OF e1wbb_customer,
datab LIKE sy-datum,
datbi LIKE sy-datum,
message TYPE char16,
END OF e1wbb_customer.
DATA: i_edidd TYPE edidd_short,
i_e1wbb_customer TYPE e1wbb_customer.
i_e1wbb_customer-datab = date_from.
i_e1wbb_customer-datbi = date_to.
i_e1wbb_customer-message = 'mysap.com'.
i_edidd-segnam = 'E1WBB_CUSTOMER'.
i_edidd-sdata = i_e1wbb_customer.
INSERT i_edidd into idoc-idoc_data index edidd_startindex.
<b> ADD 1 TO idoc-seg_counter.</b>
Just folllow the above process for the segments that u have added and ur job should be done.
Cheers
Nishanth