cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem in IDoc to JDBC scenario

Former Member
0 Kudos

Hi friends,

Thanks for providing the help so far.I am designing a IDoc to JDBC scenario.I am facing a mapping problem.An IDoc field needs to be mapped to the receiver data type only if it exists in the IDoc,else no value needs to be passed to the receiver data type. I have made the occurence of the specific field of the receiver data type as 0..1.I am trying to do a mapping using 'exists' and boolean function 'if then'. Still the mapping is not working.

regards

Debansu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Santosh,I had done the mapping as you have mentioned but still it did not work.

Prakasu,can you please tell me how the MapWithDefault works ?

santhosh_kumarv
Active Contributor
0 Kudos

Hi Debansu,

Are u testing the mapping using the test tab..?

if so the actual testing process for this mapping will work by deleting the source node.

1. Right click on the source node and delete it or

2. In the Source text view delete the tag <sourcefiled/>

Thanks

SaNv...

Former Member
0 Kudos

Hi,

Field1(IDOC)MapwithDefaultTargetField

If Field1 exits with some value (123) then the same value will be assign to the Target Field.

If Field1 does Not exit in the Sender then that time

MapwithDefault--TargetField.

Default Value is null. So empty tag will form in the Target Side.

Regards,

Prakasu

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Thanks to all especially Prakasu and Santhosh.The problem has got resolved.

regards

Debansu

Former Member
0 Kudos

HI.

Apply the Logic Inside this Screeshot

http://img223.imageshack.us/img223/2882/78323488su6.jpg

REgards

Seshagiri

Former Member
0 Kudos

Hi,

1)use if then else boolean function.

2)if source field exists map source field to target

3)else map empty constant to target

Edited by: malini balasubramaniam on Aug 13, 2008 10:35 AM

santhosh_kumarv
Active Contributor
0 Kudos

What error do you get in the mapping.

Is you mapping is like.

source field-----> exist----> IF -------------> target 
                                       |
                                    then<----- source field

Thanks

SaNv...

prateek
Active Contributor
0 Kudos

Ideally boolean function exists should work. Try using createIf.

Regards,

Prateek

Former Member
0 Kudos

Hi,

Use "Map with Default" function.

It will solve ur Problem.

If the value passed it will pass the value.Other wise empty tag will create if the node does not exit also.

Regards,

Prakasu