How to move flat file after loading in owb to other directory with othernam

Hi All,
I wast struck in problem . after loading the flat file in owb that file should be move or rename or zip with Date everyday .
I dont know how to achieve this issue in owb via proceudre or any other way ... .
how to zip files from pl/sql procedure ...... with sysdate.zip.
any one please help me in this problem to come out soon.
thanks ,
murari

One way is to use a Java stored procedure, this can then be called from a map or a process flow. The Java stored procedure will use the Zip capabilities in Java to do what you need. For example you will need the following procedure and you will have to grant privileges for your file to ZIP and the entire directory for zipping into (since the file name will be dynamic):
For example grant YOURSCHEMA (change to your tgt schema) read on your extract directory where your file to zip is and write on your zips directory (where the zips will go);
exec dbms_java.grant_permission('YOURSCHEMA', 'SYS:java.io.FilePermission', 'c:\staging\extracts\*','read');
exec dbms_java.grant_permission('YOURSCHEMA', 'SYS:java.io.FilePermission', 'c:\staging\zips\*', 'write' )
You can then create your procedure which you can invoke
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "otnZipFile"
AS
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class otnZipFile
public static void zipFile(String zip, String filename)
byte[] buf = new byte[1024];
try {
String outFilename = zip;
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
FileInputStream in = new FileInputStream(filename);
out.putNextEntry(new ZipEntry(filename));
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
out.closeEntry();
in.close();
out.close();
} catch (IOException e) {
create or replace PROCEDURE zip_file(
dir IN VARCHAR2,
file_name IN VARCHAR2) IS
LANGUAGE JAVA NAME 'otnZipFile.zipFile(java.lang.String, java.lang.String)';
For example here I zip a file MYCSV.csv into the zip file MYZIP.zip
exec zip_file('c:\staging\zips\MYZIP.zip', 'c:\staging\extracts\MYCSV.csv');
Cheers
David

Similar Messages

  • How to design Flat file for loading attribute dimension in a planning application

    Dear Gurus,
    I have a requirement to extract attribute dimensions from an essbase application and load it to another planning application. I have a dimension called Program and two attribute dimensions Sales Manager, Accounts manager associated with Program dimension in Essbase application. I will Extract these dimensions using Essbase outline extractor. After Extracting the attribute dimensions I have to load these dimensions to planning applications using outline load utility. Kindly guide me how to design the flat file for loading attribute dimensions in planning application.
    Thanks and Regards
    SC

    You could dig through the docs and try to figure out the file format manually, or you could do this the easy way.  Simply use the Outline Load Utility to export your attribute dimension from Planning.  The export file format is the same as the import file format.  You might have to manually add a couple of test members to your attribute dimension so that your export file has some content.  Then simply update the file you exported, and import it.
    (I am assuming you have already manually created the Attribute dimension in Planning, and that you simply need to add members to it.)
    Hope this helps,
    - Jake

  • How to upload flat file in planning book

    Hi,
    Can anyone tell me how to upload flat file(e.g xls, csv) in planning book against key figures(e.g forecast) in some characteristics level(e.g brand, sku etc)?
    Is it possible to have screen shots or path to follow?

    Hi
    Yes you can upload the excel files or flat files in APO planning area. APO planning area is made of characteristics and key figures. All the characteristic information is mainly available in Infoobject. You can upload these excel files in infobojects which will than reflect in planning book. Please find the detail information regarding APO BW building blocks.
    http://help.sap.com/bp_scmv250/BBLibrary/documentation/DPL_BB_ConfigGuide_EN_DE.doc
    Please go through the section 2. Setting up APO BW which will tell you all the details steps.
    Please remember to activate the infoobject once you load the data.
    I hope this will help you.
    Thanks
    Amol

  • Flat File Data Loads to BI 7.0

    Hi Experts,
    Please update me what is the best approach i have to follow for the below scenario of Flat File Data Loads
    I will get data in Excel ....with Two worksheets....from the user
    My requirment is to place the file in Central location avaliable to the user and BW to update if any changes necessary  and want to load data(full0  to bw from file if there are any changes
    Please update me how to deal with this scenarion of Two work sheets,In a central location...
    Thanks

    Easiest thing would be to use a DSO with change log to handle the changes to pass onto to any cubes and load a full every night
    Then let the change log worry about any changes to the workbook
    You have to be careful about the DSO keys though for this to work properly
    Now to automate the loads - just how are you planning to create the infopackage as it will only read a csv and not the binary xls
    Well it will read the binary xls if you maybe use a dbconnect with a jdbc driver to read the xls (that's on my next thing to do - but if you are as your user id suggests a "bw learner" then that may be a bit complicated)
    The only other thign to do is to write a macro that automatically creates the csv file on the app server when the user quits the xls
    Or off course you can just dump the csv each night - but then that is a manual task and in systems I design I hate manual tasks as staff go on holiday and peopel change jobs and it's not really very SoX compliant

  • How to handle flat file dissembler in biz-talk from getting spited in to multiple files???

    Hi,
    How to handle flat file dissembler in biz-talk from getting spited into multiple files according to number of transaction sets???
    where the Map flow is from Flat file to X12 Standard files.
    Please advise...

    You can go through following links:
    Developing
    Custom Pipeline Components
    How
    to Develop BizTalk Custom Pipeline Components - Part1
    Custom
    BizTalk Pipeline Disassembler Component
    Creating
    a custom BizTalk 2010 pipeline component–Part I
    add one more which talks about extending the FFDASM @http://msdn.microsoft.com/en-us/library/ee267856(v=bts.10).aspx
    Regards,
    Rachit
    Vote, if you find it useful.

  • How do i recover files after being trashed?

    how do i recover files after being trashed?

    If you emptied the trash, you don't unless they are on your backup disk.

  • How to convert Flat file(.txt) data to an Idoc format(ORDERS05)

    Hi,
    How to convert Flat file(.txt) data to an Idoc format(ORDERS05). If any FM does the same work please let me know.
    thanks in advance,
    Chand
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jul 26, 2011 11:11 AM

    Hi,
            For more information, please check this link.
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Have a look at the FM IDOC_XML_FROM_FILE. May be it helps...
    Regards

  • How to run media file after Runtime.exc the real player?

    Hi
    How to run media file after Runtime.exc the real player application

    String command = "cmd /c start videotest.rm";
    Runtime.getRuntime().exec(command);

  • How to move PDF file from Spool to Application Server?

    How to move PDF file from Spool to Application Server?
    Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
    RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
    The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.

    Hi Gemini ,
    Please refer the below links.
    [http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
    [http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
    Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM

  • How to move downloaded files from download folder to other relevant folder or how to download files in relevant folders other than download folder

    how to move downloaded files from download folder to other relevant folder or how to download files in relevant folders other than download folder

    Just drag the file from the Download folder to the folder of your choice in Finder. If you are using Safari you can designate a new default download destination in Safari>Preferences>General tab, 'Save Downloads to...'. Other browsers should have a similar option in their preferences.

  • How to move all files but X to Y

    It doesn't really matter if it's in the terminal or if it's a applescript but I need to know how to:
    Move all files in a dictionary but a few named.

    Could you pleas explain more?
    If you do not understand the shell while loop, it is possible that using shell commands is a bit more dangerous than you might want to try.
    The explanation:
    ls -a | grep -v "X" | while read file
    do
        mv "$file" "Y/"
    done
    ls -a will list all the files in the current working directory (including the invisible files that start with a leading period.  Thinking about this, maybe you do not want to include -a.  You could cd /path/to/the/desired/directory as a way to set your current working directory as the directory you wish to move things from
    cd "/path/of/the/from/directory"
    ls | grep -v "X" | while read file
    do
        mv "$file" "Y/"
    done
    The ls command's output is piped (the vertical bar | ) into the grep command (general regular expression parser).  The -v option tells grep to throw away any lines (filenames) that match the regular expression "X".  So if the regular expression X matches all the files you do not want to move, the filenames send to the next pipe will be the files you wish to move.
    The while loop will read the filenames grep has selected and invoke the mv (move) command for each file selected by grep and move them to the destination directory Y
    The bigest risk is that you will execute this in the wrong directory and move the files that you need somewhere else.  OR WORSE, if "Y" is NOT a directory, and you DO NOT put a trailing / the mv could move easy file to the destination file, deleting the previous file for each file moved, so effectively deleting every file in the directory except the last one.
    This is why I said if you do not understand what is going on with the shell commands, you could do damage to your system.
    ls could have the /path/of/the/from/directory instead of using the cd command.  The grep command could be replaced with egrep that allows using alternate matching strings:
    ls /path/of/the/from/directory | egrep -v "abc.txt|def.jpg|xyz.mp3|etc..." | while read file
    do
        mv "$file" "/path/to/the/destination/directory/"  # notice the trailing slash for safety
    done
    Good luck.  I hope you do not destroy your system

  • Is it possible to know flat files names loading using particular info pack

    hi experts ,
    is it possible to know flat files names loading using particular info package  ??
    in our project we hav flat file extraction  manually ...as i am replacing old sap bi consultant i must contine pending loads ..
    as ther s no document about loads i must check and ensure about loads left out ..'
    for every flatfile they used load with differnt name ... if am able to get those files name i can list out  pending ones
    and can load
    is it possible to those details ??
    pls help me .....
    relative answer will rearded with points ............
    thanks in advance
    regards
    harry

    I AM REALLY THANK FUL FOR ALL.. your people are really quick .and giving relavtive answers ...
    they loaded from desktop only ....not from application server ..
    i got details  from info cube mange screen .they used to load data monthly wise ,so i hav given month in selection  and viewed data..
    Regards ,
    Harry

  • How to read flat file and convert to xml throught OSB

    Hi ,
    Can somebody help how to read flat file and convert to xml in OSB.
    appreciate ur help.
    Thanks & Regards ,
    Siva K Divi

    if you're using the oepe with osb plugin (will be installed when you install the osb locally) and then in your osb project > rightmouseclick > new > MFL.
    that's it
    maybe you're trying to create it within an oepe installation which doesnt have the osb plugin ?

  • How to convert flat file to XMl without key field value

    Hi experts,
    I have a input CSV Flat file which has got one HEADER line and Multiple Detail records.
    I do not have any key field value to convert this FLAT file to XML using normal file content conversion.
    Is there any module or Bean which can be used to convert this Flat File to XML.
    Or any other remedy to overcome this problrm.
    Thanks in advance.
    Regards
    Pradeep

    Hi Saurabh,
    Thanks for the reply.
    Ur understanding is perfectly alright.Lets say my file is like below.
    Account Number,Account Name,Currency,Unclear Balance,Account Balance010205000033,VAISHNAVI SALES CORPN,0.00,0.00,350000.00
    010205000034,CHAKKA ENTERPRISES,0.00,-641350.47,8649.53
    010205000035,SEHGAL TRADING COMPANY,338665.00,-220.00,461115.00
    010205000036,SHUBH LAXMI AGENCIES,0.00,0.00,0.00
    010205000037,EMPIRE AGENCIES,0.00,-245.11,0.00
    010205000038,PIONEER AGENCIES,0.00,-696386.00,303614.00
    I am not using the first line in the mappiing.
    Are you saying that I need to ignore the first line while doing the conversion using Recordset OFFSET ?
    Or do I need to make a single structure taking all the fields from header as well as details and while defining the structure I need to ignore the fields from header?
    Please suggest.

  • I want to import flat files by ftp in owb

    I want to import flat files by ftp in owb.
    When I config the ftp host ip, username, password and path, then I import the flat files, but
    this didn't succeed. And I find the owb didn't check the ftp host's directory,
    and it check the localhost of owb, so it reported there isn't the directory.
    So how to solve the problem.
    Thank you!

    Hi,
    you must first transfer the files via ftp to the dbserver and then process. Create a workflow with a ftp activity and transfer the files. After this you can call the mappings in this workflow.
    If you want to sample the flat files you have two choices:
    1.) Using the owb client on the dbserver and sample the files on the dbserver. Then you need only one location with the path on the db-server.
    2.) Using the owb client on a client machine and sample the files on the client. Then you need two locations: one local which points to the file directory on your client, one remote which points to the path on the dbserver. Use the first to sample the files, and change to the second before deploying the mappings.
    Regards,
    Detlef

Maybe you are looking for

  • OIM 11g R2 Provisoning using AD 11.1.1.5 connector

    Hi, i installed AD 11.1.1.5 connector successfully and i installed ConnerSever in AD machine and it up and running . when i am trying to run group lookup recon it is giving following error. <IAM-1020021 Unable to execute job : Active Directory Group

  • How to make use of Portal service in the web dynpro application

    hi I have some portal service and how to use that in the web dynpro application. and also what is the main diff between Portal Component and web dynpro application. do we required portal to run web dynpro application. thanks mmukesh

  • Webutil error while generate excel form

    Hi In my forms appl. I use webutil in order to generate excel reports I have to midtier instances both running on a separate host. End users connect through a WLB frontend. At one of the midtiers, when generating a excel report using webutil "error w

  • Reverse Function Keys

    Hi all, Help! I recently got Apple's wireless keyboard and I was fiddling around with it and now the "F12" function key (which has the "increase volume" no longer works) on my MBP brings on dashboard and the actual dashboard function key - F4 doesn't

  • Can't render or export

    FC studio 6, 8 core Mac Pro, 6 gig memory, 12 TB RAID storage: One of several sequences refuses to render "preview" or "needs Render" and will not export the show in sequence settings: 1080i ProRes 4:2:2. Deadline looming. What to do?