on 11-30-2011 11:02 AM
Hi
I am doing one simple file to file scenario without mapping i.e picking file from sender directory and then placing it in receiver directory via FTP.
Now i have to take two files from different directories and place them in to different directories in the receiver side.
On the sender side i have selected Advanced selection for source file and maintained the sceond directory name and filename.
now i am not aware about the reciver side that how to place the two files in to different directories.
I have to make only one interface for this.
Thanks in advance.
split your requirement in to two different scenarios, very simple and effective, anyway no mapping involved .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Is there any other method as it is not well understood.
can we do something using variable subsitution in receiver CC.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
u have to follow the code in the link provided above but with some manipulations...
in case u r placing the files in different target dir depending upon the source directory then ur code will be something like this:
Note: i dont have a system as of now..so cant able to check the code for syntax errors..please cross check it
MessagePropertyKey mpk = new MessagePropertyKey("Directory","http://sap.com/xi/XI/System/File");
String SourceDir = msg.getMessageProperty(mpk);
if(SourceDir.equals("/SourceDirectory1"))
{
String targetDir1 = "/TargetDirectory1"
msg.setMessageProperty("http://sap.com/xi/XI/System/File","Directory",targetDir1);
}
else if(SourceDir.equals("/SourceDirectory2"))
{
String targetDir1 = "/TargetDirectory2"
msg.setMessageProperty("http://sap.com/xi/XI/System/File","Directory",targetDir2);
}
else
{
}
lIbraries for adapter module development:
http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development
How to develop adapter module:
>>How and where to deploy this code??
install NWDS and code ur logic...once done u have to deploy this code on ur PI server
refer this article (already provided u):
>>any other method is not possible
Try to do like this::
create 2 bussiness components
1 Sender agreement
1 Receiver determination -> depending upon the source directory name define ur routing condition..select Context Object "Directory" and then chosse ur bussines components
for ex ur XPATH will be:
Directory = /folder1 -> Receiver 1
Directory = /folder2 -> Receiver2
2 Interface determintaion
2 Receiver agreement
Select ASMA (FileName, Directory) in sender Channel
Select ASMA(FileName) in receiver channels
hi Amit,
Can you please tell me how to set the Xpath.
I have checked context type and selected directory
Then i checked on Xpath and written like Directory = /folder -> rec1
Then i added another row and done the same for reciver2.
Operand is AND between the two rows and Right operand is empty
When i excecute it is showing exception in moni that unable to excecute condition
Please tell me hw to set the xpath.
Thanks!!
u can go for adapter module...in the module depending upon the file name (or source directory) u can define the target directory...
chk this wiki (tweak the code as per requirement)
http://wiki.sdn.sap.com/wiki/display/Snippets/DynamicfilenameinaFiletoFilepassthroughscenario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please go through below blog,
http://www.saptechnical.com/Tutorials/XI/Fileadapter/page1.htm
regards,
ganesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.