GOS: How to display attachment?

Hello,
I want to display the first attachment. I found the function GOS_ATTACHMENT_LIST_POPUP, but I haven't found a possibility to display an attachment directly. Does anybody know how to do this?
Please help.
Have a nice day. Bye.
Frank

This may not be the purist way of doing it, but hopefully it may help you along the way.
Jonathan
report zlocal_jc_sdn_gos_test.
tables:
  srgbtbrel.   "Relationships in GOS Environment
parameters:
*"Defaults here are an FI doc with GOS Note visible in FB03
  p_objkey                   like borident-objkey
                               default '100000120618312008',
  p_objtyp                   like borident-objtype
                               default 'BKPF'.
start-of-selection.
  perform display_attachment.
*&      Form  display_attachment
form display_attachment.
  data:
    l_objkey            type swo_typeid,
    lo_gos_service      type ref to cl_gos_document_service,
    ls_srgbtbrel        type srgbtbrel,
    lt_srgbtbrel        type srgbtbrel occurs 10.
*" Get a list of the links and choose one:
  select *
    into corresponding fields of table lt_srgbtbrel
    from srgbtbrel
    where instid_a = p_objkey
    and   typeid_a = p_objtyp
    and   reltype  = 'NOTE'.
*" Exit if no attachments found
  if lines( lt_srgbtbrel ) is initial.
    exit.
  endif.
*" Choose first one and set up the ident for the BOR
  sort lt_srgbtbrel by utctime. "put oldest top for this demo
  read table lt_srgbtbrel into ls_srgbtbrel index 1.
  l_objkey = ls_srgbtbrel-instid_b. "i.e. the Note's ID
  create object lo_gos_service.
  call method lo_gos_service->display_note
    exporting
      ip_note      = l_objkey
      ip_disp_html = 'X'.
*"Methods in cl_gos_document_service include:
*" DISPLAY_ATTACHMENT
*" DISPLAY_NOTE
*" DISPLAY_PERSONAL_NOTE
*" DISPLAY_URL
endform.                    "display_attachment

