Problem with the Excel Download with GUI_DOWNLOAD

Hi Sdn,
I am reading the long text from FM READ_TEXT and downloding that text to Excel file  in one cell with the GUI_DOWNLOAD FM (I got 16 lines of text and by using CONCATENATE i got 16 lines of text into a string variable).
The problem here I am facing is.
The text contains a # symbol in one line (Which is not a last line).
After downloading the file the text after the # symbol is coming in the next line.
I tried to REPLACE that # symbol with space but failed.
System not at all reading that symbol also.
The text came as LEE, ANDREW" Completed On: 2010/09/04#
Can any one help me to solve this issue.
Edited by: Naresh Nelapatla on Apr 20, 2011 8:27 PM

Hi Naresh,
My thoughts on a possible solution, convert the last character value to a HEX value and check if it falls within the ASCII/Unicode CP range, Obviously this becomes easier if you are just looking at a single language character set.
The below FM and code helps you check if the character falls within the ASCII char set.
DATA: l_in_char TYPE string,
      l_out     TYPE xstring.
CALL FUNCTION 'NLS_STRING_CONVERT_FROM_SYS'
  EXPORTING
    lang_used                   = sy-langu
    SOURCE                      = l_in_char
  TO_FE                       = 'MS '
IMPORTING
   RESULT                      = l_out
  SUBSTED                     =
EXCEPTIONS
   illegal_syst_codepage       = 1
   no_fe_codepage_found        = 2
   could_not_convert           = 3
   OTHERS                      = 4.
IF l_out LT '0' OR l_out GT '7F'.
  WRITE: 'error'.
ENDIF.
Links: http://www.asciitable.com/
          http://www.utf8-chartable.de/unicode-utf8-table.pl
Regards,
Chen
Edited by: Chen K V on Apr 21, 2011 11:25 AM

