8 Replies Latest reply: Mar 15, 2006 12:38 PM by Krishnakumar Ramadoss RSS

How to export logs from sm35 to excel ?

Shankara Narayanan T.V
Currently Being Moderated

Hope that the question is clear.

I have run an lsmw and excecuted the same in sm35.

I want the list of data which got 'processed' and which are processed 'incorrect' in an excel file so that i can compare it with the input data.

 

Thanks in advance,

Shankar

  • Re: How to export logs from sm35 to excel ?
    Andreas Mann
    Currently Being Moderated

    hi,

     

    create a spool and read it with fm RSPO_RETURN_ABAP_SPOOLJOB

     

     

    Andreas

    • Re: How to export logs from sm35 to excel ?
      Shankara Narayanan T.V
      Currently Being Moderated

      Hi Andreas Mann ,

       

      Can you please exlain in detail, how to do that ?

       

      Regards,

      Shankar

      • Re: How to export logs from sm35 to excel ?
        Currently Being Moderated

        Hi,

         

        Use this.

         

         

        DATA : P_SPOOL1  LIKE TSP01-RQIDENT.

         

        DATA: ABAPLIST1 LIKE SOLI OCCURS 0 WITH HEADER LINE.

         

        CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'

             EXPORTING

                  RQIDENT              = P_SPOOL1

        •         FIRST_LINE           = 1

        •         LAST_LINE            =

             TABLES

                  BUFFER               = ABAPLIST1

             EXCEPTIONS

                  NO_SUCH_JOB          = 1

                  NOT_ABAP_LIST        = 2

                  JOB_CONTAINS_NO_DATA = 3

                  SELECTION_EMPTY      = 4

                  NO_PERMISSION        = 5

                  CAN_NOT_ACCESS       = 6

                  READ_ERROR           = 7

                  OTHERS               = 8.

         

        where P_SPOOL1 will be the SPOOL no. U got from the

        output.

         

        The list is stored in ABAPLIST1 now download this to

        an excel using FM GUI_DOWNLOAD

         

        call function 'GUI_DOWNLOAD'

          exporting

            filename                        = v_file

            FILETYPE                        = 'ASC'

          tables

            data_tab                        = ABAPLIST1

        EXCEPTIONS

           FILE_WRITE_ERROR                = 1

           NO_BATCH                        = 2

           GUI_REFUSE_FILETRANSFER         = 3

           INVALID_TYPE                    = 4

           NO_AUTHORITY                    = 5

           UNKNOWN_ERROR                   = 6

           HEADER_NOT_ALLOWED              = 7

           SEPARATOR_NOT_ALLOWED           = 8

           FILESIZE_NOT_ALLOWED            = 9

           HEADER_TOO_LONG                 = 10

           DP_ERROR_CREATE                 = 11

           DP_ERROR_SEND                   = 12

           DP_ERROR_WRITE                  = 13

           UNKNOWN_DP_ERROR                = 14

           ACCESS_DENIED                   = 15

           DP_OUT_OF_MEMORY                = 16

           DISK_FULL                       = 17

           DP_TIMEOUT                      = 18

           FILE_NOT_FOUND                  = 19

           DATAPROVIDER_EXCEPTION          = 20

           CONTROL_FLUSH_ERROR             = 21

           OTHERS                          = 22

                  .

         

         

        Regards,

        GSR.

        • Re: How to export logs from sm35 to excel ?
          Shankara Narayanan T.V
          Currently Being Moderated

          Dear Srinivas,

           

          I want to export the logs from batch Input session ( SM35 ) to excel  . I didn't understand what is the spool number that you are telling ? Whether sm35 logs will be available in any spool ? I am not able to see any spool related to this batch input session.

           

          Awaiting your reply ..

           

          Thanks & Regards,

          Shankar

          • Re: How to export logs from sm35 to excel ?
            Currently Being Moderated

            Hi,

             

              OK.

              Goto SM35

              There U have an option to download the file to

              presentation server(say .XLS file)

              Select Your Session name and press the Export Session

              button or press Shift+F12.

              In the screen which follows select the

              'File from presentation server' radio button and give

              the file name (with .xls extension) and data format as

              ASC

             

              U'll get the required session in excel format.

             

            Regards,

            GSR.

Actions