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

Mapping doubt

hi all,

I have a small doubt in mapping which i have shown below

<i>then</i>----->ZOILID

item-- ><i>exists</i> --><i>if </i> -


>ZOILID

<i>else</i>(5constants)

item is the node which has ZOILID as a subnode.If item exists then ZOILID will have a value which we enter(as shown in mapping).But if item does not exist i need to have 5constant values assigned to ZOILID....which i dont have any idea how to proceed with.

We can give one constant using the constant function but how to assign 5constant values.Do i need to write a UDF....as i dnt know java coding

Help will be greatly appreciated

thanks,

Nisheeta

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 07:45 AM

    Hi Nisheeta,

    you could use 5 constants from ther constant functions and concat them. But with 5 constants you should use a UDF. Here a simple example.

    String concatString = new String() ;
    concatString = val1+ " " + val2+ " " +val3+ " " +val4+ " " +val5;
    return concatString;
    

    Hope this helps you.

    Dominic

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 07:42 AM

    Hi,

    U can easily achieve this by graphical mapping, as

    1) first check whether that field exists or not (If without else function)

    2) if exists then (If function) check, whether that filed is null value

    3)if it is null, in the then part take 5 constant functions and three concate functions, delimeter ','

    That's it, u can achieve this, i jst tested and its working. I am jst fowardign the screen shot to ur mail id. If you want plz try this.

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 07:53 AM

    Hi,

    Is it that you need to create 5 different ZOILID nodes or assign all 5 values to one ZOILID node?

    If you need to assign all 5 to one node: Simple. You can assign more that one value in the constant function that is available in the mapping editor.

    If you need to create 5 different ZOILID nodes: You would need to write a UDF that will create these nodes.

    This link will help you with the udf:

    http://help.sap.com/saphelp_nw2004s/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/frameset.htmhttp://help.sap.com/saphelp_nw2004s/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/frameset.htm>

    Regards,

    Smitha.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2007 at 10:23 AM

    Also Nisheeta read the article which enhances your mapping skills.

    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

    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.