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

Similar Messages

  • 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

  • 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

  • Can no longer attach pdf files into email.

    I recently purchased a new computer with Windows 8.1 as the OS.  Seems that I am no longer able to attach PDF files into any email.  Any clues as to what has gone wrong?

    Thanks for the help.  Seems I had a failed Windows update several weeks past I had forgottent about.  Had to do a restore to the prior date to get back to the right configuration.  Did an online session with Mircosoft, reinitiated the update, and it seems as if the issue is resolved.  We were able to re-test attaching and send pdf files. Seems there is still some slight issue with IE, but you appear to be on the right track about focusing on Web Outlook if the problem continues to surface.  Thanks again.

  • How do I "run" an ldt file for Service Contracts?

    Ref. BugNo. 4450150
    How do I “run” an .ldt file for Service Contracts?
    Do I use FNDLOAD and if so is this the way to do it
    FNDLOAD apps/apps_password 0 Y UPLOAD @FND:OKS_TOP/patch/115/import/US/okskfinv.ldt
    Thanks

    See Note:142483.1
    Subject: How to Define the ORACLE_SERVICE_ITEM_FLEXFIELD

  • Hi, I am user iPad and I do not know how can attach a file into email e.g. CV.  Thanks

    Hi,
    I am user iPad and I do not know how can attach a file into email e.g. CV. 
    Thanks

    You attach files within the app that creates the file or within the app that the file is saved. For example you email photos from within  the Photos App itself. Typically there will be an action icon within the app - an arrow icon many times - you tap on that to bring other options like Share - then Email.
    Attachments must be mailed within the apps themselves.

  • 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.

  • 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

  • Upload Attachements(Doc File) into SAPand Read The same in BADI

    Hi All,
    I am Nagesh, and presently working on a BADI(NOTIF_EVENT_POST) for sending emails when a new Notification is created through QM01 Transaction Code, and its working very very fine. But now an additional requirement has come up, where i need to upload an Standard Format Word Document into SAP and then attach this file to the Mail to which the converted PDF Smartform file has been attached and then send both files in single mail to concerned Vendor. So I tried to upload the .Doc file into SAP by using OAER TCode with following Parameters
    Class name              :            PICTURES
    Class type               :            OT
    Object key               :            CAPA.
    I exactly dont know whether this is the right format or not, please help me, if this is possible or not.
    And also I uploaded the same doc file from application server to Presentation Server using Tcode CG3Z, to a ditectory which exists in SAP (Checked in AL11 Tcode). So the nhow to read that complete file to send the same as attachemnts without making any changes .
    Regards,
    Nagesh Kumar.
    Edited by: Nagesh Kumar on Mar 12, 2010 9:39 AM
    Edited by: Nagesh Kumar on Mar 12, 2010 11:32 AM

    Hi All,
    I am Nagesh, and presently working on a BADI(NOTIF_EVENT_POST) for sending emails when a new Notification is created through QM01 Transaction Code, and its working very very fine. But now an additional requirement has come up, where i need to upload an Standard Format Word Document into SAP and then attach this file to the Mail to which the converted PDF Smartform file has been attached and then send both files in single mail to concerned Vendor. So I tried to upload the .Doc file into SAP by using OAER TCode with following Parameters
    Class name              :            PICTURES
    Class type               :            OT
    Object key               :            CAPA.
    I exactly dont know whether this is the right format or not, please help me, if this is possible or not.
    And also I uploaded the same doc file from application server to Presentation Server using Tcode CG3Z, to a ditectory which exists in SAP (Checked in AL11 Tcode). So the nhow to read that complete file to send the same as attachemnts without making any changes .
    Regards,
    Nagesh Kumar.
    Edited by: Nagesh Kumar on Mar 12, 2010 9:39 AM
    Edited by: Nagesh Kumar on Mar 12, 2010 11:32 AM

  • Error in attach PDF file into email

    Hi, currently i have problem in sending out email as i try to go through the <b>Offline Interactive PDF Form Using E-Mail</b> and also <b>Uploading and Downloading Files in Web Dynpro Java</b> and then i manage to get the file that i want to upload into the filedownload UI
    but then the problem is i cannot map the context of the FILEDOWNLOAD UI data source to the attachment email
    which is as below the code
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    messageBodyPart.setDataHandler(new DataHandler(new MemoryDataSource(wdContext.currentContextElement().getPdfSource())));
    messageBodyPart.setFileName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
    messageBodyPart.setHeader("Content-Type","application/pdf");
    multipart.addBodyPart(messageBodyPart);
    message.setContent(multipart);
    Transport.send(message);
    wonder anyone know where is the problem or mistake or anyone has the idea of doing it

    Hi, currently i have problem in sending out email as i try to go through the <b>Offline Interactive PDF Form Using E-Mail</b> and also <b>Uploading and Downloading Files in Web Dynpro Java</b> and then i manage to get the file that i want to upload into the filedownload UI
    but then the problem is i cannot map the context of the FILEDOWNLOAD UI data source to the attachment email
    which is as below the code
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    messageBodyPart.setDataHandler(new DataHandler(new MemoryDataSource(wdContext.currentContextElement().getPdfSource())));
    messageBodyPart.setFileName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
    messageBodyPart.setHeader("Content-Type","application/pdf");
    multipart.addBodyPart(messageBodyPart);
    message.setContent(multipart);
    Transport.send(message);
    wonder anyone know where is the problem or mistake or anyone has the idea of doing it

  • Attaching video file into keynote

    How come some video files are not attaching automatically to my keynote? there are files where it attaches immediately while some won't? The mpeg file is not attaching. Is there something I can do so I don't have to leave my presentation deck?

    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

  • Attach audio file into MS-SQL Database (CRS 7.0.1)

    Hi all,
    I'm trying to insert a record into a MS-SQL Database. After recording step I try to insert a DB Write step in order to insert the record into the database:
    INSERT INTO Table1
                          (VOICE_MSG)
    VALUES     ($voice_msg)
    I've defined the MS-SQL colum as varbinary, however I always get a SQL Error.
    Any ideas?
    Thank you!
    Manel Quesada

    Hello, Manel.
    I'm sorry to see you were not able to find the information or assistance you were looking for here in the Contact Center community forum.
    You may be able to find more help through the Cisco Developer Network.
    Also, you might want to consider engaging Cisco Advanced Services via your account team to assist with UCCX custom scripting.
    Thank you, and good luck.
    -Paulo

  • Can't attach any files into mail from a 4GB hard drive

    I have a sandisk 4GB crusier and when I try to attach files in mail, mail doesn't see the drive. The drive is mounted on my desktop and I can see it in finder. I have to drag files from the HD to my outgoing mail message.
    Could I have a drive that is going?

    I dont think this is a issue with the drive going bad mail isn't seeing it for some reason but thats no indication that the drive is bad...

  • Attachment of file into Business Object.(GOS object)

    Hi,
    I am trying to attach a PDF document for Equipment Number (T-Code IE02) by using the function module
    BDS_BUSINESSDOCUMENT_CREATEF.
    I gave the following inputs
    where OBJECT_KEY is the equipment number for which, I am attaching.
    In the FILES table I mentioned the DIRECTORY and FILENAME as 'test.pdf'.
    After executing, although the file is attached, it is attached as MDB type.Also it dont have the title.
    When I am attaching manually, It takes the original file-type and file name will be created as title.
    It is also updating in the table SRGBTBREL.
    While I am executing from function module, it is not updating in the table also.
    Kindly suggest what went wrong for me.
    Regards
    Danny

    You didn't put the file at the same place.
    --> no user name --> HTTP Content Server
    --> username --> maybe in the database : table SOFFCONT1
    could you check the customizing in the OAM1 trans ?
    regards
    Fred

  • Upload and Attach file to Service Notificacion through Web Dynpro

    Hi,
    I need to upload and attach a file (Word, PDF, TXT ...) to Service Notificacion (TX - IW53) through Web Dynpro.
    I have used the integration component "File Upload" to obtain the "fileName" atribute. Also, I have used the functions SO_OBJECT_UPLOAD, SO_INSERT_OBJECT and BINARY_RELATION_CREATE_COMMIT.
    But have a problem, because the function SO_OBJECT_UPLOAD use the class "cl _ gui _ frontend _ services" and that clash with Web Dynpro.
    My question is: how could I resolve that problem?
    I look forward to your response.
    Thanks

    IV_NAME     Importing     Type     STRING
    IV_CONTENT     Importing     Type     STRING
    IV_CONTENT_HEX     Importing     Type     XSTRING
    IS_LPORB     Importing     Type     SIBFLPORB
    IV_OBJTP     Importing     Type     SO_OBJ_TP
    RT_MESSAGES     Returning     Type     BAPIRETTAB
    method save.
      data ls_message type bapiret2.
      data:
        filename     type string,
        filefullname type string,
        mime_type    type string,
        size         type i,
        offset type i,
        offset_old type i,
        temp_len type i,
        objname type string,
        l_obj_type type so_obj_tp,
        hex_null type x length 1 value '20',
        l_document_title type so_text255,
        file_ext type string,
        lt_objcont type standard table of  solisti1 initial size 6,
        objcont like line of lt_objcont,
        lt_ls_doc_change type standard table of sodocchgi1,
        ls_doc_change like line of lt_ls_doc_change,
        lt_data type soli_tab,
        ls_data type soli,
        lt_xdata type solix_tab,
        ls_xdata type solix,
        l_folder_id type sofdk,
        ls_object_id type soodk,
        l_object_id_fol type so_obj_id,
        l_object_id type so_obj_id,
       l_doc_info TYPE sofolenti1,
        l_object_hd_change type sood1,
        l_tab_size type int4,
        l_retype type breltyp-reltype,
        lt_urltab  type standard table of sood-objdes.
    get foler
    l_folder_id = 'FOL29000000000004'.
      call function 'SO_FOLDER_ROOT_ID_GET'
        exporting
         owner                            = sy-uname
          region                           = 'B'
        importing
          folder_id                        = l_folder_id
       tables
         path_table                       =
      if iv_objtp = gc_type_file.
        size = xstrlen( iv_content_hex ).
    get file name and extension
        call method split_path
          exporting
            iv_path           = iv_name
          importing
         E_PATH           =
           ev_filename       = filename
         E_PSERVER        =
        call method split_file_extension
          exporting
            iv_filename_with_ext = filename
          importing
            ev_filename          = objname
            ev_extension         = file_ext.
        ls_doc_change-obj_name = objname.
        ls_doc_change-obj_descr = objname.
        ls_doc_change-obj_langu = sy-langu.
        ls_doc_change-sensitivty = 'F'.
        ls_doc_change-doc_size = size.
        offset = 0.
        while offset <= size.
          offset_old = offset.
          offset = offset + 255.
          if offset > size.
            temp_len = xstrlen( iv_content_hex+offset_old ).
            clear ls_xdata-line with hex_null in byte mode.
            ls_xdata-line = iv_content_hex+offset_old(temp_len).
          else.
            ls_xdata-line = iv_content_hex+offset_old(255).
          endif.
          append ls_xdata to lt_xdata.
        endwhile.
    set object type relation type and other header info
        l_retype = 'ATTA'.
        l_obj_type = 'EXT'.
        l_object_hd_change-objnam = ls_doc_change-obj_name.
        l_object_hd_change-objdes = ls_doc_change-obj_descr.
        l_object_hd_change-objsns = ls_doc_change-sensitivty.
        l_object_hd_change-objla  = ls_doc_change-obj_langu.
        l_object_hd_change-objlen = ls_doc_change-doc_size.
        l_object_hd_change-file_ext = file_ext.
      prepare header
        data lt_obj_header type standard table of solisti1.
        data ls_header type solisti1.
        concatenate '&SO_FILENAME=' filename into ls_header.
        append ls_header to lt_obj_header.
        clear ls_header.
        ls_header = '&SO_FORMAT=BIN'.
        append ls_header to lt_obj_header.
    change hex data to text data
        call function 'SO_SOLIXTAB_TO_SOLITAB'
          exporting
            ip_solixtab = lt_xdata
          importing
            ep_solitab  = lt_data.
      else.
    for note
        size = strlen( iv_content ).
        objname = iv_name.
        ls_doc_change-obj_descr = objname.
        ls_doc_change-sensitivty = 'O'.
        ls_doc_change-obj_langu  = sy-langu.
    put content into table
        offset = 0.
        if iv_objtp = gc_type_note.
    it's a note
          l_retype = 'NOTE'.
          l_obj_type = 'RAW'.
          l_object_hd_change-file_ext = 'TXT'.
    read note content into table
          while offset <= size.
            offset_old = offset.
            offset = offset + 255.
            if offset > size.
              temp_len = strlen( iv_content+offset_old ).
              clear ls_data-line.
              ls_data-line = iv_content+offset_old(temp_len).
            else.
              ls_data-line = iv_content+offset_old(255).
            endif.
            append ls_data to lt_data.
          endwhile.
    get title from content , if it's initial
          if objname is initial.
            read table lt_data index 1 into l_document_title.
            while l_document_title+49 <> ' '.
              shift l_document_title right.
            endwhile.
            shift l_document_title left deleting leading ' '.
            ls_doc_change-obj_descr = l_document_title.
          endif.
        else.
    it's url (not note)
          l_retype = 'URL'.
          l_obj_type = 'URL'.
          if objname is initial.
            split iv_content at '/' into table lt_urltab.
            describe table lt_urltab lines l_tab_size.
            read table lt_urltab index l_tab_size into ls_doc_change-obj_descr.
          endif.
          while offset <= size.
            offset_old = offset.
            offset = offset + 250.
            if offset > size.
              temp_len = strlen( iv_content+offset_old ).
              clear ls_data-line.
              ls_data-line = iv_content+offset_old(temp_len).
            else.
              ls_data-line = iv_content+offset_old(250).
            endif.
            concatenate '&KEY&' ls_data-line into ls_data-line.
            append ls_data to lt_data.
          endwhile.
        endif.
        ls_doc_change-doc_size = size.
       l_object_hd_change-objnam = ls_doc_change-obj_name.
        l_object_hd_change-objdes = ls_doc_change-obj_descr.
        l_object_hd_change-objsns = ls_doc_change-sensitivty.
        l_object_hd_change-objla  = ls_doc_change-obj_langu.
        l_object_hd_change-objlen = ls_doc_change-doc_size.
      endif.
    save object
      call function 'SO_OBJECT_INSERT'
           exporting
                folder_id                  = l_folder_id
               OBJECT_FL_CHANGE           = OBJECT_FL_CHANGE
                object_hd_change           = l_object_hd_change
                object_type                = l_obj_type
               ORIGINATOR_ID              = OWNER_ID
              OWNER                      = USER-USRNAM
           importing
               OBJECT_FL_DISPLAY          = OBJECT_FL_DISPLAY
               OBJECT_HD_DISPLAY          = OBJECT_HD_DISPLAY
                object_id                  = ls_object_id   "l_doc_info-object_id
           tables
                objcont                    = lt_data
                objhead                    = lt_obj_header
               OBJPARA                    = OBJECT_PARA
               OBJPARB                    = OBJECT_PARB
           exceptions
                component_not_available    = 01
                folder_not_exist           = 06
                folder_no_authorization    = 05
                object_type_not_exist      = 17
                operation_no_authorization = 21
                parameter_error            = 23
                others                     = 1000.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into ls_message-message.
        ls_message-type = sy-msgty.
        ls_message-id = sy-msgid.
        ls_message-number = sy-msgno.
        ls_message-message_v1 = sy-msgv1.
        ls_message-message_v2 = sy-msgv2.
        ls_message-message_v3 = sy-msgv3.
        ls_message-message_v4 = sy-msgv4.
        append ls_message to rt_messages.
        return.
      endif.
    create relation
      data l_obj_rolea type borident.
      data l_obj_roleb type borident.
    MOVE-CORRESPONDING wd_this->ms_lporb to l_obj_rolea.
      l_obj_rolea-objkey = is_lporb-instid.
      l_obj_rolea-objtype = is_lporb-typeid.
      l_obj_rolea-logsys = is_lporb-catid.
      l_object_id_fol  = l_folder_id.
      l_object_id = ls_object_id.
      concatenate l_object_id_fol l_object_id into l_obj_roleb-objkey respecting blanks.
      l_obj_roleb-objtype = 'MESSAGE'.
      clear l_obj_roleb-logsys.
      call function 'BINARY_RELATION_CREATE'
        exporting
          obj_rolea    = l_obj_rolea
          obj_roleb    = l_obj_roleb
          relationtype = l_retype
        exceptions
          others       = 1.
      if sy-subrc = 0.
        commit work and wait.
       wd_this->MV_UPDATE_FLAG = 'X'.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into ls_message-message.
        ls_message-type = sy-msgty.
        ls_message-id = sy-msgid.
        ls_message-number = sy-msgno.
        ls_message-message_v1 = sy-msgv1.
        ls_message-message_v2 = sy-msgv2.
        ls_message-message_v3 = sy-msgv3.
        ls_message-message_v4 = sy-msgv4.
        append ls_message to rt_messages.
        return.
      endif.
    endmethod.
    Edited by: Reyleene Hunt on May 26, 2009 10:05 AM

Maybe you are looking for

  • Searching Ipad for photos by file name

    Why can't I find photos in my Ipad search? (I have an Ipad 2.) When I search for something, it will find everything BUT photos. As it is, it takes forever to find whatever specific photo I want to look at, because I have to scroll and scroll and scro

  • An unknown error occurred (-50) while uploading my library from a disc.

    I seriously need some help here. I recently wiped my computer and reinstalled everything. I have a PC with Windows XP Pro. I made sure that I backed up my entire iTunes library on DVD-RW's. My entire Libray is on five of these. Disc one and two works

  • Anyone can HELP

    Why I connect the oracle database by using java coding and I run it sometimes can but sometimes cannot and showed the following error : D:\KLTAY\JAVA>java CreateCoffees SQLException: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HAN

  • Error message (-3256) appears when connecting to remote speaker

    An error occured when connecting to remote speaker. An unknown error occured (-3256). ANy help would be most appreciated. Thank you.

  • Importing of material revaluation using DTW problem

    Hello, I tried to import a material revaluation using DTW because i want to make amendment in cost price so i use the 2 templates (material revaluation & material Revaluation_lines). Uploading was successful because i received this message "75oMateri