Append error message to itab and download to excel

Hi GURUS,
Need urgent help
I have an internal table  ( say columns a,b,c)
I need to validate the fields and upload to ztable.
If any of the row fails during validation. I need to write a corresponding message and append it to the contents of itab--output itab( same as itab) and then download the output internaltable
Please send some code, if any one has implemented
THanks in advance

please see below example code :
Program    : ZLWMI151_UPLOAD(Data load to ZBATCH_CROSS_REF Table)
Type       : Upload program
Author     : Seshu Maramreddy
Date       : 05/16/2005
Transport  : DV3K919574
Transaction: None
Description: This program will get the data from XLS File
             and it upload to ZBATCH_CROSS_REF Table
REPORT ZLWMI151_UPLOAD no standard page heading
                       line-size 100 line-count 60.
*tables : zbatch_cross_ref.
data : begin of t_text occurs 0,
       werks(4) type c,
       cmatnr(15) type c,
       srlno(12) type n,
       matnr(7) type n,
       charg(10) type n,
       end of t_text.
data: begin of t_zbatch occurs 0,
      werks like zbatch_cross_ref-werks,
      cmatnr like zbatch_cross_ref-cmatnr,
      srlno like zbatch_cross_ref-srlno,
      matnr like zbatch_cross_ref-matnr,
      charg like zbatch_cross_ref-charg,
      end of t_zbatch.
data : g_repid like sy-repid,
       g_line like sy-index,
       g_line1 like sy-index,
       $v_start_col         type i value '1',
       $v_start_row         type i value '2',
       $v_end_col           type i value '256',
       $v_end_row           type i value '65536',
       gd_currentrow type i.
data: itab like alsmex_tabline occurs 0 with header line.
data : t_final like zbatch_cross_ref occurs 0 with header line.
selection-screen : begin of block blk with frame title text.
parameters : p_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
  g_repid = sy-repid.
at selection-screen on value-request for p_file.
  CALL FUNCTION 'F4_FILENAME'
       EXPORTING
            PROGRAM_NAME = g_repid
       IMPORTING
            FILE_NAME    = p_file.
start-of-selection.
Uploading the data into Internal Table
  perform upload_data.
  perform modify_table.
top-of-page.
  CALL FUNCTION 'Z_HEADER'
  EXPORTING
    FLEX_TEXT1       =
    FLEX_TEXT2       =
    FLEX_TEXT3       =
*&      Form  upload_data
      text
FORM upload_data.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       EXPORTING
            FILENAME                = p_file
            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                  = itab
       EXCEPTIONS
            INCONSISTENT_PARAMETERS = 1
            UPLOAD_OLE              = 2
            OTHERS                  = 3.
  IF SY-SUBRC <> 0.
    write:/10 'File '.
  ENDIF.
  if sy-subrc eq 0.
    read table itab index 1.
    gd_currentrow = itab-row.
    loop at itab.
      if itab-row ne gd_currentrow.
        append t_text.
        clear t_text.
        gd_currentrow = itab-row.
      endif.
      case itab-col.
        when '0001'.
          t_text-werks = itab-value.
        when '0002'.
          t_text-cmatnr = itab-value.
        when '0003'.
          t_text-srlno = itab-value.
        when '0004'.
          t_text-matnr = itab-value.
        when '0005'.
          t_text-charg = itab-value.
      endcase.
    endloop.
  endif.
  append t_text.
ENDFORM.                    " upload_data
*&      Form  modify_table
      Modify the table ZBATCH_CROSS_REF
FORM modify_table.
  loop at t_text.
    t_final-werks = t_text-werks.
    t_final-cmatnr = t_text-cmatnr.
    t_final-srlno = t_text-srlno.
    t_final-matnr = t_text-matnr.
    t_final-charg = t_text-charg.
    t_final-erdat = sy-datum.
    t_final-erzet = sy-uzeit.
    t_final-ernam = sy-uname.
    t_final-rstat = 'U'.
    append t_final.
    clear t_final.
  endloop.
  delete t_final where werks = ''.
  describe table t_final lines g_line.
  sort t_final by werks cmatnr srlno.
Deleting the Duplicate Records
  perform select_data.
  describe table t_final lines g_line1.
  modify zbatch_cross_ref from table t_final.
  if sy-subrc ne 0.
    write:/ 'Updation failed'.
  else.
    Skip 1.
    Write:/12 'Updation has been Completed Sucessfully'.
    skip 1.
    Write:/12 'Records in file ',42 g_line .
    write:/12 'Updated records in Table',42 g_line1.
  endif.
  delete from zbatch_cross_ref where werks = ''.
ENDFORM.                    " modify_table
*&      Form  select_data
      Deleting the duplicate records
