on 01-04-2008 7:11 AM
Hi,
The requirement is like I need to use a client proxy to delete a file at a server using file adapter.
Is it feasible ..please suggest how to to do this ?
Thanks !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to bring it up !!
Guys ...plz help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sneha,
u gonna create the scenario just to delete a file in FIle server???
or the requirent is something like.... u will send some data fro SAP using proxy to File server... and u need to delete the old file and create a new file???
Regards
Biplab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sneha,
u can do one thing...
trigger a file to file scenario ..which will delete the necessary files.
then u trigger Proxy to File.. which will create fresh files in the File server.
For Proxy to File see this weblog....
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
Regards
Biplab
Hi Sneha,
Actually i was thinking... u need to write File(report may be) in weekly/daily/monthy once.....
and before writing the File(report) ..u want to delete the old file/report....
1)u need to delete Files from File server, where u want to write file from proxy.why u need to delete the file??
can u please explain ur scenario...whats the requirement???
Regards
Biplab
Biplab,
Currently, what is happeening is I am calling a proxy report to create a file in a file server and the file adapter overwrites the data nad creates a new file. This scenario is working fine for small amount of data ( i.e, daily/weekly) but when I have to send monthly data to a file it is throwing some performance error.
So the workaround I have found is that:
1. I will delete the existing contents of the file in the file server.
2. Then, I will call proxy method number of times with small chunks of data.
Hope you understand my requirement.
Hi Sneha,
yes i understood :)!!
using BPM u can do it easlily.. but again.. it will be a big performance issue
u have to run two scenario simultaneousl
1) a File to File scenario..which will delete the File.(construction mode delete)
2)Proxy to File--will write the report...
but u have to write the report in such way that it first checks the content of the File server is empty or not...the report will trigger the Proxy if and only if File server is empty.
regards
Biplab
Hi Sneha,
u r correct ...delete mode is avialable in sender channel.
...u have to do some R&D....
1)create sender communcation channel...specify the file...construction mode delete.
2)create sender agreement.
No need to create rcvr comm channel & rcvr agrrement..
Although u will get an error message in MONI but File will be definetly deleted.... and no file will be created....
wait a minute.. i think u can do it...using a single scenario............in proxy to file scenario....
in rcvr file adapter u can use operating system command...
or can run some batch file....(u have to give the path of batch file..which will delete the file....)
And the file will be deleted before the channel is executed...
(my XI server is down..other wise i could have tell u more specificly)
All the best!!!!
Regards
Biplab
Thanks a lot Biplab.
Your ideas looks very good:
1)create sender communcation channel...specify the file...construction mode delete.
2)create sender agreement.
No need to create rcvr comm channel & rcvr agrrement..
Although u will get an error message in MONI but File will be definetly deleted.... and no file will be created....
Q: here how can i automate this whole process the file gets deleted just before the proxy is gng to write.
in rcvr file adapter u can use operating system command...
or can run some batch file....(u have to give the path of batch file..which will delete the file....)
And the file will be deleted before the channel is executed...
(my XI server is down..other wise i could have tell u more specificly)
This is a very good way. can you plz supply the batch file which is to be used and what are the steps to execute this.
Secondly, I want the batch file to delete the existing file only the first time the XI is start writing and after that XI will use append to create the new file .
Biplab. i am really thankful to u for helping me. this is a quite urgent requirement ...can you give me your gtalk id so that we can discuss these thioings online.
Thanks in advance.
Snehal,
See, if u r working on Windows OS.. u have to use windows delete command.. and if its unix ..u have to use unix delete command.
And no.. u need not execute 2 scenario...in the single scenario itself u can do it...i mean.. the OS command will delete the existing file before the creation of File by file adpater..
i dont have XI server access.. i am unable to tell u exactly...
But u try to do in that.. ur problem should be solved...
try to do it self.... u can learn alot....
Regards
Biplab
Biplab
how this would work ? for instance lets consider this file name as tdel.txt to be delted and again another interface that would uplaod chunks of data into the same file. what happens if the same interface that is to delete is file is triggered in the next interval? there will be a data loss.
regds
Prabhu
Hi Prabhu,
for instance lets consider this file name as tdel.txt to be delted and again another interface that would uplaod chunks of data into the same file>>
First of all the whole scenario will be done in single interface trigger.
OS command will delete tdel.txt first.
then tdel.txt will be created.
file will be delted first..then file adapter will create the file.
u have to do some setting in the rcvr Adapter..
Regards
Biplab
OS command will delete tdel.txt first.
then tdel.txt will be created
thats right but again when the interface is triggered the same file will be deleted and created again and this result in the loss of data i.e. the data that is written to the file during the previous trigger would be lost. corect me if i'm wrong
Hi Xi mates,
With the help of Biplab, I am able to meet one requirement of mine using OS line command before processing.
Actually, the scenario was to create a file once in a month with some sales order data for forcasting purpose. This scenario is to be triggered only once in a month and hence the file creation. Also, i wanted to delete the file once a new file to gng to be created by XI.
snehal
the concern over here is what happens if the proxy is triggered again? u will have th file deleted and again a new file created with previous set of data lost. as u said u can first have the proxy method caled to delete the file and later in the program u can can create a file. this will work fine for the first instance and what abt when caled for the second time. the same process is repeated resulting in deleting for the file first and creating a new file again thus resulting in the loss of data created during the first instance. this case is for when the file name is the same.
Yes, i want to do this but I can not use OS line command before the processing function as I want to call proxy method to create file multiple times and this will delete the my new file also.
Also, i have come across a FM : SXPG_COMMAND_EXECUTE
which can delete the file from the target location and this can be called in the client proxy report.
since u want to delte the file only once it is one-time program u got to use. hence instead of configuring an interface for this purpose u can have the RFC f/n module to perform this task. instead of calling it in the C.proxy u can have a separate report to perform this task as calling this in the proxy is as good as making use of external OS command in the comm.channel.
since u got to delete the file only once u need to have the process initiated as a separate instance for which there are f/n modules aviabkle. i remember my team using the f/n mod earlier but now unbale to track it. why not to use in the same client proxy is the file will be delted and recreated as per the code following in the proxy. as discueed earlier it results in data loss
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.