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

Adding segments in idoc.

Former Member
0 Likes
2,580

Hi all,

I have a requirement to add segments that have not changed along with the changed segments.

example:

line item 1 has been changed so the line item segment is sent. I would need also the long text associated to the line item 1 to be sent along with it even if the long text has not been changed.

I'm looking at the exit EXIT_SAPLEINM_011 but can see how I can add a segment in this area.

I would like to be able to see witch segment are going to be sent to be able to know witch segments to add.

Is there a flag or indicator that will tell me witch segments are going to be sent?

MY partner type LS is PARTNER_PI with outbound ORDCHG using idoc type ORDERS01 and message control EF ZNEM ME11 and the change is checked. ZNEM is type 2.

Have any ideas?

Best regards!

Curtis

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,437

Hello,

in the EXIT_SAPLEINM_011 - exit you get the table dint_edidd .

There are all segments of the idoc which will be sent.

It's the last exit located where the idoc-data is completed.

Think you would have to read this table and to manipilate it.

Be careful - the exit is also in use for other MM-Idocs than ORDCHG.

Regards Wolfgang

4 REPLIES 4
Read only

Former Member
0 Likes
1,438

Hello,

in the EXIT_SAPLEINM_011 - exit you get the table dint_edidd .

There are all segments of the idoc which will be sent.

It's the last exit located where the idoc-data is completed.

Think you would have to read this table and to manipilate it.

Be careful - the exit is also in use for other MM-Idocs than ORDCHG.

Regards Wolfgang

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,437

I would like to be able to see witch segment are going to be sent to be able to know witch segments to add.

Is there a flag or indicator that will tell me witch segments are going to be sent?

check these badi's

IDOC_DATA_MAPPER - Preparing Internal Data Mappng

IDOC_DATA_INSERT - for inserting segements -

IDOC_COPY_MANAGE - BAdI for Modifying the Outbound IDocs that can be Copied

Read only

Former Member
0 Likes
1,437

Hi,

I am trying to use IDOC_DATA_INSERT without succes.

Here is what I am doing.

A point in the right direction would be appreciated.

DESCRIBE TABLE data LINES lv_counter.

lv_line_new-SEGNUM = lv_counter.

lv_line_new-COUNTER = '000'.

lv_line_new-SEGNAM = 'E1EDPT1'.

lv_line_new-SDATA = 'F01 F FR'.

append lv_line_new to new_entries.

lv_line_new-SEGNUM = lv_counter.

lv_line_new-COUNTER = '000'.

lv_line_new-SEGNAM = 'E1EDPT2'.

lv_line_new-SDATA = 'totototototot'.

append lv_line_new to new_entries.

have_to_change = 'X'.

no changes to the idoc.

What am I doing wrong.

The segments I need to add are the ones for the long text of the line item of a purchase order.

So I need to add the segment E1EDPT1 and E1EDPT2 even if they have not changed by the user in me23n.

Best regards!

Curtis

Read only

0 Likes
1,437

Thanks Wolfgang Valtin,

I used the exit EXIT_SAPLEINM_011 to add the missing segments.

Best regards!

Curtis