cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting a segment in an IDOC - XI - IDOC Scenario

praveen_pillai3
Explorer
0 Kudos

Hi

I am relatively new to XI. I would appreciate any help on the following issue.

I have a requirement to send Material Master information from one R/3 system to multiple R/3 systems via XI. These IDOCs have multiple segments for the Description segment (E1MAKTM). Some of these systems are unicode enabled and some are not. This means the IDOCs sent to all the non unicode systems should not have some of the description (E1MAKTM) segments in it. To achieve this I need to read the Language key in E1MAKTM and then decide whether to keep the segment or not, but I am not sure about where to do this.

Should I be creating a scenario for this using BPM or is there a way of doing this using the Mapping interfaces? I would appreciate if any one could please give me some input on this or point me to a right documentation which could help me.

Thanks & Regards

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

praveen_pillai3
Explorer
0 Kudos

Hi,

Thank you for the quick reply..

Michal, The segment needs to be removed in case of some languages. If I leave MAKTX field as blank I will still have a segment.

Bhavesh, I tried this and I couldn't get it to work for some reason, This is what I did.

1. Auto mapping for MATMAS between the source and the target.

2. Removed the mapping for the segment E1MAKTM.

3. Used the standard functions with logic as follows

IF SPRAS = Constant with value EN

{

Assign E1MAKTM to the target.

}

4. Tested this mapping using the option in Repository by creating 2 segments for E1MAKTM, one with SPRAS as EN and the other with SPRAS as ES. The target should have only one segment once it goes through the above mentioned logic, but for some reason it is having both of them.

I would appreciate if you could give me some suggestion on this situation.

Thanks & Regards

Praveen

moorthy
Active Contributor
0 Kudos

Hi,

You can think of using <i>CreateIf</i> node function for this.

Try out this.

Regards,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Like mentioned by moorthy, CreateIf would also suffice.

http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/content.htm

This link has a similar example. Just follow the example in the link and use it for your case too.

Regards,

Bhavesh

praveen_pillai3
Explorer
0 Kudos

Thanks guys

It solved the issue...I had to deal with multiple languages so I used a user defines Java Function which will check the language key and then return a value based on which the Segment will be created.

The point system is givin me an error at this time... will reward points to you guys....

Thanks & Regards

Praveen

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Praveen,

Do this using Mapping.

Language Key --> Ifwithoutelse --> Map to segment E1MAKTM .

If condition is satisfied, segment will be created, else it will not be created.

Regards,

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>Should I be creating a scenario for this using BPM or is there a way of doing this using the Mapping interfaces

no need for a BPM

in your message mapping you just need to do:

if language key = something

then map descripion if no then don't

then it will be empty

use standard If function to do that (message mapping)

Regards,

michal