Printing all error messages in the out put report

Hi all,
I have MATNR and WERKS data in final internal table now my requirement is ineed to print all the error messages for all the materials (where sy-subrc ne 0) in the out put report. how can i do it for multiple error records will anybody tell me with coding
The Requirement is like bellow:
Take material number(s) (MARC-MATNR) from selection screen then check to see if any plants have that material setup as QM active (MARC-QMATV).  If no, then issue message on report.
Thanks,

Hi Mythili,
Hope the attached code helps you...
TABLES marc.
TYPE-POOLS: slis.
TYPES : BEGIN OF g_ty_msg,
        type LIKE sy-msgty,
        msg(120),
       END OF g_ty_msg.
TYPES: BEGIN OF g_ty_marc,
        matnr TYPE matnr,
        werks TYPE werks_d,
        qmatv TYPE qmatv,
      END OF g_ty_marc.
DATA: g_t_msg TYPE TABLE OF g_ty_msg,
      g_r_msg TYPE g_ty_msg.
DATA: g_t_marc TYPE TABLE OF g_ty_marc.
FIELD-SYMBOLS <fs_marc> TYPE g_ty_marc.
SELECT-OPTIONS: s_matnr FOR marc-matnr,
                s_werks FOR marc-werks.
START-OF-SELECTION.
  SELECT matnr werks qmatv FROM marc
    INTO TABLE g_t_marc
    WHERE matnr IN s_matnr AND
          werks IN s_werks.
  IF g_t_marc IS NOT INITIAL.
    LOOP AT g_t_marc ASSIGNING <fs_marc>.
      IF <fs_marc>-qmatv IS INITIAL.
        g_r_msg-type = 'E'.
        CONCATENATE <fs_marc>-matnr <fs_marc>-werks
          INTO g_r_msg-msg SEPARATED BY space.
        APPEND g_r_msg TO g_t_msg.
        CLEAR g_r_msg.
      ENDIF.
    ENDLOOP.
  ENDIF.
END-OF-SELECTION.
  PERFORM display_log.
*&      Form  display_log
      To display error log as an ALV Popup
FORM display_log .
  CONSTANTS: l_c_type(4)    TYPE c VALUE 'TYPE',
             l_c_msg(3)     TYPE c VALUE 'MSG'.
  DATA :  l_t_fieldcat TYPE TABLE OF slis_fieldcat_alv,
          l_r_fieldcat TYPE slis_fieldcat_alv.
  DATA :  l_f_line TYPE i.
  CLEAR l_r_fieldcat.
  l_f_line = l_f_line + 1.
  l_r_fieldcat-col_pos    = l_f_line.
  l_r_fieldcat-fieldname  = l_c_type.
  l_r_fieldcat-seltext_m  = 'Type'.
  APPEND l_r_fieldcat TO l_t_fieldcat.
  CLEAR l_r_fieldcat.
  l_f_line = l_f_line + 1.
  l_r_fieldcat-col_pos = l_f_line.
  l_r_fieldcat-fieldname = l_c_msg.
  l_r_fieldcat-seltext_m = 'Message'.
  l_r_fieldcat-outputlen = 120.
  APPEND l_r_fieldcat TO l_t_fieldcat.
To display the message log as a Popup in the form of ALV List
  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title       = 'Message Log'
      i_tabname     = 'G_TY_MSG'
      it_fieldcat   = l_t_fieldcat[]
    TABLES
      t_outtab      = g_t_msg
    EXCEPTIONS
      program_error = 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.
ENDFORM.                    " display_log
Best Regards,
Suresh

