Upload a file where no. of columns for each row is not fixed...

Hi All,,
I have to upload a file......
number of columns for each rows are not fixed ....
e.g.
Posting Date     Company Code     Currency     Header Text     Cost Center     Internal Order     Ref 1     Ref 2     Line Text     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount
31-05-09     1000     EUR     PAYROLL 05/2009     1234     123456     123456     seaman     RU     999999     9,999.99                                                            
31-08-09     1000     EUR     PAYROLL 05/2009     678     98765     98765     officer     GB     600015     4,560.00      600035     2,125.50      600020     1,325.40      600025     245.75      600030     300.00      280010     1,000.00      281091     6,000.00
its in tab delimited txt file.....
how to upload this type of file..
Plz suggest....
thnx
rahul

Hi,
Define your internal table like this.
     TYPES: BEGIN OF upload_type,
       upload(330),
       END OF upload_type.
DATA: itab_upload TYPE STANDARD TABLE OF upload_type,
       wa_upload TYPE upload_type.
Data: file type string.
file = 'C:/test.txt'.
  CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
            filename                = file
            filetype                = 'ASC'
           HAS_FIELD_SEPARATOR = 'X'
       TABLES
            data_tab                = itab_upload
       EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            OTHERS                  = 17.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
Use the sring operations to identify your coloumns.
Regards,
Satish

