Skip to Content
0

Changes in Inbound IDoc segments done through User Exit does not get reflected in WE05/WE02.

May 15, 2017 at 09:23 AM

186

avatar image

Hi,

I'm using User Exit EXIT_SAPLV55K_004 to modify segments of Inbound Idoc of message type DESADV.
Modification is done to the internal table IDOC_DATA.
The problem is, this changes does not show up in WE05/WE02, even though IDoc is successful.

Am I missing something?

Thank you.

10 |10000 characters needed characters left characters exceeded

What changes are you doing specifically? Post your code.

0

Hi there,

I'm allowed to post my code, but here are specifications of my changes:

  • Each inbound ASN idoc contains a segment called "E1EDL37". This segment contains a field named "EXIDV" (Pallet ID).
  • Now, there may be more than one "E1EDL37" segments and each will contain "EXIDV" which, often time, is same as previous segment.
  • I'm changing them as per business requirement so as to make them unique.

FM IDOC_INPUT_DESADV1 is used to create these inbound IDocs. It it contains user exit EXIT_SAPLV55K_004 to accommodate any modifications to Idocs. This is where I'm adding my code.

Thank you.

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Patrick Weber May 15, 2017 at 10:01 AM
1

This may be too obvious but have you placed a breakpoint in your code yet and processed an example IDoc to confirm it is even triggered?

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Yes, I have tested the code with few IDocs.

IDOC_DATA table does contain the desired modifications until the very end of function module. Idoc is even in passed status (53). But it still does not show changed segment values in WE05.

0

Sorry, I overlooked the keyword "inbound". I don't have the function in front of me but when you're modifying internal segment structures in memory before evaluating them to call the transaction or BAPI that ultimately creates the corresponding business document in SAP, the modified data record would typically not be persisted on the database. That means that your business document would be created with the "correct", i.e. modified data but those modifications would not be visible in WE02 or WE05.

0

You explained it well. That's exactly what's happening. (The strange thing is, those modifications aren't even visible in table EDID4.)

What are my options here?

0

The modifications are not on EDID4 because they are not persisted on the database. They are just applied to the local structures in memory and then used subsequently to create your business document. If you need to "document" the changes, you have a number of options including but not limited to:

- Add custom code that writes logs of your changes to the status record of your IDoc
- Write a wrapper function for the function module that you configured in your partner profile that reads your incoming IDoc, creates a duplicate with your modifications applied, posts the new IDoc and then moves the old IDoc to a final status, with a reference to the duplicate marked in the status records.

If you just need the changed values to be applied and be visible in WE02/WE05, have a look at IDoc conversion rules and see if these can meet your requirements. I have never used these in practice myself but I think the conversions would be applied before the IDoc is added to the database and would hence be visible in your IDoc monitor.

1

I just need the changed segment values to be applied and visible in WE02/WE05. I'll look into IDoc conversion rules to see if they can be applied in my case.

Thank you for your help.

0

Another option is to request the IDoc sender to send the valid values. The IDoc manipulation on the recipient side is usually used when it's either not feasible or too complicated for the sender to provide the exact information required. For example, if we get an EDI order from a customer, they send us their own part number and it's clearly on us to convert it into SAP material. But, based on the comment above, this is ASN with some kind of "pallet ID", so why there is duplicate data in the IDoc in the first place? Getting the right value from the source would solve all the issues here.

0
Prem Muthuswamy May 15, 2017 at 06:06 PM
0

Hi

the structure should not be changed except that you can populate the data. Can you let us know whether the structure is added in the extension.

One more thing if the data is not populated at all then it won't show in WE02.

Thanks,

Prem.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi there,

I'm not changing the structure. I'm just modifying the values by doing some calculations.

And can you please elaborate what do you mean by "Adding the structure in the extension"?

Thank you.

0