Similar Messages

  • While printing, why does PE11 crop the out put?

    While printing, why does PE11 crop the out put?

    Did you crop the photo to the same aspect ratio as your print size? If not, then the software will crop it for you.

  • I am getting error message in the colum of report

    Hi,
    I am getting error in the colum ,when i execute the report.
    Error like 1987 ERROR.What would be the reason,even i was try to do some changes in the farmulea,but still i am getting error.
    What is use of NODIM?

    That sounds like a kernel panic. These are generally hardware related, often caused by poorly seated or fauly RAM.
    What is a Kernel Panic?
    http://support.apple.com/kb/TS3742
    and  http://support.apple.com/kb/TS1892?viewlocale=en_US
    http://developer.apple.com/mac/library/technotes/tn2002/tn2063.html
    More details here:
    http://www.thexlab.com/faqs/kernelpanics.html
    Useful articles on how to avoid and eliminate kernel panics here:
    http://reviews.cnet.com/8301-13727_7-10344626-263.html?tag=mfiredir
    http://www.macworld.com/article/2027201/how-to-troubleshoot-a-kernel-panic.html# tk.nl_mwhelp

  • Can I get a print out of all text messages for the past 90 days including pictures?

    Hi I am attempting to get a printout of all text message for the past 90 days to include text and pictures.  How can I do this?

    Messages + (Verizon messages app) stores up to 90 days of messages, but I think it starts when you install it - it doesn't go back prior to installation.  Other apps (SMS Backup, for one) will also allow you to save and print out your messages. Again though, I believe it only goes back as far as installation, so if you haven't been uisng the app(s), you won't have the previous 90 days available.

  • All of a sudden my iTunes stopped working, and I get the following error messages:   1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem   and   2. iTunes was not installed correct

    All of a sudden my iTunes stopped working, and I get the following error messages:
    1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem
    and
    2. iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows error 126).
    Now I've checked the forums and followed the advice of uninstalling all Apple applications, rebooting, and reinstalling iTunes.
    This is not working. I've tried installing as Administrator but doesn't make any difference at all.
    There must be a way to fix this? I'm not a tech geek but I want to avoid having to take my laptop back to factory settings to sort this out.
    Thanks

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99192)

  • MacBook 2006 w/Snow Leopard; HP B210 printer; print problem; error message: One or more components of the HP printing software are corrupted or missing. Reinstalled software but Mac will not cause printer to print.

    ? MacBook 2006 w/Snow Leopard; HP B210 printer; print problem; error message: "One or more components of the HP printing software are corrupted or missing..." Reinstalled software but Mac will not cause printer to print.  My MacBook Pro works fine with same wireless printer.

    Hi ArielAce , thanks for getting back to me!
    I would recommend downloading and running the HP Print and Scan Doctor.
    Please keep me posted!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • HT5052 I have been trying to upate my ipod to 5.0.1, but every time i get an error message of the server timed out after downloading for over an hour. My broadband speed here is is 1.5mbs, not good any help?

    I have been trying to update my ipod to the 5.0.1 but after waiting for a hour for the download i get an error message that the server has timed out as my broadband speed is not good, could this be the problem and if so how can i get the update?

    I have the same problem I disable msconfig mode all the programs escept windows and apple products but the same error appears at the last second of downloading the update

  • I am trying to add my brother printer series HL-2270DW, but I keep getting an error message that the software is currently when it tries to install it.

    I am trying to add my brother printer series HL-2270DW, but I keep getting an error message that the software is currently unavailable. How do I fix this?

    I am also having this same problem. I have updated my computer. I have downloaded the complete brother driver package from Apple as well as the drivers from Brother. As far as I can tell, all have been installed successfully. It is only when I try to ADD the printer do I get that message. Both my roomate and I have Macbook Airs so we cant use the disk which came with the printer. This is irrelivant anyway as the drivers have been successfully downloaded and installed. SO FRUSTRATING!!!!! 

  • All of a sudden tonight when I went to sync with my iTunesMacPro, I received an error message that the iPhone could not be sync'ed because it needed 6.25 GB more space

    I have a 16 GB iPhone 4S.  Tonight when I went to sync with my iTunes on my MacPro, I received an error message that the iPhone could not be sync'ed because it needed 6.25 GB more space. I still have 2.5 GB free. I sync'ed last night fine.  How could I need 8.75 GB (6.25 +2.5) more space on a 16GB iPhone.  I have added nothing but audio podcasts to my iTunes library on my Mac in the last two days and I have not change the sync setting on my iPhone.  Something has gone haywire.  Any ideas.  Mahalo, Oahu Guy

    I resolved this after some analysis.  Turnes out that iTunes was not recognizing that my music was already installed on my iPhone, so when I tried to sync, iTunes was attempting to load all my music a second time, and there was not enough room on my iPhone for that.  I did a restore from backup today and this appears to have resolved the problem.  I initiatied an iTunes sync and it worked fine.  Not sure where the glitch was.  Could have been in the latest update of the iTunes software.  Not sure.  Anyway, I'm good now.
    Oahu Guy

  • Itunes wont open at all, error message : quicktime was not found .... please reinstall ... i did that but no luck this only seems to have happened since the 10.4 update, im on windows 7 ..

    itunes wont open at all, error message : quicktime was not found .... please reinstall ... i did that but no luck this only seems to have happened since the 10.4 update, im on windows 7 ..

    Can you start QuickTime on your computer?
    You'll probably have to search for the Windows Installer Cleanup Utility and use it to remove QuickTime Player and iTunes. Then download and install the iTunes again.

  • I installed a new printer and now Photoshop Elements tells me I can't print.  The error message is "The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available.  You will need to che

    I installed a new printer and now Photoshop Elements tells me I can't print.  The error message is "The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available.  You will need to check your printer settings before printing."  I have uninstalled and re-installed Photoshop Elements, checked my printer settings and still I can't print a photo.

    Hi ,
    Please update to PSE 13.1
    13.1 has solved this problem.
    Refer to this link.
    Photoshop Elements Help | Printer errors with Photoshop Elements 13

  • Print a custom Error message in the XML bursting program's log file...

    Hi,
    I having this requirement, where i need to print a custom error message in the xml bursting program's log file.
    Actually i am having a report where i create invoices and then those invoices are emailed to the respective customers, now say if a customer has three contacts and there is only two valid email id's so what happens is bursting will be successful for two contacts whereas the third contact dosen't get any emails. when this happens i need to log a message in the bursting programs log file stating a custom message.
    Two things i want to know..
    1- Whether is it possible to write into the xml bursting programs log file
    2- If yes, then how..
    note: it ll be greatly appreciated if the answer is elaborated.
    thanks,
    Ragul

    Hi,
    I having this requirement, where i need to print a custom error message in the xml bursting program's log file.
    Actually i am having a report where i create invoices and then those invoices are emailed to the respective customers, now say if a customer has three contacts and there is only two valid email id's so what happens is bursting will be successful for two contacts whereas the third contact dosen't get any emails. when this happens i need to log a message in the bursting programs log file stating a custom message.
    Two things i want to know..
    1- Whether is it possible to write into the xml bursting programs log file
    2- If yes, then how..
    note: it ll be greatly appreciated if the answer is elaborated.
    thanks,
    Ragul

  • How do I view and open all my files again that are on my external hard drive?? Error message saying 'The disk you inserted was not readable by this computer' Three options are Initialize, Ignore or Eject.

    I have recently purchased Toshiba 1TB hard drive and I set it up and I was able to transfer all my files onto it such as my music, photos, documents. I had correctly ejected and used it again and all these files were safely stored and accessible afterwards. However after I rebooted my computer as it had been going slow and I had too much clogging it up once I reconnected the external hard drive I have error message saying 'The disk you inserted was not readable by this computer' Three options are Initialize, Ignore or Eject. How do I access all my files? I set it up to work on both mac and windows. I have tried both another mac and windows computer and same issue occurs?? I am worried that all my personal files are gone but am confused as the drive has had absolutely no damage to it as it was in a very short time frame and its never left the same spot. Any help would be greatly appreciated. Thanks

    Thanks for your quick response. I had a look at your discussion... I tried it on a Windows machine and I thought that was compatible with ExFAT?
    Therefore I need to attempt to use my external hard drive with a machine that boasts OS X 10.6.5 or above and then it should work?
    Thanks

  • I tried to sync my Macbook Pro photos in iPhoto with my iPod Touch.  I have done this numerous times, but today I got an error message saying the required file cannot be found.  At the same time all of my photos on my iPod vanished.  Can anyone help me?

    I tried to sync my Macbook Pro photos in iPhoto with my iPod Touch.  I have done this numerous times, but today I got an error message saying the required file cannot be found.  At the same time all of my photos on my iPod vanished.  Can anyone help me?

    Try deleting the photo cache from your computer and then re-try the photo sync - the location of the cache, and how to delete it, is on this page http://support.apple.com/kb/TS1314

  • I had just put the finishing touches on my 36 minute documentatary when I got an error message that the external 1TB HD I was using to store the project had been ejected improperly (must have shaken a cord).  The result is that the project would not load

    I had just put the finishing touches on my 36 minute documentatary when I got an error message that the external 1TB HD I was using to store the project had been ejected improperly (must have shaken a cord).  The result is that the project would not load in the edit Projects window.  I can see the file in the finder window and it will launch iMovie but the file itself will not load in the projects window.
    I have contacted apple support and they tried to do a few things... to no available.
    With my limited knowledge of file structures I assume that the header file must be corrupt.
    Is there a 3rd party utility that can decompile and fix the file structure so it will load properly.  I've been working on this project since june and would hate to have to redo the whole thing again.

    I had just put the finishing touches on my 36 minute documentatary when I got an error message that the external 1TB HD I was using to store the project had been ejected improperly (must have shaken a cord).  The result is that the project would not load in the edit Projects window.  I can see the file in the finder window and it will launch iMovie but the file itself will not load in the projects window.
    I have contacted apple support and they tried to do a few things... to no available.
    With my limited knowledge of file structures I assume that the header file must be corrupt.
    Is there a 3rd party utility that can decompile and fix the file structure so it will load properly.  I've been working on this project since june and would hate to have to redo the whole thing again.

Maybe you are looking for