Attach a doc file to work item

Hi,
We have scenario in which we have to attach a document file to a work item of a workflow. The workflow is triggered by a Function Module (FM). The document file to be attached is place in the file system of the R/3 system. The FM provides the file name to the workflow. Please tell us how to attach a file to a work item?
Also we are triggering the FM from an Enterprised Portal screen, so we cant use any transaction (T codes).
We are trying to implement this using an SOFM object but no success. Please give the solution in detail as Im new to workflows.
Regards,
Piyush.

Hi,
We are triggering the FM from EP screen so no transaction screen would be available.
Alternatively we have done the following:
First we have placed the document file in a folder of the application server. Then an FM reads the file using OPEN DATASET and stores it in an internal table of type binary. Now using SWL__SOFM_CREATE_WITH_TABLE we are generating a key and this key is passed to the SOFM object, which is used to generate container element for attachment. The attachment is visible in the work item but when we try to open the attachment, microsoft word giving the following error:
"the document may be corrupt or damaged. Use either the Recover Text converter or the Open and Repair feature. Both are available from the Open dialog. The Recover Text converter is in the Files of type: drop down and the Open and Repair feature is available from the Open button (select the down arrow and not the button itself)."
We assume that  there is some problem while reading and converting the document file to binary and vise a versa. Is there any other way to keep it consistent and it works fine.
Regards,
Piyush.
ps: the document files are the candidate's resume.

