cancel
Showing results for 
Search instead for 
Did you mean: 

Outbound IDoc

Former Member
0 Kudos

Hi Guys

While mapping in XI for an Outbound IDOC: IDOC has segments and elements inside that segment are mapped.

So I check for the elements if they exist ,I map it accordingly but if the Segment is not present in the IDOC then I want to put CONSTANTS in target for all the elements under that segment.

How can it be done?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajat,

You can use the standard function mapwithdefault where if you dont have the value it maps the default value. Here you can specify spaces.

Else check for the field existence if field exists then pass the field else in the else part pass the spaces. So use if else option not a simple if.

Regards,

---Satish

Former Member
0 Kudos

Hello

Where do I need to use the mapwithDefault function : In the else clause of if element does not exist then map with default?

Instead of the just putting a Constant in else clause?

Thanks

Former Member
0 Kudos

Rajat,

Map like this:

Option1: input idoc field --> exists --> then map --> else spaces --> output

Option2: input idoc field > mapwithdefault (spaces )-> Output

You may get suppress or context problems so please test it in test tab.

Regards,

---Satish

Former Member
0 Kudos

Hi

I had used option 2 wich you have told but it is not fulfilling the task.

Point is : Field is present in a Segment and we are checking for exisitence of the field in the Option 2 which you have mentioned.

Now if the outoging IDOC does not have the SEGMENT in which that source field is present then I want to still put blank in the target.

I think option 2 should have worked but it is not wroking.

Thanks

Former Member
0 Kudos

Rajat,

I think you are mapping the segment which is not there in the source to one of the segment in target. So if source segment is not there then your target segment itself is not there. Even though you map the field with mapwithdefault this will not work becuase in the target you dont have the segment. So no segment itself no field.

To overcome mapwithdefault to the target segment also.

So Source Segment --> mapwithdefault --> Target segment

Regards,

---Satish

Former Member
0 Kudos

Thanks Satish.

I have awarded you the full points and will close the thread.

Regards,

Rajat

Answers (0)