Creating Batch Files

I need best practices for loading a number of messages/transactions from SAP into a single flat file (i.e. similar to an ETL tool)?  Can this be done "out of the box" or do I need to build custom ABAP or JAVA code to build this file with a number of transactions?

You simply have to write your commands , one after the other :
sqlplus user/password @script1;
sqlplus user/password @script2 param1 param2;
sqlload userid=user/password control=table1.ctl log=table1.log data=table1.dat;
sqlplus user/password @script3 ;
Of course, there are many possibilities to display execution message, display output ...

Similar Messages

  • Creating batch file for ftp

    hi,
    can anybody tell me how to create batch file which will have username and password for ftp.
    i want copy file from remote server to local server using ftp.
    i want to create batch file which will perform all this taks..
    please help me.
    thanks in advance,
    Chetan S. Raut.

    Hi Chetan,
    You should use something like that:
    Code Snippet
      %windir%\ftp.exe -s:SCRIPT.TXT
    Look at this link for additional details: http://www.ericphelps.com/batch/samples/ftp.script.txt
    P.S. Note that this forum is about extending Visual Studio IDE - not about writing batch files.
    Hope that helps,

  • How to create Batch file to execute sql scripts

    Hi friends,  
          i want to create batch file to execute all my .sql scripts.
    I have all table ( all table scripts in single file ) ,Udds ( all udds in single file ) ,Stored procedures( separate file for each SPs ),Functions ( Separate file for each Functions ),Triggers and views scripts in .SQL file.   
    can anybody tell me how to create batch file for executing all these scripts in sql server ?.   
       while executing, it should ask Database name,server name, password. if these details are given then it should execute my all scripts in given database
    , if any error thrown then that error and procedure name alone have to move to separate log file..
    Please help me if this possible or any other easy way to do this..
    Thanks - Ravi

    Hi  Mate.
    can i save the below details in my batch file parmantly, so that i don't need to provide the details agains again in CMD while i execute this. Please help
    set /p SName=Server Name :
    set /p UName=User Name :
    set /p Pwd=Password :
    set /p DbName=Database Name
    If  i am providing the details before execution of this bat file it will throw error.

  • Create batch file

    hi all
    I want to know how to create batch file for
    java program to execute with mouse click.

    open txt file
    write these:
    @echo off
    @start java -classpath . *****
    ***** must be your main class name(dont add .class extension);
    and change file extension to bat

  • Creating batch file

    Hi
    Is this the correct way to create batch file
    ESSMSH filepath\filename.mxl and save with .bat extension
    example ---> ESSMSH C:\Documents and Settings\mpankhan\My Documents\Maxl scripts\inc.mxl
    were inc.mxl is the file name
    thanks in advance

    Hi,
    Yes it is ESSMSH filepath and filename, well as long as the environment path/variable is correct so you can just enter ESSMSH from command line, you can easily check that just by going to command line and enter ESSMSH.
    You may need to enclose the fiilepath and name in quotes if you have spaces in your path.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • RFBIBl00 - Creating Batch File

    Hello Everyone,
    I am writing a piece of ABAP code which creates a text file and submits
    this via RFBIBl00. One of the amounts BBSEG-WRBTR is set to 166.44 and
    this can be seen in the text file as 166.44.
    However, when I run SM35 to process the batch file ( as in FB01) the amount is
    being loaded onto the screen as 166,44 (notice the comma instead of the
    decimal point).
    Any ideas anyone????
    Cheers
    Andy

    Hi Andy,
    just to clarify, what happens is that in your input file, you specify the field value BBSEG-WRBTR as 166.44 but during the batch input run, it fills the screen field with 166,44?
    Hm... not sure why that would happen, but is it possible that something is not right with the default settings of the user the BI session is executed with?
    Does this happen with all fields that have decimals?
    If you can not get rid of the problem, maybe you could run the BI with a user that has a comma as decimal notation in the user defaults and get the BI processing that way.

  • Create batch file containing SQL commands

    Hi,
    Iam using windows xp... I have 8 *.sql files, all of them contain insert statements and every file takes 40 min to execute and when one finishes i execute the other.
    Is there any way that i can combine them and execute at one go..
    Now iam using
    spool o:\abc.log
    @abc.sql
    spool off
    Can any one help me ..
    Any help would be appreciated
    Thanks

    > all of them contain insert statements and every file takes 40 min to execute
    Insert statements!?
    All of them totally trash the Oracle Shared Pool.. If only done properly, each would take mere seconds to run and not 40 minutes.
    A snip of a benchmark I posted some time ago showing just how utterly wrong it is to code SQL inserts using literal values.
    SQL> create table footab( n number );
    Table created.
    SQL> set timing on
    SQL>
    SQL> -- doing a 100,000 inserts using a single SQL INSERT with bind variable
    SQL> declare
    2 sqlInsert varchar2(1000);
    3 begin
    4 sqlInsert := 'insert into footab( n ) values( :0 )';
    5 for i in 1..100000
    6 loop
    7 execute immediate sqlInsert using i;
    8 end loop;
    9 end;
    10 /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:04.91
    SQL> -- doing a 100,000 inserts using a 100,000 SQL INSERTs
    SQL> declare
    2 sqlInsert varchar2(1000);
    3 begin
    4 -- need to built a unique SQL for each insert
    5 for i in 1..100000
    6 loop
    7 sqlInsert := 'insert into footab( n ) values( '||i||' )';
    8 execute immediate sqlInsert;
    9 end loop;
    10 end;
    11 /
    PL/SQL procedure successfully completed.
    Elapsed: 00:05:21.47
    SQL>The second method is what you are using. 1000's of insert statements, each with hard coded literal values to insert.
    The first method show how it should be done from the client side - using a single SQL insert with bind variables.
    And the result? 5 minutes 21 seconds versus a mere 4.91 seconds!!!
    You need to seriously rethink your approach. Abusing Oracle is not how one achieve the spectacular performance and scalability that Oracle is famous for.

  • How to create a Batch file for java application  ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    [http://static.springsource.org/spring-batch/]
    Assuming you want to develop a batch application rather than actually just create a .bat file ..

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

  • Unix shell script to batch file for windows

    Hello all,
    Iam writing a program in java in unix environment and iam executing using shell scripts in unix this program is for client-server environment
    which look like this:
    For server:
    #! /bin/ksh
    export CLASSPATH=/user/vpp/jal/classes:$CLASSPATH
    #set var for filename config file
    export JAL_CONF_FILE=/user/vpp/jal/conf/JALapp.conf
    java -DJAL_CONF_FILE=$JAL_CONF_FILE jalsvr/JALTCPServer 7776for client side it is
    #! /bin/ksh
    export CLASSPATH=/user/vpp/jal/classes:$CLASSPATH
    echo $CLASSPATH
    java jalcl/JALTCPClient msoc05:7776my question is know i want to execute them in windows by creating batch files runsvr.bat, runcl.batbut how
    i gave PATH by giving JRE path but what is the replacement of export because iam having all class files
    in /jalcl for clients and /jalsvr for server but want to create this batch file in separate /bin folder how to do.please help me

    Thank you for reply ,
    And sorry by mistake question repeated twice,
    but when iam executing those batch files it is throwing some exceptions,
    in that file you did not mention to set the JRE path whether it is not necessary and also there msoc05 is the machine name of unix system that need to kept or need to be changed with window IP address .please reply.
    thanks in advance.

  • Procedure/batch file to export data from sql to excel(predefined path)

    Hi,
    I have countries, sites, states tables (total 3) in database (i have user id and password to connect to this database).
    every week i need to extract data from these tables into excel files and i need to save those in shared drive for team use.
    Currently i am connecting to database every time running sql query and manually exporting that latest data to excel and saving that as excel files in (G:\team\common\) folder with specific name.
    output format should be : excel (.xls)
    file names should - countries.xls,sites.xls,states.xls
    server name : ap21
    output location : G:\team\common\ ( G is shared drive).
    i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.
    could you please guide me what is the option and also help me with technical stuff to do this task.

    Hello,
    output format should be : excel (.xls)Do you really want to create .xls files? This is not easy to do because it is a proprietary (MS) binary format. You should consider other formats like .csv or .xlsx. Follow the link in the previous answer how to generate them.
    file names should ...The name of the files does not matter, you are free to name them as you like.
    server name : ap21
    output location : G:\team\common\ ( G is shared drive).You can write the file generated in the database only to directories that are accessible from the db as Oracle Directories. You could mount the shared drive to the db server, but it might be better to write the output to a server directory and then transfer them to the shared drive with OS-copy command or FTP.
    i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.I would use Oracle Scheduler to execute a PL/SQL procedure to generate the files and then a OS-batch file to transfer them. You can use the Scheduler to execute the batch file too, see {message:id=3895983}.
    Regards
    Marcus

  • Can I close Firefox and Plugin-container with a batch file? ANSWER: Yes. SOLUTION below.

    Steps to create batch file to End process tree: "Firefox.EXE"
    1. create new .txt file
    2. copy/paste the following: taskkill /IM firefox.exe
    3. Save
    4. Rename the txt file - EndFirefoxTree.bat
    5. Run from desktop at any time, give it a cute icon if you'd like!.

    This works well although user will need to put the .bat file in Documents and create a shortcut to desktop in order to change the icon (of the shortcut).

  • Installing Windows Updates Manually by using Batch File

    Hi
    i'm having a computer lab of Windows XP SP3. I want to create batch file so that i can maually installed updates by just clicking the batch file in every pc of computer lab instead of using WSUS or Windows update directly on all computer.
    Regards,
    Devang Patel

    We use
    BatchPatch for this sort-of thing.  You should take a look at it to see if it solves your problem.

  • Small query from batch file

    I have just created batch file with the below code
    FOR /F "usebackq delims=!" %%i IN (`sqlplus -s usr/pwd@orclprd @runquery.sql`) DO set var_x=%%i
    rem @echo on
    echo "value of var_x " is %var_x%
    Trying to get the value of variable x from the query which is in runquery.sql(select status from table1 where id=20292;)
    but when i execute the batch file ,it got stuked and not giving or printing the value of 'X';
    Do i need to add or modify any thing else to get the X Value????

    Wrong forum but this is what I do to get variables back....
    sqlplus -L -S %user%/%pw%@%host% @sp\oracle\sp_etl_rollback.sql > connect.logThe results of this connection test is put into the connect.log file (the greater than (>) symbol is a assignment operator to assign whatever it gets from the buffer on that query into the file).
    Then just use any FOR /F look to get the value from the .log file.
    Here is an example I use to find a certain ID:
    echo set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on linesize 4096 serveroutput on > temp.sql
    echo select count(*) from d_grid where grid_id = '%grid%'; >> temp.sql
    echo exit; >> temp.sql
    sqlplus -S %user%/%pw%@%host% @temp.sql > result.dat
    for /f %%x in ('more result.dat') do set exists=%%x
    IF '%exists%'=='0' goto :NO_GRID
    IF '%exists%'=='1' IF '%undo_type%'=='1' goto :GET_DATE
    IF '%exists%'=='1' IF '%undo_type%'=='2' goto :ORA_GET_BATCH
    IF '%exists%' GTR '1' (
         SET errormsg=Two separate grid entries contain the same name!!      
         goto :ERROR )TimS

  • Batch file for IE settings

    Hi everybody,
    I want to make some changes to IE settings of many PCs to be able to open a tool which willl be used by all users using the systems..
    Since same settings are to be applied to different systems. I want to create a batch file for it .
    Settings are :
    1.Go to internet Options-- security--sites--trusted sites and and the site
    https://abc.com under it
    2.Set security level for this zone as Low
    3.Check enable protected mode
    4.Go to internet options--settings--privacy and uncheck Turn on Pop-up blocker
    5.Go to tools--compatibility view settings and the site
    https://abc.com under it . Check option - display intranet sites
    in compatibility view
    I did some research on net and found that all these settings are done by changing entries in registery.
    The site http://support.microsoft.com/kb/182569 gave lot of info on what various codes mean . But since I am new to creating
    batch files , it does not help me in writing commands. Little more research showed me that my commands would be something like
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /.....................
    However I cannot use trial and error as any unwanted change to registery may cause damage to my systems .
    It would really be very helpful if anyone can help me with his/her expertise in batch files and reg files.
    My target will be for IE8/9/10/11 preview . I am assuming the commands would be same for these versions which are comparitively new.
    Thanks,
    Mani
    manISRT

    Hi,
    this is a very broad topic, with quite a few scenarios, and potentially lots of complexity.
    Here are some thoughts I have written down for you to consider:
    Firstly, you really need to understand the basics of IE Zones, and how it is that addresses are categorised into each zone.
    There are default settings for each zone, and these are initially defined by MS, but you, or the user can, and may, have changed which zone is active, in which situation.
    E.g., if you are dealing with pc's in your organisation and under your control, vs pc's not in your organisation and/or not under your control.
    For pc's which are in your organisation, are they used only inside your office network, or are they also used outside your office network?
    Are the pc's under your control managed by Active Directory (are they members of your organisation's AD Domain?
    Does your office network use a network firewall or proxy, and the pc's inside gain access to the internet by "traversing" this proxy?
    Is the website you mention, "inside" your organisation's network, or, "outside" your organisation's network?
    If outside, how do your organisation's pc's currently become configured for internet access?
    Do they have configurations applied to the pc's, such as proxy settings? If so, does this use Proxy Auto Configuration (PAC) or INS, such as wpad.dat or proxy.pac?
    Note that if you adjust site-to-zone settings, and/or settings for a particular zone, other websites which are categorised into that zone will also attract the adjusted settings, so you need to ensure that any changes you make, are suitable for those other
    websites too.
    Is the website address part of your organisation's domain name, or a domain name that you already have particular settings for?
    Is the website/address and the content upon it controlled by your organisation?
    For compatibility view, depending upon the IE browser version, there are different methods available, you may not need to adjust the browser settings if the webpages are suitably constructed:
    Does the website specify <!DOCTYPE  ?
    Does the website supply X-UA-Compatible metatag?
    You can deliver most settings for IE in a few different ways:
    - AD GPO (you can use Group Policy Admin Templates, or, Group Policy Preferences)
    - IEAK (you can deploy a settings package with or without deploying a version of the browser)
    - registry settings (which you can deploy using scripts or batch files)
    - get the user to manually apply the settings via the user interface
    Note that some settings may need to be applied per-user (HKCU) and some settings are per-machine (HKLM).
    If you have a multi-user or hotdesk scenario (where more than a single user, uses the same machine), this might require you to re-apply the settings for each and every user.
    E.g.:
    Your organisation is wanting to use a hosted web application, accessed from inside your organisation, but it is hosted outside your ogranisation.
    The address is http://contoso.websales.hosterxyz.com
    You examine your existing pc configurations and determine that the IE Trusted Sites zone is not currently in use by any standard configurations.
    The hosted web application requires IE Protected Mode to be disabled (because of some special functions/features).
    You examine the default settings of the IE Trusted Sites zone, and observe that the Trusted Sites zone already has Protected Mode disabled.
    You decide to categorise the website "http://contoso.websales.hosterxyz.com" as a Trusted Site.
    On a test pc, you manually add the website "http://contoso.websales.hosterxyz.com" to Trusted Sites, and test the web application is operating correctly.
    You then create an AD GPO, which adds this website address into the Trusted Sites zone, and link/apply/deploy this GPO within your AD.
    Your organisations computers automatically read, process and apply this GPO, and all computers are now configured for this website as a Trusted Site.
    Note that if you use the "classic" GPO methods (Admin Templates), users can no longer manually adjust websites in or out of the Trusted Sites zone, because when "classic" GPO is deployed, it removes the ability for users to adjust these
    settings manually.
    This may be suitable for your organisation, or, unsuitable - it depends upon the degree of "freedom" you wish/need to allow.
    Alternately, you could use IEAK or GP Preferences, to deploy the Trusted Sites settings - these two methods allow the end-user to manually adjust if they choose. This means the end-user can remove the settings you deployed.
    Again, this may (or not) suit your scenario.
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

Maybe you are looking for

  • IPhone: Using embedded QT movies that either Loop or Loop Back and Forth

    Hi to everyone, I'm working on a very simple iPhone app: it has several buttons that launch different QuickTime movies embedded in the application, that will either Loop or Loop Back and Forth. The desired looping behaviour is already set within Quic

  • Can't get update for os x 10.7.3

    Just bought a mac mini - it's telling me I need to update the os x 10.7.3 to 10.7.4 when I click on the updater it fails... when I go to apples download site I get either a check sum error or another error and am unable to use the download this has h

  • Photoshop CS3 - Vista | slow file opening

    Hello NG, i dont know the source for this problem, but i think after the last Vista Update Photoshop needs such a lot of time to work and also to open files. I have reinstall the new update of Photoshop from adobe.com.......but nothing... Is there a

  • Keyboard Shorcut - Swap Sound Output

    I swap from "Line Out" to "Headphones" all day long, and every time I do so I have to go to System Preferences>Audio and change the setting. Does anyone know how I can do this from the keyboard? Thanks!

  • AT&T Lacking Basic Customer Service and Accountability

    This details the worst customer service for a first time customer that I have ever experienced, attempting to use AT&T service.  To sum up the details explained below, my first experience with AT&T service consisted of a supervisor in the support dep