cancel
Showing results for 
Search instead for 
Did you mean: 

Standard function

Former Member
0 Kudos

Hi Experts

Could someone explain to me with the real time example of these standard functions

1) Formatbyexample: actually when to use.

2) format number

3) Counter.

4) copyValue

5) Fix Value

6) MapWithDefault

Please can someone explain with good example

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anmol,

Copy Value: - u can interpret it as "How many ever times I occur I am copied just once".

It is used very frequently in real-time. Let us take an instance of material group, which can occur as many times as the item node. But since we are mapping it to the header in the target node I just want to copy the first occurrence of material group and map it to the header node. CopyValue exactly does that.

MapWithDefault: As the name suggests u give a vlaue in it which is mapped in default,

In real time u can think of it being used in an IF condition where the element has to created and if it is of 1..1 occurence ..u know that f the condition is not satisfied the mapping will have an error ...in this case u can use map with default.

Fix value: is someting like a look up..

where in conversion u will have a key and a corresponding value for it that has to be the output of the mapping

FormatNum: with format num u can decide how the number has to appear after mapping..in terms of deciamal..or no deciaml ..no of digits etc

Edited by: Mohd Tauseef Ibrahim on Jun 19, 2008 12:43 PM

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

1) Formatbyexample: actually when to use.

This function has two inbound queues, which must both have the same number of values. To generate the result queue, the function takes the values from the first queue and combines them with the context changes from the second queue.

2) format number

Converts integer according to a pattern that you define using the function properties. The possible patterns are the same as in the

3) Counter.

to get the number of fields in a context

4) copyValue:

For a frequently occurring element, copies the value at a defined position in the source structure to the assigned target field.

5) Fix Value:

Executes a value mapping using a fixed value table that you complete using the function properties. The table is saved together with the most current message mapping and can only be used once.

6) MapWithDefault

Replaces empty contexts in the inbound queue with a default value, which you specify in the function properties.

Example:

If Default is the default value and

A|B1,B2| |C| |D

is the inbound queue

then mapWithDefault gets the following outbound queue:

A | B1,B2 | Default | C | Default |D.

The function corresponds to the following combination of standard functions:

If(

[]field,

exists([]field),

Constant([value=default]))

http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

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

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

Thanks,

Vijaya.

Former Member
0 Kudos

HI

Map with default : Inserts default value specified in the function properties into empty contexts

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

Sravaya Talanki- Message Mapping(Node Function) Part-2

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

Standard Functions

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

Advanced mapping function(mapwithdefault,formatbyexample,sort,sortbykey)

/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13

mapping- createif, removecontext,splitbyvalue

/people/yukai.shi/blog/2006/06/02/b2b-mapping-techniques-using-the-graphical-mapping-tool

mapping- createif, removecontext,splitbyvalue

/people/claus.wallacher/blog/2006/08/15/duplicating-subtrees-and-numbering-them-using-the-graphical-mapping-tool

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

/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool

/people/claus.wallacher/blog/2006/08/15/duplicating-subtrees-and-numbering-them-using-the-graphical-mapping-tool

http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm

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

/people/sundararamaprasad.subbaraman/blog/2006/02/21/real-example-for-formatbyexample

http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/4b/d11e3e1c3b120ae10000000a114084/content.htm

cheers

Former Member
0 Kudos

Hi Anmol,

Node functions are used in Real time when the occurance of receiver fields is multiple and needed various complex logics to be added.

Just few days back it was discussed here

Please refer below link for Real time Example - step bye step

Check this weblog where claus have mentioned with examples:

/people/sundararamaprasad.subbaraman/blog/2006/02/21/real-example-for-formatbyexample

/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool

/people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool

/people/claus.wallacher/blog/2006/08/15/duplicating-subtrees-and-numbering-them-using-the-graphical-mapping-tool

Also check this weblogs:

/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

For value mapping check this video presentation and weblog:

/people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication

/people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool

https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#xi [original link is broken]

check the following link for the node functions:

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13

Pls reward points if it is helpful.

Thanks,

Radhika

Former Member
0 Kudos

HI,

Refer the below links:

/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

standard functions.

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

IfWithoutElse and CreateIf Node Function of Graphical Mapping

/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

reg,

suresh

Former Member
0 Kudos

HI,

refer the below links:

/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13

/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

/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

standard functions.

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

I suggest u try by urself only in message mapping.

chirag