How to filter out alt+enter in excel when upload to abap internal table

hi guys,
we're facing a problem when upload excel file with alt+key in between a line.
system would create some special character (# if see from internal table, a square if see from text file) in between the line.
replace all occurrences of '#' in char with space is not working here. And it is possible for user to key in '#' in the lines.
do we have any other option to fix this?
thanks.

Hi,
How are you uploading data from Excel to your program.
Try using FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' as shown below :
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_file
      i_begin_col             = '1'
      i_begin_row             = w_row
      i_end_col               = '200'
      i_end_row               = '60000'
    TABLES
      intern                  = ex_itab
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
This will allow you to upload the file without any special character. w_row is the row from which actual data in your excel begins.
Hope I understood your problem correctly and have given the right soln.
Regards,
Lalit Kabra

Similar Messages

  • How to upload an excel to a dynamically generated internal table?

    Hi,
    I have an excel sheet. I have to create an internal table dynamically according to the fields of the excel sheet. The internal table i have created successfully, the fields are exactly coming as the excel sheet. I need to upload the excel sheet directly to my Internal table.
    Similar to the FM GUI_UPLOAD, which directly uploads the text document into the internal table
    I am not able to pass my dynamic internal table to the GUI_UPLOAD, The tables parameter in the GUI_UPLOAD is accepting only the standard tables.
    How to do?
    -Sudheer

    Hi,
    Use TEXT_CONVERT_XLS_TO_SAP  Function  Module.
    AWARD POINTS IF USEFUL

  • How to Upload Excel sheet in DB or internal table using SAP NetWeaver ABAP

    Dear All experts,
    Pls provide guidance  to Upload Excel sheet in DB or internal table using ABAP in  ( SAP NetWeaver stack  )
    Regards
    Machindra
    Edited by: Machindra Patade on Apr 8, 2010 3:07 PM

    Please search before posting.
    Thread locked.
    Thomas

  • Help - How To Filter Out Completed Tasks from Remember

    I am a new user to Blackberry Classic OS 10.3.2. When I view tasks in the Remember app I would like to filter out or hide the tasks that are completed. The completed tasks currently still appear in the list and are crossed out but are cluttering up my list. Note that my tasks are synched to Outlook 2010. I have a long list of tasks and unless I can hide the completed tasks, the Remember app is not feasible. The sorting does not help as there is no way to sort all the incomplete to the top of the list. Thanks - hopefully someone knows a way around this!

    Hi Manuel,
    You should enclose the part you don't want to be checked...
    eg.
    REPORT zreport.
    SET EXTENDED CHECK OFF.  "To deactivate extended checks
    INCLUDE (standard include 1).
    INCLUDE (standard include 2).
    SET EXTENDED CHECK ON.  "To reactivate extended checks
    START-OF-SELECTION.
    Kr,
    Manu.

  • How to prepare excels  based on records of internal table.

    Hi abapers,
    I have a scenario as follows:
    In my internal table the records are as follows.
    col1   col2        col3
    1        a1          b1
    2        a2          b1
    3        a3          b2
    4        a4          b3.
    Now want i need is i have to break the records on the basis of  col3 . All b1 rows  are to be taken and dumped in a excel. b2 rows are to be taken and dumped in an excel and similarly for b3. And the name of excel will should be b1, b2 , b3 respectively.
    How do i go for the case?
    Help would be appreciated..
    Regards,
    Navin C
    Edited by: navin.c on Jun 12, 2009 7:41 AM

    put col3 as the first field in your itab.
    TYPES:BEGIN OF ty3,
    col3(3) TYPE c,
    col2(3) TYPE c,
    col1(3) TYPE c,
    END OF ty3.
    DATA:itab3 TYPE TABLE OF ty3.
    DATA:it_xl TYPE TABLE OF ty3.
    DATA:wa3 TYPE ty3.
    DATA:file_name TYPE string.
    SORT itab3 BY col3.
    LOOP AT itab3 INTO wa3.
      APPEND wa3 TO it_xl.
      AT END OF col3.
        READ TABLE itab3 INTO wa3 INDEX sy-tabix.
        CHECK sy-subrc = 0.
        file_name  = wa3-col3.
        PERFORM download_xl USING file_name.
        REFRESH it_xl.
      ENDAT.
    ENDLOOP.
    *&      Form  download_xl
    *       text
    *      -->P_FILE     text
    FORM download_xl USING p_file type any.
      DATA:lv_path TYPE string VALUE 'c:\'.
      CONCATENATE lv_path  p_file '.xls' INTO p_file.
      CONDENSE p_file NO-GAPS.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename              = p_file
          filetype              = 'DAT'
          write_field_separator = '#'
        TABLES
          data_tab              = it_xl.
    ENDFORM.                    "download_xl

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • 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

  • How to split all the fields of output ls-l from an internal table

    Hi all,
    Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
    Now how to split all these fields from the internal table or what should be the splitting criteria.
    The field contents of internal table are like this:
    -rw-rw----    1  devadm     sapsys     18360    apr  29......so on
    I want to split this into different fields.
    Kindly suggest.
    Thank You.

    Hi,
    I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
    Thanks and regards,
    S. Chandramouli

  • How to create a bapi to update and add record 2 abap r3 table created by me

    i have created a abap r3 table and i now want to insert records into it through SAP netweaver(Web-Dynpro). So i need a bapi to udate and insert records in the abap r3 table.if someone can please tell me how to create the bapi..coz i handel the EP part and dont know much about abap.

    BAPIs are defined as API methods of SAP business object types.
    A BAPI is implemented as a function module, that is stored and described in the Function Builder.
    To create BAPI you are supposed to do following steps :
    1) create package in SE80.
    2) create function group in SE80.
    3) create function module in SE37(REMOTE ENABLE) & relased it .
           write your logic in that FM.
    4) Go in SWO1 to create Object type /  object name (write the program name which is SE38 program generated in background )
    5) Then go to SWO1
          Utilities -> Api methods -> ADD method
             write the name of FM which you have created & continue.
    6) select your method
      a) EDIT -> change release status -> object type -> implement
                                                                           -> released
      b) EDIT -> change release status -> object type  component-> implement
                                                                           -> released
    7) go in BAPI & you will get your BAPI.

  • Excel data transfer into SAP internal table with GUI_UPLOAD

    hi all,
      i m using SRM4 system and i wanted to develop one report which will upload data from excel and convert it into IT.
    i know that many threads are posted on this topic.
    but my requirement is slight different. in the system only one function module is available that is "GUI_UPLOAD" and we want that user shd not save file as tab delimited before calling this fm. instead, program shd take care of all these things...
    please suggest something asap..
    helpful ans will be rewarded..
    thanks,
    jigs.

    Dear Jigs,
    Please go though the following lines of code:
    D A T A D E C L A R A T I O N *
    TABLES: ANEP,
    BKPF.
    TYPES: BEGIN OF TY_TABDATA,
    MANDT LIKE SY-MANDT, " Client
    ZSLNUM LIKE ZSHIFTDEPN-ZSLNUM, " Serial Number
    ZASSET LIKE ZSHIFTDEPN-ZASSET, " Original asset that was transferred
    ZYEAR LIKE ZSHIFTDEPN-ZYEAR, " Fiscal Year
    ZPERIOD LIKE ZSHIFTDEPN-ZPERIOD, " Fiscal Period
    ZSHIFT1 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 1
    ZSHIFT2 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 2
    ZSHIFT3 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 3
    END OF TY_TABDATA.
    Declaration of the Internal Table with Header Line comprising of the uploaded data.
    DATA: BEGIN OF IT_FILE_UPLOAD OCCURS 0.
    INCLUDE STRUCTURE ALSMEX_TABLINE. " Rows for Table with Excel Data
    DATA: END OF IT_FILE_UPLOAD.
    S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME,
    BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B2,
    END OF BLOCK B1.
    E V E N T : AT S E L E C T I O N - S C R E E N *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    PROGRAM_NAME = SYST-REPID
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    STATIC = 'X'
    MASK = '.'
    CHANGING
    FILE_NAME = P_FNAME
    EXCEPTIONS
    MASK_TOO_LONG = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Upload Excel file into Internal Table.
    PERFORM UPLOAD_EXCEL_FILE.
    Organize the uploaded data into another Internal Table.
    PERFORM ORGANIZE_UPLOADED_DATA.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    *& Form UPLOAD_EXCEL_FILE
    text
    --> p1 text
    <-- p2 text
    FORM UPLOAD_EXCEL_FILE .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = P_FNAME
    I_BEGIN_COL = 1
    I_BEGIN_ROW = 3
    I_END_COL = 7
    I_END_ROW = 32000
    TABLES
    INTERN = IT_FILE_UPLOAD
    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.
    ENDFORM. " UPLOAD_EXCEL_FILE
    *& Form ORGANIZE_UPLOADED_DATA
    text
    --> p1 text
    <-- p2 text
    FORM ORGANIZE_UPLOADED_DATA .
    SORT IT_FILE_UPLOAD BY ROW
    COL.
    LOOP AT IT_FILE_UPLOAD.
    CASE IT_FILE_UPLOAD-COL.
    WHEN 1.
    WA_TABDATA-ZSLNUM = IT_FILE_UPLOAD-VALUE.
    WHEN 2.
    WA_TABDATA-ZASSET = IT_FILE_UPLOAD-VALUE.
    WHEN 3.
    WA_TABDATA-ZYEAR = IT_FILE_UPLOAD-VALUE.
    WHEN 4.
    WA_TABDATA-ZPERIOD = IT_FILE_UPLOAD-VALUE.
    WHEN 5.
    WA_TABDATA-ZSHIFT1 = IT_FILE_UPLOAD-VALUE.
    WHEN 6.
    WA_TABDATA-ZSHIFT2 = IT_FILE_UPLOAD-VALUE.
    WHEN 7.
    WA_TABDATA-ZSHIFT3 = IT_FILE_UPLOAD-VALUE.
    ENDCASE.
    AT END OF ROW.
    WA_TABDATA-MANDT = SY-MANDT.
    APPEND WA_TABDATA TO IT_TABDATA.
    CLEAR: WA_TABDATA.
    ENDAT.
    ENDLOOP.
    ENDFORM. " ORGANIZE_UPLOADED_DATA
    In the subroutine --> ORGANIZE_UPLOADED_DATA, data are organized as per the structure declared above.
    Regards,
    Abir
    Don't forget to award points *

  • Exporting to excel erases the contents of internal tables

    Hi All,
    I am creating a BSP application wherein i am exporting the data from my
    BSP pages to the excel sheet using oninputprocessing event.
    The issue is when i open the excel, it opens it in a separate url but after opening the
    excel when i try to navigate to the other page, the contents of the other page gets erased.
    and once i refresh the page from which i am opening the excel, the contents of this page also disappears.
    so basically its clearing the contents of all my internal tables.
    I tried creating different set of internal tables for excel use, but the issue still exists.
    Could anybody please help me with this issue.
    With Regards,
    Mahima.

    In my opinion, after you are opening the window with export to excel you are creating new session, then all of your application data is initialized and you have an application like it would be newly started. The reason is improper link or so...

  • ABAP Internal Tables to Multiple Excel Worksheets in One Workbook

    I have an ABAP List report that shows data from two dozen internal tables.  Each internal table has different fields, formats, column headers, etc.
    I need to allow the user to export this data into one Excel file.  The file should contain multiple worksheets (each on a separate tab), but it should only be one XLS file.  Each worksheet is formatted differently. 
    I just coded it with the OLE Automation commands.  It runs too SLOW.... way way too slow.  Is there another technique to use that runs faster?  Examples?
    Thanks in advance!

    I should add...
    the slow part of this process is setting the value of each cell.
      SET PROPERTY OF gh_cell 'Value' = p_lv_value
    I am looking into function modules XXL_SIMPLE_API and XXL_FULL_API.  They appear to work faster, but they only create a single worksheet.
    Maybe it would be fastest to use the XXL modules to create multiple spreadsheet files and then use the OLE commands to merge them into a single workbook file?

  • How to filter out inbound Read receipts but prevent prevent notification to sender

    Greetings,
    For Exchange 2007, we would like to prevent external users from sending Read Receipt requests to our users.  In the Outlook client, we can easily disable this.  But for EAS users, their smartphones send a reply as soon as the email is opened.  I've
    applied a Hub Transport rule to strip out the "Disposition-Notification-To" from inbound emails but this causes a different message to be sent to the sender, "Delivery to these recipients or distribution lists is complete, but delivery
    notification was not sent by the destination:".   As a test, I've now also unchecked "Allow Delivery Reports" for Remote domains, but will this work?  Should both settings be applied to avoid generating the response to senders as noted
    previously?
    Thanks

    Hi,
    From your description, you want to prevent the external users from receiving the read receipts of internal users.
    You can create the following transport rule to achieve it. (Note: Because we use the "Read" as subject key word, it will delete the messages whose subject contain "read", please pay attention to use it.)
    What's more, I have a test in my lab. If I choose "Read:" as subject key word, the transport doesn't work. When I choose "Read" as subject key word, it works.
    Besides, to force an immediate update of transport rule, you can stop and start the Microsoft Exchange Transport service.
    Hope it helps.
    If you need further assistance, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • How to filter out multiple rows , using multiple selection criteria ?

    Dear Expert's,
    I am stuck with a problem while designing my dasboard.
    I have data in the following format.
    Year - Quarter - Customer - Division - KF1 - KF2
    2005 - Q1 - SAP - Consulting - 10 - 20
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    2006 - Q2 - RAM - Jets - 11 - 11
    What i wish to do, is to create radio box(for selection) to choose any Year, Quarter , Customer & Division
    eg if the user chooses 2005 , i want to display 3 line entries
    2005 - Q1 - SAP - Consulting - 10 - 20
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    if the user further selects quarter - Q2 (without disturbing the selection on for year ) the result should be
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    If the selection from year is removed (still maintaining the selection on quarter Q2 ) the result should show
    2005 - Q2 - IDE - Food - 20 - 10
    2005 - Q2 - SAP - Jets - 12 - 11
    2006 - Q2 - RAM - Jets - 11 - 11
    Simply i need to create a filer for all the fields.
    The issue that i am facing with filer component is that - 1 - it returns only one desitnation row , 2 - you can only get Key values in result set
    Issue with combo box is i cannot select multiple fields (dimensions) using it .
    Please suggets .
    Thanks in Advance

    Hi Ankit,
    There is a workarround that requires some excel work.
    Here you need to follow the above mentioned steps along with this you need an additional combo box (wont be displayed at runtime, it will fetch the entire data if we select blank for the first combo box).
    Now suppose we are using 2 combobox C1 and C2 and our data is from B3 to F6.
    Now for C1 (one we are using for selection)
    1. select the labels as Sheet1!$B$2:$B$6 (a blank cell is added for all selection)
    2. Insertion type as filtered Rows
    3. Take source data as Sheet1!$B$2:$F$6 (includeing one blank row)
    4. selected Items as none
    5. for C2 labels as Sheet1!$A$3:$A$6 source data as Sheet1!$B$3:$F$6 destination as Sheet1!$B$14:$F$17.
    6. Selected Item : Sheet1!$B$9  (blank  Type dynamic). So it will select the entire table, if nothing is selected.
    7. take a Grid component and map it to Sheet1!$H$9:$L$12. use formula as =IF(IF($B$9="",B14,B9)=0,"",IF($B$9="",B14,B9)) on cell H9. Where we take H6 to L12 as final data set. Tis will become the data for next set fo Combo box for further selection.
    8. follow the same steps for other combobox selections.
    9. control the dynamic visibility of grids on the basis of Destination cell (like B9).
    Revert if you need further clarification.
    Regards,
    Debjit

  • How to filter out data by total value.

    Hi expert,
           I have following requirement for a query:
             employee              overtime_reason_code        overtime_hours
                   1                                      1                                       1
                                                           2                                       6
                                                           3                                       10
           so for an employee, if total overtime_hours>8, then it will be displayed in the report, otherwse , it will be filterred out from the report.
    Many Thanks,

    Hi Bo,
    This suggestion will add another KF in column:
    Create a FORMULA and insert the OVERTIME_HOURS in it..Go to aggregation tab and make it TOTAL with reference characteristic to EMPLOYEE..
    Then make a CONDITION for the FORMULA you have created so that if total is <8 hours, it will not be shown..
    The result will be like this:
             employee              overtime_reason_code        overtime_hours               new formula
                   1                                      1                                       1                                                 17
                                                           2                                       6                                                  17
                                                           3                                       10                                                17
    so if you have employee 2 with total of less than 8 hours, it will not be shown..
    Regards,
    Loed

