Skip to Content
0
Former Member
Feb 21, 2009 at 01:12 PM

Outgoing IDOC ORDERS05 - Adding new Z-segment

1974 Views

Hi there,

I have to implement an additional segment in a standard idoc of type ORDERS05.

The following steps I did yet:

1) I created a new Z-segment with transaction WE31 and implementing the structure

2) After that I created a new Z-extension for type ORDERS05 via transaction WE30 (my new segment is added as child of another node - under position-data which can occur multiple times)

3) In transaction WE81 I created a new message type in Z-namespace

4) And as final step I linked the new message type to the basic type ORDERS05 and my new extension of step 2)

Now I have to fill in data to this new segment via user-exit. I found the function module EXIT_SAPLEINM_002. But now my question is in programming this exit.

How can I find out the used message type in this function module? I want to add my new segment only to the IDOC if my message type is used for sending the IDOC. But how can I acess to this data? Or another way would be to find out that my extension is used... I don't want to modifiy standard ORDERS05-IDOCs with my new segment because not every vendor needs that additional data.

Can you please give me some hints? I am new in this topic "IDOC" and I want to learn it.

Thank you very much!

Kind regards

Max