Similar Messages

  • Attach of doc file to website

    Is there anyway to attach my doc file eg: for those job search website need to attach my cv.

    Hi Arghadip,
    Thanks for the reply, but as I said I am new to workflows, please provide me with solution in detail.
    It would be helpful if you can provide me with the code.
    Regards,
    Piyush.

  • How to attach a PDF document to work item .---urgent

    Hi EXperts ,
      I am wanted to know how to attach a PDF document to my work item which i will be geneating . Pls let me the Method coding to be done so that I can send the attachment also when the work item is generated ..
    What is need to pass to Workflow container ...
    Regards
    Abhilash

    Ah ok,
    then the only way I know is to get hold of some one with skills in Smart Forms, and alley up with them. Or better yet, use it as an excuse to learn to do it your self
    With a Smart Form, you can parse data into it, create the file, and then use the GOS functionality to attatch it to your BO. All this in back ground!
    Kind regards
    Mikkel

  • Attaching a .doc file

    I am not new to Mac but this is my first iPad. It is the 1st IPad.
    I am looking for a job online. When looking for a job I need to attach my resume (.doc) to a web page.
    Where I need to attach my resume there is no location showing up on the iPad such as Desktop or Documents for me to choose from.
    Does anyone know how I can do this or an app I can get to do this?
    Any help would be appreciated.

    You can't do it via Safari, but I believe that the iCab Mobile browser supports uploading of some types of file : http://itunes.apple.com/us/app/icab-mobile-web-browser/id308111628?mt=8#

  • Work Item Attachment

    Hi Guru's
    I need to attach a Pdf file to work item.
    Actually I have wrritten a code for converting the Smartform into PDF format but now i need to send this as a mail with workitem attachment.
    for this we need Use SOFM Object but i'm not having clear idea about the sequence process.
    <removed by moderator>
    Please help me to do this
    Advance Thanks
    Edited by: Mike Pokraka on Jul 24, 2008 11:04 AM

    hi maruli
    use this link
    Link:[http://help.sap.com/saphelp_nw70/helpdata/EN/d3/bde438b572b407e10000000a114084/frameset.htm]

  • Will office 11 work with lion and old doc files?

    I updated to Lion and my old office will not work... will office 11 be able to read and use my old office files ...word and excel?

    Office 2011 will work with Lion, old doc files will work with 2011 as long as MS hasn't done something in Office 2011.  I have had no problems with files from as far back as office 2003 with 2011.

  • How can I add a Custom Field in Work Item "Bug" in VisualStudio Online agile MSF Template?

    We are using Visual Studio Online for task and bug tracking. The problem we are facing is that very few fields are available to working with. We need to add custom fields to filter bugs on multiple attributes like OS, Device model, Verified in build etc.
    We do not have local TFS server setup. The support questions i have read, they ask to update XML file for work item but i dont know how and where to get that xml file. Also is there any particular Role needed to access such configuration files?

    hi Zahid
    as already written above currently it is not possible to customize a process template on Visual Studio Online.
    but for your purpose you can use tags to save the attributes.
    see here Visual Studio Online - Work Item Tagging
    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

  • QuickLook does not show Word .doc files.

    In the past two days, QuickLook has stopped showing the contents of older Word documents (.doc or 97-2004). It still works for the current file type, .docx. The icons just show the old "W" and page logo and that's all that comes up in QL. If I save a .doc as a .docx it is fine. Has anyone encountered this problem? I get many, many .doc files from work, which only recently upgraded from Office 2003....

    Before you do this insert your original dvd, then restart holding the c key until the grey apple logo screen appears. When it asks to select language do so. On the next screen select Disk utility from the tools/utilities menu. Select your HD and do a Repair Disk. If errors are indicated and repairs are shown as successful, rerun this until there are no errors indicated. Also do the Repair Permissions option while in this mode.
    After all this restart and see whether all goes well.
    This process will be a lot quicker than a reinstall if it solves the problems.
    Neville

  • Issue with attaching pdf in work item

    Dear Friends,
      I am trying to attach Adobe form output to a work item and send it in for approval. I have converted the Adobe form output to binary format inside the program using function module 'SCMS_XSTRING_TO_BINARY and passed it to the workflow container while starting the workflow and then inside the workflow i used the below code inside a method convert the binary to xstring format and then attach it to the workitem. But when I open the attachment from business workplace I am getting an error that There was an error opening this document, the file is damaged and could not be repaired.
      I tried to debug the method and found that everything seems to be fine, even I checked the Adobe output by sending it as an email attachment and I am able to open the same Adobe form attachment in the email. So I suspect that I am doing something wrong while converting the same(binary to xstring) in the workflow. Please advise what would be wrong with the below code.
    DATA:  wid TYPE swwwihead-wi_id,
                op_len TYPE wsuser-wsuserinstanceno,
               it_solix_tab TYPE solix-line OCCURS 0.
    DATA : zswr_att_header TYPE swr_att_header,
               zswr_att_id     TYPE swr_att_id,
               lo_sofm TYPE swc_object,
               zxstring TYPE xstring.
    swc_get_element container 'WID' wid.
    swc_get_element container 'OP_LEN' op_len.
    swc_get_table container 'IT_SOLIX_TAB' it_solix_tab.
    CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
       EXPORTING
         input_length = op_len
       IMPORTING
         buffer       = zxstring
       TABLES
         binary_tab   = it_solix_tab.
    zswr_att_header-file_type = 'B'.
    zswr_att_header-file_name = 'Attachment.pdf'.
    zswr_att_header-file_extension = 'PDF'.
    zswr_att_header-language = 'EN'.
    BREAK-POINT.
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
       EXPORTING
         workitem_id = wid
         att_header  = zswr_att_header
         att_bin     = zxstring
      IMPORTING
        att_id      = zswr_att_id.
    swc_create_object lo_sofm 'SOFM' zswr_att_id-doc_id.
    swc_set_element container 'SOFM' lo_sofm.

    Hi
    I feel like this part of teh code might be creating a a problem.
    zswr_att_header-file_type = 'B'.
    zswr_att_header-file_name = 'Attachment.pdf'.   "<------ Just give the name of the file , no extension needed as .pdf"
    zswr_att_header-file_extension = 'PDF'.              " <---- Since here you are already specifying the type of file.
    zswr_att_header-language = 'EN'.
    Regards
    Pavan

  • Invalid URL error when displaying Work Item Attached URL Object in UWL

    Hi,
    After upgraded from EP6 to EP7 the user can no longer display the attached URL object of work items in the UWL Inbox.  It works fine in the SAPGUI Inbox so the URL should be okay.  We found below error messages in UWL log file:
    #1.5#0003BA5D298B001E0000030300003A280004314BFE992222#1180102370599#/uwl/ui#sap.com/tcwddispwda#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#C004049#43497#####SAPEngine_Application_Thread[impl:3]_0##0#0#Warning#1#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#Plain###com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=HTTP://apinvoice.d51.lilly.com
    gbip
    gbip.asp?po=invoice=TC630400360USERID=USC076601#
    #1.5#0003BA5D298B001E0000030400003A280004314BFE9986AB#1180102370625#/uwl/ui#sap.com/tcwddispwda#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#C004049#43497#####SAPEngine_Application_Thread[impl:3]_0##0#0#Warning#1#com.sap.netweaver.bc.uwl.ui.control.UWLActionControl#Plain###com.sap.netweaver.bc.uwl.UWLException: Fri May 25 10:12:50 EDT 2007
    (Portal) :com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException:Invalid URL=HTTP://apinvoice.d51.lilly.com
    gbip
    gbip.asp?po=invoice=TC630400360USERID=USC076601#
    Looks like the error is related to the back slashes in the URL but it was working fine in EP6.  We are going to change the back slashes to forward slashes to see it will work.  We would like to know if any SDNer’s can provide some more detail on why this is happening and if there is other solution.  Any hint will be very appreciated.
    Regards,
    Jiannan Che

    Use link attachment or add button action to UWL as possible workaround. It appears that work item text can only be displayed as-is.

  • Attaching a word document to the work item

    Hello Everyone,
                              I want to send an attachment with the work item. My requirement is as follows.
    Iam working on CRM.  The Business Object which Iam using is BUS2000116. In this Activity, there is an attacment tab. Here the user will generate a word document which is populated with the values from the Activity.
    I need to send this word document as an attacment through a work item when status gets changed.
    I can send the work item. But in my BO BUS2000116, the attachment is not being shown. So I can't do any binding to the Container element Attach_objects.
    Please let me know how to achieve this.
    Regards
    Hari

    Use SAP_WAPI_ATTACHMENT_ADD function module.
    or  There is also a step type in 4.6 you can use in the workflow -Generate
    Document from a template. You can create doc template (e.g. using
    MS Word) and insert a placeholders in the text which would at
    generation time be substituted with values from corresponding container
    elements.
    <inappropriate content removed by moderator>
    Thanks
    Yogesh Sharma
    Edited by: Mike Pokraka on Jul 1, 2008 1:34 PM

  • How to transfer GOS attachment to my work item

    Hi Friends,
      I have the following requirement. The user while creating a Appropriation request in tcode IMA1N will create an attachment using Generic Object Services(GOS). once he saves my workflow will trigger and it will go to approval. I need to show the attachment created using GOS in my Work item. How to achieve this. Please advice.

    I have some annotations:
    The object type ARCHIVE is for archived Data Files from the DataArchiving. The object type for ArchiveLink documents is  IMAGE
    The default method is  .Display   to display the document.
    The GOS-Attachment is not a SAP ArchiveLink document. This attachment is stored in SOOD and linked via the GOS-relationship table SRGBTBREL
    The business object, that can be used here is: SOFM
    The object instance needs to be found with a custom self-made background method, to find the correct link and create an object instance.
    After that, this instance can be used as a secondary method in the work item's execution or attached to the ADHOCOBJECTS as already mentioned here.
    Good luck,
       Florin
    P.S.: Similar reply cross-posted to SAP-WUG

  • 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

  • Attach .pdf and .doc files to Reply emails.

    I am desperately trying to figure out how to attach .pdf and .doc files to Reply emails in the Mail app. I have downloaded GoodReader, but when I go into "Manage Files" and choose "Open in...", Mail is not one of the apps listed for me to choose from (only Quickoffice and iBooks are listed, that's it). My Gmail account is pushed to the Mail app, if that's relevant at all.
    I'm hoping to be able to attach documents to Reply emails in the Mail app, but if I have to do it using my web-based email, that's better than nothing. I just really need to be able to attach them to Replies, and not compose a new email from scratch.
    I'd REALLY appreciate any help with this!
    Thanks.

    I thought I might be able to figure out a clever work-around by using cut and paste from a new message but this did not work as expected. I have been using the MobileMe iDisk app to store pdf files and then just mailing out the links.  I believe my cut and paste method would have worked with this, however I've got about a year now to figure out another way to do this if it is not included in Apple's new cloud service. This has actually been a better as I need to worry less about file size and don't need to have the files stored on the device.
    You may want to look into what on-line file storage solutions are out there and if they have the ability to send links to files to colleagues, possibly with password protection.

  • Hi is it possible to attach PDF as a attachment to the work item

    hi is it possible to attach PDF as a attachment to the work item

    Hi!
    Maybe it help's u:
    <a href="http://searchsap.techtarget.com/loginMembersOnly/1,289498,sid21_gci1076071,00.html?NextURL=http%3A//searchsap.techtarget.com/expert/KnowledgebaseAnswer/0%2C289625%2Csid21_gci1076071_tax299365%2C00.html%3Fbucket%3DETA">Attaching a .pdf file to a work item</a>

Maybe you are looking for