Similar Messages

  • I have a an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes. All of the other movies on the card download with out a problem.

    I have an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes.
    All of the other movies on the card download with out a problem. The movie in question is not 'corrupt' as you can watch it in iMovie direct from the SD card but as soon as you try to import it, it  just says 'error'. iIve tried moving the file to an external drive ( and other variations on this theme) then importing but have had no luck.
    Can anyone please help me.

    The mystery remains....
    Thanks for the pointers. The file type is .mts (a proprietry sony one).
    I have now found some video converter software (Wondershare and iSkysoft) at a cost. Either will convert this file for me into .mp4. This I can then import into iMovie without any problems. I've checked this on the trial versions and it worked well but without paying am left with a giant watermark in the video
    The mystery (which I still havent solved) is why did 20 other .mts files import fine and then this one not?
    If you could point me in the direction of some free .mts converter software that would be the cherry on the cake.
    Thanks

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Hi people, have on the phone till Apple, the reason i cant download OS X Lion is because BT are having issues with the large download & are working on a fix. Was told to phone back in 24 hours if problem continues

    Hi people, have on the phone till Apple, the reason i cant download OS X Lion is because BT are having issues with the large download & are working on a fix. Was told to phone back in 24 hours if problem continues

    Hi, just got off the phone from BT Business. It is the Business 2wire hub that has the issue. The girl from technical talked through a direct modem to Mac connection and my download took 20 minutes. If you are on Fibre broadband this is the only current fix or a new router if non fibre customer. Hope that helps.

  • HT4623 Has any one had a problem with the new download?

    Has anyone had a problem with the new download?

    Here's what others have done successfully to work around that problem: In your Web browser, go to Photoshop.com and log in.  You should be asked to accept the Terms Of Use.  Once you have, then you won't have any issue with accessing Photoshop.com from PSE.

  • There seems to be a problem with the file download. For troubleshooting tips, please visit our customer support page

    There seems to be a problem with the file download. For troubleshooting tips, please visit our customer support page.

    Thank you for the update Dlawrenceusa.  I would recommend reviewing the installation logs for the updates that are failing to apply to determine the exact cause of the failure.  You can find details on how to locate and interpret the installation log files at Creative Cloud Help / Troubleshoot install issues with log files | CC.  You are welcome to post any specific error messages you discover to this discussion.

  • Excel download with multiple worksheets using ABAP webdynpro

    Content of Internal table should to downloaded  to an excel sheet with multiple worksheet.

    Excel doesn't support multiple worksheets with the text tab delimited or any of the other plain text formats.  So if you need multiple worksheets those approaches are out.  Multiple worksheets would only work with the Excel native format or the XML based format.  From ABAP the best approach would be to create the XML Excel format.  Search the forms and wiki has there has been tons of discussion in the mast on the XML Excel format.

  • Any FM or other ways to open the Excel file with data

    Please provide some Help, where I need to open the excel File  with some static  data (header data) from the Selection screen application Toolbar on clicking the button
    Thanks
    Ravindra

    Hi here is good example.
    Satish
    Reads an existing Idoc and dispays the contents in a spreadsheet format
    REPORT Z_DISPLAY_IDOC_AND_DATA line-size 275.
    This tool reads an existing Idoc and dispays the contents in a       *
    spreadsheet format. The spreadsheet (MS-EXCEL) will be automatically *
    created if D_EXCEL = 'X'.                                            *
    data: idoc_control like EDIDC,
          NUMBER_OF_DATA_RECORDS like sy-dbcnt,
          NUMBER_OF_STATUS_RECORDS like sy-dbcnt,
          INT_EDIDS like edids occurs 0 with header line,
          INT_EDIDD like edidd occurs 0 with header line.
    TYPE-POOLS :  LEDID.
    data: STRUCT_TYPE TYPE  LEDID_STRUCT_TYPE ,
          IDOC_STRUCT TYPE  LEDID_T_IDOC_STRUCT,
          SEGMENTS TYPE  LEDID_T_SEGMENT,
          SEGMENT_STRUCT TYPE  LEDID_T_SEGMENT_STRUCT,
          excel_tab(2000) occurs 0 with header line.
    parameter: DOCNUM like edidc-docnum obligatory, ""Idoc Number
               sap_rel like SY-SAPRL default SY-SAPRL obligatory,
               pi_ver like EDI_VERREC-VERSION default '3' obligatory,
               d_excel as checkbox default 'X'. ""Download ?
    start-of-selection.
      perform read_idoc.
      perform process_idoc.
      if d_excel = 'X'.
        perform download_to_excel.
      endif.
    end-of-selection.
    FORM read_idoc.
      CALL FUNCTION 'IDOC_READ_COMPLETELY'
           EXPORTING
                DOCUMENT_NUMBER          = docnum
           IMPORTING
                IDOC_CONTROL             = idoc_control
                NUMBER_OF_DATA_RECORDS   = NUMBER_OF_DATA_RECORDS
                NUMBER_OF_STATUS_RECORDS = NUMBER_OF_STATUS_RECORDS
           TABLES
                INT_EDIDS                = INT_EDIDS
                INT_EDIDD                = INT_EDIDD
           EXCEPTIONS
                DOCUMENT_NOT_EXIST       = 1
                DOCUMENT_NUMBER_INVALID  = 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.                    "" read_idoc
    FORM process_idoc.
      perform read_idoc_structure.
      perform display_data_records.
    ENDFORM.                    "" process_idoc
    FORM display_data_records.
      data: PE_seg_HEADER like EDI_SAPI01,
            segname like EDI_IAPI12-SEGMENTTYP,
            prev_segname like EDI_IAPI12-SEGMENTTYP value ' ',
            pt_fields2 like EDI_IAPI12 occurs 0 with header line,
            PT_FVALUES2 like EDI_IAPI14 occurs 0 with header line,
            byte_first type i,
            byte_last type i,
            field_val(50),
            tmp_str(15),
            tmp_str3(15),
            seg_repeats type i value 0,
            tmp_str2(15),
            tab_cr(1) type x value '09',
            tot_ctr type i value 0,
            ctr type i value 0,
            msg(40) type c.
      data: IDOC_STRUCT_wa TYPE  LEDID_IDOC_STRUCT.
      sort int_edidd by segnum.
      describe table int_edidd lines tot_ctr.
      loop at int_edidd.
        move int_edidd-segnam to segname.
        clear msg.
        concatenate 'Reading segment ' segname
                    into msg separated by space.
        if tot_ctr <> 0.
          ctr = ( 100 * sy-tabix ) / tot_ctr.
        endif.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
             EXPORTING
                  PERCENTAGE = ctr
                  TEXT       = msg.
        add 1 to seg_repeats.
        clear tmp_str2.
        if int_edidd-segnam <> prev_segname.
          seg_repeats = 1.
          clear: pe_seg_header, pt_fields2, pt_fvalues2.
          refresh: pt_fields2, pt_fvalues2.
          CALL FUNCTION 'SEGMENT_READ_COMPLETE'
               EXPORTING
                    PI_SEGTYP                 = segname
                    PI_RELEASE                = sap_rel
                    PI_VERSION                = pi_ver
               IMPORTING
                    PE_HEADER                 = pe_seg_header
               TABLES
                    PT_FIELDS                 = pt_fields2
                    PT_FVALUES                = pt_fvalues2
               EXCEPTIONS
                    SEGMENT_UNKNOWN           = 1
                    SEGMENT_STRUCTURE_UNKNOWN = 2
                    OTHERS                    = 3.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          prev_segname = int_edidd-segnam.
        endif.
        read table idoc_struct into idoc_struct_wa with key
                               segment_type = int_edidd-segnam.
        if sy-subrc = 0.
          IF IDOC_STRUCT_WA-SYNTAX_ATTRIB-MUSTFL = 'X'.
            TMP_STR = 'Mandatory'.                  ""Mandatory
          ELSE.
            TMP_STR = 'Optional'.                  ""Optional
          ENDIF.
          if IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-QUALIFIER = 'X'.
            tmp_str3 = 'Qualified'.
          else.
            tmp_str3 = 'Non-Qualified'.
          endif.
          shift IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
                                     left deleting leading '0'.
          move seg_repeats to tmp_str2.
          condense: IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX, tmp_str2.
          concatenate tmp_str2 'of'  IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
              into tmp_str2 separated by space.
          write :/ IDOC_STRUCT_wa-SEGMENT_TYPE,
               tmp_str,
               TMP_STR3,
               tmp_str2,
               IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL,
               IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast,
               IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP.
          if d_excel = 'X'.
            concatenate 'Segment Name' tab_cr
                        'Mand / Opt ' tab_cr
                        'Qual / non-Qual' tab_cr
                        'Seq of Max' tab_cr
                        'Level' tab_cr
                        'Owner' tab_cr
                        'Description'
                        into excel_tab.
            append excel_tab.
            concatenate IDOC_STRUCT_wa-SEGMENT_TYPE tab_cr
                  tmp_str tab_cr
                  TMP_STR3 tab_cr
                  tmp_str2 tab_cr
                  IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL tab_cr
                  IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast tab_cr
                  IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP
                  into excel_tab.
            append excel_tab.
            concatenate tab_cr
                        'Field Nma' tab_cr
                        'Type' tab_cr
                        'Length' tab_cr
                        'Byte From' tab_cr
                        'Byte To' tab_cr
                        'Description' tab_cr
                        'Value' tab_cr
                        'Qualifier Meaning'
                        into excel_tab.
            append excel_tab.
          endif.
        endif.
        sort pt_fields2 by field_pos.
        byte_first = 0.
        loop at pt_fields2.
          clear: field_val.
          byte_last = pt_fields2-EXTLEN.
          write int_edidd-sdata+byte_first(byte_last) to
                field_val left-justified.
          shift pt_fields2-EXTLEN left deleting leading '0'.
          shift pt_fields2-byte_first left deleting leading '0'.
          shift pt_fields2-byte_last left deleting leading '0'.
          write:/ '   ', pt_fields2-fieldname,
                  pt_fields2-datatype,
                  pt_fields2-EXTLEN,
                  pt_fields2-byte_first ,
                  pt_fields2-byte_last,
                  pt_fields2-descrp,
                  field_val.
          read table pt_fvalues2 with key fieldname = pt_fields2-fieldname
                        fldvalue_l = field_val.
          add byte_last to byte_first.
          if sy-subrc = 0.
            write : pt_fvalues2-descrp.
          else.
            clear pt_fvalues2-descrp.
          endif.
          if d_excel = 'X'.
            concatenate tab_cr pt_fields2-fieldname tab_cr
                    pt_fields2-datatype tab_cr
                    pt_fields2-EXTLEN tab_cr
                    pt_fields2-byte_first tab_cr
                    pt_fields2-byte_last tab_cr
                    pt_fields2-descrp tab_cr
                    field_val tab_cr
                    pt_fvalues2-descrp
                    into excel_tab.
            append excel_tab.
          endif.
        endloop.
      endloop.
    ENDFORM.                    "" display_data_records
    FORM read_idoc_structure.
      data: idoctype type LEDID_IDOCTYPE.
      if not idoc_control-cimtyp is initial.
        STRUCT_TYPE = 'E'. ""Extended
        idoctype = idoc_control-cimtyp.
      else.
        STRUCT_TYPE = 'B'. ""Basic
        idoctype = idoc_control-idoctp.
      endif.
      CALL FUNCTION 'IDOC_TYPE_COMPLETE_READ'
           EXPORTING
                RELEASE              = sap_rel
                STRUCT_TYPE          = STRUCT_TYPE
                IDOCTYPE             = idoctype
                VERSION              = pi_ver
          IMPORTING
               IDOC_TYPE            = idoctype
           TABLES
                IDOC_STRUCT          = idoc_struct
                SEGMENTS             = segments
                SEGMENT_STRUCT       = segment_struct
           EXCEPTIONS
                IDOCTYPE_UNKNOWN     = 1
                IDOCSTRUCT_UNKNOWN   = 2
                SEGMENT_DATA_MISSING = 3
                ILLEGAL_STRUCT_TYPE  = 4
                OTHERS               = 5.
      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.                    "" read_idoc_structure
    FORM download_to_excel.
      data: name like RLGRAP-FILENAME.
      shift docnum left deleting leading '0'.
      concatenate docnum '-' idoc_control-idoctp '.xls'
                  into name.
      CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
       EXPORTING
         DATA_NAME                 = name
         DATA_TYPE                 = 'ASC'
         WAIT                      = ' '
       TABLES
         DATA_TAB                  = excel_tab
       EXCEPTIONS
         NO_BATCH                  = 1
         EXCEL_NOT_INSTALLED       = 2
         WRONG_VERSION             = 3
         INTERNAL_ERROR            = 4
         INVALID_TYPE              = 5
         CANCELLED                 = 6
         DOWNLOAD_ERROR            = 7
         OTHERS                    = 8
      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.                    "" download_to_excel

  • I can not log on to my itunes account on my second generation ipod but I have no problem with the log on with my ipad.  The password doesn't work on the ipod touch.  Thoughts???

    Trouble connecting to itunes store with my password on my ipod touch (2nd generation) but using the same apple id and password on my ipad2 I don't have a problem connecting to the store.
    Need troubleshooting

    I have the same thing, same issues.  Just came from Colorado using my iPad extensively with no problems.
    Get back home, there is an update on my home computer for Airport Extreme to 7.5.2 which I updated.  Also updates for iPad for 4.3.4 and now last night 4.3.5.
    Still does not work.  I have not taken the iPad to another network locally, but my understanding is that it is not a problem with the iPad but with Airport Extreme's update. I have done all the resets, restarts, and turning on and off Wifi on the iPad and that does not work. 
    I would have to assume Apple is working on it.  Very frustrating since I am on my Mac Pro, iPhone 4, and other things and no problem.

  • I got my iphone 5 3 weeks ago and the battery life is very short. It drains out very fast. Does anyone know if it's a problem with the iOS or with my phone? Because I'm a bit concerned

    I recieved my iPhone 5 3 weeks ago and the battery life completely *****! After doing a few things and maybe using it for about 30 minutes the phone start overheating like crazy then the battery starts dropping very fast. Does anyone know if it's a problem with the iOS or with my phone? And is anyone else expierenceing these problems?

    It sounds like you have an app that is incorrectly continuously using data and power... from normal use the phone should NOT be getting that warm... only constant video playing via data like Netflix for example would result in that...
    I'd say that you should remove all apps in the recent app tray... tunr phone off... then once you power back on...
    Hold BOTH home and sleep wake buttons together until you see a white apple symbol... then release both buttons...
    This will ensure you have no apps running...
    I've experienced a hang up with mail while out and about that has resulted in this on my iPhone as well... Once I performed these steps it was fixed... it seemed like it got stuck and that's what caused the warm phone and battery drain...
    I notived that when it gets stuck (mail app that is) I will see the text connecting at the bottom and it never changes to "updated" like it should... this is my trigger that it's gotten stuck.
    Have not really figured out what causes mail app to get stuck yet...

  • What's wrong with the IOS5 download, it downloads and then after its finished it says server timed out, how do i sort this out

    What's wrong with the IOS5 download, it downloads and then after its finished it says server timed out, how do i sort this out?

    The Firefox versions which come with many Linux distros have the default Mozilla Firefox updater disabled and use the distros built-in updater.
    See this - http://linuxforums.org.uk/netbooks/install-firefox-6-on-an-acer-aspire-one-running-linpus-lite-linux/

  • HT4437 I have successffully used my iPad with the Apple TV with no problem but just recently, the Airplay icon doesn't come up on the iPad anymore when I'm trying to connect.   What can I do to fix this?

    I have successffully used my iPad with the Apple TV with no problem but just recently, the Airplay icon doesn't come up on the iPad anymore when I'm trying to connect.   What can I do to fix this? 

    Try restarting your router as a first thing, this sometimes works for me.

  • Need to generate the excel file with diffrent sheets using utl_file package

    Hi,
    Sorry for previous message in which I had missed the usage of " UTL_FILE " package
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files using
    " UTL_File " package and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    Hello 10866107,
    at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet.
    Regards
    Marcus

  • I've a "bug" with the apps downloading. This one stops at the end and stays like that infinite. The app doesn't appears normally on the homescreen. Someone can fix this?

    I've a "bug" with the apps downloading. This one stops at the end and stays like that infinite. The app doesn't appears normally on the homescreen. The app is on the home screen, and its downloading is blocked at its end, without showing the app like it should when it's finished downloadung. Does someone can help me and fix this please?

    Hi Tom
    Thanks for replying!
    I had heard that these switches didn't stack unless everything was identical.
    I only tried it at all out of pure desperation.
    I've applied and tested every version 3 firmware in standalone mode via a console cable and xmodem.
    They either never come up properly receiving decompression errors and reboot constantly in a loop.
    Occasionally they stall / jam and stay there displaying the same error with no rebooting.
    And twice out of 80-100 times I got it to boot to the username and password screen in standalone mode.
    But as soon as I made a change it crashed and started the rebooting cycle again.

  • IPad Mini keeps randomly rebooting - started last week after downloading 8.3 - Apple logo keeps coming up with the reboot/download line below

    - started last week after downloading 8.3 - Apple logo keeps coming up with the reboot/download line below. Seems to happen after opening a site to view information or pictures or.......

    this is getting more & more ridiculous......and worsening by the hour. Now every click on a Pages file makes it reboot....and just trying to save some files prior to doing a total restore as not sure what gets saved in the "back up" prior to the restore. Am starting to love my 5 year old original IPad as slow as it is, even more....

