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

mapping help

Hi all,

I am doing a message mapping with source and target as same idoc. The requirement is as follows.

The target field in the idoc has a field colno. It should be 10,20,10,20 and so on based upon the incoming idoc.

ie, if an idoc is coming in XI, then colno. should be 10.

for the next idoc, its value should be 20 and so on.

I am planning to do this logic in message mapping by taking idoc number as reference.

ie, if idocnumber divided by 2 =0, then colno=10 else colno = 20.

How can i implement this in the message mapping?

The idoc number is in EDIDC40-docnum field.

its occurence is 0..1. Its already mapped to docnum in the target.

So if i map it again with the colno, there would be an error, right? How can i resolve this?

Thanks in advance,

Deno

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 08, 2005 at 10:10 AM

    Hi Deno,

    I have implement the same using XSLT mapping. Its very easy using the 'position()' function in XSLT. With message map, you have to write a user defined function to take all the idocs as inputs and inside the 'for' loop you have to build ur logic and set the context properly.

    rgds,

    Sasi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 08, 2005 at 10:18 AM

    Hi,

    you can do it in the "Advanced Java function" and SplitByValue for sure but I don't understand the 10,20,10,20

    but try using Advanced Java function and standard if statement inside

    Regards,

    michal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 08, 2005 at 10:30 AM

    Hi Deno

    You can achieve this by writing your own simple java function which will do this logic for u, in the mapping.

    and u wont get an error even if u use the same field for another mapping.

    Regards

    Sunita

    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.