Help needed to write control file.

Hi Guys,
i need to write one control file to upload data from .txt file to oracle table.
.txt file data contains like this
2006041110:40:22
2006041111:30:42
2006041210:40:22
i need to upload this data into date column in oracle table.
please help me to write control file for this requirement.
Thanks for your help and time

    data1        "to_date(:data1, 'YYYYMMDDHH24:MI:SS')"

Similar Messages

  • Help needed to write download file program

    I want to write a servlet which will allow clients to download files from server. Main work is, a fixed no.of downloads(only n users can have download permission) will be allowed at any time. if any more no.of new users came they have to wait for a download connection. if a connection is freed then that connection will be given to a user who had entered first. (First In First Out). Can it possible. Plz help me. Thanks in advance.

    It's easy:
    In PAI you have do an insert into a database table, following the steps:
    1.on PAI  create a module: for exemple Zwrite_table.
    2. inside Zwrite_table code as follow:
    move var1 to wa_table-var1.
    move var2 to wa_table-var2.
    move var3 to wa_table-var3. etc etc
    insert table ztable from wa_table.
    P.s. ztable is a database table.
    wa_table is a structure that have the same structure of ztable.
    var1 var2 var3 etc is a variable inside your dynpro.
    regards,
    Roberto.

  • Help me to build control file

    i have data file in .CSV format.
    i need to upload this data into control file.
    for this i wrote one control file.
    my consern with date format in table.
    in .csv file column B and C having date and time.
    i want to merge this to columns as single column in oracle.onemore thing before date i have one extra character i need to remove that character also
    example data in .csv file.
    120060422 122544
    220060422 122645
    320060422 122744
    please help me to write control file.

    Open your CSV and insert a Column next to your date column enter formula
    MID(Cell Number, Starting Position, Number of Characters to return)
    Drag this formula till last cell select the column and Copy-> Paste Special Values
    Then delete the original column
    Also you can merge the two date columns in excel itself by using the formula
    Concatenate(Cell A, Cell B)
    Then you can upload this data.
    Hope this helps.
    Rajnish

  • Need help in writing the control file for SQLLOADER

    Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
    i.e. My data file is something like
    aaa,bbb,cc
    dd,eee
    And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
    Thanks...

    Nisha,
    Again I posted test example in your other post but here is how can do that
    CREATE TABLE mytest111 (
       col1 NUMBER,
       col2 NUMBER,
       col3 NUMBER
    LOAD DATA
    TRUNCATE INTO TABLE MYTEST111
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 integer external,
    col2 integer external
    #mytest.dat
    1,2,3
    1,2
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   mytest.ctl
    Data File:      mytest.dat
      Bad File:     mytest.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table USIUSER.MYTEST111, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    COL1                                FIRST     *   ,  O(") CHARACTER           
    COL2                                 NEXT     *   ,  O(") CHARACTER           
    Table MYTEST111:
      2 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  33024 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             2
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Fri Apr 10 11:40:39 2009
    Run ended on Fri Apr 10 11:40:40 2009
    Elapsed time was:     00:00:00.99
    CPU time was:         00:00:00.06
    {code}
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help needed in Message Control - very urgent

    Hi Experts,
    I have one requirement where in the customer wants to stop creation of IDOC which posts Invoice using message control and message control status should be changed to RED color and also the message should be populated in the processing log saying 'IDOC processing failed, External customer numbers not maintained'.
    Could you please let me know any user exits or customer exits available for this purpose.
    I have searched all the possibilities.
    I have chanked the program RSNAST00 which picks up the data from table NAST and looks into table TNAPR to get the processing porgram for th selected output and also this program checks the partner profile and gets the process code which creates an inoice IDOC. I searched for user exits and customer exits to popolate the required messages and stop IDOC creation.
    I am an ABAPER and i know i need to write code to do validation, but could not find the exact place where to write? I any ABAPERS looking at this post, please reply me.
    Can anyone please advise me how to go about solving this issue?
    Thanks
    Srinath

    Hi,
       I am sending the requirement.
      Please send me the solution.
    Requirements:
    1.     EDI Invoice requires populating bottle UPC number not case UPC in IDOC and also populates customer PO number when invoice billing type is a credit.  These changes need to be reflected on EDI invoice (Idoc INVOIC02).
    Investigation:
    Requirement 1. EDI invoices are populating segment E1EDP19 qualifier 003 based on the unit of measure in the line item.  If shipment unit is CSE then it populates CSE upc, if shipment unit is EA then it populates Bottle UPC. 
    a.     It was found that the UPC populated on the EDI invoice was being read from material master – Additional data tab.  (Field SMEINH-EAN11).  For the EDI invoice, the customers expect the bottle UPC on this column.
    Requirement 2.  Need to always populate Segment E1EDK02 Qualifier 001 (customer PO) on the INVOIC02 idoc.  Standard SAP populates this information only when the billing type is F2 (regular invoice) and if the customer PO was entered in the Sales Order.
                                a) Premier requires this information to be populated in the idoc if the billing type is G2, RE, L2 also.
    Solution:
    Requirement 1.
           IDOC_OUTPUT_INVOIC function module needs to be changed to always populate the UPC number for the bottle UPC in segment E1EDP19 qualifier 003, field IDTNR.  This number is found on the material master – Basic data 1 view.  Field name is MARA-EAN11.   Please see screenshot of where in the material master to find the bottle UPC. 
         a. This change applies to all billing types (F2, G2, L2, RE etc).
           Requirement 2.
                 Change IDOC_OUTPUT_INVOIC function module to always populate customer PO information in Segment E1EDK02 qualifier 001, field BELNR.
    If billing type is equal to G2, L2, RE and VBRK-XBLNR not equal blanks then make BELNR = VBRK-XBLNR.
    Segment:  E1EDK02
                                  Field:  QUAL = 001
                                  Field:  BELNR = VBRK-XBLNR
    Please help me how to move a step ahead.
    Waiting for your immediate response.
    Thanks,
    Chandra.

  • Help needed in creating pdf file

    Hi all,
    I keep coming back to this question again. I chose iText over jasper reports to generate PDF files for some good reasons. in my application I
    1. accept file uploaded by the user
    2. process the data inside files and separate them into good data & bad data
    3. put these good and bad data in a vector
    4. pass it to a bean to write PDF files
    5. files are stored in a application ROOT path under different folders based each data input (ex: each employer folder)
    6. I delete these files from the application path
    I go back to the data submit screen and start submitting for another employer. While processing for the next employer the system process data correctly and writes the PDF files into the appropriate folder, but t when the browser link that has the PDF get clicked, instead of current PDF, we still get the previous employer documents.
    what to do?
    please please somebody help me
    hepzi

    hey folks
    I have found out that every time the PDF file is downloaded, in the firefox download manager, that opens up to show the status of the downloaded PDF, when I click on the "Remove" button once I open the much needed PDF, the PDF is not carried onto the next upload for some reason... but I still need to investigate in Netscape and see how it works..
    thanks guys
    I will come back to update you once I test it in netscape navigator
    hepzi

  • URGENT HELP ON SQL LOADER CONTROL FILE

    Dear All,
    Please find my control file below. I need two leading zeros for the coulmn DDA_CLEARING_NUMBER. Presently its loading 18 characters. position is (0791:0808). Now i need this to be loaded with two leading zeros to the left. I need padding two zeros in front of the 18 characters. HOW CAN I DO THAT? PLEASE HELP ME IN IT.
    OPTIONS (DIRECT=FALSE,
    ROWS=30000,
    BINDSIZE=3000000,
    READSIZE=3000000,
    SKIP_UNUSABLE_INDEXES=TRUE)
    LOAD DATA
    INFILE '/xxx/xxx/xxx.dat'
    BADFILE '/xxx/xxx/xxx.bad'
    DISCARDFILE '/dev/null'
    APPEND
    INTO TABLE AAA
    WHEN MONTH_END_STATUS = 'O'
    TIME_PERIOD POSITION (0079:0086) DATE "YYYYMMDD",
    SERVICE_TYPE POSITION (0077:0078) CHAR,
    ACCOUNT_NUMBER POSITION (0001:0020) CHAR,
    MONTH_END_STATUS POSITION (0060:0060) CHAR,
    CIF_BANK POSITION (0066:0069) CHAR,
    CIF_BRANCH POSITION (0070:0074) CHAR,
    PLAN_CODE POSITION (0075:0076) CHAR,
    DDA_CLEARING_NUMBER POSITION (0791:0808) CHAR,
    TAX_ID POSITION (0516:0524) CHAR)

    Dear peterson,
    When i do what you said, its inserting nothing. not even space. Please help me in it what to do?
    thanks and regards

  • Help needed in writting Customer exit - ABAP Code

    Hi Friends,
    I have a scenario in one of the query and need to write a customer exit for the same. Here is the scenario:
    I am using one input variable XXX to get input from user which feeds value to one of the charateristic  lets say "CHAR1" in query. I have one more characteristic "CHAR2" which has to get the value from the same variable XXX. This is not allowed in BI7.0 as the variable is Hierarchy Node type. It gives error that "Variable XXX is used for two different characteristics."
    So i need to create one more vaiable YYY which will get the value from XXX and then YYY will feed value to CHAR2.  I would appreciate if some one could tell me step by step how to write customer exit and give me the piece of ABAP code i need to write in my case.
    Your help will be appreciated in terms of points.
    Thanks,
    manmit

    Hi Arun,
    1. What should CHAR2 take - Hierarchy node variable or something else ?
    --> CHAR2 is a simple charateristic
    2. In your scenario - why have CHAR1 and CHAR2 ? why not have the user enter values against CHAR2 ??
    --> We dont want user to enter two input as the input values for both Chars are same.
    3. Did you try using a replacement path variable with the CHAR2 variable taking values from Variable on CHAR1 ?
    --> In BI7.0 replacement path variable only take values from Query results. So not able to do the same.
    Thanks

  • Help needed on properties of files attached to the transaction-crmd_order

    Hi Experts,
    My requirement is to hide the file attached to the transaction(crmd_order).
    For this, I got the information about the file from cl_crm_documents=> get_info method and the FLAG VARIABLE used for hiding th file is KW_SYSTEM_FLAGS.
    But if I try to set this flag by passing this as a import paramter(as properties) to cl_crm_documents=> change_properties method, I am getting 'SKWF_IO E003KW_SYSTEM_FLAGS' error.I am getting this error in cl_skwf_io_util=>check_properties_authority method. It says that the hidden property is a restricted one and we are not supposed to change it.
    But I am in need of changing this. Can anyone help me out in this?
    Regards
    Athikrish.

    Al_Barrs wrote:
    THR AUG th?I have some picture, graphic and text files that have in some way been saved in the Creative Player2 format on my computer. I need to associate these files with another program so that I can reoer the images and text. Can anyone tell me what program I can use to associate these Creative Player2 files to revover them, or if there is some other way to open them... Desperate for help!!! Thanks in advance. Al [email][email protected]][email protected][/url]?
    What player are you referring to? Is it Creative PlayCenter 2? Playcenter doesn't save any special extension to the files. It uses all the standard extension. eg. jpg,txt.... Not sure what you are trying to say.

  • Help needed in reading text file to database table

    Hello experts,
    i have to insert the values from the column of this text file and insert them in my database table.
    I have done a few file to table insertions but i'm having some trouble with this one.
    Any suggestions plz
    thanks
    liab_report      1.00                                                                                                                              Page: 1
    CDC:00537 / Mon Jun-21-2010                           LIABILITY REPORT                               Mon Jun-21-2010 22:06:26
    DRAW    1; SET    1;  November 7, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         701040.00          0.00     660146.00          0.00      40894.00    0.00          0.00
        Div3        1444128.00          0.00    1330056.00          0.00     114072.00    0.00          0.00
        Div4        4711900.00          0.00    3889700.00          0.00     822200.00    0.00          0.00
                    6857068.00          0.00    5879902.00          0.00     977166.00    0.00          0.00
    DRAW    2; SET    1;  November 14, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         817817.00          0.00     817817.00          0.00          0.00    0.00          0.00
        Div3        1687405.00          0.00    1611742.00          0.00      75663.00    0.00          0.00
        Div4        3402100.00          0.00    3034200.00          0.00     367900.00    0.00          0.00
                    5907322.00          0.00    5463759.00          0.00     443563.00    0.00          0.00
    DRAW    3; SET    1;  November 21, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         779933.00          0.00     769804.00          0.00      10129.00    0.00          0.00
        Div3        1605548.00          0.00    1525104.00          0.00      80444.00    0.00          0.00
        Div4        4891700.00          0.00    4256800.00          0.00     634000.00    0.00        900.00
                    7277181.00          0.00    6551708.00          0.00     724573.00    0.00        900.00

    Plz clarify whether u want to load text file as a file into database or value of this text file into database. If values are to be loaded from this text file, U can better format the text file and use SQL loader to load the file into database. By formatting the database, i mean remove the unnecessary headings and characters, kee only the values to be loaded idelimited by ' '(space) or ','(comma). Create a control file and load it into the target table.

  • Help needed on Transforming input File to EDI Format

    I have an input flat file in one location. Using BizTalk, i need to pick that file from that Recieve location, transform it to EDI format and send it to Destination location.
    Now, when I place input file in the "Recieve location", it is being processed and it is erased from recieve location. But I am not able to see the output in the Destination location.
    And when i query it in BizTalk Administration console, the state is "Completed" without any errors.
     Any guidance/suggestions are appreciated. Thanks in advance.

    Hi all, I have just collated everything and have put it in my words below..Please
    let me know your valuable inputs as I am struck in this point from more than a week.
    I need to fetch an input flat file (.txt format) from the "Receive location" and I am supposed to transform that to an EDI message X12 format and send it to Destination folder.
    I have set up the receive port and send port configurations in the Admin Console, have created the Trading Partners, agreement and other settings.
    The problem I am facing : Now, when I place input file in the "Receive location", it is being processed and I am able to pick up the file from the input folder
    but I am not able to figure out why the file is not being processed and sent to the destination folder.. (If I query for All In Progress instances, suspended instances or Running instances : I am not getting any results and the below grid is always empty).
    And when i query it in Biz-talk Administration console for Tracked instances, the Receive pipeline component's state is "Completed" without any errors.
    And I am not using any Orchestration in between..
    Thank you all in advance....

  • Help needed to write a dialog program

    Hello ABAP Gurus,
    I am very much new to ABAP Programming.
    Can anybody help me to write a simple Dialog Program ??
    I have a database table.
    I have created a screen with screen painter, and kept some input fields & a push button in it.
    I want to fill the database table with the data entered into the fields on the screen.
    When the user enters the data and  presses  the PUSH BUTTON then that data record should be stored into the Database table.
    So what kinda code I have to write in PAI (Process After Input),  to achieve this functionality ??
    The help will be greatly appreciated.
    Thanks in advance
    Best regards
    Ravi
    Edited by: Ravi Kiran on Oct 28, 2009 2:17 PM

    It's easy:
    In PAI you have do an insert into a database table, following the steps:
    1.on PAI  create a module: for exemple Zwrite_table.
    2. inside Zwrite_table code as follow:
    move var1 to wa_table-var1.
    move var2 to wa_table-var2.
    move var3 to wa_table-var3. etc etc
    insert table ztable from wa_table.
    P.s. ztable is a database table.
    wa_table is a structure that have the same structure of ztable.
    var1 var2 var3 etc is a variable inside your dynpro.
    regards,
    Roberto.

  • How to write control file below data

    Hi,
    Here is my table
    create table sample1 (name varchar2(5), num number(2));
    sample.txt(Datafile)
    vikram12
    sharma13
    sonu 14
    Here is my control file
    load data
    infile 'C:\sample.txt'
    into table sample1
    fields terminated by "," optionally enclosed by '"'          
    ( name char(5), num char(2) )
    But it rejecting all the records. Just let me know where i went wrong.
    Thanks in advance

    fields terminated by "," optionally enclosed by
    '"'          As per your control file, the fields have to be seperated by commas but in your datafile it is seperated by space. Either change the delimiter in your control file or in your datafile
    Using Comma Seperated file,
    sample.txt(Datafile)
    vikram,12
    sharma,13
    sonu, 14
    load data
    infile 'C:\sample.txt'
    into table sample1
    fields terminated by ","
    optionally enclosed by '"'
    ( name char(5),
    num char(2)
    )Note:
    1. You have to increase the length of name column as your datafile has values greater than 5 characters. First and second records will be rejected with NAME VARCHAR2(5)

  • Please help me to write a file from applet to server with a servlet.

    In an applet the client elaborates a string and stores it in the variable of the name "line"
    I would Like to write the string "line" in the file myfile.txt on the server.
    I am in an applet trying to make the URLconnection to a servlet.
    The part of the applet which calls the servlet is the following:
    private void writeToSer(String line)
    try
    URL u = new URL("http://192.168.1.103:8180/servlet/ScriviFileServletFor1?stringa="+line);
    HttpURLConnection urlConn = (HttpURLConnection)u.openConnection();
    catch(IOException ioe)
    JOptionPane.showMessageDialog(null,"IO Exception ","attenzione",JOptionPane.ERROR_MESSAGE );
    the code of the servlet is the following:
    import java.io.*;
    import java.io.File;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ScriviFileServletFor1 extends HttpServlet {
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    //read the parameters
    String string = request.getParameter("stringa");
    try {
    File file = new File("/home/icurrado/myfile.txt");
    FileWriter out = new FileWriter(file);
    out.write(string);
    out.close();
    catch (Exception e) {
    e.printStackTrace();
    When I call the servlet from the bar of the URL with :
    http://localhost:8180/servlet/ScriviFileServletFor1?stringa=prova
    It works and writes the string "prova" in the file "/home/icurrado/myfile.txt".
    When I call the servlet from the applet it doesn't work and it doesn't write the string in the file.
    What is wrong or is missing ?
    Please help me.

    You dont need to go through the URL mechanism.
    From an Applet you can directly save the file on the server at destinated location.
    You can look for "Uploader Applet" in google.

  • Help needed to take control back from sqlplus for expired password

    Hi,
    I am executing the following line for Oracle 11g in Windows from my application
    sqlplus -L "aaaa"/"aaaa" @connectonly.sql >>"D:\tempDBlogs\connectonly.log"
    connectonly.sql file contains the following code:
    whenever sqlerror exit 1
    whenever oserror exit 2
    exit
    This piece of code executes fine for both correct & incorrect userid & password and gives proper messages. Now the problem is when password of the user in DB gets expired. The controls waits for user input. But my problem is I am runinng this code from an application which waits for sqlplus.exe to end, as it can't proceed without validation. But sqlplus runs as background process and the command prompt never comes to user. Moreover I dont want to give the user the option to change DB password from my application front end.
    So I need to find a way so that if password is expired sqlplus will return the control and will not wait for user input. Or atleast my application gets to know that the password is expired so that it can kill sqlplus process.
    Can somebody help me in this.

    interesting question. I tried something on unix and this seems to work. I simply piped a line through this which leads to an error with the expire-prompt and doesnt do any harm when there is no such prompt:
    oracle@oracle:~$ echo "" | sqlplus brost/secret @test.sql
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 19 10:18:36 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ERROR:
    ORA-28001: the password has expired
    Changing password for brost
    New password:
    Retype new password:
    ERROR:
    ORA-00988: missing or invalid password(s)
    Password unchangedSomething similar should be possible on windows. Of course, the real solution would be flag for sqlplus that makes it absolutely non-interactive.

Maybe you are looking for

  • Webdynpro abap from outside

    Hi Folks, I have created a webdynpro abap and it works very well, when I call ist from the application server or inside the network. Now I want to call it from outside and I get error " can not display the page". The url from inside  is http://server

  • How do I create a Header for page 1 only?

    I want a Header as a title on my first page only. I've searched Help to no avail. I find it annoying to have the heading repeated on all my pages.

  • How to send a push notification in smp

    Hi All,     I am doing a sample with Push notification in SMP2.3, when i insert a record in database then it has to send a notification. form the work space when i send a notification it is coming. Now i want the notification when i insert a record t

  • Filename is not attached with archivelink process

    Hello Experts, I installed a SAP Content Server with Max DB and I did the different customizing : - creation of  repository - creation of documents type - link of objects etc.. Today I can attach documents (CRM opportunities) without problem BUT I ha

  • NWDI in NW04s

    Hi, We have installed NW04s recently and would like to configure our NWDI. However we are unable to create Software Component. When we ran the template for NWDI,it went through successfully. Do we need to do anything before creating SC that I may hav