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

Orders05 IDoc Create/Change.

Former Member
0 Likes
3,319

Dear All,

I am able to create the Outbound IDocs for create or change of purchase order . But I want to know

how to create orders05 IDoc with only changed items not all the items.

Example : If I change line item 3 for any order ,then IDoc should have only one segment E1EDP01 for that item

Thanks in Advance.

10 REPLIES 10
Read only

Former Member
0 Likes
1,993

For changes link your setup with process code ME11 (using FM 'IDOC_OUTPUT_ORDCHG').

Regards,

Dominik Modrzejewski

Read only

0 Likes
1,993

Thanks Domnik for your response.

I have already configured ME11 and function . But it's creating all the E1EDP01 segments in IDoc.

My requirement is to create only one E1EDP01 segment If I change only one line Item of the order.

Thanks...

Read only

0 Likes
1,993

Do you have the message type ORDCHG with process code ME11 and change flag on?

If you are calling IDOC_OUTPUT_ORDCHG, Can you confirm if the subroutine READ_CHANGES_PO is called?

Read only

0 Likes
1,993

Thanks Kris,

I have already tried using ME11 process code opttion but no luck

Read only

0 Likes
1,993

>

> Do you have the message type ORDCHG with process code ME11 and change flag on?

> If you are calling IDOC_OUTPUT_ORDCHG, Can you confirm if the subroutine READ_CHANGES_PO is called?

Did you try it with 'CHANGE FLAG ' on and ME11? It may not help, but you can try... And while debugging, did it go through the subroutine I had referred in my earlier email?

Read only

0 Likes
1,993

As Kris and Dominick pointed out. ORDCHG with ME11 with "Change Flag" checked will do the trick. If it doesn't work, just check the output type. The output type should be configured with operation 2 so that only changes are triggered. E.g. NEU/ZNEU (whatever is the output type you're using) should have Operation type 2 setup along with Operation 1. This will add the change flag to NAST entry and thus ME11 can correctly process it. I'm sure ME11 with change flag will pick up the changes (only) and process them but let us know if this doesn't work.

Read only

0 Likes
1,993

Gautam,

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 has not changed.

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

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

Read only

0 Likes
1,993

Curtis,

If I understand you're requirement correctly, you want to "Send all changed items on the ORDCHG. In addition to these, you want the item long text sent for all the items that haven't been changed".

If this is true, I would do it in one of the following ways:

1. Send all the data (like ORDERS) on an ORDCHG IDOC along with long texts and have the vendor compare each item and see which ones have changed. --> I know this is not a preferred option for all the clients but I have done this at one of the client who had the muscle to have his vendors comply to his needs.

2. Change exit: EXIT_SAPLEINM_001. Pick up all the materials listed in UEKPO, go back to EKPO and get the remaining for that PO and populate long text field which would go into E1EDPT1/T2 segment and update those relevant fields in UEKPO and save it. The next form would automatically pick up these and fill up the IDOC. This way, you'll see E1EDP01 (and the segments beneath it) for all the materials but you just populate E1EDPT1/T2 and rest are blank. I might have oversimplified it because I didn't go in and check how the program flow would work but I'm positive this is a good way to start. The reason I would like to change EXIT_SAPLEINM_001 is that this is the place where the actual IDOC filling didn't start yet and all you have to do is feed into UEKPO so that the next perform will take care of the rest.

Let me know if this works out for you. If you went through any alternative way then do educate me back

Just a thought: You're question is different to the original thread here (although related). We're hijacking this thread. So I think it'll be better if you put it in a new one.

Read only

0 Likes
1,993

Hi Gautam,

I have opened another thread as you suggested.

It's title is 'Adding segments in idoc.'

Thanks for your response and hope you can help me.

Curtis

Read only

0 Likes
1,993

To All,

I have used the user-exit

EXIT_SAPLEINM_011

to add the missing segments. and it is working very well.

Thanks!

Curtis