Login
Main Menu
FAQ Menu
Mapping
Convert Flat File to Deeply Nested XML Structures Using Only Graphical Mapping
Last Updated (Monday, 29 November 1999 16:00) Written by Riyaz Saturday, 08 August 2009 07:45
Many a times, you are required to convert flat file structures to deeply nested structures like IDocs. Standard File Content Conversion allows you to convert the incoming file to flat XML structures only i.e. only one level of nesting is possible. Converting incoming file to deeply nested structures would require use of either custom developed adapter modules or third-party conversion agents.
This article provides a workaround to accomplish the same thing by using only the graphical mapping. William had a similar requirement, and we came up with a generic solution which is described below.
Read more: Convert Flat File to Deeply Nested XML Structures Using Only Graphical Mapping
SDN "PI 7.0 & 7.1 Mapping - Blogs,Articles,Wiki,Code Samples and Videos Collections"
Last Updated (Monday, 29 November 1999 16:00) Written by Kevin Wilson Tuesday, 21 July 2009 09:05
Here is an extensive wiki of SAP NetWeaver PI related articles on SDN
PI 7.0 & 7.1 Mapping - Blogs,Articles,Wiki,Code Samples and Videos Collections
Another way of getting aii_map_api.jar for usage in Java mapping
Last Updated (Monday, 29 November 1999 16:00) Written by Praveen Gujjeti Monday, 15 December 2008 21:06
1. If you don't have the access to your XI/PI server at the directory level2. If you don't have access to Market place download
Use the below procedure to get the aii_map_api.jar file,
If your machine is running on windows operating system,(remember your machine means from where you work on Repository and Directory Frameworks)
Then look in this folder,
>:\Documents and Settings\\Application Data\Sun\Java\Deployment\javaws\cache\http\D\P\DMrep\DMrepository
where - host name of XI server.
- J2EE dispatcherport of XI servergenerally it will be 50000 if instance number is 00 or it will 50000+(100 X Instance number)
- the userprofile with which your are working on your machine.
in the directory you will find "RMaii_map_api.jar". Copy this to your working directory for java mapping class program and set in classpath. You can also rename this jar file as the original name is "aii_map_api.jar".
I really appreciate if some body explores on different OS (LINUX etc...) environments to get aii_map_api.jar file, since the client files will cached into the user profiles when we first log into Repository & Directory frameworks.
Mapping components pictorial
Last Updated (Tuesday, 25 November 2008 22:14) Written by Kevin Wilson Tuesday, 25 November 2008 22:10
GlobalContainer - in graphical mapping (XI)
Last Updated (Tuesday, 25 November 2008 22:07) Written by Michal Krawczyk Tuesday, 25 November 2008 22:01
There are times when we want to create many tags from just one source tag - imagine situation, when we get serial numbers as a range (from, to) and we have to create one tag for each serial number.
Let's suppose we have such a source structure:

and we want to create a Dest_line for each number in a range from source XML structure:

If we want to create many tags we have to remember that producing only Number's will not be enough because we also have to create the same number of Dest_line's.
We could do it by creating the same function for tag Number and Dest_line but is it realy nessecary? No way.
SAP gives as a standard object GlobalContainer which can hold an array and from which we can get our array in another function.
So let's start with creating our advanced function and connect it with Dest_line tag.

The code below inserts numbers into our container under the name of "our_number" (setContainer):
GlobalContainer globalContainer = container.getGlobalContainer();
int from = Integer.parseInt(a[0]);
int to = Integer.parseInt(b[0]);
ArrayList list = new ArrayList();
for (int i=from;i<=to;i++)
{
String s = String.valueOf(i);
list.add(s);
result.addValue(s);
}
globalContainer.setParameter("our_number", list.toArray(new String[0]));
Then we can use values from our container to fill the Number tag.
The code below inserts values from the container into the result of our function (getContainer):
GlobalContainer globalContainer1 = container.getGlobalContainer();
String[] b = (String[]) globalContainer1.getParameter("our_number");
for (int i=0; i<b.length; i++)
{
result.addValue(b[i]);
}