Maybe you are looking for

  • Java Mapping: payload as mail attachment and dynamic file name .

    Hi, I have written this piece of java code. The code includes XPATH for fetching dynamic filename and the copysource( in, out ) to copy the content of payload as mail attchment. The code seems to work fine, when either of the functionality is impleme

  • J2sdk1.4.1 installation in Solaris 2.6

    Hi, I've installed the "j2sdk-1_4_1-rc-solaris-i586.sh" (Solaris j2sdk1.4.1) and "J2SE_Solaris_2[3].6_x86_Recommended.tar.Z" (patch for solaris 2.6). And make the j2sdk1.4.1 de default java. When running java, the following message ocurrs: 18:03 eid@

  • How to add  new column in VA02?

    I want to add a new column before the column posnr in VA02/VA03 which will be non editable.

  • Account Assignment PO

    Message no. ME045 DIAGNOSIS: Comparison of the field selection strings from G/L account 400000 and the account assignment category K revels that there is an incompatible combination of field selection for the field selection group u201CEARMARKED FUND

  • GUI Tool for Cisco 6500 Chassis

    Hi We have a requirement to allow our Service Desk to amend vlans on switchports on a range of 6509 chassis. Is there a tool, (like SDM for routers) which would allow them to do this using a GUI? We need to keep it as simple as possible as the Servic