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]

Similar Messages

  • 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

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

  • RSWUWFML2 - Work item attachment issue

    Dear Friends,
      I have used RSWUWFML2 to send notifications to outlook when a new workitem comes to user's SAP Inbox. The notification is working fine but when the user clicks the attachment in outlook to open the workitem  the SAP GUI is opening in a small window(minimized state). I want that to open in a maximized state. Please let me know if need to do any settings.
    I tried to open the same attachment from SOST but there also it is opening in minimized state.

    I debugged the report RSWUWFML2 and found that  the parameter   i_windowsize passed to the function module swn_create_shortcut is hard coded  "Normal Window". Probably I have to created a custom version of this report to change this parameter to "Maximized".

  • Word Document as Work Item Attachment

    HI All
         Can any body help me , how to pass a word document as attachment to a workitem (Activity Step)
    Thanks in Advance
    Pavan

    Purvesh Thank you  very much for giving me the alternative solution but, can you say me how can i programatically pass the attachment to the workflow
    may be from ABAP to Wrokflow conatiner element (&_ATTACH_OBJECT&)

  • BAPI or FM to retrieve invoice Work item attachment

    Hi Folks, is ther any FM or BAPI to extract the link of attachment using workitem ID of Invoice WF.
    Regards
    TGB

    Closed. Got the answer by self.

  • 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

  • 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

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

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

Maybe you are looking for

  • Post order processing for sales document is not yet complete

    hi, sap gurus, i am facing the error while saving the sales order and this ticket is unique and it is saying that "post order processing for sales document is not yet complete". please help me in this regard. and it is blocking the order for further

  • How to deploy a POJO or a java application in oracle ESB?

    hi, I m beginner in oracle ESB. please someone tell me how to deploy a POJO or a java application in oracle ESB? thank you. Peter.

  • Yosemite Preview Highlighting Problems

    I use Preview all the time for school. It has been working fine on my iMac, but on my MacBook Air I've been having problems since the semester started up again on Monday. I cannot use the right click menu inside of a PDF document to highlight materia

  • Sync BB Calendar with Win 7 calendar

    I have a BB Curve and I am unable to syn the calendar with Win 7 Calendar (Live.MSN I believe)  I can syn with google calendar however I get dozens of the same event on the date of the event and then I have to delete hundreds of events from the BB. 

  • How to get rid of black outline boxes persisting on screen

    Black outline boxes have started appearing around objects and icons that I've clicked on or text areas I've filled in. Sometimes these boxes persist on the screen in its original location until I go to a new program. For example – in PhotoShop, a bla