Skip to Content
author's profile photo Former Member
Former Member

Mapping problem in IDoc to JDBC scenario

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 07:21 AM

    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 ?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Field1(IDOC) MapwithDefault TargetField

      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

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 06:47 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 13, 2008 at 06:48 AM

    Ideally boolean function exists should work. Try using createIf.

    Regards,

    Prateek

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 13, 2008 at 06:49 AM

    What error do you get in the mapping.

    Is you mapping is like.

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

    Thanks

    SaNv...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 06:57 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 07:03 AM

    HI.

    Apply the Logic Inside this Screeshot

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

    REgards

    Seshagiri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 09:46 AM

    Hi,

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

    regards

    Debansu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.