Problem to upload the data into internal table record length more than 6000

Hi all
        I stuck with this problem from past 3 days. I have to upload the data from excel sheet. iam making it tab delimited and trying to upload from gui_upload. but in the structure of file, we have, one field of 4000 characters, and other fields of 255 characters.
how can i upload this into internal table . From excel sheet or from tab delimeted or any other format? or any special function module is there?  while iam doing this its truncating the datat 255 characters and not uploading the other fields also...
can any one of you help me out. ASAP
thnks in advance

from one of the forum iam just pasting code which it is used in lsmw, try the same logic in ur code hope it can work.
you have to create multiple lines with do...enddo loop., like this:
(assuming excel_long_text-text is 924 characters long, 7 lines X 132 char)
__GLOBAL_DATA__
data: offset type i,
text_132(132) type c.
__BEGIN_OF_RECORD__ Before Using Conversion Rules
Rule : Default Settings Modified
Code: /sapdmc/ltxtl = init_/sapdmc/ltxtl.
CLEAR offset.
DO 7 TIMES.
text_132 = excel_long_text-text+offset(132).
offset = offset + 132.
__END_OF_RECORD__ After Using Conversion Rules
Rule : Default Settings Modified
Code: transfer_record.
ENDDO.
also check this
COMMIT_TEXT
To load long text into SAP
READ_TEXT
To load long text into SAP

