on 01-18-2011 2:02 PM
Hi experts
Hi have to map the entire IDOC structure into single field of a file which is a target side by using XSLT code. Please help me out of this
Thank you guys
Hi Yugandhar,
Please check Link1 above, it have solution for this issue using Java Mapping and XSLT.
Regards,
Raghu_Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yugandhar,
If your are using PI7.1, it can be done using graphical mapping.
Please follow these blogs [Link1|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/19719] [original link is broken] [original link is broken] [original link is broken]; [Link2|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8649] [original link is broken] [original link is broken] [original link is broken];
Else (your are using lesser PI version), it can be done using Java Mapping. Please let me know, if you need help on that.
Regards,
Raghu_Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this sample and change according to your target message structure
import com.sap.aii.mapping.api.StreamTransformation;
import java.io.*;
import java.util.Map;
public class InputPayloadToFieldJM
implements StreamTransformation
{
public InputPayloadToFieldJM()
{
}
public static void main(String args[])
{
try
{
FileInputStream fin = new FileInputStream(args[0]);
FileOutputStream fout = new FileOutputStream(args[1]);
InputPayloadToFieldJM mapping = new InputPayloadToFieldJM();
mapping.execute(fin, fout);
}
catch (Exception e)
{
e.printStackTrace();
}
}
public void setParameter(Map map1)
{
map = map1;
}
public void execute(InputStream inputstream, OutputStream outputstream)
{
try
{
int len = 0;
byte[] buffer = new byte[1024*5000];
outputstream.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><TARGET_MT><Field1>".getBytes());
while ((len = inputstream.read(buffer)) > 0)
{
outputstream.write(buffer, 0, len);
}
outputstream.write("<Field1></TARGET_MT>".getBytes());
}
catch(Exception e)
{
e.printStackTrace();
}
}
private Map map;
}
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.