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 Segment adding

Former Member
0 Likes
943

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

9 REPLIES 9
Read only

Former Member
0 Likes
877
Read only

Former Member
0 Likes
877

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.

Read only

0 Likes
877

Which Function module are you working with?

Or which IDOc are you extending??

REgards,

Ravi

Read only

0 Likes
877

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

Read only

0 Likes
877

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

Read only

0 Likes
877

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

Read only

0 Likes
877

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

Read only

0 Likes
877

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

Read only

0 Likes
877

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