Similar Messages

  • Upload excel data into Internal table

    Hi,
    I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.
    Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.
    I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.
    Please advise if you know any alternate procedure to upload excel data into internal table.
    Thanks,
    Kumar.

    Moderator message - Cross post locked
    Rob

  • Problem in uploading the file of internal table into appliaction server

    i want to send the data of internal table to application server through selection screen and in selection screen and in selection screen parameter it should show the path of application server and through that path internal table data should go to application server , if possible give the code

    Hi,
    form download_file_appl_server.
      open dataset p_dlf2 for output
              in text mode encoding default .
      if sy-subrc ne 0.
        message:i005 with text-415 text-407.
      endif.
      loop at i_final into wa_final.
        transfer wa_final to p_dlf2.
      endloop.
      close dataset p_dlf2.
    endform.                    " OPENDATA_CLOSE
    where p_dlf2 is the seelction screen parameter which give the application server file path
    You can use this code for ur purpose.
    Reward if useful.
    Regards
    Shibin

  • Problem in collecting Spool data into internal table

    Hi ,
    i need to download  spool request data into internal table,
    after collecting i need to loop it and delete some records,
    for this i am using  Fm  RSPO_RETURN_ABAP_SPOOLJOB
    but getting some extra spaces and lines,unable to get right format.
    please help me in this issue to prepare internal table like normal internal table with spool id.
    Regards
    sarath

    Hi ,
    Thanks for the reply,
    My requirement is like i need to collect all the records from the spool to Internal table and
    after that based on one field in the internal table i have to separate error records by deleting sucess records from that internal table(from spool),
    for that i have to loop the internal table and need to count the error records, after that download to excel and mail functionalities
    required for that .
    so please help me in this.
    Regards
    sarath

  • Upload excel data into Internal table dynamically

    Hi all,
    I have a excel file, in this file there are fixed columns but I don't know, at run time, how many rows will come up.
    Now I want to fetch the data from file to internal table, I used
    GUI_UPLOAD and ALSM_EXCEL_TO_INTERNAL_TABLE.
    But it is not working for me.
    Please suggest how to get it.
    Thanks
    Sanket sethi

    HI,
    go through this code:
    Upload data from Excel to internal table.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_pfile
          i_begin_col             = 1
          i_begin_row             = 2
          i_end_col               = 45
          i_end_row               = 8
        TABLES
          intern                  = it_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.                               " IF sy-subrc  0
    *Populate data to internal tables and structructures
      SORT it_excel BY row col.
      LOOP AT it_excel INTO ls_excel.
        CASE ls_excel-col.
          WHEN 1.
            ls_data-doc_type = ls_excel-value.
          WHEN 2.
            ls_data-rec_no = ls_excel-value.
          WHEN 3.
            ls_data-doc_ver = ls_excel-value.
          endcase.
    endloop.
    Hope it will help you
    Thanks and Regards
    Rahul Sharma

  • How to apply data into 2 tables AND to more than one record in same table?

    Hello,
    I am trying to apply/insert data into 2 tables AND at the same time apply data to more than one record (in the same table). How would I do this in APEX?
    I have updated using one table with no problem, however, when I try updating with the two tables/ multiple record sets, I get errors.
    I appreciate the help.
    Thanks.
    Linda

    You can achieve what you want using PL/SQL. Can you post ur code?

  • Bdc upload file data into internal table problem with gui_upload fm

    Hello experts,
    my coding is like this ..
    data : begin of itab occurs 0 .
    field1 like mara-matnr,
    field2......
    etc,
    end of itab.
    data: file1 type string.
    parameter :file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    mask = space
    field_name = 'FILE'
    CHANGING
    file_name = file.
    START-OF-SELECTION.
    FILE1 = FILE . "HERE I AM PASSING INTO STRING
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = FILE1
    FILETYPE = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
    HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
    file structure is same as the internal table.
    I stored the file as .txt( ie in notepad).
    my file is like this..
    10000 200 323 sunndarrr.......
    i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
    when i am using the ws_upload it is working fine.
    please guide me where i have done the mistake.
    thank you so much for all the replies.

    Hi,
    Have a look on the following code.
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      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
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    1.U need to define internal table with one field of max size
    2.upload the flat file data into that internal table
    3.split that internal table data into another internal table(having fields)
    <REMOVED BY MODERATOR>
    thanks,
    Chandu
    Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM

  • Problem in downloading spool data into internal table

    Hi,
    I am using the FM, RSPO_RETURN_ABAP_SPOOLJOB to get data from spool to internal table. but the problem is length of each line in spool is more than 500 characters. data which is dowlnoaded into the internal table using the above FM is truncated to 255 characters. Is there any way to fetch all the characters ?
    Best Regards,
    Phani Kumar. S

    Hi
    Try FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'.
      TYPES: BEGIN OF normal_list,
               data_line(1000),
             END OF normal_list.
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'
        EXPORTING
          rqident              = c-itcpp-tdspoolid
        TABLES
          buffer               = i_rdidata
        EXCEPTIONS......................
    It maybe can give you an answer...
    Regards
    Yossi Rozenberg

  • Copying the data into internal table without internal table

    Hello experts.
    i have two internal tables . itab1 without headerline and itab2 with headerline. itab1 has 10 fields and itab2 has 2 fields.
    BEGIN OF itab,
    lifnr LIKE lfa1-lifnr,
    ktokk LIKE lfa1-ktokk,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    pstlz LIKE lfa1-pstlz,
    ort01 LIKE lfa1-ort01,
    land1 LIKE lfa1-land1,
    j_1ipanno LIKE j_1imovend-panno,
    end of itab.
    DATA: itab1 TYPE STANDARD TABLE OF itab.
    data: begin of itab2 occurs 0,
    lifnr like j_1imovend-lifnr,
    j_1ipanno like j_1imovend-j_1ipanno,
    end of itab2.
    now i want to move the data from itab2-j_1ipanno into itab1-j_1ipanno.
    Both the tables ie itab1 and itab2 has lifnr data in them .
    so in itab2 j_1ipanno has pan number for the lifnr( vendors) so i need to populate this pannumbers in itab1 also by comparing
    the lifnrs in two tables. where ever the lifnr of itab2 is equal to itab1-lifnr then this pannumber should be placed there. 
    so pls tell me how to do that. lifnr in both the tables are the same.
    thanks for all the replies.

    Hi Shiva,
                Try this one..
    data: begin of itab.
       lifnr LIKE lfa1-lifnr,
        ktokk LIKE lfa1-ktokk,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    pstlz LIKE lfa1-pstlz,
    ort01 LIKE lfa1-ort01,
    land1 LIKE lfa1-land1,
    j_1ipanno LIKE j_1imovend-panno,
    end of itab.
    data: wa like line of itab1.
    data: begin of itab occurs 0,
            lifnr like j_1imovend-lifnr,
            j_1ipanno like j_1imovend-j_1ipanno,
    end of itab2.
    data: wa1 like line of itab2.
    loop at itab1 into wa.
    itab2-lifnr = wa-lifnr.
    itab2-j_1ipanno = wa-j_1ipanno
    append itab2.
    endloop.
    Reward points if helpful.
    Kiran Kumar.G.A
            Have a Nice Day..

  • Char data into internal table.

    Hi all,
    I will get data from the FTP (.TXT file) through FTP_SERVER_TO_R3.
    in chardata with separater Tab delimited.
    here i took one field symbol and assigning the data into internal table.
    till here every thing is ok.
    My problem is one data type is 13 char, if that field is more than 13 char in the file
    it is giving DUMP. (DUMP is OVERFLOW Field 999976767878.22)
    TYPES : BEGIN OF X_STRING,
                       LINE(150) TYPE STRING,
                  END OF X_STRING.
    data : IT_STRING TYPE STANDARD TABLE OF X_STRING,
              WA_STRING TYPE X_STRING.
                          FIELD-SYMBOLS : <fs> TYPE ANY.
                        LOOP AT chardata INTO wa_chardata.
                          REFRESH it_string.
                          SPLIT wa_chardataline AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_string.
                          LOOP AT it_string INTO wa_string FROM 1 TO 29.
                            ASSIGN COMPONENT sy-tabix OF STRUCTURE wa_data TO <fs>.
                            <fs> = wa_string-field1.
                            UNASSIGN <fs>.
                          ENDLOOP.
                          APPEND wa_data TO it_data.
                          CLEAR wa_data.
                        ENDLOOP.
    Please give me solution to over come this.
    Regards,
    Sri

    In Statement ASSIGN COMPONENT sy-tabix OF STRUCTURE wa_data TO <fs>.
    insted of using SY-TABIX  use the actual field name of the structre wa_data .
    Use a RTTS Method to get all the fields of the structre WA_DATA and then loop at all the fields and then manuplate teh that which has been splitted...!
    Hope it helps it will not cause any over flow..and ...( Try to condence the The splitted dat use condence addition while moveing the data to wa_data it will avoide the leading and trailing spaces.... )
    Edited by: Anup Deshmukh on Jun 17, 2010 8:31 AM

  • Uploading  Excel sheet  data into internal table

    Hi All,
    I want to upload Excel file data into internal table. My problem is that my excel file  having more than one sheets. I want to upload  the data of particula Excel sheet..
    Please suggest me how can I upload particulat Excel sheet data .
    Thanks and regards
    Praveen

    check this link
    Uploading multiple excel sheets
    You can check Satish's answer in the above link
    Re: uploading data from excel sheets through BDC's into sap system
    <b>Award points if found helpful</b>

  • Extract the classification data into internal table

    Hi all,
    I having requirement to extract classification data for material number.
    1) Provide the selection option for material number (MATNR).
    2) Based on the material number, then extract all that data into internal table as below layout. My problem is how to retrieve the following data from different table based on the MATNR (material number).
    Please provide the sample code for select the following data. Thanks.
    Classification table
    OBJEK  (from AUSP table)
    MAFID (from AUSP table)
    KLART (from AUSP table)
    CLASS  (from KLAH table)
    ATWRT (from AUSP table)
    MSEHI  (from CABN table)
    OBTAB (check if class type=002, set it as “MARA”)
    STDCL (from KSSK table)

    Hi,
    if I understand, you´re trying to get information from the classification system for the material. You can use the following code:
    DATA: clases LIKE TABLE OF sclass WITH HEADER LINE,
          datos LIKE TABLE OF clobjdat WITH HEADER LINE.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
         EXPORTING
              class              = 'DESK'               "clase a buscar
              classtype          = '001'                "tipo de la clase
              features           = 'X'
              language           = sy-langu
              object             = 'PM00A000C055'       "Material
              objecttable        = 'MARA'
              key_date           = sy-datum
              initial_charact    = 'X'
              change_service_clf = 'X'
         TABLES
              t_class            = clases
              t_objectdata       = datos
         EXCEPTIONS
              no_classification  = 1
              no_classtypes      = 2
              invalid_class_type = 3
              OTHERS             = 4.
    loop at datos.
    endloop.

  • Getting Issue while uploading CSV file into internal table

    Hi,
    CSV file Data format as below
         a             b               c              d           e               f
    2.01E14     29-Sep-08     13:44:19     2.01E14     SELL     T+1
    actual values of column   A is 201000000000000
                     and  columen D is 201000000035690
    I am uploading above said CSV file into internal table using
    the below coding:
    TYPES: BEGIN OF TY_INTERN.
            INCLUDE STRUCTURE  KCDE_CELLS.
    TYPES: END OF TY_INTERN.
    CALL FUNCTION 'KCD_CSV_FILE_TO_INTERN_CONVERT'
        EXPORTING
          I_FILENAME      = P_FILE
          I_SEPARATOR     = ','
        TABLES
          E_INTERN        = T_INTERN
        EXCEPTIONS
          UPLOAD_CSV      = 1
          UPLOAD_FILETYPE = 2
          OTHERS          = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    am getting all columns data into internal table,
    getting problem is columan A & D. am getting values into internal table for both; 2.01E+14. How to get actual values without modifying the csv file format.
    waiting for your reply...
    thanks & regards,
    abhi

    Hi Saurabh,
    Thanks for your reply.
    even i can't double click on those columns.
    b'se the program needs be executed in background there can lot of csv file in one folder. No manual interaction on those csv files.
    regards,
    abhi

  • Function module to get data into internal table from Excel file sheets

    Hi,
    I have to upload customers from excel file.
    we are donloading customer data excel file sheets.
    Customer data in 1 sheet, tax data the other sheet of same excel file, Customer master-Credit data in other sheet of same excel file.
    so i have 3-4 sheet in one excel file.
    now my requirement is to get the data from excel file into internal table.
    is there any function module.
    Thanks & Regards

    I am sending you the idea with an example how you can upload data from an EXCEL file into an internal table. I am not sure if you can take data from different sheet in the same EXCEL file. I think that this is not possible (try it )
    Upload the data into an internal table, like the way that I am describing in the above:
      DATA: L_MAX_COL_NB TYPE I.
      DATA: l_file_name LIKE RLGRAP-FILENAME.
    Just to be sure that is the correct type for the FM.
      l_file_name = P_FILE_NAME.
      L_MAX_COL_NB = 58.  "Maximum nb of colums that the FM can read.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                FILENAME                = l_file_name
                I_BEGIN_COL             = 1
                I_BEGIN_ROW             = 2
                I_END_COL               = L_MAX_COL_NB
                I_END_ROW               = 9999
           TABLES
                INTERN                  = PT_EXCEL
           EXCEPTIONS
                INCONSISTENT_PARAMETERS = 1
                UPLOAD_OLE              = 2
                OTHERS                  = 3.
      IF SY-SUBRC <> 0.
      ENDIF.
    Now you should upload the data into your own itab. The Function Module will return to you all the an itab
    from all fields and columns. Define the structure of the uploading file into SE11 - Data Dictionary. Then read the fieldcatalog of this structure. In the code that I am sending to you, I am insearting an empty line into the internal table and then I am assigning this line into a corresponding field-symbol. Then I am able to change the working area - so and the line of the itab. Propably you could you the statement APPEND INITIAL LINE TO (your_table_name) ASSIGNING <your_field_symbol>, but the example was written in an old SAP version.
      FIELD-SYMBOLS:
                     <F_REC> LIKE WA_UPLOAD_FILE,      "working are of the uploading file
                     <F_FIELD> TYPE ANY.
      DATA: COLUMN_INT TYPE I,
            C_FIELDNAME(30) TYPE C.
      PERFORM GET_FIELDCATOLG TABLES FIELDCAT
                               USING 'ZECO_CHARALAMBOUS_FILE'.
      LOOP AT PT_EXCEL.
        AT NEW ROW.
          ASSIGN WA_UPLOAD_FILE TO <F_REC>.
        ENDAT.
        COLUMN_INT = PT_EXCEL-COL.
        READ TABLE FIELDCAT INTO WA_FIELDCAT INDEX COLUMN_INT.
        CONCATENATE '<F_REC>-' WA_FIELDCAT-FIELDNAME INTO C_FIELDNAME.
        ASSIGN (C_FIELDNAME) TO <F_FIELD>.
        <F_FIELD> = PT_EXCEL-VALUE.
        AT END OF ROW.
          APPEND WA_UPLOAD_FILE TO GT_UPLOAD_FILE.
          CLEAR WA_UPLOAD_FILE.
        ENDAT.
      ENDLOOP.
    With Regards
    George
    Edited by: giorgos michaelaris on Mar 4, 2010 3:44 PM

  • How to avoid the split problem when uploading the data from csv file

    Dear Friends,
                  I have to upload data from the .csv file to my custom table , i have found a problem when uploading the data .
    i am using the code as below , please suggest me what i have to do in this regard
          SPLIT wa_raw_csv  AT ',' INTO
                    wa_empdata_csv-status
                     wa_empdata_csv-userid
                     wa_empdata_csv-username
                     wa_empdata_csv-Title
                     wa_empdata_csv-department.
    APPEND wa_empdata_csv TO  itab.
    in the flat file i can see for one of the record for the field Title  as
    Director, Finance - NAR............there by through my code the  wa_empdata_csv-Title is getting splited data as "Director, and  Department field is getting Finance - NAR" , i can see that even though  " Director, Finance - NAR"  is one word it is getting split .
    .......which is the problem iam facing.Please could any body let me know how in this case i should handle in my code that this word
    "Director,Finance - NAR"   wil not be split into two words.
    Thanks & Records
    Madhuri

    Hi Madhuri,
    Best way to avoid such problem is to use TAB delimited file instead of comma separated data. Generally TAB does not appear in data.
    If you are generating the file, use tab instead of comma.
    If you cannot modify the format of file and data length in file is fixed character, you will need to define the structure and then move data in fixed length structure.
    Regards,
    Mohaiyuddin

Maybe you are looking for