Attaching an attachment to Work item

Hi all,
I have req where I need to attach an attachment to the work item , I need to develop an FM which will do this .So could you please help me out ?
This is on very high priority so Correct ans would be definately rewarded.
Thanks .

hi
good
go through the following link
/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background
u will get an clear idea of how to attach PDF as a attachment to the work item
or
you want to manually attach a file.. in the task you can check the "Confirm end of processing" option.
By doing this the agent executing the task has an option to attach a file on completing the task/workitem so that the next agent gets a work item with or without an attachment.
Alternatively - Create a task using object type SOFM, import the attachment (method : Import File) .Pass this attachemnt to your workitem through binding: Workflow Container element is AttachObjects.
Also refer : Re: Attachments in Send Mail step.
reward point if helpful.
thanks
mrutyun^

Similar Messages

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

  • 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

  • Couldn't open attachment of a work item in the business  work plance

    Dear Friend,
    Any body so kind to help me resolve the following issue.
    One of our user not open the attachment(Puchase order rejection reason) of a perticular work item in his business workplace(swap). However another user can able to open the attachment for the same work item.
    For your kind information, both of the user have same authorization.
    Regards,
    sp sahu

    Hi All,
    Thanks you all for your kind reply.
    However I am not yet find the solution the the above issue.
    I noticed that the user can able to open the attachment like ALI (ABAP list document). However user not able to open the attachment with class RAW (SAP editor document).
    Any body so kind to reply for this post.
    Your effort should be highly appreciated.
    Regards,
    sp sahu

  • Problems opening attachments in work-item

    Good day all,
    I'm having an issue currently within the SAP Inbox, it's regarding file attachments inside the work-items.
    The problem is that for some reason that I don't know, the files are correctly uploaded to the the work-item but afterwards I cannot access to them correctly. Not even to a simply comment (using the RAW format type). When you click on the attachment link, nothing happens.
    I have tried setting the option "(Double)-clicking on an object displays the Object in the same window" in the User Settings, but the file that opens is not the right one, it usually open an older attached file from other work-item or so. It's very strange...
    The thing is that I've tested in another computer and it works fine there "without" enabling the setting I mentioned. So when I try without enabling this setting, nothing happes, no file is open, no attached comment either...
    I've discarded that it's an autorization issue, and also is not the SAP GUI (710).
    Have you experienced the same problem? or any input on this to solve it or what could be happening?
    Your help would be much appreciated.
    Thanks. I'll be waiting for your comments..

    For attachements, if you have used SELFITEM-NOTE_CREATE and you are using more than 6.40.
    Apply OSS Notes 1115440, 1092152 accordingly and it must work.
    Let me know for any more clarifications.
    Thanks,
    Sudhir.

  • Problem with executing work item from the inbox

    Hello All,
       I'm able to send mails from R/3 to Outlook along with the attachment to execute the work item directly from the outlook.
    However upon clicking the Exectute work Item.sap file I get an sap gui popup with the description " Not all data for SAP  GUI shortcut is available. System description and GUI start parameter are unknown. Entering the missing data."
    Clicking on the OK button, leads to another window for SAP logon details. After I chose the right system and on Clicking OK, it opens up the logon prompt. Entering the logo info opens up the work item correctly.
    We are on ECC 5.0 with SAP GUI 640 patch level 18 on it. Any suggestions about what am I missing to directly jump into an sap screen provided a session already is open in SAP.
    Thanks and Regards
    Uday

    Hello Uday,
    Sounds like something is wrong in the SAPLogon <i>on the client PC</i>. The system sends out a shortcut, and when it's opened it does not relate to a unique entry in the saplogon. Either it's called differently or you have two entries for the same system with different parameters.
    Hope that helps,
    Mike

  • Work item 000000400082: Object FLOWITEM method EXECUTE cannot be executed?

    Hello,
    I am getting the above mentioned error during the start of the custom built workflow.
    The process to re-produce the error is as follows;
    1. The employee raises a travel request which goes to his reporting officer for the approval process.
    2. The custom workflow built uses the business object BUS2089 for triggering. The event used in the case is REQUESTCREATED of BUS2089. In binding of the workflow template, I have taken _EVT_OBJECT and _EVT_CREATOR as input parameters to my workflow container elements.
    3. Once the workflow is triggered a background step is processed by which a PDF document of the employee travel details are fetched and attached to the respective work item ID. This attachment is done using a standard task and a Z-customized Object type and method.
    4. Once the attachment is added, the next step forwards the attachment to the reporting officer of the employee for the approval process which is a dialog decision step, either approve or reject.(Agent Assignment is working fine. Tested in PFAC using the simulation mode for the employee code)
    Now the issues in DEV system are as follows;
    1. when the employee raises the request, the workflow throws the error at the start of the workflow, however the start event is received.
    2. The PDF document is not getting attached in the background step, but the same Z-customized object type is working fine in QA and PRD
    3. The work item number 400082, as mentioned above for which the error is coming is the work item of the start of the workflow.
    4. Also, I am getting error : Error when processing node '0000000021' (ParForEach index 000000). This node number is the node of the dialog decision, either approve or reject.
    I have double checked the binding between workflow container->task container->method parameters and vice versa. I dont see any change. I have attached necessary screen shots of step history and graphical log.
    Kindly advice.
    Thanks & Regards
    Rao Chinmay AN

    Hello Ronen, Rick, Modak
    Thank You for your timely response.
    Rick/Ronen,
    As mentioned by you, when i checked the step history in detail of the error step, it clearly stated that the error is in agent determination. I have attached the necessary screenshot.
    I did a background check myself on rule - 90100002 which is again the customized one. I simulated it under transaction PFAC and entered the employee code for which i am running the test. It says agent has been determined and the employee code of his reporting officer is displayed.
    I checked the binding of the same from the workflow to the rule container. It is fine. I have attached the screenshot of the same.
    And Rick,
    I have checked the Agent Assignment of the User Decision Task. I have gone to PFTC, entered the task number. Menu bar- Additional Data->Agent Assignment->Display.
    It Says:    General task: can be edited by all users.
    So i Suppose it is the general Task.
    Kindly advice.
    Thanks,
    Chinmay.

  • 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

  • How to get the image stored in archieve link as an attachment in work item.

    Hi All,
    through transaction OAWD we are storing scanned images.
    Once this transaction is executed a workitem appears in the inbox of the initiator with the scanned invoice as attachment.
    When the user executes the work item FV60 screen is displayed where the user enters the data based on the scanned invoice attachment.
    After the user Parks the document the custom workflow triggers and a workitem appears in the inbox of an approver.
    Our requirement is that the scanned image should also appear as the attachment.
    Can you please suggest how to get the image stored in archieve link as an attachment in work item.
    Regards
    Shraddha

    Hi Martin,
    with every parked document a scanned image is linked.
    I need to create a link under objects and attachments in the work item, such that when the user clicks that link the image is displayed.
    At present the following functionality is available.
    The BO used is FIPP
    Objects and attachments:
    parkeddocument:AK0108500001252008.(via FIPP binding with WIOBJECT_ID)
    On clicking the link below objects and attachments: the parked document AK0108500001252008 opens in display mode.
    Now we want to have 2 links:
    parkeddocument:AK0108500001252008.
    image.
    When we click on the link image then the scanned invoice linked to the document should get opened.
    I am able to get the image id of the the image through  SAP_WAPI_GET__OBJECTS,
    export parameter leading_object provides the detail.
    But I am not able to figure out how to use it in my workflow to display it as an attachment.
    Hope this will give a better understanding of my question.
    can you please suggest as to how I should proceed with it.

  • Convert XSTRING to PDF Format and Send it as an attachment with work-item

    I have an Adobe Form data available in the ECC system in XSTRING format. In one of my ABAP methods (used by a custom workflow task), i want to convert the XSTRING data in PDF format and send it as an attachment with a work-item. How best can this be done?
    Appreciate any ideas,
    Saurabh

    Hi Saurabh,
    if u want to download pdf which is in xstring format to u r local system
    u can try the following code.
    data: data_tab type table of x255.
    call function 'SCMS_XSTRING_TO_BINARY'
    exporting
    buffer = XString data
    tables
    binary_tab = data_tab.
    cl_gui_frontend_services=>gui_download(
    exporting
    filename = filename
    filetype = 'BIN'
    changing
    data_tab = data_tab ).
    cl_gui_frontend_services=>execute(
    exporting
    document = filename ).
    Regards,
    Chandru

  • 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

  • Smartform as work item attachment

    Hi,
    I would like to have a smartform as an attachment in the work item. This is as part of User Decision step.
    I had gone through one of the blogs  by Ramakanth Reddy of creating attachment to work item but there was no clear description of SOFM object and what needs to be done to configure the same. Also it was a Adobe form...I need details as to how a smartform needs to be attached.
    Could you help me out as to how to attach a smartform as an attachment in the work item.
    There is a Z report in which the code to generate the smartform is written. I need to know how I can use this smartform as a work item attachment.
    Thanks in advance for all the help.

    Hi,
    I have checked the same and everything seems to be in order.
    Lemme explain what I have done and maybe u mite throw some light on it.
    I have created a new task. In this task I have called the report program that generates the smartform.
    Submit Z_tr_form with pernr = object-key-employeenum
                                         reinr  = object-key-tripnumber
                                and return.
    Inside this report, I have done the following :
    IMPORTING
          document_output_info = st_document_output_info
          job_output_info      = gt_otfdata
    i_otf[] = gt_otfdata-otfdata[].
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = v_len_in
            bin_file              = v_file
          TABLES
            otf                   = i_otf
            lines                 = i_tline
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            OTHERS                = 4.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = v_file
    *     APPEND_TO_TABLE       = ' '
       IMPORTING
         OUTPUT_LENGTH         = ZVAR1
        TABLES
          BINARY_TAB            = it_solix_tab
    if sy-subrc = 0 and not it_solix_tab[] is initial.
                swc_set_table container 'IT_SOLIX_TAB' IT_SOLIX_TAB.
                swc_set_element container 'ZVAR1' zvar1.
                swc_set_element container 'ZTR_MGNT' obj.
                export ZVAR1 to memory id 'ZVAR'.
    CALL FUNCTION 'SWW_WI_START_SIMPLE'
        EXPORTING
    TASK                               = 'WS12500022'
    TABLES
          AGENTS                             = it_agents
    WI_CONTAINER                       = container
    Now after the submit statement I am importing the value  of ZVAR1.
    swc_get_table container 'IT_SOLIX_TAB' IT_SOLIX_TAB.
    swc_get_element container 'WORKITEMID' WORKITEMID.
    swc_get_element container 'ZVAR1' ZVAR1.
    CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
    EXPORTING
    INPUT_LENGTH       = ZVAR1
    IMPORTING
    BUFFER             = ZXSTRING
    TABLES
    BINARY_TAB         = IT_SOLIX_TAB.
    ZSWR_ATT_HEADER-FILE_TYPE = 'B'.
    ZSWR_ATT_HEADER-FILE_NAME = 'TRIPDET'.
    ZSWR_ATT_HEADER-FILE_EXTENSION = 'PDF'.
    ZSWR_ATT_HEADER-LANGUAGE = 'EN'.
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
    EXPORTING
    WORKITEM_ID          = WORKITEMID
    ATT_HEADER           = ZSWR_ATT_HEADER
    ATT_BIN              = ZXSTRING
    IMPORTING
    ATT_ID               = ZSWR_ATT_ID
    swc_create_object lwa_bo_sofm 'SOFM' zswr_att_id-doc_id.
    swc_set_element container 'SOFM' lwa_bo_sofm.
    After this step in the workflow we have the User Decision. The binding from the WF container to the User decision as mentioned in Ramakanth's article has also been done.
    I am not able to see the PDF output in the container also.
    I have a question.....in the article that Ramakanth had given, the report program to generate the adobe form was run separately. In my case I am calling the same inside the task. Is that causing a hinderance as such....I am not able to figure out as to why I am unable to get the attachment.
    Lemme know ur comments.
    Thanks in advance for all the help.
    All the bindings are also in place. I checked with the document that Ramakanth had written and checked all the bindings

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

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

  • Attachment to work item

    Hi,
    How do you send an attachment to a work item, at the time when the work item is created in the inbox

    anybody has worked on such a requirement?

Maybe you are looking for

  • Problem with iCloud and storage

    I have 13GB of 15GB available on iCloud and I back up my phone constantly, my phone still says I have no storage left on the device it self. I've had this problem on my iPad before, I bought more storage and still nothing was resolved. How do I creat

  • IPhone 4s bluetooth wont work with car

    My Blackberry bold and iPhone 4 were absolutely fine with 3 different cars. I have just upgraded to the iPhone 4s and now the phone connects to the bluetooth but doesnt work properly. It rings and the screen shows that there is a call there, it even

  • Using FCPX as a music editor

    Does anyone know if I can use FCPX to pull in an iTunes song and add beeps or similar for a workout track and share/export as an iTunes file again. Also looking to blend two songs together. Very basic stuff I know but free software is just useless. T

  • Customer Groups and Customer Credit Groups

    Hello   I was going through the documentation for Credit Management, but I was confused on what the difference was between customer groups and customer CREDIT Groups.. both of them sort of have the same definition, then what is the difference ? Pleas

  • Automatically logged out from SQL tool on update queries

    This is a local instance configuration issue. Our current setup has the unfortunate feature that whenever you attempt to run an "update" statement in the SQL query tool, you get automatically logged out. I was guessing that it's a permissions issue ,