Skip to Content
author's profile photo Former Member
Former Member

Upload Graphics Using Function Module

Hello,

I am trying to use SAPSCRIPT_IMPORT_GRAPHIC_BDS function module to upload graphics. The problem is that I am always getting dump. Could some one help me with sample code.

Regards,

Vimal

Add a comment
10|10000 characters needed characters exceeded

  • What does the dump say? Have you checked the where-used list of this function module? It gives two programs where it is used. May be you can find some clues there. Why are uploading graphics yourself? Don't you have standard transaction SE78 to do that?

    Srinivas

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 03, 2006 at 03:48 PM

    Yes, here is a sample program. This program actually uses the subroutine in SE78 to upload the graphics. Works pretty good. Also, doing it this way, there is no user interaction required after giving the name and filename.

    
    report zrich_0004 .
    
    parameters: p_file type localfile default 'C:file.bmp'.
    parameters: p_image type stxbitmaps-tdname.
    
    data: imagename type stxbitmaps-tdname.
    
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    
    start-of-selection.
    
      imagename = p_image.
    
    
      perform show_status using 'Importing Image from Front End'.
      perform import_bitmap using p_file
                                  imagename
                                  'Test Image'.
    
    
    ************************************************************************
    *       FORM import_Bitmap                                             *
    ************************************************************************
    form import_bitmap using filename
                             name
                             title.
    
      data: l_resolution  type stxbitmaps-resolution.
      data: l_docid     type stxbitmaps-docid.
    
      perform import_bitmap_bds
                      in program saplstxbitmaps
                                using    filename
                                         name
                                         'GRAPHICS'     "Object
                                         'BMAP'         "ID
                                         'BMON'         "B/W
                                         'BMP'          "Extension
                                         title
                                         space
                                         'X'
                                changing l_docid
                                         l_resolution.
    
    
    
    endform.
    
    
    

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2006 at 04:40 PM

    Thanks...Rich Heilman & Srinivas..

    Problem is Soved.

    Add a comment
    10|10000 characters needed characters exceeded