Change PM Notification - attach / display file as service of object

Hi experts .
My requirements are :
1. open attached file of selected notification for display ( if exists one)
as it done in transaction iw22->System->Services for Object
2. attach a file as service of object (in the same transaction Iw22)
If any  function exists for it ? - In batch input option attach file in non active
Please your help. Helena

I'm also not familiar with IW22.
But I can help you in debugging screens. Open a new notepad and paste the ff:
[FUNCTION]
Command=/H
Title=Debugger
Type=SystemCommand
save it and include it in your pc's shortcut icons for easier drag and drop.
You can simply drag and drop this notepad on the sap screen to activate debugging on screen.

Similar Messages

  • How do I upload and attach the file to Service Request

    [This thread was migrated from the On Demand Developer Forum in the old Siebel Community]
    drangineni
    New Contributor
    Hi,
    I am trying to upload a file and add it to a Service object as an
    attachement. I greatly appreciate if you could provide any code or
    sample...
    Thanks.
    Daya
    Product: CRM OnDemand
    10-21-2006 10:58 AM
    Re: How do I upload and attach the file to Service Request...
    BigSlick
    Valued Contributor
    On Demand doesn't support adding attachments via web services. One
    solution I've seen is depending on the scenario is to create a web link
    field on an object that's based on a custom text field. Your web service
    can populate that custom field and the web link can generate a dynamic
    link to the file in On Demand's UI. However, this depends on where the
    attachment is located and if the user needs some sort of firewall access.
    Hope this helps
    -BigSlick
    10-23-2006 11:43 AM
    ==============================================================================
    Click on the board or message subject at the top to return.

    Yes this still holds ture.
    Bardo

  • Attach PDF file to Service notification

    Hi Everyone,
    Can somebody tell me how I can attach PDF file from local folder into the attachment list in the service notification(tcode IW52) ?
    Also how i can get the list of documents attached to the  service notification ?
    I should attach the file from module pool program(from custom transaction).
    Is there any FM or some class methods that can make the attachment ?
    Thanks,
    Dime Slavkov

    1. Make your pdf files readily available on your PC desktop.
    2. Go to IW52, Click on GOS icon, Create... --> Create Attachment.
    You will get a file select Dialog box, refer to your desktop file and attach. You can attach number of files this way. If you want to see the files you've attached, click on the Attachment list shown below Create.. in the above picture. You will get the list of all files attached. You can choose anyone and view.
    KJogeswaraRao

  • Attaching a file into Service Contracts

    Hi
    I'm trying to attach a file to a service contract form.  I'm using the Attachments2 object.  Does anyone have an example of how to use the code?
    I have tried different variations of the Attachments2 & Attachments2.Lines object and nothing seem to work.

    Hi,
    at first, check:
    Administration -> System Initialization -> General Settings
    folder "Path", whether you have the "Attachments Folder"  filled in
    so the SAP would know, where to store them
    In "mail" object, the attachments are added via:
    oMail.Attachments.Add               oMail.Attachments.Item(oMail.Attachments.Count - 1).Filename = sAttaPath & sAttachFile
    I think, in the ServiceContracts, it will be similiar.
    Don't forget to copy the AttachmentFile into the "Attachments Folder" first. So the SAP could attach it.
    PS: try it manually, at first, and then via code ...
    Regards,
    Jaro

  • How to change number of records displayed in Web service: Query_view_data

    Hi experts
    I´m using webservice Query_view_data to fill a Xcelsius model with data.
    The Bex Query contains appr. 300 records but the webservice returns only 50 records. When I test it it says "displaying 50 of 312 records".
    When I tried ABAP FM RRW3_GET_QUERY_VIEW_DATA it gave all 312 records.
    Does anyone know how I can change this setting so that all 312 records are displayed in the webservice?
    Best Regards
    Kenneth

    Mani,
    I have changed the properties of the chart as you said and gave 4 decimal places. If my actual data value is 0.787989, i would expect it to result 0.7879 but the outcome is 0.7800. It is replacing the other two decimal places with 0's rather than the actual number. Is this a bug in OBIEE or am i doing anything wrong?? Is there any other way to do this. Please let e know...
    Thanks,
    vnk
    Edited by: user8708843 on Aug 18, 2010 8:03 AM

  • Tnx. IW22 Change PM Notification -  Create external document (URL) posting

    Hi:
    I am in transaction IW22 i.e. Change PM Notification.  There is a 'Services for object' drop down which appears below the enter tick.  This appears in online but not in BDC.  I have tried it through the transaction SHDB i.e. Transaction Recorder also herein the 'Services for object' does not appear.  I need to post entries through 'Create external document (URL)' through the 'Services for object' drop down using BDC / BAPI / etc.
    Please advice.
    NB.

    Hi NB,
    We have similar issue for QM notification and I have used function "SO_OBJECT_INSERT".
    I am enclosing my code may be useful for you:
    FORM CREATE-URL-ATTACHMENT.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
        EXPORTING
          REGION    = 'B'
        IMPORTING
          FOLDER_ID = FOLDER_ID
        EXCEPTIONS
          OTHERS    = 1.
      CLEAR: LS_OBJCONT, LT_OBJCONT, LT_OBJHEAD.
      REFRESH: LT_OBJCONT, LT_OBJHEAD.
      CONCATENATE '&KEY&' H-URL INTO LS_OBJCONT.
      APPEND LS_OBJCONT TO LT_OBJCONT.
      CLEAR: L_OBJ_DATA.
      L_OBJ_DATA-OBJSNS = 'O'.
      L_OBJ_DATA-OBJLA  = SY-LANGU.
      L_OBJ_DATA-OBJDES = 'NOTES URL'.
      CALL FUNCTION 'SO_OBJECT_INSERT'
        EXPORTING
          FOLDER_ID             = FOLDER_ID
          OBJECT_TYPE           = 'URL'
          OBJECT_HD_CHANGE      = L_OBJ_DATA
        IMPORTING
          OBJECT_ID             = L_OBJ_ID
        TABLES
          OBJHEAD               = LT_OBJHEAD
          OBJCONT               = LT_OBJCONT
        EXCEPTIONS
          ACTIVE_USER_NOT_EXIST = 35
          FOLDER_NOT_EXIST      = 6
          OBJECT_TYPE_NOT_EXIST = 17
          OWNER_NOT_EXIST       = 22
          PARAMETER_ERROR       = 23
          OTHERS                = 1000.
      CLEAR: IS_OBJECT.
      IS_OBJECT-OBJKEY = WQMNUM.
      IS_OBJECT-OBJTYPE = 'BUS2078'.
      CLEAR: REL_DOC.
      CONCATENATE FOLDER_ID L_OBJ_ID INTO REL_DOC-OBJKEY.
      REL_DOC-OBJTYPE = 'MESSAGE'.
      CALL FUNCTION 'BINARY_RELATION_CREATE'
        EXPORTING
          OBJ_ROLEA    = IS_OBJECT
          OBJ_ROLEB    = REL_DOC
          RELATIONTYPE = 'URL'
        EXCEPTIONS
          OTHERS       = 1.
      IF SY-SUBRC EQ 0.
        COMMIT WORK.
      ELSE.
        T_MESSAGE = 'Notification Attachment Add Failed'.
        APPEND T_MESSAGE.
        CLEAR: T_MESSAGE.
        T_MESSAGE = 'Reference:'.
        T_MESSAGE+11(20) = H-REF.
        APPEND T_MESSAGE.
        CLEAR: T_MESSAGE.
        T_MESSAGE = 'Notification:'.
        T_MESSAGE+14(12) = WQMNUM.
        APPEND T_MESSAGE.
        CLEAR: T_MESSAGE.
        T_MESSAGE = 'URL:'.
        T_MESSAGE+5(72) = H-URL.
        APPEND T_MESSAGE.
        PERFORM SEND-EMAIL.
      ENDIF.
    ENDFORM.                    "create-url-attachment
    Hope this may help you.
    Please reward all the useful answers.
    Regards,
    Lanka

  • Difference in storage method for DMS and Services for Object

    Hi-
    Our R/3 version is: 4.7 Enterprise.
    In most (if not all) of the transactions users execute, there is a feature where they can attach a file using "Services for Object" from their PC to the associated record (i.e. material master, purchase orders, service notifications, etc.) 
    What I would like to know is where the document is stored.  From what I found on help.sap.com it says that it is a link from the user's PC.  But I would guess it is storing a copy of the file as a blob on the R/3 server somewhere.  Is this true?  Or is there a risk if the user's harddrive dies, that the file is no longer available for viewing? 
    I am trying to determine the difference between using the Services for Object feature vs. DMS and setting up an object link for the specific object type (i.e. material).
    Thanks!
    -Jenn

    I found the following about Services for Objects: 
    Business Workplace
    The documents that were appended to an object using Create attachment and Create note are stored in the Business Workplace. There, for example, you can make settings for where the documents should be stored (R/3 System or Web Server) and which document classes may be loaded in the SAP System (for example DOC, but not EXE).
    Sending is also carried out internally using the Business Workplace. Messages are created that contain a link to the object as an attachment. By double-clicking on the attachment, the users can call the default method of the object. This is normally the display method.

  • Attaching PDF files to PO in Services for Objects

    Hi Experts
    I have got a strange requirement. Upon creation of the Purchase order or after any changes done to the PO, I need print the form and store it into PDF format in the application server. Later I need to upload that file to Services for Objects , button which available on the top of PO, in the Left most one.
    Using that I need to attach the coverted PDF file to that. Everything should be done by the program in the background. Please advice is it possible, if it is possible please help me how to code for this requirement.
    Awaiting for your reply,
    Thanks
    Praveen
    Edited by: Praveen Kumar on Feb 4, 2010 4:25 AM
    Edited by: Praveen Kumar on Feb 4, 2010 5:43 AM

    FUNCTION z_mm_save_po_in_gos.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PONUMBER) TYPE  EBELN
    *"  EXCEPTIONS
    *"      ERROR_OPEN_FORM
    *"      ERROR_CLOSE_FORM
      TYPES: BEGIN OF ty_message_key,
             foltp TYPE so_fol_tp,
             folyr TYPE so_fol_yr,
             folno TYPE so_fol_no,
             doctp TYPE so_doc_tp,
             docyr TYPE so_doc_yr,
             docno TYPE so_doc_no,
             fortp TYPE so_for_tp,
             foryr TYPE so_for_yr,
             forno TYPE so_for_no,
             END OF ty_message_key.
      INCLUDE : <cntn01>.
    * TABLES: ekko,
    *         lfa1,
    *         t001,
    *         pekko.
    * Load class.
      CLASS cl_binary_relation DEFINITION LOAD.
      CLASS cl_obl_object DEFINITION LOAD.
    **data declarations
      DATA: l_fstr   TYPE xstring,
            l_fsize  TYPE i,
            l_bsize  TYPE i,
            l_botype LIKE obl_s_pbor-typeid VALUE 'BUS2012', " e.g. 'BUS2012'
            l_bo_id  LIKE obl_s_pbor-instid," VALUE '4610000000'
            l_docty  LIKE borident-objtype VALUE 'MESSAGE',
            l_reltyp LIKE breltyp-reltype VALUE 'ATTA',
            lt_bin TYPE STANDARD TABLE OF char255 WITH HEADER LINE,
            lt_pdf TYPE TABLE OF tline,
            lv_message_key TYPE ty_message_key,
            lo_message TYPE swc_object,
            l_title    TYPE char30,
            lo_is_object_a TYPE borident,
            lo_is_object_b TYPE borident,
    *        lt_nast TYPE TABLE OF nast,
    *        lw_nast LIKE nast,
    *        l_nast  LIKE nast,
    *        l_druvo LIKE t166k-druvo,
    *        l_from_memory,
    *        l_doc   TYPE meein_purchase_doc_print,
    *        l_retcode TYPE i,
            lt_cdpos TYPE TABLE OF cdpos,
            lw_cdpos TYPE cdpos,
            lt_cdhdr TYPE TABLE OF cdhdr,
            lw_cdhdr TYPE cdhdr,
            l_flg,
    *        w_opt  LIKE ITCPO,
            l_text TYPE text60,
            lw_gos   TYPE zmm_gos,
            lr_chno  TYPE RANGE OF text60,
            lw_chno  LIKE LINE OF lr_chno,
            otf      TYPE TABLE OF itcoo.
        DATA: w_full TYPE string.
    **program will check only these values in the change history,
      lw_chno-sign = 'I' . lw_chno-option = 'EQ' .
      lw_chno-low = 'EKKO-FRGKE'. APPEND lw_chno TO lr_chno."Release Indicator: Purchasing Document
      lw_chno-low = 'EKKO-FRGZU'. APPEND lw_chno TO lr_chno."Release status
      lw_chno-low = 'EKKO-RLWRT'. APPEND lw_chno TO lr_chno."Total value at time of release
      lw_chno-low = 'EKET-MENGE'. APPEND lw_chno TO lr_chno."Scheduled Quantity
      lw_chno-low = 'EKPO-NETWR'. APPEND lw_chno TO lr_chno."Net Order Value in PO Currency
      lw_chno-low = 'EKPO-NETPR'. APPEND lw_chno TO lr_chno."Net Price in Purchasing
    *                                                        Document (in Document Currency)
      lw_chno-low = 'EKPO-BRTWR'. APPEND lw_chno TO lr_chno."Gross order value in PO currency
      lw_chno-low = 'EKPO-MENGE'. APPEND lw_chno TO lr_chno."Purchase Order Quantity
      SELECT SINGLE * FROM zmm_gos INTO lw_gos WHERE objectclas = 'EINKBELEG'
                                                   AND objectid = ponumber.
      IF sy-subrc EQ 0.
        IF lw_gos-changenr NE '1000000000'.
          SELECT * FROM cdpos INTO TABLE lt_cdpos
                          WHERE objectclas = lw_gos-objectclas
                            AND objectid   = lw_gos-objectid
                            AND changenr   GT lw_gos-changenr.
          IF sy-subrc EQ 0.
            LOOP AT lt_cdpos INTO lw_cdpos.
              CONCATENATE lw_cdpos-tabname lw_cdpos-fname INTO l_text
                          SEPARATED BY '-'.
              IF l_text IN lr_chno.
                l_flg = 'X'.
                EXIT.
              ENDIF.
              CLEAR: lw_cdpos,
                     l_text.
            ENDLOOP.
            IF l_flg = 'X'.
              DESCRIBE TABLE lt_cdpos.
              READ TABLE lt_cdpos INTO lw_cdpos INDEX sy-tfill.
              lw_gos-changenr = lw_cdpos-changenr.
              MODIFY zmm_gos FROM lw_gos.
              IF sy-subrc EQ 0.
                COMMIT WORK.
              ENDIF.
            ENDIF.
          ELSE.
            l_flg = space.
          ENDIF.
        ELSE.
          SELECT * FROM cdhdr INTO TABLE lt_cdhdr WHERE objectclas = 'EINKBELEG'
                                                 AND objectid   = ponumber.
          IF sy-subrc EQ 0.
            DESCRIBE TABLE lt_cdhdr.
            READ TABLE lt_cdhdr INTO lw_cdhdr INDEX sy-tfill.
            l_flg = 'X'.
            lw_gos-objectclas = lw_cdhdr-objectclas.
            lw_gos-objectid = lw_cdhdr-objectid.
            lw_gos-changenr = lw_cdhdr-changenr.
            MODIFY zmm_gos FROM lw_gos.
            IF sy-subrc EQ 0.
              COMMIT WORK.
            ENDIF.
          ENDIF.
        ENDIF.
      ELSE.
        SELECT * FROM cdhdr INTO TABLE lt_cdhdr WHERE objectclas = 'EINKBELEG'
                                                  AND objectid   = ponumber.
        IF sy-subrc EQ 0.
          DESCRIBE TABLE lt_cdhdr.
          READ TABLE lt_cdhdr INTO lw_cdhdr INDEX sy-tfill.
          l_flg = 'X'.
          lw_gos-objectclas = lw_cdhdr-objectclas.
          lw_gos-objectid = lw_cdhdr-objectid.
          lw_gos-changenr = lw_cdhdr-changenr.
        ELSE.
          l_flg = 'X'.
          lw_gos-objectclas = 'EINKBELEG'.
          lw_gos-objectid = ponumber.
          lw_gos-changenr = '1000000000'.
        ENDIF.
        MODIFY zmm_gos FROM lw_gos.
        IF sy-subrc EQ 0.
          COMMIT WORK.
        ENDIF.
      ENDIF.
    *  IF l_flg EQ space.
    *    l_flg = 'X'.
    *  ENDIF.
      IF l_flg NE space.
        DATA: memkey(10),
              memkey1(10).
        memkey = 'POOTF'.
        memkey1 = 'PONO'.
        EXPORT ponumber TO MEMORY ID memkey1.
        SUBMIT zmmr086 AND RETURN.
        IMPORT otf FROM MEMORY ID memkey.
        CHECK otf[] IS NOT INITIAL.
          import w_full from MEMORY ID 'REV'.
    **convert the otf data into xstring
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
          IMPORTING
            bin_filesize          = l_bsize
            bin_file              = l_fstr
          TABLES
            otf                   = otf[]
            lines                 = lt_pdf[]
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            err_bad_otf           = 4
            OTHERS                = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    **create the object message retriveing the msg details
    *    swc_create_object lo_message 'MESSAGE' lv_message_key.
    ** define container to pass the parameter values to the method call
    *    swc_container lt_message_container.
    **creating the title for GOS
    *    WRITE sy-datum TO l_title.
    *    CONCATENATE ponumber l_title INTO l_title SEPARATED BY '_'.
    ** Populate container with parameters for method
    *    swc_set_element lt_message_container 'DOCUMENTTITLE' l_title.
    *    swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
    *    swc_set_element lt_message_container 'NO_DIALOG' 'X'.
    *    swc_set_element lt_message_container 'DOCUMENTNAME' l_docty.
    *    swc_set_element lt_message_container 'DOCUMENTTYPE' 'PDF'.
    *    swc_set_element lt_message_container 'FILEEXTENSION' 'PDF'.
    **convert the file string into binary format
        CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
          EXPORTING
            buffer        = l_fstr
          IMPORTING
            output_length = l_fsize
          TABLES
            binary_tab    = lt_bin.
    *    swc_set_table lt_message_container 'DocumentContent' lt_bin.
    *    swc_set_element lt_message_container 'DOCUMENTSIZE' l_fsize.
    *    swc_refresh_object lo_message.
    *    swc_call_method lo_message 'CREATE' lt_message_container.
    *    swc_get_object_key lo_message lv_message_key.
    ***fill the object key details for purchase order
    *    lo_is_object_a-objkey = ponumber. "purchase order number
    *    lo_is_object_a-objtype = 'BUS2012'. "business object type
    ** Create attachment BO object_b
    *    lo_is_object_b-objkey = lv_message_key.
    *    lo_is_object_b-objtype = l_docty.
    *    CALL FUNCTION 'BINARY_RELATION_CREATE'
    *      EXPORTING
    *        obj_rolea      = lo_is_object_a
    *        obj_roleb      = lo_is_object_b
    *        relationtype   = l_reltyp
    *      EXCEPTIONS
    *        no_model       = 1
    *        internal_error = 2
    *        unknown        = 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.
    *    COMMIT WORK AND WAIT.
    *CONSTANTS: pc_file TYPE char128 VALUE '/usr/sap/DEV/DVEBMGS00/data/newdoc5.pdf'.
    *open DATASET pc_file for OUTPUT in BINARY MODE." IGNORING CONVERSION ERRORS.
    *IF sy-subrc eq 0.
    *  TRANSFER l_fstr to pc_file.
    *  IF sy-subrc eq 0.
    *    CLOSE DATASET pc_file.
    *  ENDIF.
    *ENDIF.
        CONCATENATE  ponumber sy-datum sy-uzeit w_full INTO w_full SEPARATED BY '_'.
        CONCATENATE 'C:\' w_full '.pdf' INTO w_full.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
    *   BIN_FILESIZE                    =
            filename                        = w_full
            filetype                        = 'BIN'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
          TABLES
            data_tab                        = lt_bin[]
    *   FIELDNAMES                      =
    * 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
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ELSE.
          WRITE: 'File saved on PC'.
        ENDIF.
        FREE: l_fstr,
              l_fsize,
              l_bsize,
              l_botype,
              l_bo_id ,
              l_docty,
              l_reltyp,
              lt_bin,
              lt_pdf,
              lv_message_key,
              lo_message,
              l_title,
              lo_is_object_a,
              lo_is_object_b,
    *              l_doc,
    *              l_nast,
    *              lt_nast,
    *              lw_nast,
              lt_cdpos,
              lw_gos,
              lw_cdpos.
    *      ENDIF.
      ENDIF.
    *  ENDIF.
    ENDFUNCTION.
    plz chk and let me know if any issue.

  • Services for Object- Attached file option is disable

    Hi All,
    I am not able to see the attached file in services to object in billing document.As for other document I am able to see that , Pl le me know the configure setting related to this Icon. how to configure for see the attached document If i create a invoice.
    Rds
    VM

    Hi Vip,
    I am facing the same problem now.. Can you share the solution if you got it done ...
    Thanks
    Avinash Raju

  • Attachments to Notifications - using "Services for Object"

    Hi All,
    I have sucessfully created a VC application (7.0 sp13) to create a General Notification in R/3
    using the BAPI -  IQS4_CREATE_NOTIFICATION
    Our users in R/3 4.7 use the button in the Top Left Hand corner of the Screen "Services for Object"
    to attach MS Word documents to Notifcations. Using the Create Attachment option from the Services for Object toolbar that pops up when the button is clicked.
    Has anyone else tried this or have any advice on how this can be done in VC - if you can recommend a BAPI that I can try or will this be a custom ABAP BAPI.
    Thanks in advance for any advice you can offer.
    - Robert

    FUNCTION z_pm_attachment_and_url.
    *"*"Interface local:
    *"  IMPORTING
    *"     VALUE(I_QMNUM) TYPE  QMNUM OPTIONAL
    *"     VALUE(I_AUFNR) TYPE  AUFNR OPTIONAL
    *"     VALUE(I_URL) TYPE  SO_URL OPTIONAL
    *"     VALUE(I_FILE) TYPE  ZPMCT002 OPTIONAL
    *"     VALUE(I_FILENAME) TYPE  STRING OPTIONAL
    *"  TABLES
    *"      T_RETURN STRUCTURE  BAPIRET2
    * Objetos locais
      DATA:
        vl_url         TYPE so_url,
        vl_path        TYPE string,                             "#EC NEEDED
        vl_loopc       TYPE sy-loopc,
        vl_lines       TYPE sy-loopc,
        vl_filename    TYPE string,
        vl_filelength  TYPE i,
        it_url         TYPE STANDARD TABLE OF sood-objdes,
        it_obj_cont    TYPE STANDARD TABLE OF solix,
        wa_obj         TYPE borident,
        wa_obj_cont    TYPE soli,
        wa_obj_data    TYPE sood1,
        wa_folder_id   TYPE soodk,
        wa_document_id TYPE sofmk.
      DEFINE valida_retorno.
        loop at t_return into t_return.
          if t_return-type eq zgtpm_e.
            exit.
          endif.
        endloop.
        if t_return-type eq zgtpm_e.
          exit.
        endif.
      END-OF-DEFINITION.
    * === Valida parâmetros de entrada
      IF i_qmnum IS INITIAL AND i_aufnr IS INITIAL.
    *   Nenhum objeto informado: Informe Nota ou Ordem de Manutenção
        PERFORM mensagem_retorno_tab
        USING
          'ZPM_PORTAL' zgtpm_e '055' '' '' '' ''
        CHANGING
          t_return[].
        EXIT.
      ELSEIF NOT i_qmnum IS INITIAL AND NOT i_aufnr IS INITIAL.
    *   Informe apenas um objeto: Nota ou Ordem de Manutenção
        PERFORM mensagem_retorno_tab
        USING
          'ZPM_PORTAL' zgtpm_e '054' '' '' '' ''
        CHANGING
          t_return[].
        EXIT.
      ENDIF.
      IF  i_url IS INITIAL
      AND i_filename IS INITIAL.
    *   Informe Anexo e/ou URL
        PERFORM mensagem_retorno_tab
        USING
          'ZPM_PORTAL' zgtpm_e '060' '' '' '' ''
        CHANGING
          t_return[].
        EXIT.
      ENDIF.
    * === Define Categoria de objeto
      IF NOT i_qmnum IS INITIAL.
        wa_obj-objkey  = i_qmnum.
        wa_obj-objtype = 'BUS2038'. " Nota PM
      ENDIF.
      IF NOT i_aufnr IS INITIAL.
        wa_obj-objkey  = i_aufnr.
        wa_obj-objtype = 'BUS2007'. " Ordem de manutenção
      ENDIF.
    * === Anexo
      IF NOT i_filename IS INITIAL.
    *   Conteúdo do arquivo
        IF NOT i_file[] IS INITIAL.
          it_obj_cont[] = i_file[].
          DESCRIBE TABLE it_obj_cont LINES vl_lines.
          READ TABLE it_obj_cont INTO wa_obj_cont INDEX vl_lines.
          vl_filelength =
            ( 255 * ( vl_lines - 1 ) ) + STRLEN( wa_obj_cont ).
        ELSE.
          CALL FUNCTION 'GUI_UPLOAD'
               EXPORTING
                    filename                = i_filename
                    filetype                = 'BIN'
               IMPORTING
                    filelength              = vl_filelength
               TABLES
                    data_tab                = it_obj_cont
               EXCEPTIONS
                    file_open_error         = 1
                    file_read_error         = 2
                    no_batch                = 3
                    gui_refuse_filetransfer = 4
                    invalid_type            = 5
                    no_authority            = 6
                    unknown_error           = 7
                    bad_data_format         = 8
                    header_not_allowed      = 9
                    separator_not_allowed   = 10
                    header_too_long         = 11
                    unknown_dp_error        = 12
                    access_denied           = 13
                    dp_out_of_memory        = 14
                    disk_full               = 15
                    dp_timeout              = 16
                    OTHERS                  = 17.
          IF sy-subrc <> 0.
            PERFORM mensagem_retorno_tab
            USING
             sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
            CHANGING
              t_return[].
            EXIT.
          ENDIF.
        ENDIF.
    *   Pasta de Destino
        PERFORM get_folder CHANGING wa_folder_id t_return[].
        valida_retorno.
    *   SAPoffice: definição do objeto, modificar atributos
        wa_obj_data-objla  = sy-langu.      " Idioma
        wa_obj_data-objsns = 'O'.           " Objeto confidencial
        wa_obj_data-objlen = vl_filelength. " Tamanho conteúdo documento
        wa_obj_data-ownnam = sy-uname.      " Nome proprietário
        CALL METHOD cl_report_viewer=>split_path_filename
        EXPORTING
          i_filename = i_filename
        IMPORTING
          e_path     = vl_path
          e_filename = vl_filename.
        SPLIT vl_filename AT '.' INTO
          wa_obj_data-objdes    " Descrição breve do conteúdo
          wa_obj_data-file_ext. " Extensão de file de uma aplicação PC
        CONDENSE wa_obj_data-file_ext NO-GAPS.
    *   Insere Objeto (Anexo)
        PERFORM object_insert
        USING
          'EXT' " Anexo
          wa_obj_data
          wa_folder_id
          it_obj_cont
        CHANGING
          wa_document_id
          t_return[].
        valida_retorno.
    *   Relacionamento Objeto PM x Anexo
        PERFORM relation_create
        USING
          'ATTA'
          wa_obj
          wa_document_id
        CHANGING
          t_return[].
        valida_retorno.
      ENDIF.
    * === URL
      IF NOT i_url IS INITIAL.
    *   Inicializa estruturas comuns a Anexo e URL
        CLEAR:
          it_obj_cont,
          wa_obj_cont,
          wa_obj_data,
          wa_folder_id,
          wa_document_id.
    *   Conteúdo da URL
        MOVE i_url TO vl_url.
        WHILE NOT vl_url IS INITIAL.
          CONCATENATE '&KEY&' vl_url(250) INTO wa_obj_cont.
          APPEND wa_obj_cont TO it_obj_cont.
          SHIFT vl_url LEFT BY 250 PLACES.
        ENDWHILE.
    *   Pasta de Destino
        PERFORM get_folder CHANGING wa_folder_id t_return[].
        valida_retorno.
    *   SAPoffice: definição do objeto, modificar atributos
        wa_obj_data-objla  = sy-langu. " Idioma
        wa_obj_data-objsns = 'O'.      " Objeto confidencial
        wa_obj_data-ownnam = sy-uname. " Nome proprietário
        SPLIT i_url AT '/' INTO TABLE it_url.
        DESCRIBE TABLE it_url LINES vl_loopc.
        READ TABLE it_url INDEX vl_loopc
        INTO wa_obj_data-objdes. " Descrição breve do conteúdo
    *   Insere Objeto (URL)
        PERFORM object_insert
        USING
          'URL'  " Link Inter/Intranet
          wa_obj_data
          wa_folder_id
          it_obj_cont
        CHANGING
          wa_document_id
          t_return[].
        valida_retorno.
    *   Relacionamento Objeto PM x URL
        PERFORM relation_create
        USING
          'URL'
          wa_obj
          wa_document_id
        CHANGING
          t_return[].
        valida_retorno.
      ENDIF.
    * === Libera objetos locais
      FREE:
        vl_url,
        vl_path,
        vl_loopc,
        vl_lines,
        vl_filename,
        vl_filelength,
        it_url,
        it_obj_cont,
        wa_obj,
        wa_obj_cont,
        wa_obj_data,
        wa_folder_id,
        wa_document_id.
    ENDFUNCTION.
    ***INCLUDE LZGPM0010F01 .
    *&      Form  mensagem_retorno_tab
      FORM mensagem_retorno_tab
      USING
        p_msgid TYPE symsgid
        p_msgty TYPE symsgty
        p_msgno TYPE symsgno
        p_msgv1 TYPE any
        p_msgv2 TYPE any
        p_msgv3 TYPE any
        p_msgv4 TYPE any
      CHANGING
        t_return TYPE ty_return.
        DATA:
          vl_msgty  TYPE symsgty,
          wa_return LIKE LINE OF t_return.
        IF p_msgty IS INITIAL.
          MOVE zgtpm_e TO vl_msgty.
        ELSE.
          MOVE p_msgty TO vl_msgty.
        ENDIF.
        IF p_msgno IS INITIAL.
          EXIT.
        ENDIF.
        MOVE p_msgid  TO wa_return-id.
        MOVE vl_msgty TO wa_return-type.
        MOVE p_msgno  TO wa_return-number.
        MOVE p_msgv1  TO wa_return-message_v1.
        MOVE p_msgv2  TO wa_return-message_v2.
        MOVE p_msgv3  TO wa_return-message_v3.
        MOVE p_msgv4  TO wa_return-message_v4.
        MESSAGE ID p_msgid TYPE vl_msgty NUMBER p_msgno
        WITH p_msgv1 p_msgv2 p_msgv3 p_msgv4
        INTO wa_return-message.
        APPEND wa_return TO t_return.
        FREE: vl_msgty, wa_return.
      ENDFORM.                    " mensagem_retorno_tab
    *&      Form  get_folder
      FORM get_folder
      CHANGING
        w_folder_id TYPE soodk
        t_return TYPE ty_return.
        CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
             EXPORTING
                  region    = 'B'  " ?
             IMPORTING
                  folder_id = w_folder_id
             EXCEPTIONS
                  OTHERS    = 1.
        IF sy-subrc <> 0.
          PERFORM mensagem_retorno_tab
          USING
           sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          CHANGING
            t_return[].
        ENDIF.
      ENDFORM.                    " get_folder
    *&      Form  object_insert
      FORM object_insert USING
        p_objtp     TYPE so_obj_tp
        w_obj_data  TYPE sood1
        w_folder_id TYPE soodk
        t_obj_cont  TYPE zpmct002
      CHANGING
        w_document_id TYPE sofmk
        t_return      TYPE ty_return.
    *   Objetos locais
        DATA:
          it_objcont  TYPE STANDARD TABLE OF soli,
          it_obj_head TYPE STANDARD TABLE OF soli,
          wa_obj_id   TYPE soodk,
          wa_obj_cont LIKE LINE OF t_obj_cont.
    *   RAW to CHAR
        LOOP AT t_obj_cont INTO wa_obj_cont.
          APPEND wa_obj_cont TO it_objcont.
          CLEAR wa_obj_cont.
        ENDLOOP.
    *   Insere objeto
        CALL FUNCTION 'SO_OBJECT_INSERT'
             EXPORTING
                  folder_id                  = w_folder_id
                  object_type                = p_objtp
                  object_hd_change           = w_obj_data
                  owner                      = sy-uname
             IMPORTING
                  object_id                  = wa_obj_id
             TABLES
                  objhead                    = it_obj_head
                  objcont                    = it_objcont
             EXCEPTIONS
                  active_user_not_exist      = 1
                  communication_failure      = 2
                  component_not_available    = 3
                  dl_name_exist              = 4
                  folder_not_exist           = 5
                  folder_no_authorization    = 6
                  object_type_not_exist      = 7
                  operation_no_authorization = 8
                  owner_not_exist            = 9
                  parameter_error            = 10
                  substitute_not_active      = 11
                  substitute_not_defined     = 12
                  system_failure             = 13
                  x_error                    = 14
                  OTHERS                     = 15.
        IF sy-subrc = 0.
          w_document_id-foltp = w_folder_id-objtp.
          w_document_id-folyr = w_folder_id-objyr.
          w_document_id-folno = w_folder_id-objno.
          w_document_id-doctp = wa_obj_id-objtp.
          w_document_id-docyr = wa_obj_id-objyr.
          w_document_id-docno = wa_obj_id-objno.
        ELSE.
          PERFORM mensagem_retorno_tab
          USING
           sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          CHANGING
            t_return[].
        ENDIF.
    *   Libera objetos locais
        FREE:it_objcont, it_obj_head, wa_obj_id, wa_obj_cont.
      ENDFORM.                    " object_insert
    *&      Form  relation_create
      FORM relation_create
      USING
        p_relationtype TYPE binreltyp
        w_obj          TYPE borident
        w_document_id  TYPE sofmk
      CHANGING
        t_return TYPE ty_return.
        DATA wa_doc TYPE borident.
        wa_doc-objtype = 'MESSAGE'.
        CASE p_relationtype.
          WHEN 'ATTA'.
            wa_doc-objkey  = w_document_id(34).
          WHEN 'URL'.
            wa_doc-objkey  = w_document_id.
          WHEN OTHERS.
        ENDCASE.
        CALL FUNCTION 'BINARY_RELATION_CREATE'
             EXPORTING
                  obj_rolea      = w_obj
                  obj_roleb      = wa_doc
                  relationtype   = p_relationtype
             EXCEPTIONS
                  no_model       = 1
                  internal_error = 2
                  unknown        = 3
                  OTHERS         = 4.
        IF sy-subrc = 0.
          COMMIT WORK AND WAIT.
          CASE p_relationtype.
            WHEN 'ATTA'.
    *         O anexo foi criado com êxito
              PERFORM mensagem_retorno_tab
              USING
                'SGOS_MSG' zgtpm_s '043' '' '' '' ''
              CHANGING
                t_return[].
            WHEN 'URL'.
    *         A URL foi criada com êxito
              PERFORM mensagem_retorno_tab
              USING
                'ZPM_PORTAL' zgtpm_s '059' '' '' '' ''
              CHANGING
                t_return[].
            WHEN OTHERS.
          ENDCASE.
        ELSE.
          PERFORM mensagem_retorno_tab
          USING
           sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          CHANGING
            t_return[].
        ENDIF.
        FREE wa_doc.
      ENDFORM.                    " relation_create
    Edited by: Fabrício Alves Vieira on Apr 8, 2008 3:08 PM

  • How can I find services for object for PM Notification

    Hi all
    How can I find services for object(attached files ) for PM Notification  ?
    I can see then,for examle ,using transaction Iw22 :System---->Services for object
      My requirement are : 1. open attached file of selected notification for display ( if exists one)
                                     2. If user wants to attach file as service of object
                                           what function exists for it ?
    Please your help

    Hi SD,
    I have checked in SUIM and SU24 also. But I didn't find.  Could you please tell me any other way to finding out the authorization objects.
    Thanks,
    bsv.

  • Services for Object (Create , Change, Delete)

    Hi All,
    Is there any sample program where we can create (Change and delete) a note in the services for object for sales order.
    We have requitement where we need to develop a Z program which should have the functionality of changing or creating or deleting the Note from the services for object in sales order. the input parameter will be sales order.
    Thanks.
    Chindam.

    I don't have any sample code
    Please check how this fm called
        CALL FUNCTION 'BDS_CALL_NAVIGATOR'
           EXPORTING
                classname      = 'BUS2037'    " Business object for sales order
                classtype      = 'BO'
                OBJKEY         = L_OBJKEY  " Sales order Number
           TABLES
                EXCLUDING      = i_excluding
           EXCEPTIONS
                INTERNAL_ERROR = 1
                OTHERS         = 2

  • Bulk Upload of Attachments (images) to an invoice (Services for object)

    Hi Gurus,
    We are trying to create some kind of program to mass upload scanned images of invoices to an invoice document. At the moment we do each document on its own, we create the attachment to an invoice using FB02, then access the services for objects menu & create attachment.
    Can anyone advise of a way of creating a program to upload these images to a document OR the name of the table where it keeps the location of the attchments.
    I hope that makes sense!

    How to add an attachment to a Purchase Order in SAP?
    You can attach manually any document to PO without using Document Management System ( DMS ) in SAP 4.6C.
    But you cannot attach document while you create PO in T/Code ME21N
    Save you PO ( ME21N ) and again open with change ( ME22N ) then you can attach document through Service for Object button. Service for Object button available down side of Command screen ( in your PO screen ME22N )
    Click your Service Object button -> Create -> Create attachment
    then select your window directory ( which file you need to attach) select your file Now your system shows message  Service "Create attachment" is started.
    Save again your PO. You can see (open) your attachment in same field ( Service for Object ) select and Create and check attachment list. You can attach as many document in your PO.
    Note: This is only information for internal or you can print separately this document for sending to vendor ( fax ) System will not print automatically along PO print out.

  • Services for object buttons randomly disappearing from FB03

    Hello SAP Experts,
    We display an FI document via tcode FB03 (Display Document) and use the "services for object" buttons to attach documents via the "create attachment" button and also to view attached documents via the "attachment list" button.
    However, quite often when displaying the FI document after a document has been attached, the "services for objects" buttons are not displayed.  Just a blank toolbar appears.
    Later on the when the FI document is displayed again via tcode FB03 (Display Document), the "services for objects" buttons do appear and the attachments can then be displayed.
    As the attachments can be viewed sometimes, I would say that this issue is not related to security.
    Any idea's what maybe causing the "services for objects" buttons randomly disappearing???
    Regards,
    SAP Muppet

    Hello SAP Experts,
    Any ideas or comments here???
    Regards,
    SAP Muppet

  • Services for object in sap

    Hi,
    When I am enclosing some document or file in services for object in sap in me23n, how can I know that some object is attached without seeing the attachement list. Secondly if anyone want to delete the attachement he can delete, we want that the person who has attached the attachment should delete the attachement not anyother person. How to achive this.
    Regards
    Ishu

    Hi, There is no standard report or transaction to get this other than looking at the object through the transaction that creates those attachments, also you can go through SAP OSS note 530792
    Refer below link for creating a report for your requirement
    http://it.toolbox.com/wiki/index.php/GOS_Finding_Attachments_or_Links_to_an_Object_in_SAP/ABAP
    For second requirement it can be handled by Authorization, discuss with your basis guys

