Using operating system command on file receiver comm.channel

Hi,
I pepared a XI 3.0 message generating .txt file.
I must append content of this file to the and of the file with same name but different extension(.bak extension).
I know it is achieved with copy name.bak+name.txt it appends txt file to the .bak file.
My problem is: How can i supply name of .txt file to use as name of .bak file?
How can i do that?
Thanks.

/usr/sap/SID......./../../../Server0
Put the java program there.
Regards
Ravi Raman

Similar Messages

  • Is it possible to call operating system command after file receive?

    Hi expert,
    I'm trying to call operating system command after file receive comm.channel receive a txt file.
    operating system command uses txt file name as parameter.
    Is it possible? How?
    Thanks.

    Hi,
    It should be possible, actually we have two options that are
    1.RUN OS command before message processing
    2.RUN OS command after message processing.
    So you can give the commands in the RUN OS command after message processing.
    Check this links for more info
    http://wiki.sdn.sap.com/wiki/display/XI/SAP%20XI%20File%20Adapter%20OS%20Command%20Line%20Feature
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1690747750DB11724434094963199241End?blog=/pub/wlg/10392
    Regards
    Ramesh

  • Unzip file using operating system command in file/ftp receiver adapter

    Hi,
    I'm wonderdering how to unzip a zip-file in the receiver file/ftp adapter. I know it is possible to do it using the 'Operating system command' feature, but somehow the command I use seems to be ignored! (I'm using SP14, unix).
    The command I entered is quite simple: unzip %F (also tried the %f, but i guess it doesn't really matter wich on I use).
    Is it possible that I'm unzipping to another directory than the one i expect? the unzip should be performed to/in the current directory, and assumingly current directory is the one stated in the 'Target Directory', right?
    Hope someone can clearify this issue for me.
    Best regards,
    Daniel

    Hi Daniel,
    It seems to me also, that the files are being unzipped to a different location than what you are expecting. The OS command might getting executed in some default location(i am trying to fnd that out)on the server and not in the target directory of the channel(It seems logical to me)....
    If you have time...pls try this out & see whether this would help...
    Have a shell script written with the following commands in them
    cd <path to target directory>
    unzip $1(filename from the channel)
    and in the OS command in the Channel give....
    <absolute path to the .sh file> %F
    Thanks,
    Renjith.

  • Operating system command in file receiver adapter

    Hi,
    How to use the Run Operating system command after message processing option in the parameters tab of the file receiver adapter.
    I am working on a scenario wherein a batch file needs to be invoked after the file is written on the file system.
    So how do i invoke this batch file from the file reciever adapter ( Run Operating system command after message processing ).

    Hi,
    did you see this page?
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    it shows all you need to know
    Regards,
    Michal KRawczyk

  • Operating system command in file adaptor

    Hi,
    I am doing file to Idoc scenario, can i use the Operating system command in file adaptor to compress the file at FTP server and decompress the file at IE. I don’t know is it possible and if yes then how or is there any other way to handle the big files as the network speed is very low.
    Any clues!!!!!!!!!!!
    Thanks in advance
    Regards
    Swatantra

    Have a look into these threads - they seem to have the solution u need (i havnt tried it though)
    Unzip file using operating system command in file/ftp receiver adapter
    How to zip and unzip xml files dynamically by XI

  • How to use Operating System Commands while using define in sqlplus

    How to use Operating System Commands while using define in sqlplus . The Host OS is Linux
    define report_name=PROD_${host date "+%b"}.html
    The above is not working.
    The output should be 
    define report_name=PROD_JAN.html
    Regards,
    DB

    of course I was talking nonsense: the problem here is the mixing of bind variables and DEFINE variables.
    With the following changes the script should work (the conditions for begin_interval_time are perhaps not what you want):
    variable snap1 number
    variable snap2 number
    variable rptname varchar2(20)
    begin
    SELECT min(snap_id) into :snap1 FROM dba_hist_snapshot WHERE CAST(begin_interval_time AS DATE) >= SYSDATE-1;
    SELECT max(snap_id) into :snap2 FROM dba_hist_snapshot WHERE CAST(begin_interval_time AS DATE) >= SYSDATE-1;
    end;
    col file_name_value new_value report_name noprint
    select 'PROD_'|| to_char(sysdate,'MON') || '_' ||  to_char(sysdate,'DD') file_name_value  from dual;
    define  report_type  = 'html'
    define num_days=2
    define begin_snap=:snap1
    define end_snap=:snap2
    @@?/rdbms/admin/awrrpt.sql

  • Operating System Command After File Processing in Sender File Adapter

    Hello guys,
    actually we have different interfaces, and the client to take all the files from only one directory, for example D:/DPI.
    Unitl now we had one adapter for every file with the content conversion, so we didn't have problems with that. Now we have the problem that we sould maintain an order processing files.
    We thougth that an idea could be to execute one file pointing to D:/DPI and at the Operating System Command put like: copy D:/DPI/file.txt D:/DPI/outbound/file.txt, so when file is executed, we move the next file to another directory where is pointing the adapter. Doing this we have an error on the adapter giving us the message: Could not process due to error: java.lang.NullPointerException
    We are using a Windows.
    There is anyway to do in our way, or there is a better solution to resolve this problem?
    Any other idea to do this?
    Many thanks in advance.
    Regards,
    Xavi.

    Helo Guys,
    maybe I haven't explained well.
    We have one directory with different files. We have one adapter for every file( we need for the content conversion ) using NFS and all the adapters are pointing to the same directory.
    The problem is that if we have files A.txt, B.txt and C.txt we need to process in an order.
    And the problem we see is that for every file we have one adapter, so for example if we process file A.txt with one adapter, when this part is finished, we want to process file B.txt with another adapter, and the same for the rest of the files.
    So the idea we had is to create another directories, and when A.txt has finished move file B.txt to another directory.
    However this way is not running, if we log on the PI machine and execute cmd, we can do a copy of one file from one directory to another, but when we put this sentence in the adapter in OS command if we see the adapter log we see an error executing the OS command, but we don't know what is the error, there is no more information.
    There is any way to do this or maybe we have to manage in a different way?
    Many thanks in advance.
    Regards,
    Xavi.

  • Problem in File Receiver comm channel

    Hi,
    I can't see anything in the Recevier communication channel in the RWB > Component Monitoring>Comm. channel monitoring-->Comm. channels.
    I do have selected my comm channel.Its showing the message as "Comm. channel is configured correctly and started". But I cant see msgID and Explanation or error. Even, I cant fine any info in Error log.
    The diagnosis i did as follows. Let me know if u come across any thing.
    Checked the logs in VA but i didnt found any information and is not upto date. Bad luck
    *Recreated the Rcvr comm channel again and teste. Nohope.
    In the MONI its showing successfull, but i cant see output at destination.
    *cache is uptodate
    I have checked the queues, nothing got stuck.All queues are clear.
    *I cant restart the Server since it is in production.
    Your suggestions are highly appreciated.
    Thanks
    SRI

    Nilesh,
    All the things you mentioned are done by XI IS.  FYI plz chk below..
    Send binary file "/home/dpiadm/xi/tmp/passthru/EDI_250123.rpz", size 60, character encoding 8859_1 with QoS EO
    2007-10-19 13:48:43 Success MP: Entering module processor
    2007-10-19 13:48:43 Success MP: Processing local module localejbs/SFTPFileUploadDownloadAdapterModule
    2007-10-19 13:48:43 Success 192.133.217.6 /XI/SFTPTest pimsp kuljasimsim EDI_250123.rpz   /home/dpiadm/SridharRajuMahali /home/dpiadm/xi/tmp/passthru/ EDI_250123.rpz Enable
    2007-10-19 13:48:43 Success EDI_250123.rpz
    2007-10-19 13:48:43 Success SFTPOutBoundEDIFileToFile
    2007-10-19 13:48:43 Success SFTP_Sender_File
    2007-10-19 13:48:43 Success 8878c990-7e6b-11dc-8137-001a4b065b86
    2007-10-19 13:48:43 Success SFTPServerNameOrIpAddress  192.133.217.6
    2007-10-19 13:48:43 Success Indiashining.txt SFTPOutBoundEDIFileToFile SFTP_Sender_File 8878c990-7e6b-11dc-8137-001a4b065b86 SFTPOutBoundEEIFileToFile
    UNDEFINED
    2007-10-19 13:48:43 Success Host Key Verified
    2007-10-19 13:48:43 Success Socket Opened for Transport and connected..
    2007-10-19 13:48:43 Success SFTP SshClient is connected
    2007-10-19 13:48:43 Success Authentication Method is Public Key
    2007-10-19 13:48:43 Success Ssh2 Client is Connected and Authenticated
    2007-10-19 13:48:43 Success pimsp kuljasimsim
    2007-10-19 13:48:43 Success /XI/SFTPTest
    2007-10-19 13:48:43 Success /XI/SFTPTest
    2007-10-19 13:48:43 Success localFolder2 + dropFileName2  /home/dpiadm/xi/tmp/passthru/EDI_250123.rpz
    Entering to download file
    2007-10-19 13:48:43 Success Current Directory before LCD0 : /home/dpiadm
    2007-10-19 13:48:43 Success Current Directory After LCD0 :/home/dpiadm/xi/tmp/passthru
    2007-10-19 13:48:43 Success download completed
    2007-10-19 13:48:43 Success MP: Processing local module localejbs/CallSapAdapter
    2007-10-19 13:48:43 Success Application attempting to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.
    2007-10-19 13:48:43 Success Trying to put the message into the send queue.
    2007-10-19 13:48:43 Success Message successfully put into the queue.
    2007-10-19 13:48:43 Success The application sent the message asynchronously using connection File_http://sap.com/xi/XI/System. Returning to application.
    2007-10-19 13:48:43 Success MP: Leaving module processor
    The message was successfully retrieved from the send queue.
    2007-10-19 13:48:43 Success Confirmation mode test found. File sent.
    2007-10-19 13:48:43 Success The message status set to DLNG.
    2007-10-19 13:48:44 Success The message was successfully transmitted to endpoint http://quark:8005/sap/xi/engine?type=entry using connection File_http://sap.com/xi/XI/System.
    2007-10-19 13:48:44 Success The message status set to DLVD.
    2007-10-19 13:48:44 Success The message was successfully delivered.
    Note:- I AM NOT ABLE TO SEE ANYTHING IN THE RCVR COMM CHANNEL(RWB).
    any Idea about, where can I see the message if it got stuck in Integration server apart from logs
    Thanks
    Sri Raj

  • File Receiver Comm Channel in error

    Hi All,
    I am getting below error in my receiver communication channel -
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Unable to clone File Adapter receiver channel for parallel processing
    This is just FiletoFile scenario. I am trying to use VARIABLE SUBSTITUTION here to give dynamic name to the file at receiver. I haven't use FCC here.
    If I dont use VARIABLE SUBSTITUTION then scenario is working fine.
    Thanks & Regards,
    Rashmi Joshi

    Hi Abhradeep,
    I am getting new error now -
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: Vname
    I have changed the reference value as -
    Emp_ID
    payload:MT_File,1,Record,1,Emp_ID,1
    Thanks & regards,
    Rashmi Joshi

  • XI 3.0 File receive comm.channel using variable for folder/file name schema

    Hi,
    I prepared a integration message to produce .txt file output of message.
    I prepared message successfully, it's running properly and producing .txt file.
    My problem is to set .txt file name.
    I must set file name using by some information in .txt file.
    I must get some part of the first line of .txt to set filename.
    I declared a variable to do it.
    How can i set referance of variable?
    payload:..?
    Thanks.

    Hi,
    this blogs might be helpful:
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417800%29ID0935780750DB11281184595516315205End?blog=/pub/wlg/13704
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417800%29ID0935780750DB11281184595516315205End?blog=/pub/wlg/2664
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417800%29ID0935780750DB11281184595516315205End?blog=/pub/wlg/1888
    http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
    Regards
    Patrick

  • Error in File receiver comm channel

    Hi,
        In Runtime Workbench communication channel monitoring i get the following error
    Unable to create new pooled resource: UnknownHostException Error when getting an FTP connection from connection pool
    Could you please let me know why am i getting this error
    Thank you,

    Hi Deepak,
    This error you will get if you are giving wrong authentication details for FTP connection. Please make sure that your details are correct.
    First try to open your FTP server through the IE.
    Otherwise, open Command Prompt.
    Type FTP-> Open your server name->
    you will get the message connected to your server name.
    Then give the user id and password to enter into the server.
    If you are able to log in here. Then your details are correct otherwise check with the basis team for the correct user id and password.
    Regards,
    Nutan

  • Operating system command to zip the file

    Hi Experts,
    I got proxy to file scenario, i can place the text file successfully in reciever side, i want to zip the file in reciever side using operating system command option in reciever Communication Channel.
    Can anyone please give me the operating system command to create the zip file in reciever side.
    Kind Regards,
    Praveen.

    Hi Praveen,
    >>Can anyone please give me the operating system command to create the zip file in reciever side.
    Why OS commands and not the PayloadZipModule?
    If you need OS commands check this blog of Michal /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    Update
    You can try this command too
    cmd /C "jar cMf \\<folderpath>test1.zip \\<folderpath>*.*"
    Regards
    Suraj

  • Execute external operating system command

    Hi Friends,
    I have a requirement to run a script file with extention '.PL' on the application server using ABAP.
    i have sample how to run it in XI.
    XI3.0 provides a very simple way of handling this using the "Operating System Command" in the File Adapter.
    I post my output file in the following folder,
    /usr/sap/sapout/test/
    The shell script is available in the following path,
    /usr/sap/bin/convert.pl
    The figure below explains as to how we call the shell script using "Operating System Command".
    File Acess parameters
          Target Directory      = /usr/sap/sapout/test/
          File Name Scheme = TestOutput.txt
    Processing Parameters
         File Construction Mode          = Add Time Stamp
         File Type                              = Binary
         Operating System Command = /usr/sap/bin/convert.pl %F
    I have to do the same thing in ABAP as it has been done for XI as mentioned in the above example.
    My operating system is UNIX.
    If any one can give me a sample it would be really helpful to me.
    Thanks in advance,
    Arundhathi.

    Hi Arundhati,
    You can run operating system commands from ABAP.
    e.g. If you want to change UNIX right for any file, you can use following code.
    lv_ucomm  = 'chmod a+rwx 123.txt'.
    CALL 'SYSTEM' ID 'COMMAND' FIELD lv_ucomm.
    whatever command you provide in Field parameter ( lv_ucomm in the above case ), ABAP run that command at operating system level.
    In your case, you can provide command in lv_ucomm to run script at operating system level.
    Hope it will help you.
    Regards,
    Naren

  • Run operating system command for sender File adpter (NFS)

    Hi All,
    iam doing a file to RFC scenario, using 'Run operating system command' in sender file adapter to change the file name while archiving (after processing completed).
    I mention OS command like this:
    sample_server\scripts\Test\Rename.bat"
    Rename.bat file calls a 'perl script' code.
    when i run interface, could see below statement in adapter log ->
    "Execute OS command "
    sample_server\scripts\Test\Rename.bat"
    but the script was not run and file name was not changed.
    Please advice what could be the problem?
    Does this mean script executed successfully?
    Do i need install perl software on XI server, even perl script (.bat file) is executing on sample_server?
    Thanks in advance..
    Regards,
    Rajesh

    Hi,
    Just check the following URL and give it a try again :-
    Executing Unix shell script using Operating System Command in XI
    Hope this info Helps..
    Regards,
    Aditya

  • How to execute operation system commands by using TSQL without enabling xp_cmdshell.

    Hi Experts
    Looking for advise if one can use operation system commands using TSQL without enabling xp_cmdshell. 
    actually using xp_cmdshell requires sysadmin privs which I am unable to provide (directly or using proc) to a user  but the user needs some operating system commands to execute for file manipulation from sql server session. Please share your thought.
    Best Regards 
    khalil

    >but the user needs some operating system commands to execute for file manipulation from sql server session
    See article here
    http://www.mssqltips.com/sqlservertip/2014/replace-xpcmdshell-command-line-use-with-sql-server-agent/:
    "Problem
    I need to run something from the command-line, but based on best practices xp_cmdshell has been disabled. The task that needs to run is an internal process that will originate from within SQL Server. Is there a way to do this without using xp_cmdshell?
    Solution
    The use of xp_cmdshell is generally frowned upon and is now recommended to be disabled, unless it is absolutely necessary.  There is a solution that works around this restriction via the use of SQL Server Agent.
    Wherever SQL Server is installed, SQL Server Agent is installed with it (except for SQL Express). SQL Server Agent has the ability to run job steps which invoke the command shell. And in the case that the job is owned by a member of the sysadmin fixed server
    role, the job will execute as the service account under which the SQL Server Agent is running. "
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

Maybe you are looking for

  • Not able to get data in the F4 help for disrtibution channel in ic web

    Hi Experts, Need some help. 1. I have a ic web screen for complaint. Here in the header(Form view) there is a F4 for Distribution channel. The item list which is a table view, which contains one column . This column contains checkboxes. Issue: scenar

  • Problem in connecting JCO destination in web dynpro

    HI all, I was installed sneak preview of Net weaver 6.4, I want to do some web dynpro (java) programs which connect to back end systems.(R/3 system). The R/3 system which I want to connect is at remote place, i have connectivity to that R/3 system us

  • Cross joins on queries

    HI,     how we can apply cross joins on select query.plz help me .I am using tables ekko,ekpo and lfa1 .Plz help.

  • Problem with Archive and Install - Second disc won't complete

    I'm trying to run an archive and install for my iMac, OS 10.4.11. I get through the first disc fine, but after I put in the 2nd install disc, it gets all the way to the "finishing installation" and then won't move past "running GarageBand Demo Songs

  • Windows 7 taskbar hidden

    All of a sudden, I can no longer get the Windows 7 taskbar to show when I place the cursor at the bottom...What could be the cause(s)?