Skip to Content
avatar image
Former Member

How can I export graphs on SE78 into my local drive?

Hi Experts worldwide

I've got a series of different graphs on SE78. How can I export them / save them into my local drive?

many thanks

Nuno Natividade

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 07, 2007 at 05:02 PM

    Hi,

    Yes we can download the graphics stored in SE78 to local PC, Here is the program to do that

    *&---------------------------------------------------------------------*
    *& Report  Z_EXPORT_GRAPHIC_FROM_SE78                                  *
    *&                                                                     *
    *&---------------------------------------------------------------------*
    *&   This program exports logos from SE78 to a pc file in .bmp format  *
    *&                                                                     *
    *&---------------------------------------------------------------------*
    
    report  z_export_graphic_from_se78    .
    
    *-----------------------------------------------------------------------
    *@DAT                         D A T A
    *-----------------------------------------------------------------------
    type-pools: sbdst .
    data : git_content type sbdst_content.
    data : git_rawdata type w3mime occurs 0,
           g_bitmaptypeout type c.
    data : begin of git_bitmap occurs 0,
                 line(1000),
           end   of git_bitmap.
    data : g_bytecount type i.
    *-----------------------------------------------------------------------
    *@SSL             S E L E C T I O N   S C R E E N
    *-----------------------------------------------------------------------
    selection-screen: begin of block b01 with frame title text-b01.
    parameters      : p_obj like stxbitmaps-tdobject default 'ZOGLGRPOBJ',
                      p_nam like stxbitmaps-tdname,
                      p_id  like stxbitmaps-tdid default 'ZC',
                      p_ref like stxbitmaps-tdbtype default 'BMON'.
    selection-screen: end   of block b01.
    selection-screen: begin of block b02 with frame title text-b02.
    parameters      : p_file like rlgrap-filename.
    selection-screen: end   of block b02.
    *-----------------------------------------------------------------------
    *@INI                 I N I T I A L I Z A T I O N.
    *-----------------------------------------------------------------------
    initialization.
    *
    
    *-----------------------------------------------------------------------
    *@SOS             S T A R T   O F   S E L E C T I O N
    *-----------------------------------------------------------------------
    start-of-selection.
    *
      perform sapscript_get_graphic_bds.
      perform sapscript_convert_bitmap.
      perform ws_download.
    *
    *-----------------------------------------------------------------------
    *@EOS                E N D   O F   S E L E C T I O N
    *-----------------------------------------------------------------------
    end-of-selection.
    *
    
    *-----------------------------------------------------------------------
    *@TOP                   T O P   O F   P A G E
    *-----------------------------------------------------------------------
    top-of-page.
    *
    
    *-----------------------------------------------------------------------
    *               A T   S E L E C T I O N   S C R E E N
    *-----------------------------------------------------------------------
    at selection-screen on value-request for p_nam.
    *
      data: l_return type i.
      ranges: r_obj for stxbitmaps-tdobject.
      data: l_bitmaps type table of stxbitmaps with header line.
      data: lit_scrfields type table of dynpread with header line.
    *
      r_obj-sign = 'I'.
      r_obj-option = 'EQ'.
      r_obj-low = 'ZOGLGRPOBJ'.
      append r_obj.
    *
      call function 'SAPSCRIPT_SEARCH_GRAPHIC_BDS'
        exporting
          selection_screen         = 'X'
          select_entry             = 'X'
          selection_show           = 'X'
        importing
          e_object                 = p_obj
          e_id                     = p_id
          e_name                   = p_nam
          e_btype                  = p_ref
        tables
          t_objects                = r_obj
    *    T_IDS                    = R_IDS
    *    T_BTYPES                 = R_REFS
          t_selections             = l_bitmaps
        exceptions
          nothing_found            = 1
          selection_canceled       = 2
          internal_error           = 3
          others                   = 4
                .
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      else..
        lit_scrfields-fieldname = 'P_ID'.
        lit_scrfields-fieldvalue = p_id.
        append lit_scrfields.
        call function 'DYNP_VALUES_UPDATE'
          exporting
            dyname                     = 'Z_EXPORT_GRAPHIC_FROM_SE78'
            dynumb                     = '1000'
          tables
            dynpfields                 = lit_scrfields
    *     EXCEPTIONS
    *       INVALID_ABAPWORKAREA       = 1
    *       INVALID_DYNPROFIELD        = 2
    *       INVALID_DYNPRONAME         = 3
    *       INVALID_DYNPRONUMMER       = 4
    *       INVALID_REQUEST            = 5
    *       NO_FIELDDESCRIPTION        = 6
    *       UNDEFIND_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.
    
      endif.
    
    *
    *-----------------------------------------------------------------------
    *@FOR                          F O R M S
    *-----------------------------------------------------------------------
    *
    *
    *&---------------------------------------------------------------------*
    *&      Form  SAPSCRIPT_GET_GRAPHIC_BDS
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    form sapscript_get_graphic_bds.
    *
      call function 'SAPSCRIPT_GET_GRAPHIC_BDS'
           exporting
                i_object       = p_obj
                i_name         = p_nam
                i_id           = p_id
                i_btype        = p_ref
           importing
                e_bytecount    = g_bytecount
           tables
                content        = git_content
           exceptions
                not_found      = 1
                bds_get_failed = 2
                bds_no_content = 3
                others         = 4.
      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.                    " SAPSCRIPT_GET_GRAPHIC_BDS
    
    *&---------------------------------------------------------------------*
    *&      Form  SAPSCRIPT_CONVERT_BITMAP
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    form sapscript_convert_bitmap.
    *                                                assign
      call function 'SAPSCRIPT_CONVERT_BITMAP '
           exporting
                old_format               = 'BDS'
                new_format               = 'BMP'
                bitmap_file_bytecount_in = g_bytecount
                itf_bitmap_type_in       = '*'
           importing
                bitmap_file_bytecount    = g_bytecount
                itf_bitmap_type_out      = g_bitmaptypeout
           tables
                bitmap_file              = git_rawdata
                bds_bitmap_file          = git_content
           exceptions
                no_bitmap_file           = 1
                format_not_supported     = 2
                bitmap_file_not_type_x   = 3
                no_bmp_file              = 4
                bmperr_invalid_format    = 5
                bmperr_no_colortable     = 6
                bmperr_unsup_compression = 7
                bmperr_corrupt_rle_data  = 8
                bmperr_eof               = 9
                bdserr_invalid_format    = 10
                bdserr_eof               = 11
                others                   = 12.
      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.                    " SAPSCRIPT_CONVERT_BITMAP
    
    *&---------------------------------------------------------------------*
    *&      Form  WS_DOWNLOAD
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    form ws_download.
    *
      call function 'WS_DOWNLOAD'
           exporting
                bin_filesize            = g_bytecount
                filename                = p_file
                filetype                = 'BIN'
           tables
                data_tab                = git_rawdata
           exceptions
                file_open_error         = 1
                file_write_error        = 2
                invalid_filesize        = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                others                  = 10.
      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.                    " WS_DOWNLOAD
    
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2007 at 04:32 PM

    Hi,

    Not possible.But if you load it using OAER then you can export them BACK to PC

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 18, 2007 at 04:22 PM

    Hi Pavan

    Congratulations! You were right on target.

    Thank you.

    Nuno

    Add comment
    10|10000 characters needed characters exceeded