Maybe you are looking for

  • When I try to update to Itunes 11 I get an error message saying that Itunes has an invalid signature and wont be installed. I use Windows 7.

    Everytime I try to update to Itunes 11 I get an error message saying that Itunes has an invalid signature and can't be installed?  I have tried to install it two times and get the same message each time. Any solutions to my problem?? Those who have i

  • 3KEH in SAP 6.0 - Note 124363

    We just upgraded our system form 4.7 to 6.0 ECC. One of the functionality to pull profit center from 3KEH during the FB01 Posting is not working correctly. Though maintained properly we get DUMMY porit center in the posting for the GL Account. I saw

  • ITunes COM SDK to sync Audiobook with iOS 5 issue

    My application has been using iTunes COM SDK for Windows to add tracks into iOS devices and it's been working for years. Until the recently released iTunes 10.5 versus iOS 5, the added tracks are missing from the iOS 5 devices (iPhone, iPad, etc.). T

  • "show view options" is gone

    When you right-click on your desktop, or in Finder view menu, isn't it supposed to be a "view options" option? I used to have it but now I don't. Is it possible that I disabled it by accident? If so, how do I turn it back on? Also, the hotkey for vie

  • Is it meant to take this long?

    Okay, I've had to leave my computer on for like 3 days now because I'm imported the entire Dragonball GT series which is 64 episodes each lasting around 20 mins each and before they can be synced onto my iPod they need to be converted and so its just