on 07-04-2013 9:25 AM
Dear Experts,
I am working on File to File (Pass Through) scenario where no ESR Objects involved.
i need to generate target file like this format.
if Source file name is like this 123.txt then i need to create my target file name like this 123.txt.pgp.
Please advise me.
Thanks & Regards,
Pavan
Hello,
Two ways to achieve this:
Adapter module:
Java mapping:
http://wiki.sdn.sap.com/wiki/display/XI/Dynamic+file+name+for+pass-through+scenario
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
4 Steps to achieve this.. what we are going to do is.. first store the actual original file name (123.txt) in a variable using Dynamic Configuration Bean... then save this value in another variable using variable substitution... and finally we will just append .pgp to this variable... so final result will be 123.txt.pgp
Add the DynamicConfigurationBean as follows:
Configure the parameters:
Add variable substitution:
Use the variable in your file name:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
Yes, you can use operating system cmmand after message processing in your file adapter.
Rename <Old file name> <New file name>
OR
Ren <Old file name> <New file name>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhradeep Basu,
Thanks for the response i tried to run OS command at my sender file channel(NFS) before message processing.
my source file name is sf_out_*.txt
my desired file name sf_out*.txt.pgp
i write my command like this
Renamesf_out_*txtsf_out*.txt.pgp
&
Rensf_out*txtsf_out_*.txt.pgp
both are not working.
Please provide your inputs.
Thanks & Regards,
Pavan
Hi Gagan,
Thanks for the prompt response. I tried as you said. But no use. Still i am getting my output file name as .txt only.
i have gone thru this below link. in this link it is mentioned that we need SAP_XI_CONFIG_FILE_OS_CMD_J2EE role to assign OS command. But this link is for PI7.3 EHP 1. My PI version is 7.3 SP5. i checked the role but does not exist in my PI server.
Thanks & Regards,
pavan
Hi pava,
Check this wiki http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407
If you only need to change the extension i would use an OS command in a way similar that the wiki mentioned.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Inakai,
Thanks for the prompt response. I have gone through your suggested link.
All options not possible.
I can't run OS command hence i am using SFTP adapter at receiver end.
I can't write UDF ( no ESR involved).
Please find the screen shot of source file format.
STATUS;USERID;USERNAME;FIRSTNAME;LASTNAME;MI;GENDER;EMAIL;MANAGER;HR;DEPARTMENT;DIVISION;LOCATION;TIMEZONE;HIREDATE;EMPID;TITLE;BIZ_PHON;FAX;ADDR1;ADDR2;CITY;STATE;ZIP;COUNTRY;MATRIX_MANAGER;DEFAULT_LOCALE;PASSWORD
Active ;SF8000007 ;DOBRD0007 ;David ;Dobraszkiewicz ; ;M;
every field is "; " separated.
I have one approach in my mind. Kindly suggest the possibility.
I will create a data types contains 1 filed(0.unbound) and i will pass the data as a string. then i will perform mapping (includes UDF for my Dynamic name).
at receiver end i will use Content conversion. (SFTP with Content Conversion).
Is this possible?
I will pass this data in
Thanks & Regards,
pavan
Hi Pavan,
Yes, it's possible your approximation with ASMA configuration. Check this thread http://scn.sap.com/thread/3195212 because there are some things that you need to configure for avoid problems, as Gred suggestion if you are using the advantco adapter.
Regards
HI Inaki,
Thanks for the prompt response. I am stuck st receiver SFTP side. SFTP adapter doesn't support file content conevrsion directly.
We need to use Module Configuration to convert the data into fcc format.
i need to use these below FCC parameters
Fields.end Seperator ‘nl’
Fields.fieldSeperator'nl'
Fields.fieldNames Message.
How can add this below parameters in my SFTP comm channel?>
Thanks & Regards,
pavan
Hi Pavan,
Have you tried with the adapter module MessageTransformBean?
http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
Regards.
Hi Inkai,
Thanks for the response. I developed my scenario. While i am testing the interface i am getting the below error.
i searched SDN and made changes according to this below blog
but still error persists
Thanks & Regards,
Pavan
Hi,
You can have a Java mapping in place with dummy service interfaces. In the mapping append the desired extension to your file name.
https://wiki.sdn.sap.com/wiki/display/XI/Sample+JAVA+Mapping+code+using+PI+7.1+API
Hi Adarsh,
can't i achieve this using OS command at Sender File channel(NFS). ?
i can see Run OS command options(after & before processing)
i am using run OS command to at sender File channel(NFS) rename the File name Before processing.
Ant body can provide me the syntax to rename the file
my source file name will be like this sf_out_201209281006.txt
i need to write a OS command to add .PGP extension to my source file name before processing
sf_out_201209281006.txt.pgp
Thanks & Regards,
Pavan
Hi Adarsh,
I have gone through your suggested link. Can you please guide me how can i achieve my requirement using dummy service interface.
The jave code is for PI 7.1 but we are using PI 7.3 sp5. do i need to change the code?
then what will be my design plan?
please provide me your valuable inputs.
Thanks & Regards,
pavan
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.