Similar Messages

  • Qry return same value for a particular column for each row but not all time

    hi,
    We recently migrated to Oracle Database 10.2.0.3.0 from 9i. We were using a sql to populate a table and it had been running fine. After migration the same sql is fetching / population incorrect values, but not everytime. If we run the same sql again it gives a correct result.
    Ex:
    insert into a1 ( col1, col2, col3 )
    select a.field1, b.field2, c.field
    from tab1 a, tab2 b, tab3 c
    where a.field = b.field
    and b.field (+) = c.field
    something like this. Let us assume it fetches 200 rows
    But sometimes the col1 has the same value for all the 200 rows and col2, col3 has correct values. If we run the same sql next time, the col1 fetches the correct value and everything is correct.
    Could someone help on the above issue.

    I know it's difficult but can you put together a small test case for us to reproduce this behaviour? Did you contact Oracle Support?
    Any special constructs used behind the scenes? Virtual private database? Views?Materialized Views? Anything else?

  • Get the length of column for each row in 2d array

    let say if i declared a 2d array
    int [][]set = new int[5][5];
    if i had finished storing datas in the 2d array like the following
    Columns
    row 0[10][10][10][10][10]
    row 1[20][][][][]
    row 2[15][25][30][][]
    row 3[17][12][][][]
    row 4[10][][][][]
    how do we know the the length of each row of the datas?
    for example row 0 had 5 column data , row 1 got 1 col data, row 3 got 3 columns of data..
    is it possible?
    as what i know int set[1].length() = 5 and is not 1... am i right?

    as what i know int set[1].length() = 5 and is not
    1... am i right?No, there is no parenthesis for the array property length
    Lets suppose you create this 2-D array;-
    int [][]array = {{1,2,3,4},
    {5,6,7,8},
    {10,11,12,13},
    {15,16,17,18} };
    EG:-
    This is array[0][0]= 1;
    This is array[1][0]= 5;
    This is array[2][2]= 12;
    This is array[3][1]= 16;
    int first = array[0].length; // will initialise 'first' to a value of 4

  • Setting different Tabel Cell SemanticColor for Multiple Columns of each row

    Hi,
    I have requirement of setting different colors to different columns for each row based on some condition in table data.
    The data to table is coming from model, hence table is mapped to model node and attributes.
    I have created Seperate Node CellColorNode with attribue CellClr1 and CellClr2 of type TextView Semantic Color.
    Set the calculated, read only attribute to True. Mapped table columns text view to the CellColorNode->CellClr1 and CellColorNode-->CellClr2 correspondingly.
    Now, my query is how do i set the colors to CellClr1 and CellClr2 attributes. As I need to set the color for multiple columns of each table row.
    Is it in method getColorCellCellClr generated? Any  Example Code?

    Its resolved by following below link
    http://scn.sap.com/thread/158286

  • How to upload a file to a BLOB column in the DB using PL/SQL???

    Hi
    I am trying to upload a file to a BLOB column in my database. I wana do this using some pl/sql procedure.I don't wana use webutil. is it possible??? and if so can anybody help me with this???
    Regards
    Shiraz

    Hello,
    This is a stored procedure sample that show how insert into CLOB, BLOB and BFILE columns
    CREATE OR REPLACE PROCEDURE Insert_document
         PC$Type IN DOCUMENT.TYP%TYPE
        ,PC$Nom IN DOCUMENT.NOM_DOC%TYPE
        ,PC$Texte IN VARCHAR2
        ,PC$Image IN VARCHAR2 
        ,PC$Fichier IN VARCHAR2
       ) IS
      L$Blob BLOB;
      L$Clob CLOB;
      L$Bfile BFILE;
      LN$Len NUMBER := dbms_lob.lobmaxsize;
      LN$Num NUMBER ;
      LN$src_off PLS_INTEGER := 1 ;
      LN$dst_off PLS_INTEGER := 1 ;
      LN$Langctx NUMBER := dbms_lob.default_lang_ctx ;
      LN$Warn NUMBER;
      BEGIN
        -- Création of new raw --
        If PC$Fichier is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Fichier );
        End if ;
        -- Creation of temporary objetcs --
        dbms_lob.createtemporary( L$Clob, TRUE ) ;
        dbms_lob.createtemporary( L$Blob, TRUE ) ; 
        -- Loading text in CLOB column --
        If PC$Texte is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Texte );
           dbms_lob.fileopen(L$Bfile, dbms_lob.file_readonly);
           If dbms_lob.fileexists( L$Bfile ) = 1 Then
             dbms_output.put_line(PC$Texte || ' open' ) ;
             dbms_lob.loadclobfromfile(
                                       L$Clob,                -- Destination CLOB
                                       L$Bfile,               -- Source file pointer
                                       LN$Len,                -- # bytes to read
                                       LN$src_off,            -- Source start position
                                       LN$dst_off,            -- Target start position
                                       dbms_lob.default_csid, -- CSID
                                       LN$Langctx,            -- Language Context
                                       LN$Warn);              -- Warning message
             dbms_lob.fileclose(L$Bfile);
          Else
             raise_application_error( -20100, 'Erreur ouverture ' || PC$Texte ) ;
          End if ;
        End if ;
        -- Loading image in BLOB column --
        If PC$Image is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Image );
           dbms_lob.fileopen(L$Bfile, dbms_lob.file_readonly);
           dbms_lob.loadblobfromfile(
                                     L$Blob,       -- BLOB de destination
                                     L$Bfile,      -- Pointeur de fichier en entrée
                                     LN$Len,       -- Nombre d'octets à lire
                                     LN$src_off,   -- Position source de départ
                                     LN$dst_off);  -- Position destination de départ
           dbms_lob.fileclose(L$Bfile);
        End if ; 
        -- Save --
        Insert into DOCUMENT (ID, NOM_DOC, TYP, UTILISE, LOB_TEXTE, LOB_DATA, LOB_FICHIER)
               Values( SEQ_DOCUMENT.NEXTVAL, PC$Nom, PC$Type, NULL, L$Clob, L$Blob, L$Bfile ) ; 
        -- Free the temporary objects --
        dbms_lob.freetemporary( L$Clob ) ;
        dbms_lob.freetemporary( L$Blob ) ; 
      END;
    /The table structure for this sample is the following:
    CREATE TABLE DOCUMENT (
      ID           NUMBER (5) PRIMARY KEY,
      TYP          VARCHAR2 (20),
      UTILISE      VARCHAR2 (30),
      LOB_TEXTE    CLOB,
      LOB_DATA     BLOB,
      LOB_FICHIER  BFILE,
      NOM_DOC      VARCHAR2 (100))
    /Francois

  • I am trying to upload a file to an accounting website for work. It will not allow me to select any type of file, they are all greyed out.

    I am trying to upload a file to an accounting website for work. My computer will not allow me to select any type of file, they are all greyed out.

    Try using a different browser. If it works, then the problem is most likely Safari. If the other browser doesn't work, perhaps it is the web site.
    Firefox

  • When I try to upload a file it goes through the correct proceedure, but does not change the remote file i.e.Index.htm

    Hi
    I have an uploading problem to the server. The problem is when I try to upload a file it goes through the correct proceedure,
    but does not change the remote file i.e.Index.htm, or three stages1.htm.
    My Localroot folder is C:\Gods Plan Web\
    The site map layout is C:\Gods Plan Web\Index.htm
    The folder for the remote site is /public_html/
    Should the local root folder mirror the remote site, i.e./public_html/
    if this is so, what should I put into the
    (a) Local Root Folder box?
    (b) site map layout box?
    The FTP is performing well other than changing the intended file.

    You should be uploading only the contents of your local root to the public_html folder (remote root).
    The index.html you use as your site's home page needs to be in your site root. If you look at your Files window in DW, you should have something like the following...
    Site - Whatever you named your site
         index.html
         images
         pages
              page1.html
              page2.html
    If you have any folder between Site - and the index.html page, like...
    Site - Whatever you named your site
         mywebsite
              index.html
    It will upload to the public_html while still in that folder, so to find your page online, you would need to type something like...
    www.mydomain.com/mywebsite
    public_html should NOT appear within your local files and if it existed there, would cause a redundancy if uploaded. You would need to type www.yourdomain.com/public_html to see the uploaded pages.
    If you could post a screen shot of your expanded Files window while connected to the server (just connect and click the Expand button in Files, don't drill down into any of the directories), we may be able to see the issue.

  • How get values of columns for selected rows in SortingTable

    Hi,
    is possible to get values of more columns for selected rows? I have SortingTable that have 1st column loaded from list and 2nd and 3rd columns are text areas where user must write some text. I need way how to get values from all three columns for selected rows.
    My table looks like this:
    System name I User Account I  User Password
    system1 ...............jblack ............. passw1
    system2 ...............pdowe..............p@ssw
    system3 ...............ekie................. pas123
    Column System name is loaded from list, columns User Account and User Password are Text class. How can I get values for all three columns in case that I select e.g. system1 or system1 & system2?
    I read [this post|http://forums.sun.com/thread.jspa?forumID=764&threadID=5220609] but there is described selection only for one column.
    Code of my SortingTable is following:
    <Field name='tblDalsiSystemy'>
                   <Display class='SortingTable'>
                       <Property name='align' value='center'/>
                       <Property name='sortEnable' value='false'/>
                       <Property name='selectEnable' value='true'/>
                       <Property name='pageSize' value='5'/>
                       <Property name='pageButtonAlign' value='center'/>
                       <Property name='columns'>
                           <List>
                               <String>System name</String>
                               <String>User Account</String>
                      <String>User Password</String>
                           </List>
                       </Property>
                   </Display>
                   <FieldLoop for='y' in='lstSystemList'>               
                     <Field name='SystemName'>
                         <Display class='SortingTable$Row'>
                             <Property name='key'>
                                 <ref>lstSystemList</ref>
                             </Property>
                         </Display>
                         <Display class='Label'>
                             <Property name='align' value='center'/>
                             <Property name='value'>
                                 <ref>y</ref>                            
                             </Property>
                         </Display>
                     </Field>
                     <Field name='UserAccount'>
                         <Display class='SortingTable$Row'>                        
                         </Display>
                         <Display class='Text'>
                             <Property name='size' value='10'/>
                             <Property name='value'>                            
                             </Property>
                         </Display>
                     </Field>
               <Field name='UserPassword'>
                         <Display class='SortingTable$Row'>                        
                         </Display>
                         <Display class='Text'>
                             <Property name='size' value='10'/>
                             <Property name='value'>                            
                             </Property>
                         </Display>
                     </Field>
                   </FieldLoop>              
               </Field>Getting value is performed by:
    <ref>tblDalsiSystemy.selected</ref>Any help?
    Thanks
    Petr

    Hi Ivan,
    thanks for your advice - it works.
    Here is my final code:
    <Field name='tblDalsiSystemy'>
                   <Display class='SortingTable'>
                       <Property name='align' value='center'/>
                       <Property name='sortEnable' value='false'/>
                       <Property name='selectEnable' value='true'/>
                       <Property name='pageSize' value='5'/>
                       <Property name='pageButtonAlign' value='center'/>
                       <Property name='columns'>
                           <List>
                               <String>System name</String>
                               <String>User Account</String>
                      <String>User Password</String>
                           </List>
                       </Property>
                   </Display>
                   <FieldLoop for='y' in='lstSystemList'>               
                     <Field name='SystemName'>
                         <Display class='SortingTable$Row'>
                             <Property name='key'>
                                 <ref>lstSystemList</ref>
                             </Property>
                         </Display>
                         <Display class='Label'>
                             <Property name='align' value='center'/>
                             <Property name='value'>
                                 <ref>y</ref>                            
                             </Property>
                         </Display>
                     </Field>
                     <Field name='Account[$(y)].login'>
                         <Display class='SortingTable$Row'/>
                         <Display class='Text'>
                             <Property name='size' value='10'/>
                             <Property name='value'>                           
                             </Property>
                         </Display>
                     </Field>
                     <Field name='Account[$(y)].passwd'>
                         <Display class='SortingTable$Row'/>
                         <Display class='Text'>
                             <Property name='size' value='10'/>
                             <Property name='value'>
                             </Property>
                         </Display>
                     </Field>
                   </FieldLoop>              
               </Field>Maybe it could be helpful for somebody another :-)
    Petr

  • Calculating Sum of columns for a row- OBIEE 11.1.1.6

    Hi,
    We are on OBIEE 11.1.1.6.
    We have  a pivot table with a measure MCount. Our Table looks something like this:
          X  Y  Z
    A  c1  c2 c3
    B  c4  c5 c6
    C c7  c8  c9
    We want to add another column "Total" which is equal to sum of  counts for each row. So our table should be like:
          X  Y  Z     Total 
    A  c1  c2 c3   (c1+c2+c3)
    B  c4  c5 c6    (c4+c5+c6)
    C c7  c8  c9    (c7+c8+c9)
    We added another column in Criteria tab with the following formula, where Dy is the dimension along the Y axis (i.e with values A B and C)
    rsum (Mcount BY Dy). We left the aggregation rule to be default (which is sum.)
    This solution calculates the sum, however for some reason is giving the value twice of the actual value. So modifying formula to rsum (Mcount BY Dy)/2 fixes our problem.
    Can anyone please suggest a better way of doing this ?
    Thanks!
    SJ

    Hi Srini,
    Thanks for your answer. I followed your suggestion and Unfortunately now the value is 4 times the actual value. I chose the aggregation rule for the measure as
    Aggregation Rule (Totals Row): Sum
    Am I missing something ?
    SJ

  • Hyperlink for a row content (Not for a filed/column)

    Hello Friends,
    I need to insert hyperlink for particular row value. I have code for adding hyperlink for a field that is column.
    Newspaper
    language
    epaper
    xxxxx
    xxx
    [email protected]
    yyyyy
    yyy
    [email protected]
    zzzzz
    zzz
    [email protected]
    for each row I must have different link. i.e. for xxx newspaper I must have a link [email protected] associated with that and when I click on that it should take me to that link in browser.
    Is there any field(like col-text and col-pos) in the table  lvc_t_fcat so that I can add the link here.
    Please share any idea for this requirement.
    Thanks in advance.

    see the link attached with the previous replay.
    DATA:
    BEGIN OF t_itab OCCURS 0.    "Output data
    INCLUDE STRUCTURE sflight.
    DATA carrid_handle TYPE int4.   "Corresponding link id from t_hype_link(this field for 'carrid')
    DATA END OF t_itab.
    Registering field CARRID_HANDLE with 'CARRID' in fieldcatlog.
    fs_fcat-fieldname = 'CARRID'.
    fs_fcat-web_field = 'CARRID_HANDLE'.
    fs_hype_link-handle = '1' .             "link id
    fs_hype_link-href = 'http://www.google.com' .
    APPEND fs_hype_link TO t_hype_link.
    LOOP AT t_itab .
    IF t_itab-carrid = 'AA'.
    t_itab-carrid_handle = '1' .         "assigning link for each row
    ENDIF.
    MODIFY t_itab.
    ENDLOOP.

  • :new., lob columns and after insert ... for each row trigger

    I'm having this little problem with
    my update/insert triggers and lob columns.
    I have this little trigger:
    CREATE OR REPLACE TRIGGER BLOB_DATA_INSERT
    AFTER INSERT ON BLOB_DATA
    FOR EACH ROW
    BEGIN
    INSERT INTO BLOB_DATA_CHANGE VALUES(CHANGE_SEQ.NEXTVAL, 'I', :NEW.ID,:NEW.DATA);
    END;
    Which works except when the DATA column
    is a BLOB or CLOB (There is no data in :NEW.DATA. I even tried some of the DBMS_LOB package procedures)
    The one thing that is different for the lob columns is that the application updating
    the data is using a bind statement with returning, like:
    INSERT INTO BLOB_DATA
    VALUES(:ID,EMPTY_BLOB())
    RETURNING DATA INTO :DATA;
    COMMIT;
    Thanks for any help

    I'm having this little problem with
    my update/insert triggers and lob columns.
    I have this little trigger:
    CREATE OR REPLACE TRIGGER BLOB_DATA_INSERT
    AFTER INSERT ON BLOB_DATA
    FOR EACH ROW
    BEGIN
    INSERT INTO BLOB_DATA_CHANGE VALUES(CHANGE_SEQ.NEXTVAL, 'I', :NEW.ID,:NEW.DATA);
    END;
    Which works except when the DATA column
    is a BLOB or CLOB (There is no data in :NEW.DATA. I even tried some of the DBMS_LOB package procedures)
    The one thing that is different for the lob columns is that the application updating
    the data is using a bind statement with returning, like:
    INSERT INTO BLOB_DATA
    VALUES(:ID,EMPTY_BLOB())
    RETURNING DATA INTO :DATA;
    COMMIT;
    Thanks for any help

  • Use labview to read an Excel file to some control and add a checkbox for each row

      As the subject say,I need to use labview to read an excel file,and show it in some control,such as mclb;then ,I should add an checkbox for each row,enable me to choose the row i want.What should I do ? Many Thanks.
    Solved!
    Go to Solution.

    Hi,
    to answer your question:
    - read an excel file
    - show it in some control, such as a MCLB
    - add an checkbox for each row
    - choose the row you want
    Hint to make it easier: I wouldn't use checkboxes, as the MCLB already allows to select rows by mouseclick…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Aperture 3.1.2 When exporting files to Finder is creating a folder for each file, that means export 200 files is creating 200 folders for each files. Does anyone knows how to fix this. Thanks

    Aperture 3.1.2 When exporting files to Finder is creating a folder for each file, that means export 200 files is creating 200 folders for each files. Does anyone knows how to fix this. Thanks

    No. This is NOT true. I've been battling with this for a couple hours.
    I choose Export>Versions
    choose
    Subfolder Format: Project Name
    no custom subfolder
    Name Format: Current Version Name.
    Aperture creates project folders for each image and names them Projects1, Projects2, Projects3 etc.
    To be sure, I have no project named Projects
    x
    This particular Aperture library has 16 projects. you can see in the screen grab it's created more than 30 folders
    If I uncheck the Subfolder, that is say NONE, I just get images and images and images, not in their project folders (of course, because I've said NONE, so why would it put them in project folders?)
    I just want to export the entire library and have the versions placed in folders named by the projects from which they came.... ez enough, no?

  • Make select for each row - another solution?

    For example I have a function with day before selection:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    function ABS return boolean is
    ret number(10,2);
    begin
    for sab in (select saldod from ndv_ccli, nd_clientes where
    (:p_dtvenc-dtdoc) = (select min(:p_dtvenc-dtdoc) from ndv_ccli, nd_clientes
    where (:p_dtvenc-dtdoc>0)and
    ndv_ccli.cod_cli = cod_cli) and
    ndv_ccli.cod_cli = cod_cli order by dtdoc desc,cddb )
    loop
         ret := sab.saldod;
    end loop;
    return (ret);
    end;
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    In report I use the value of this function(a) in another function(b) to sum with few values.
    Output of function(b) has a lot of rows and for each row it makes select in function(a) to find the value, but actualy it is the same. Is it possible to do this select only one time and then put in function(b) only it's value? Because it makes report too slow...
    tnx before

    Thanx, but while compiling it says:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    REP-0749: After form trigger cannot reference a report column.
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

  • Update button in sql report for each row can only get the report value

    I have to added Update for each row of records like:
    select a.*,'Update' button from (
    select c.*,d.login from country c,champ d
    where c.champ_id=d.champ_id(+)
    order by c.name) a
    then go to the report->edit button ->Column Link
    I added some items P40_REGION, P40_CHAMPID,P40_ACTIVE,P40_CODE and assign the value like #region#,#active# ,#code# to these item, but when I click the update button in the report I found the values such as #region#,#active# ,#code# is the report value not the select list selected value(the region, active column are displayed as select list lov).
    Can anyone tell me how to sort this knid of problem?
    Thanks a lot!

    Sorry, it doesn't work. I also tried apex_application.g_f01(i), but not everytime I can get the value or get the incorrect value. If you have time you can try to create it like what I have described. Our team use two days now but still can not sort this problem.

Maybe you are looking for

  • How can I create an electronic signature to use on my email?

    ''locking as a duplicate - https://support.mozilla.com/en-US/questions/811562'' When I have completed an email, I would like to have a signature print automatically my name, title, address, etc. How do I create this "signature"?

  • Aperture conversion from negatives

    Does Aperture have the tool to invert a B&W scanned negative and convert it to a B&W digital photo? The scan is being done on a 2450 Epson on the with   apple software update for this old Scanner..... scanning is working fine. SHL

  • Dashboards help needed very urgently

    hi experts i have a page which displays like dril down table which has information of customers, beside the under that table i hve round diagrams which has business orinet things around that lot of object are there. for example it looks sun in the ce

  • Submit PDF via email custom button

    I followed the instructions in LiveCycle guide but it is not working completely.  I set up a custom button and followed the instructions for Submitting a pdf via email.  When I click on the submit button, it pulls the pdf into an email  but has left

  • Header method in ALV

    Is there any method for alv header in class cl_gui_grid_display  ? thanks Sandeep