cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping and Graphical Mapping

Former Member
0 Kudos

Hi All,

Could any one clarifies the situation where we need to write in a same interface ,

Both Java mapping and Graphical mapping.

Regards,

venu.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Here is a scenario where you might need to use both graphical and user defined functions.

source: <fname> <lname> <filename>

target: <name> <filetype>

Suppose, you need to concatenate fname and lname into the target <name> tag, you could use the normal graphical mapping using the concat function.

<fname>\

-


concat <name>

<lname>/

next, if we need to extract only the filetype from the filename, for example, if we have filename.txt... and we want only the value .txt, we need to write a user defined function which would achieve this for u, since there are no inbuilt function which can solve this for you in graphical mapping.

Further XSLT mapping comes into picture when we need to create the entire target xml structure. Again, graphical mapping would not be useful here.

Regards,

Smitha.

former_member181955
Contributor
0 Kudos

Hi Smitha

From the value <b>file.txt</b> to get only txt you can use subsring (text function ) in graphical mapping , user defined function is not required.

thanks

N.P.Babu

Former Member
0 Kudos

Hi prasad,

Maybe i'm wrong. But, could you do it with that function even when the filename is variable(not fixed) and the extension (eg .txt) is also variable?

regards,

Smitha.

moorthy
Active Contributor
0 Kudos

Hi Venu,

Graphical Mapping- Is easy to use. And you can do different types of scenarios on this. But many times your business scenario will be complex. Then it is difficult to handle in the Graphical Mapping. Then you can go with either of following Mappings-

Java/XSLT/ABAP Mapping. It is always preferred to use Graphical Mapping and if it is not cater your requirement based on the Business scenario, then you can go with Java/XSLT mapping.

And , in Graphical Mapping , you have provision to use Java user Defined functions. SO that you can write some of the business logic with the help of these java codes.

If you want to use multiple mappings to one interface, then your first mapping output should be input to next and consequent Mapping..

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Message mapping should be able to handle 99% of the mapping/transformation requirements, even those with complex hiearchial strucutures and manipulations of those structures.

Java mapping is used as a last resort. An example is the encryption/decryption of the XML payload. Or, in a possible situation a Z_IDoc from R/3 contains meta data with element name not valid for XML. Then, java mapping can fix the name before sending it to message mapping.

Message mapping is much more efficient to execute from both memory and cpu perpective.

Regards,

Bill

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Venu,

You need to execute both Java Mapping and graphical mapping for the same interface mapping..??

Can you please give us more details.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

Graphical mapping is generally used when you have simple target structure and does not have complex hierarchy and can be easily managed. There are numerous in build functions available which can be used to achieve the desired target.

Java or XSLT mapping is used when you have complex target structure, more hierarchy(level more than 3) and which can not be achieved by graphical mapping.

The selection of mapping is always depends on the scenario.

You will use both mapping together if you are using transformation step in BPM and want to modify the payload.

Thanks,

Prateek