Similar Messages

  • Generic Object Services(GOS)-how to get Attachment info like Title and Type

    Hi,
    I would like to know the type of document attached whether PDF, JPG,TEXT file etc.
    Ideally I could see these as an icons on the Attachment List window.
    Here my requirement is i need to create a report program which lists the attachments information as below:
    Title of the attachment                         Attachment Type
    <Title1>                                                  Pdf
    <Title2>                                                 Text or Notepad
    <Title3>                                                 jpg or Image
    How can i get this title and Attachment(document type) information.Can you suggest table or FM or Class/Method etc?
    Thanks In advance.
    Regards
    Lokesh

    Hi Folks,
    I got the answer.
    There is a parameter OBJECT_HD_DISPLAY in the FM 'SO_OBJECT_READ' which i need to capture. This will contain the title and the doc type extension ( notepad - txt ; adobe - pdf etc ).This will solve my problem.
    Thanks
    Lokesh

  • How to display attachment and delete temporary file  in Workflow

    Hello
    I have one question regarding function module SAP_WAPI_DIALOG_NOTES_DISPLAY.
    When a text file is selected, the target file is downloaded to Sapworkdir, and it's automatically deleted after displaying,
    This is pretty good behavior.
    But an Excel file is selected, the downloaded file is remained.
    I did not test other file types, but I need to delete such temporary files.
    If anyone would answer to the following questions, it's highly appreciated.
    1. This is a systematic difference or not?
    2. How to know exact downloaded temporary file's name.  ( I could search Sapworkdir and guess, but its' not good idea, I think.)
    Thank you and Best regards,
    Yuko

    Hi,
    you can try to use the:
    <b>ConsumerTreeListPreview</b>
    layout for KM navigation ivew (or customize to your own).
    This layout shows a folder tree on the left, a document list on the right. When you click on a document from the list it shows the contents of the file on the bottom of the iview.
    Hope this helps,
    Romano

  • How to display attached file size in XML Forms

    Hi,
    I've created a XML form to store presentations general information like author, subject, summary and a RID field pointing to the ppt file itself.
    I'd like to show the size of the ppt file but I don't know how... Any ideas?
    When I use default:size property, the size showed is the XML size, not the ppt size.
    thanks,
    Marcelo

    Hello Sudip,
    Which is the JRE version which you are using ? Check this SAP note 1341069, which specifies that the properties will not load when JRE 1.6 is used. (Try 1.4 or 1.5 )
    For author field try giving caption $sap_user, and schema reference, creator. For created which is date try giving /Properties/default:created, and /Properties/default:createdby for created by.
    Regards,
    Vinod

  • How display attachment links in a list view in SharePoint 2013?

    Hi all,
    I'm looking for a way to display attachment links in a list in SharePoint 2013. There are few resources online to achieve this in SP2010 and SP07. Your help is much appreciated.
    Thank you.

    Hi Ram Sampath:
    You can use Event Receiver and create another list(ListA) to record your attachment link.
    Maybe your process is:
    Users add list items and attachments
    List event will be fired
    Use Event Receiver to get attachment url and then Write into ListA
    You also can refer to the following web site:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/b693eb84-b846-4f0f-93c1-276cf931c746/how-to-get-attachment-in-itemadded-event-receiver
    http://stackoverflow.com/questions/19077770/how-to-retrieve-list-item-attachments-with-sharepoint-2013-event-receiver-in-cor

  • How to call GOS(Generic Object service) attachment ( BMP file ) into SAP

    How to call GOS(Generic Object service) attachment ( BMP file ) into SAP script
    Example: MM02 Service object there attaching the bmp file the same file i need to call script based on the material number
    Please provide the procedure and  coding.
    Thanks in advance
    Raju

    Hi,
    The following link may be useful to u.
    help.sap.com/printdocu/.../BCSRVOBS.pdf

  • Display attachment without showing pop-up List (CL_GOS_ATTACHMENTLIST)

    G'day!
    I try to display an attachment to a FI-document but without go via Attachment List.
    That is I don't want the attachment list to pop-up.
    Via my coding below I do get hold of the information I want from the attachment list...
    but THEN I want to KILL the object Attachment List so that the pop-up never shows.
    Any Ideas??
    (DATA: lo_list TYPE REF TO CL_GOS_ATTACHMENT_LIST.)
    *Get all attachment för object
    create object lo_list exporting is_object = ls_object .
    (DATA: lt_output TYPE TRL_BRLNK.)
    *Get the content of the attachmentlist...
    lt_output = lo_list->GO_LIST_VIEWER->gt_output.
    *Display all attachments.
    LOOP AT lt_output INTO ls_output.
      lo_bor_browser = ls_output-objref.
      create object go_display                            "(type ref to CL_SREL_LIST_BROWSER)
        exporting io_extension = lo_bor_browser
        exceptions others = 1.
      CALL METHOD go_display->DIRECT_DISPLAY_OBJECT "own method...only change of  SAP standard DIRECT_DISPLAY
        EXPORTING io_object = lo_bor_browser.
    ENDLOOP.
    I do find the attachment I want to display - But HOW do I avoid to show pop-up Attachment List.
    Best regards
    Henrik
    I guess my problem lies in CL_GOS_ATTACHMENT_LIST method CONSTRUCTOR
    METHOD CONSTRUCTOR .
      gs_object = is_object.
      gp_bds = ip_check_bds.
      gp_arlnk = ip_check_archive.
      gp_relation = ip_relation.
      IF go_list_viewer IS INITIAL.
    * create browser
        CREATE OBJECT go_list_viewer  !!!!!!!!!!!!!!!!!!! Anyone know how to avoid the pop-up Attachment list??
          EXPORTING
            io_extension            = me
            ip_service              = 'VIEW_ATTA'
          EXCEPTIONS
            others                  = 3
        go_list_viewer->gs_variant-report = sy-repid.
        go_list_viewer->gs_variant-handle = 'GOSA'.
        go_list_viewer->gp_no_dblclick    = ip_no_dblclick.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          RAISING execution_failed.
        ENDIF.
      ENDIF.
    *  IF gp_bds = 'X' OR gp_arlnk = 'X'.
    *    gt_supertypes = it_supertypes.
    *    CALL METHOD check_supertypes
    *      EXPORTING ip_objtype = is_object-objtype.
    *  ENDIF.
      call method check_more_objects.
    * set the title of the browser
      CALL METHOD go_list_viewer->set_title
        EXPORTING ip_title = ip_title.
    * display attachment list                                           !!!!!!!!!!!!!!!!!!! Anyone know how to avoid the pop-up Attachment list??
      CALL METHOD go_list_viewer->new_display
        EXPORTING is_object    = is_object
                  ip_role      = 'APPLOBJ'
                  ip_relation  = ip_relation
                  ip_no_browse = 'X'
                  io_container = io_container.
    ENDMETHOD.
    Edited by: Henrik Andersson on Aug 20, 2009 10:46 AM

    ( I RECONSTRUCT THE MESSAGE)
    G'day!
    I try to display an attachment to a FI-document but without go via Attachment List.
    That is I don't want the attachment list to pop-up.
    Any Ideas??
    (DATA: lo_list TYPE REF TO CL_GOS_ATTACHMENT_LIST.)
    *Get all attachment för object
    create object lo_list exporting is_object = ls_object .
    (DATA: lt_output TYPE TRL_BRLNK.)
    *Get the content of the attachmentlist...
    lt_output = lo_list->GO_LIST_VIEWER->gt_output.
    *Display all attachments.
    LOOP AT lt_output INTO ls_output.
      lo_bor_browser = ls_output-objref.
      create object go_display                            "(type ref to CL_SREL_LIST_BROWSER)
        exporting io_extension = lo_bor_browser
        exceptions others = 1.
      CALL METHOD go_display->DIRECT_DISPLAY_OBJECT "own method...only change of  SAP standard DIRECT_DISPLAY
        EXPORTING io_object = lo_bor_browser.
    ENDLOOP.
    I do find the attachment I want to display - But HOW do I avoid to show pop-up Attachment List.
    I guess my problem lies in CL_GOS_ATTACHMENT_LIST method CONSTRUCTOR
    METHOD CONSTRUCTOR .
    But HOW do I avoid the POP-UP to be visible for customer.....
    I already have displayed the attachment....so the pop-up is not necessary. Less things for user to think about the better it is..
    There SAP use:
    CREATE OBJECT go_list_viewer 
          EXPORTING
            io_extension            = me
            ip_service              = 'VIEW_ATTA'
          EXCEPTIONS
            others                  = 3
    and
    * display attachment list         
      CALL METHOD go_list_viewer->new_display
        EXPORTING is_object    = is_object
                  ip_role      = 'APPLOBJ'
                  ip_relation  = ip_relation
                  ip_no_browse = 'X'
                  io_container = io_container.
    Best regards
    Henrik

  • Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?

    Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
    I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
    I have attached the VI.
    Thanks for the help
    Attachments:
    new_control_and_acquisition_program.vi ‏946 KB

    Take a look at this document that discusses how to monitor IMAQ memory usage:
    http://digital.ni.com/public.nsf/websearch/8C6E405861C60DE786256DB400755957
    Hope this helps -
    Julie

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

  • How to display dynamic signature in Smartforms?

    Hi,
    Someone could help me in displaying dynamic signatures in SmartForms?. The signature is an attached file to the document. I already have the binary file but I don't know how to display this as an image in the Smartforms.
    Thanks in advance,
    Oliver
    Message was edited by: Oliver Vera
    Message was edited by: Oliver Vera

    Please give me the reply.
    I have an image content in one internal table.I want to display that image in the smartforms.
    plaese please.

  • How to display the Buyer's signature in PO BI Publisher Report

    Hi,
    How to display the Buyer's signature dynamically in XMLP Purchase Order Report.
    Please anybody help on this.Your help greatly appriciated.

    Hi All once again
    I was able to display the signature on XMLP AP Check Print Report by went through the follwoing Tim's blog http://blogs.oracle.com/xmlpublisher/2006/04/13#a12
    But in Purchase Order report requirement is different. We need to display the Buyer's signature on XMLP PO Report. So, where is the best place to store the buyers signatures.(For example if we have 10 buyers with 10 signatures respectively then after approving the PO, we should display that particular buyer's signature in PO XML Publisher report).We observed that in byuers & User's form there is no attachment feature enabled.
    This is an urgent requiremnt. Please help/guide/suggest to resolve this issue.
    Thanks in advance.

  • How to Display an Image on my FORM

    Good Day!
    I would like to ask some help from you guys with my problem on how to display an image on my form. I would like to display my uploaded image on my form but instead of an image, the get_blob_file is showing. By the way, I'm using Apex 4.1
    I downloaded the Order Entry Sample Application and followed the Page 6, the Product Details. I even made snapshots of each details from Page Rendering to Page Processing in order not to miss a thing.
    At the moment, I was able to upload or store the image on my created Oracle table and also able to retrieve it on the Download Link Text with Content Disposition value of Inline, provided by APEX Settings. If I invoke the Download link beside the file browser, a page with the image will be shown, below is the address:
    http://127.0.0.1:8080/apex/apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6&p_content_disposition=inline
    However, instead of showing the image on a region, below is the one showing on my Form:
    <img src="apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6" />
    As you can see the parameter values are the same but I know I missed something that's why I'm here :)
    I would highly appreciate all the help you can provide and many thanks in advance.
    I tried to change gear by making an html region of type PL/SQL (anonymous block) and a procedure but still no image :(
    Below are the scripts.
    declare
    cursor cur is
    select *
    from wsemployee
    where empid = :P230_EMPID;
    begin
    for rec in cur
    loop
    IF rec.mime_type is not null or rec.mime_type != '' THEN
    htp.p( '<img src="my_image_display?p_image_id='||NVL(rec.empid,0)||'" height="'||100||'"/>' );
    else
    htp.p( 'No Image ');
    END IF;
    htp.p( ' ');
    end loop;
    end;
    PROCEDURE
    create or replace PROCEDURE my_image_display( p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, PHOTO_BLOB_CONTENT, PHOTO_FILENAME,DBMS_LOB.GETLENGTH(photo_blob_content)
    INTO l_mime,lob_loc,l_file_name,l_length
    FROM wsemployee
    WHERE empid = p_image_id;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(l_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || l_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(l_file_name,instr(l_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    END my_image_display;
    Edited by: user13831927 on Dec 22, 2012 3:24 PM

    Hi Ying,
    you can add a UDF to the table spp2 with a programm
    but the table is not yet listed in the 'Manage User Fields' form.
    there's no way to "enable" it - sorry

  • How to display an error message after validation in Formatted Search?

    Hi SBO experts,
    if an error is detected on validation in a Formatted Search, how to display an error message to the user entering the data?
    Thanks & Regards,
    Raghu Iyer

    i created a formatted search query & attached it to the field 'Quantity' at Line Item level in Sales Order screen. just for testing purpose, i eneterd the following code lines in the query validating 'Quantity'
    if $[$38.11.0] > 50
    begin
    select @error = 1
    select @error_message = 'Vendor code cannot begin to X sign.'
    end
    the system throws the error : Internal error (8180) occurred [Message 131-183]
    actually, i need to display an error message to the user if Quantity is not in multiples of the OITM.SalFactor2
    if $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0]) > 0
    begin
    select @error = 1
    select @error_message = 'Error in Quantity.'
    end
    but, this expression to get the remainder itself seems to have some error
    $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0])
    i guess, % operator is used for modulo (to find the remainder of one number divided by another.) ? am i right ?
    Regards,
    Raghu Iyer

  • How to display multiple attachments in UWL item in portal?

    HI,
    How to display multiple attachments in UWL item in portal?
    I want to display more than one attachment in UWL body,present its dispalying one attachment.
    Pls help on this
    Thanks,
    Bheem
    Edited by: v bheem on Aug 4, 2009 3:10 PM

    Hi,
    Are you able to manage this! Pls do let us know if you have done any configuration changes!

  • How to display non-URL-based thumbnail images in JTable

    I'm trying to display thumbnail images as a tooltip popup for certain cells in a JTable. The thumbnail images are java image objects that have been retrieved dynamically as the result of a separate process--there is no associated URL. For this reason, I can't use the setToolTipText() method of the JTable.
    My attempts to JTable's createToolTip() method also failed as it seems the ToolTipManager never calls this method for a JTable.
    As a workaround, I've added a MouseMotionListener to the JTable that detects when the mouse is over the desired table cells. However, I'm not sure how to display the popup over the JTable. The only component that I can get to display over the JTable is a JPopupMenu, but I don't want to display a menu--just the image. Can anyone suggest a way to display a small popup image over the table?
    Thanks.

    Thank You Rodney. This explains why my createToolTip() method wasn't being called, but unfortunately I'm no closer to my goal of displaying a true custom tooltip using a non-URL image rather than a text string. If I make a call to setToolTipText(), at any point, the text argument becomes the tooltip and everything I have tried in createToolTip() has no effect. However, as you pointed out, if I don't call setToolTipText(), the table is not registered with the tooltip manager and createToolTip() is never even called.
    To help clarify, I have attached an SSCCE below. Please note that I use a URL image only for testing. In my actual application, the images are available only as Java objects--there are no URLs.
    import javax.swing.*;
    import java.awt.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    public class Test {
        static Object[][] data = {
                {"Cell 0,0", "Cell 0,1"},
                {"Cell 1,0", "Cell 1,1"}};
        static String[] columnNames = {"Column 0", "Column 1"};
        static JFrame frame;
        static String testImageURLName = "http://l.yimg.com/k/omg/us/img/7c/0a/4009_4182164952.jpg";
        static JTable testTable = new JTable(data, columnNames) {
            public JToolTip createToolTip() {
                System.out.println("testTable.createToolTip() called");
                Image testImage = getTestImage();
                // this.setToolTipText("Table ToolTip Text");
                JLabel customTipLabel = new JLabel(new ImageIcon(testImage));
                customTipLabel.setToolTipText("Custom ToolTip Text");
                JToolTip parentTip = super.createToolTip();
                parentTip.setComponent(customTipLabel);
                return parentTip;
        // This image is loaded from a URL only for test purposes!!!
        // Ordinarily, the image object would come from the application
        // and no URL would be available.
        public static Image getTestImage() {
            try {
                URL iconURL = new URL(testImageURLName);
                ImageIcon icon = new ImageIcon(iconURL);
                return icon.getImage();
            catch (MalformedURLException ex) {
                JOptionPane.showMessageDialog(frame,
                        "Set variable \"testImageName\" to a valid file name");
                System.exit(1);
            return null;
        public static void main(String[] args) throws Exception {
            frame = new JFrame("Test Table");
            frame.setSize(300, 100);
            // Set tool tip text so that table is registered w/ tool tip manager
            testTable.setToolTipText("main tooltip");
            frame.getContentPane().add(testTable);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }

Maybe you are looking for

  • Is anyone satisfied with Verison customer support and service?

    Verizon has the worst customer support organization I've ever dealt with in over 30 years of commercial activity in the US and abroad. I tried accessing support via live chat or telephone twice.  Neither works.  I am not really looking for answers, j

  • How to create a Project in Development system?

    Hi, I am starting my development on client system. Whenever i try to create infoarea or cube or catalog or whatever it is asking for request. before  creating request, Project must be created plz tell me how to create a project? whats the relation be

  • Ora-03113

    Hi, While running a pl/sql package i am getting an error like: ERROR at line 1: ORA-03113: end-of-file on communication channel. Does anyone have an idea and can help me out. thanks in advance.............

  • InputVerifier for JComboBox

    Hi, I'm trying to set an InputVerifier for an editable JComboBox using the setInputVerifier() method, to check the input before the JComboBox looses the focus. I've tried several things, as for exmaple extending the 'BasicComboBoxEditor' and set the

  • Problem in executing the Query

    Hi Experts, I hava query on FIAR_C03, while i am executing that query it is showing one error message and immediately it is disconnecting BW server. that error message is Abort Characterstic 0clr_doc_no is not available in the infoprovider in details