FORM select_data.
  select werks
         cmatnr
         srlno from zbatch_cross_ref
         into table t_zbatch for all entries in t_final
         where werks = t_final-werks
         and  cmatnr = t_final-cmatnr
         and srlno = t_final-srlno.
  sort t_zbatch by werks cmatnr srlno.
  loop at t_zbatch.
    read table t_final with key werks = t_zbatch-werks
                                cmatnr = t_zbatch-cmatnr
                                srlno = t_zbatch-srlno.
    if sy-subrc eq 0.
      delete table t_final .
    endif.
    clear: t_zbatch,
           t_final.
  endloop.
ENDFORM.                    " select_data
Reward points if it is useful
Thanks
Seshu

Similar Messages

  • Download error message when purchasing and downloading itunes music

    Error message occuring often in the process of downloading music to the itouch, then it says tap to re-try, which does nothing, eventually have to sync with laptop to complete and get music on itouch.

    I have this SAME problem, except even when I sync with my computer the error remains. Is there any way to cancel a download from the iPod Touch?

  • To download an App the 3 security questions are required. But at the end, apple is not able to complete the task and gives an error message. No more downloads are possible. What can I do?

    to download an App the 3 security questions are required. But at the end, apple is not able to complete the task and gives an error message. No more downloads are possible. What can I do?

    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Do they launch OK while in Safe Mode?

  • I keep getting an error message when trying to download i tunes. It says it's looking for MSVCR80.dll and I find it on my computer so I don't know what else to do. Any suggestions?

    I keep getting an error message when trying to download itunes. It says it can't find "msvcr80.dll, but when I search for it on my computer it is there. My itunes was working just fine before I got the message to download the latest upgrade. I've not had any problems doing that before now, so don't really know what to do.

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • Trouble updating to iOS 5 on my wife's iPhone 4 connected to our iM, right before download finishes downloading iTunes comes back with the error message Software corrupted during download.  Please check network settings and try again later.

    Trouble updating to iOS 5 on my wife's iPhone 4 connected to our iM, right before download finishes downloading iTunes comes back with the error message Software corrupted during download.  Please check network settings and try again later, however there was no problem updating my iPhone to iOS 5 through iTunes connceted to my dell laptop on the same wireless network.  What gives?

    Try disabling your firewall; both on your PC and the external Firewall/Router.

  • I receive error messages when I am downloading free iphone apps. I get error message 9810 and 9834. Can anyone advise how to resolve this problem?

    I receive error messages when I am downloading free iphone apps. I get error message 9810 and 9834. Can anyone advise how to resolve this problem? The problem doesn't exist when I'm downloading apps for which I pay.

    Hi,
    See Here:
    http://support.apple.com/kb/TS1276
    From Here:
    http://support.apple.com/kb/TS1424

  • TS1424 Keep trying to down load a Magazine I just purchased an I keep getting an error message that "unable to download folio". Have check for enough space and have deleated app. And reloaded. Also rebooted iPad nothing fixes problem

    Keep trying to down load a Magazine I just purchased an I keep getting an error message that "unable to download folio". Have check for enough space and have deleated app. And reloaded. Also rebooted iPad nothing fixes problem.
    Does the iTunes Store need to reset my subscription or is this a fix I can do on my iPad

    Try This...
    Close All Open Apps...  Sign Out of yopur Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.

  • Can't download mountain lion from app store, shows error message: retry/cancel and starts from begining

    can't download mountain lion from app store, shows error message: retry/cancel and starts from begining,
    I alreasy paid for it
    Can I get a direct download link other than from app store

    Try opening the Terminal utility in your system and running the following command to open the system's caches folder:
    open $TMPDIR../C
    Then locate and remove the folder called "com.apple.appstore" and then try relaunching the App Store and downloading the installer again.

  • Why is it when I try to download music an error message pops up and will not let me buy the music?

    Why is it when I try to download music an error message pops up and will not let me buy the music?

    Same happens to me......

  • TS3212 I have removed my pop-up blocker completely and still receive the following error message when attempting to download iTunes:  "The file was blocked because it does not have a valid digital signature that verifies its publisher".....any ideas?

    have removed my pop-up blocker completely and still receive the following error message when attempting to download iTunes:  "The file was blocked because it does not have a valid digital signature that verifies its publisher".....any ideas?

    That suggests that the installer is getting damaged during the download.
    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • Error message when trying to download norton av

    hi,
    I get an error message while trying to download Norton AV. It says to contact server admin and if at all the .exe file gets downloaded it says that it is not a valid WIN 32 application

    Hello debyani,
    I think some error occurred with the downloaded files. You should try to download it again and then try to Install it and before that please go through the link below it may help you.
    http://community.norton.com/t5/Norton-Internet-Security-Norton/Error-message-when-trying-to-install-Norton-Internet-Security/td-p/876274.

  • Error message when trying to download iCloud to my Vista PC

    I am getting the following error message when trying to download iCloud to my Vista PC. "Cannot download iCloudSetup.ext from supportdownload.apple.com. The connection with the server was reset.

    I would suggest you to run the fix it tool from the link mentioned below and then check if you can install the softwares.
    http://support.microsoft.com/mats/Program_Install_and_Uninstall (applicable only for 64 bit operating system)
    Also follow these steps before you proceed with the installation of ITunes.
    Download and install:
    Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update
    http://www.microsoft.com/downloads/details.aspx?familyid=766a6af7-ec73-40ff-b072 -9112bab119c2&displaylang=en#filelist
    Also, make sure that you have iTunes installer installed on your computer or else download and install it.
    Uninstall all iTunes software from Program and features.
    a)    Click Start button, click Control Panel, click Programs, and then click Programs and Features.
    b)    Select  the program, and then click Uninstall.
    c)    Uninstall or change a program
    http://windows.microsoft.com/en-us/windows7/Uninstall-or-change-a-program
    Also refer the link mentioned below
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923

  • I am getting this error message when trying to download itunes on windows 7 32 bit:  microsoft.vc80.crt.type="win32".version="8.0.907276195".publickeytoken="1p86369 ale18e36" Hresult: 0x800736fd

    I am getting this error message when trying to download itunes on windows 7 32 bit:  microsoft.vc80.crt.type="win32".version="8.0.907276195".publickeytoken="1p86369 ale18e36" Hresult: 0x800736fd
    Can someone please Help?

    I found htis other post https://discussions.apple.com/thread/3401328?start=0&tstart=0
    I also found this in another post
    These ones are typically caused by underlying problems on the PC that also often cause Windows Updates to fail to install. If we can fix the Windows Update trouble, we can usually get the iTunes trouble cleaned up en passant.
    Go into your Windows update and try to check for new updates. If updates install, stock up on the ones you're behind on, restarting the PC if requested to do so. After the restart, try installing iTunes again. Does it go through this time for you?
    If windows updates fail to install, go into your Update History and doubleclick the failures. What alphanumeric codes appear for you? (For example, 8007000B.)

  • I get the following error message when trying to download ITunes on my computer running Windows XP - Error writing to file: C:\Program Files\Common Files\Apple Application Support\CFNetwork.dll

    I get the following error message when trying to download ITunes on my computer running Windows XP - Error writing to file: C:\Program Files\Common Files\Apple Application Support\CFNetwork.dll

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there also links to backup and recovery advice should it be needed.
    tt2

  • Error Message when trying to download a PDF

    I uploaded a PDF, shared the file & then tried to download the file. I get the following error message:
    HTTP Status 400 -
    type Status report
    message
    description The request sent by the client was syntactically incorrect ().
    Apache Tomcat/5.5.17
    I tried to download the original uploaded file and received the same error message. I tried downloading using both Firefox & Safari. I had no problems downloading the User Guide. Any Ideas?
    Thanks!

    I had the same problem.  Deleted the files and re-uploaded and converted to pdf.  I am still getting the same error message when I try to download the converted pdf file.  I tried other files which have worked great,...just not this one particular file.  Please advise.

