Usage of sequence for uploading data into tables(column store) using CSV

How to make use of sequence when data is uploaded into table(column store) with the CSV file ?

Hi Sharada,
You may have to follow the below steps:
1) To load the data from flat file to a Staging table using IMPORT command
2) You have to call the procedure to load the data further into final Table.
a) Have a look on this procedure to load data :
SAP HANA: Generic Procedure using Arrays to Load delta data into Tables
b) See my reply on the syntax on how to use "Sequence"
Auto-Incrementor in stored procedure!
You will have to ensure that you frame your insert query in such a way to have the sequence number in the target table.
Regards,
Krishna Tangudu

Similar Messages

  • FDMEE Import error "No periods were identified for loading data into table 'AIF_EBS_GL_BALANCES_STG'

    Hi,
    We are having trouble while importing one ledger 'GERMANY EUR GGAAP'. It works for Dec 2014 but while trying to import data for 2015 it gives an error.
    Import error shows " RuntimeError: No periods were identified for loading data into table 'AIF_EBS_GL_BALANCES_STG'."
    I tried all Knowledge docs from Oracle support but no luck. Please help us resolving this issue as its occurring in our Production system.
    I also checked all period settings under Data Management> Setup> Integration Setup > Global Mapping and Source Mapping and they all look correct.
    Also its only happening to one ledger rest all ledgers are working fine without any issues.
    Thanks

    Hi,
    there are some Support documents related to this issue.
    I would suggest you have a look to them.
    Regards

  • Insert Data into Table from TXT or CSV file !!!!!

    Dear All,
    Recently I have started working on APEX. In Oracle Forms, we used to use TEXT_IO for inserting records into tables from txt files. Now I want to do the same thing in apex 3.2. How can I insert data into tables from txt of csv files.
    Waiting of your valuable suggestions.
    With kind regards,
    Yousuf.

    Yousuf
    wwv_flow_files is used by APEX to hold uploaded files.
    If you incorporate a file browse item on you page, browse for the selected file, then submit the page (having the PL/SQL process described as an on suibmit process) then what I detailed should work.
    If you don't need users to have access to this then just go to Home>Utilities>Data Load/Unload in APEX and there is a handy load utility there that does it all for you.
    Cheers
    Ben

  • While uploading data into the r/3 using call transaction or session method

    hi experts
    while uploading data into the r/3 using call transaction or session method error occured in the middle of the processing then how these methods behaves it transfers next records or not?

    hai
    Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.
    Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.
    While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.
    the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).
    so the session method should not return any value.
    In call transaction method data is directly pass to the SAP system.
    So its compulsory return the value.
    Because of the call transaction is the function.
    A function should return the value mandatory
    In session method errors stroed in SYSTEM GENRATED ERROR LOG.
    IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
    FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
    THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
    THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
    AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.

  • FM for uploading data into internal table from Excel sheet

    Hi,
    I have a slight problem in one of the function modules that I have created. Actually it has been copied from a standard SAP function module “KCD_EXCEL_OLE_TO_INT_CONVERT”. Now my created function module is throwing me a dump suggesting “Data objects in a Unicode program are not convertible”. Can anybody help me out in removing the error .
    Actually the need of copying the standard FM to a ZFM is to increase the length of the column which can be uploaded thru this FM. The standard FM has a restriction of being able to upload 32 characters whereas my requirement is to upload data having at least 150 characters. So in order to care the need I made a ZStructure ZAKHIL_CELLS taking the Value parameters as 150 characters instead of 32 characters.
    Well this is all done because I wanted to upload a excel sheet into an internal table and not use a tab delimited file. Can anybody help in this regard or suggest some other function module which can upload more than 150 characters from a excel sheet .
    ‘m also attaching structure of my ZStructure for ur reference .
    STRUCTURE ZAKHIL_CELLS1 .
    ROW KCD_EX_ROW_N NUMC 4 Flexible Excel upload: row number
    COL KCD_EX_COL_N NUMC 4 Column
    VALUE KCD_VALUE CHAR 150 External Data Transfer: Values of Parameters or Variables
    Thanks & Rgds,
    Akhil

    hi,
    sample excel sheet.
    coloumn 1 is name and column 2 is age
    name age
    A     8
    C     13
    D     55
    DATA : int_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    data : record like db_name_age occurs 0 with header line.
    DATA : v_start_col TYPE i VALUE '1', "starting col
           v_start_row TYPE i VALUE '1', " starting row
           v_end_col   TYPE i VALUE '2', " total columns
           v_end_row   TYPE i VALUE '10'. "total no of record
    FORM f_upload .
      CLEAR : int_excel, int_excel[].
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = wf_filename
          i_begin_col             = v_start_col
          i_begin_row             = v_start_row
          i_end_col               = v_end_col
          i_end_row               = v_end_row
        TABLES
          intern                  = int_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
    *Message is 'Unable to upload data from  '  wf_filename.
        MESSAGE e169(zm050) WITH wf_filename.
      ELSE.
        SORT int_excel BY row col.
        REFRESH : record.
        CLEAR   : record.
        LOOP AT int_excel.
          CASE int_excel-col. "go thru each column.
            WHEN 1.
              record-name  = int_excel-value.
            WHEN 2.
              record-age = int_excel-value.     
          ENDCASE.
          AT END OF row.
            APPEND record.
            CLEAR record.
          ENDAT.
        ENDLOOP.
    *inserting into table
      ENDIF.
    if this helped pld rewrd points,
    rgrds
    anver

  • BDC Recording for uploading data into Fi01

    HI,
    I need to upload date from a file into SAP Fi01 transaction
    i used a sample program and added my bdc recording to it as per instrucrion
    there is a error while uploading.
    i believe it is at the place i am pointing in bold. it is at read dataset. could you advice me how to solve it.
    CODE:
    REPORT Z_BANK_DIRECTORY
    NO STANDARD PAGE HEADING
    LINE-SIZE 200
    LINE-COUNT 300.
    *-- DATA DECLARATION--
    *---Types
    DATA : BEGIN OF t_upload,
    data element: BANKS
            BANKS_001(003),
    data element: BANKK
            BANKL_002(015),
    data element: BANKA
            BANKA_003(060),
    data element: REGIO
            PROVZ_004(003),
    data element: STRAS_GP
            STRAS_005(035),
    data element: ORT01_GP
            ORT01_006(035),
    data element: BRNCH
            BRNCH_007(040),
    data element: SWIFT
            SWIFT_008(011),
    data element: BGRUP
            BGRUP_009(002),
    data element: AD_TITLETX
            TITLE_MEDI_010(030),
    data element: AD_NAME1
            NAME1_011(040),
    data element: AD_STRSPP1
            STR_SUPPL1_012(040),
    data element: AD_STRSPP2
            STR_SUPPL2_013(040),
    data element: AD_STREET
            STREET_014(060),
    data element: AD_CITY2
            CITY2_015(040),
    data element: AD_CITY3
            HOME_CITY_016(040),
    data element: AD_PSTCD1
            POST_CODE1_017(010),
    data element: LAND1
            COUNTRY_018(003),
    data element: AD_POBX
            PO_BOX_019(010),
    data element: AD_PSTCD2
            POST_CODE2_020(010),
    data element: SPRAS
            LANGU_021(002),
    data element: AD_TLNMBR1
            TEL_NUMBER_022(030),
    data element: AD_MBNMBR1
            MOB_NUMBER_023(030),
    data element: AD_FXNMBR1
            FAX_NUMBER_024(030),
    data element: AD_SMTPADR
            SMTP_ADDR_025(132),
    data element: BANKA
            BANKA_026(060),
    data element: REGIO
            PROVZ_027(003),
    data element: STRAS_GP
            STRAS_028(035),
    data element: ORT01_GP
            ORT01_029(035),
    data element: BRNCH
            BRNCH_030(040),
    data element: SWIFT
            SWIFT_031(011),
    data element: BGRUP
            BGRUP_032(002),
    END OF t_upload.
    *--- Tables
    DATA : BEGIN OF i_bdcdata OCCURS 0."to hold the transaction t_upload
    INCLUDE STRUCTURE bdcdata.
    DATA: END OF i_bdcdata.
    DATA: i_upload LIKE STANDARD TABLE OF t_upload," to hold file data.
    i_upload1 LIKE STANDARD TABLE OF t_upload." to hold file data.
    *--- Work Areas
    DATA: wa_upload2 LIKE t_upload,
    wa_upload LIKE t_upload,
    wa_upload1 LIKE t_upload.
    *--- Variables
    DATA: v_count1(4) TYPE n,
    v_error TYPE c,
    v_session(12),
    v_field(21) TYPE c,
    v_message(60) type C.
    *--Constants
    DATA: c_open TYPE c VALUE '(',
    c_close TYPE c VALUE ')',
    c_x TYPE c VALUE 'X'.
    *---Initialisation
    initialization.
    refresh : i_upload , i_upload1 ,i_bdcdata.
    -------Selection Screen Design -
    *Selection screen for input of upload file address
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    ---AT SELECTION SCREEN -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *--For popup to select file.
    PERFORM give_help.
    -----START OF SELECTION -
    START-OF-SELECTION.
    *--Data upload using WS_Upload.
    PERFORM get_data.
    *-- OPEN SESSION
    PERFORM open_group.
    *--Insert transactions using BDCDATA table in the session.
    PERFORM do_transaction .
    *-- Close the session.
    PERFORM close_group.
    END-OF-SELECTION.
    *& Form f_get_data
    For data upload from external file.
    FORM get_data.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = p_file
    filetype = 'DAT'
    TABLES
    data_tab = i_upload
    EXCEPTIONS
    conversion_error = 1
    file_open_error = 2
    file_read_error = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    OTHERS = 10.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    DELETE I_UPLOAD INDEX 1.
    ENDIF.
    ENDFORM. " f_get_data
    *& Form F_open_group
    To open session in session management.
    FORM open_group.
    v_session = 'FI01'.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    client = sy-mandt
    group = v_session
    user = sy-uname
    keep = 'X'.
    ENDFORM. " F_open_group
    *& Form f_do_transaction
    Insert transactions in session after passing values to BDCDATA
    FORM do_transaction.
    LOOP AT i_upload INTO wa_upload .
    *---- insert your generated codes from recording at SHDB here
    read dataset <b>wa_upload</b> into t_upload.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPMF02B' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'BNKA-BANKL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BNKA-BANKS'
                                  t_upload-BANKS_001.
    perform bdc_field       using 'BNKA-BANKL'
                                  t_upload-BANKL_002.
    perform bdc_dynpro      using 'SAPMF02B' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'BNKA-BGRUP'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ADDR'.
    perform bdc_field       using 'BNKA-BANKA'
                                  t_upload-BANKA_003.
    perform bdc_field       using 'BNKA-PROVZ'
                                  t_upload-PROVZ_004.
    perform bdc_field       using 'BNKA-STRAS'
                                  t_upload-STRAS_005.
    perform bdc_field       using 'BNKA-ORT01'
                                  t_upload-ORT01_006.
    perform bdc_field       using 'BNKA-BRNCH'
                                  t_upload-BRNCH_007.
    perform bdc_field       using 'BNKA-SWIFT'
                                  t_upload-SWIFT_008.
    perform bdc_field       using 'BNKA-BGRUP'
                                  t_upload-BGRUP_009.
    perform bdc_dynpro      using 'SAPLSZA1' '0201'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'SZA1_D0100-SMTP_ADDR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CONT'.
    perform bdc_field       using 'SZA1_D0100-TITLE_MEDI'
                                  t_upload-TITLE_MEDI_010.
    perform bdc_field       using 'ADDR1_DATA-NAME1'
                                  t_upload-NAME1_011.
    perform bdc_field       using 'ADDR1_DATA-STR_SUPPL1'
                                  t_upload-STR_SUPPL1_012.
    perform bdc_field       using 'ADDR1_DATA-STR_SUPPL2'
                                  t_upload-STR_SUPPL2_013.
    perform bdc_field       using 'ADDR1_DATA-STREET'
                                  t_upload-STREET_014.
    perform bdc_field       using 'ADDR1_DATA-CITY2'
                                  t_upload-CITY2_015.
    perform bdc_field       using 'ADDR1_DATA-HOME_CITY'
                                  t_upload-HOME_CITY_016.
    perform bdc_field       using 'ADDR1_DATA-POST_CODE1'
                                  t_upload-POST_CODE1_017.
    perform bdc_field       using 'ADDR1_DATA-COUNTRY'
                                  t_upload-COUNTRY_018.
    perform bdc_field       using 'ADDR1_DATA-PO_BOX'
                                  t_upload-PO_BOX_019.
    perform bdc_field       using 'ADDR1_DATA-POST_CODE2'
                                  t_upload-POST_CODE2_020.
    perform bdc_field       using 'ADDR1_DATA-LANGU'
                                  t_upload-LANGU_021.
    perform bdc_field       using 'SZA1_D0100-TEL_NUMBER'
                                  t_upload-TEL_NUMBER_022.
    perform bdc_field       using 'SZA1_D0100-MOB_NUMBER'
                                  t_upload-MOB_NUMBER_023.
    perform bdc_field       using 'SZA1_D0100-FAX_NUMBER'
                                  t_upload-FAX_NUMBER_024.
    perform bdc_field       using 'SZA1_D0100-SMTP_ADDR'
                                  t_upload-SMTP_ADDR_025.
    perform bdc_dynpro      using 'SAPMF02B' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'BNKA-BANKA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'BNKA-BANKA'
                                  t_upload-BANKA_026.
    perform bdc_field       using 'BNKA-PROVZ'
                                  t_upload-PROVZ_027.
    perform bdc_field       using 'BNKA-STRAS'
                                  t_upload-STRAS_028.
    perform bdc_field       using 'BNKA-ORT01'
                                  t_upload-ORT01_029.
    perform bdc_field       using 'BNKA-BRNCH'
                                  t_upload-BRNCH_030.
    perform bdc_field       using 'BNKA-SWIFT'
                                  t_upload-SWIFT_031.
    perform bdc_field       using 'BNKA-BGRUP'
                                  t_upload-BGRUP_032.
    *----- insertion ends
    perform bdc_transaction using 'FI01'.
    REFRESH : I_BDCDATA.
    CLEAR : WA_UPLOAD.
    ENDIF.
    ENDLOOP.
    ENDFORM. " f_do_transaction
    *& Form bdc_dynpro
    For appending screen details to BDCDATA
    FORM bdc_dynpro USING program dynpro.
    CLEAR i_bdcdata.
    i_bdcdata-program = program.
    i_bdcdata-dynpro = dynpro.
    i_bdcdata-dynbegin = 'X'.
    APPEND i_bdcdata.
    CLEAR i_bdcdata.
    ENDFORM. "bdc_dynpro
    *& Form bdc_field
    For appending field details to bdcdata table
    FORM bdc_field USING fnam fval.
    CLEAR i_bdcdata.
    i_bdcdata-fnam = fnam.
    i_bdcdata-fval = fval.
    APPEND i_bdcdata.
    CLEAR i_bdcdata.
    ENDFORM. " bdc_field
    *& Form bdc_transaction
    For inserting Transaction in the session
    FORM bdc_transaction USING tcode.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    tcode = 'FI01'
    TABLES
    dynprotab = i_bdcdata.
    ENDFORM. " bdc_transaction
    *& Form F_close_group
    For closing the session created in Session manager SM35
    FORM close_group.
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    concatenate 'Session ' v_session 'successfully created' into v_field.
    MESSAGE v_field type 'I'..
    CALL TRANSACTION 'SM35'.
    ENDFORM. "f_close_group
    *& Form f_give_help
    For user help to select file
    FORM give_help.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    mask = ',.,..'
    mode = 'O'
    IMPORTING
    filename = p_file
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5.
    IF sy-subrc <> 0 AND NOT sy-msgty IS INITIAL.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " f_give_help
    ---- End of Template -

    Actually, there is no need for the dataset statemant at all.  Comment that out, and add a line that moves the data from wa_upload to t_upload,  or you could change the rest of the references to point to wa_upload and forget about t_upload.  Your choice.
    LOOP AT i_upload INTO wa_upload .
    *---- insert your generated codes from recording at SHDB here
    *read dataset wa_upload into t_upload.
    *f sy-subrc <> 0. exit. endif.
    t_upload = wa_upload.
    Regards,
    RIch Heilman

  • Need Logic for Inserting data into table from another table

    Hi,
    Could you please give me some logic on below:
    TABLE_A has columns A,B,C,D
    What i did
    ==========
    Created new table
    TABLE_1_A with columns A1,A2,B1,B2,B3
    Requirement
    ===========
    I should populate columns A1,A2 (table TABLE_1_A) with the data from column A (table TABLE_A)
    & simillarly populate columns B1,B2 with the data from B.
    the data is huge in the table_a.
    Database: 10g
    Thanks.

    Hi,
    Here's one way:
    INSERT INTO  table_1_a
            (a1, a2, b1, b2)
    SELECT      a,  a,  b,  b
    FROM      table_a
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    If you're asking about a DML statement, such as INSERT, the sample data will be the contents of the table before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    See the forum FAQ {message:id=9360002}

  • Query for inserting data into table and incrementing the PK.. pls help

    I have one table dd_prohibited_country. prohibit_country_key is the primary key column.
    I have to insert data into dd_prohibited_country based on records already present.
    The scenario I should follow is:
    For Level_id 'EA' and prohibited_level_id 'EA' I should retreive the
    max(prohibit_country_key) and starting from the maximum number again I have to insert them
    into dd_prohibited_country. While inserting I have to increment the prohibit_country_key and
    shall replace the values of level_id and prohibited_level_id.
    (If 'EA' occurs, I have to replace with 'EUR')
    For Instance,
    If there are 15 records in dd_prohibited_country with Level_id 'EA' and prohibited_level_id 'EA', then
    I have to insert these 15 records starting with prohibit_country_key 16 (Afetr 15 I should start inserting with number 16)
    I have written the following query for this:
    insert into dd_prohibited_country
    select     
         a.pkey,
         b.levelid,
         b.ieflag,
         b.plevelid
    from
         (select
              max(prohibit_country_key) pkey
         from
              dd_prohibited_country) a,
         (select
    prohibit_country_key pkey,
              replace(level_id,'EA','EUR') levelid,
              level_id_flg as ieflag,
              replace(prohibited_level_id,'EA','EUR') plevelid
         from
              dd_prohibited_country
         where
              level_id = 'EA' or prohibited_level_id = 'EA') b
    My problem here is, I am always getting a.pkey as 15, because I am not incrementing it.
    I tried incrementing it also, but I am unable to acheive it.
    Can anyone please hepl me in writing this query.
    Thanks in advance
    Regards
    Raghu

    Because you are not incrementing your pkey. Try like this.
    insert
       into dd_prohibited_country
    select a.pkey+b.pkey,
         b.levelid,
         b.ieflag,
         b.plevelid
       from (select     max(prohibit_country_key) pkey
            from dd_prohibited_country) a,
         (select     row_number() over (order by prohibit_country_key)  pkey,
              replace(level_id,'EA','EUR') levelid,
              level_id_flg as ieflag,
              replace(prohibited_level_id,'EA','EUR') plevelid
            from     dd_prohibited_country
           where level_id = 'EA' or prohibited_level_id = 'EA') bNote: If you are in multiple user environment you can get into trouble for incrementing your PKey like this.

  • How to upload data into a database from a csv file in a jsp app?

    I can write a HTML form to let users to post a csv file and store it in the web server, then how could I process the file to load the data into a View Obj or an Entity Obj without manually parsing the csv files? Any jsp or java code samples that will do something like the "sqlload" in sqlplus?
    I'm using JDev 3.1.1.2. Thanks.

    Navy_Coder wrote:
    6 zebras.But you must marry his eldest daughter as well, for that dowry.

  • How to insert  data into BLOB column  using sql

    Hi all,
    How to insert data into BLOB column directly using sql .
    create  table temp
      a blob,
      b clob);
    SQL> /
    Insert into temp  values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ;
    ERROR at line 1:
    ORA-01465: invalid hex number
    Please help in this.Thanks,
    P Prakash

    see this
    How to store PDF file in BLOB column without using indirect datastore

  • Uploading clob column's data into table

    Hello everyone ...
    I used webutil to opload data into blob column then converted blob to clob ... what i have now is comma delimited data that i want to put into a table...
    so , if i have the clob column like this
    1,adam,11/08/08,accountant
    2,john,12/08/09,clerk
    and the destination table is :
    ID,
    NAME,
    Hire_date,
    Job
    how can i put the 1 in the ID , adam in the name and so on?
    I need help urgent please
    Thanks alot

    perhaps its easier to directly read the file using CLIENT_TEXTIO line by line instead of first transfering it into the database and then extracting it from there again.
    Code example for CLIENT_TEXTIO (not tested):
    DECLARE
      tf CLIENT_TEXT_IO.FILE_TYPE;
      vcBuffer VARCHAR2(32000);
      nId NUMBER;
      vcName VARCHAR2(4000);
      dtHiredate DATE;
      vcJob VARCHAR2(4000);
      FUNCTION FK_SPLIT(io_vcText IN OUT VARCHAR2)
      RETURN VARCHAR2 IS 
        vcReturn VARCHAR2(4000);
      BEGIN
        IF INSTR(io_vcText, ',')>0 THEN
          vcReturn:=SUBSTR(io_vcText, 1, INSTR(io_vcText, ',')-1);
          io_vcText:=SUBSTR(io_vcText, INSTR(io_vcText, ',')+1);
        ELSE
          vcReturn:=io_vcText;
          io_vcText:=NULL;
        END IF;
        RETURN vcReturn;
      END;
    BEGIN
      tf:=CLIENT_TEXT_IO.FOPEN('filename', 'r');
      LOOP
        BEGIN
          -- read data line by line
          CLIENT_TEXT_IO.GET_LINE(tf, vcBuffer);
          -- split buffer into vars
          nId:=TO_NUMBER(FK_SPLIT(vcBuffer));
          vcName:=FK_SPLIT(vcBuffer);
          dtHireDate:=TO_DATE(FK_SPLIT(vcBuffer), 'dd/mm/yyyy');
          vcJob:=FK_SPLIT(vcBuffer);
          INSERT INTO DEST_TABLE (
            ID,
            NAME,
            HIRE_DATE,
            JOB
          ) VALUES (
            nId,
            vcName,
            dtHireDate,
            vcJob
        EXCEPTION
          WHEN NO_DATA_FOUND THEN
            EXIT;
      END LOOP;
      CLIENT_TEXT_IO.FCLOSE(tf);
    END;(not tested)
    If your importing large files it might be better to upload the file to the oas using WEBUTIL_FILE.CLIENT_TO_AS and then use TEXT_IO instead of CLIENT_TEXT_IO.
    Edited by: Andreas Weiden on 04.12.2008 20:47

  • Tcode to upload data into CATSDB table in HR ABAP

    Hi All,
      Could anyone let me know what is the TCODE to upload data into CATSDB table in HR ABAP.
    Regards,
    Srinivas.

    Thanks for your reply but i'm not able to find the required fields to upload.
    those are : pernr - employee number(ok)
    workdate - date
    awart - att./absence type
    lgart - wage type
    meinh - unit of measure
    catsquantity- quantity number
    Regards,
    Srinivas

  • BDC to upload data into FF67 Tables

    Hi,
    I like to upload data into FF67 Tables to process manual Bank Reconciliation.
    I wanted to know to upload data into FF67 Tables what are the related table.fields I have to consider.  (fields name and table names)
    My inputs are --  Posting Date, Assignment, Business Area, Profit Center, Amount, Tran key, Value Date, Bank Account, G/L Account, Co. Code, Currency
    Regards
    Rahkes

    Hi Divraj,
    As this is a regular posting like tranasction, I have to create BDC for this data posting.
    For this I like to know the table.fields that I need to update for FF67 Posting.
    If you can let me know the impacted table.fiedls for TCode: FF67 update then it will help me for creating BDC.
    Thanks & Regards
    Rahkes

  • How to upload data into Classification-MM02 for each MATNR By using BAPI

    Hi all
          How to upload data into characterstic value in  classification- MM02 for each MATNR by using BAPI.

    Hi Siva,
    Please try BAPI BAPI_OBJCL_CHANGE.
    The object key should be material number and object table should be MARA.
    Regards
    Hiren K.Chitalia

  • Tcode to upload data into CATSDB table

    Hi All,
      Could anyone let me know what is the TCODE that we will record and upload data into CATSDB table in HR ABAP.
    Regards,
    Srinivas.

    Hi,
    I also need the same information...i.e i want to record overtime of Employees...Where to do this?
    I tried creating it in PA61. I am able to create it with attendance type. But its triggering the CREATED method of ATTENDANCE Bus. Object. But i have been asked to use CREATED method CATS Bus. Object.
      Can anyone help me in this??? Also tell me how make entries in CAT2 ....
    Thanks,
    Sivagami.R

Maybe you are looking for

  • Computer clock resets to 1969. PRAM battery probably not the issue.

    I have a PowerMac G4 mirrored doors computer running Tiger 10.4.11 that occasionally starts up with that error message saying: "Your computer's clock is set to a date before March 24th, 2001. This may cause some applications to behave erratically." I

  • Can I connect an iphone 3gs to my tv to watch videos in apps, ie ActiveChannel?

    Can I connect an iphone 3gs to my tv to watch videos in apps, ie ActiveChannel or Niek Training Club?  TV is Samsung LED.

  • Linking to SQL Server using DG4ODBC

    Hi all, I've configured Oracle 11g R1 for Windows 2003 Server 32-bit to connect to MS SQL Server 2005 through ODBC. Following is the error I got when I try to access SQL Server by the db link in Oracle: SQL> select sysdate from dual@sqls ; select sys

  • "Edit in" color issues

    I love the product and have no real complaints, but I have one problem.  When I use the "edit in" feature, it's set to Corel Paint Shop Pro. simply because that's what I have.  I often get significant color degradation by the time it returns to Light

  • Photos in Blog entries

    Okay so the photos that I put into blog entries are default 400x300. If I try to put in a picture with different dimensions it cuts part of the picture off. Now if I delete the placeholder image and then insert the pic I want that works fine but then