Maybe you are looking for

  • Lightroom does NOT make use of new/fast hardwares!

    For those who are considering a new computer here's my experience.... Lightroom 4 does NOT make full use of new/fast CPUs / SSDs! I’ve been frustrated with Lightroom speed since launch and held on to my “old” Xeon work station for two years…. I recen

  • Problem in MARA extension BAPI 'BAPI_MATERIAL_SAVEDATA' - EXTENSIONIN

    Dear All, Im trying to update Z fields in MARA using the BAPI 'BAPI_MATERIAL_SAVEDATA' The appends to MARA & BAPI_TE_MARA are done. There are lots of appends & it now exceeded 960 characters. My Z fields are in the position 974  to 984. EXTENSIONIN h

  • Built it!! Now, some more questions . . .

    I put my new computer together this evening: K8N Neo Platinum 2 x 512 Crucial PC3200 RAM 120 GB WD SATA hard drive Lite-on CD-RW Floppy by Sony Antec Performance Plus 1080 AMG case with 430W Antec TruePower supply (includes 2 power supply fans, 2 rea

  • AAA TACACS for CM GUI login authentication?

    Has anyone successfully implemented TACACS authentication TO the CM GUI?  I have the CM configured for TACACS authentication to the WAE devices GUI and CLI - that works fine with the admin role assigned.  It does not work for authentication to the CM

  • Can anyone give me a list of app hosting companies other than the expensive adobe?

    Adobe has priced itself out of my budget and I am looking for other hosting companies that take the DPS built file. Best regards, James