Maybe you are looking for

  • I need to use a USB port to drive a D/A converter to send audio to a PA mixer. How is that function done. I have the D/A

    We use MP3 files for music at church. I need to access my music files and send them to a D/A through a USB port then to my mixer. (Much better quality than internal audio card) Guidance please!! "G"

  • Linking Deliveries to a particular Driver

    Hi. 1) I created a 'Route Sales' order (No. 25) and completed the order by generating:        a) Delivery Number (No.100),        b) Shipment Number (No. 2001).        This transaction can be linked back to the driver for payment of commission throug

  • SAP NetWeaver 7.0 (2004s) Trial Version - Full Java Edition includes EP

    hi all, i have install SAP NetWeaver 7.0 (2004s) Trial Version - Full Java Edition successed. i can browser http://localhost:50000,it's ok. but i can't enter EP,i try http://localhost:50100/irj/portal or http://localhost:50000/irj/portal how can i en

  • Recurring prompts to download Adobe Flash--help!!

    About every two minutes, I get an irritating prompt to reinstall Adobe Flash.  I'm running IE 32 bit on a Windows 7 machine...64 bits.  I also run Mozilla Firefox and have Comcast as a service provider at 12mB speed.  Can anyone tell me how to get ri

  • OpenVZ and Arch

    i am in progress of migrating my servers from gentoo to arch.  i am trying to build an openvz host os in arch, simply because its easier to maintain than gentoo and less needlessly complex IMO.  this package: http://aur.archlinux.org/packages.php?ID=