Attachment to workitem

Hi,
I need to attach a document to user decision step and i have converted the document to Xstring and generated the SOFM instance. Now i am binding this SOFM instance to "_ATTACH_OBJETCS" of UD step. I am getting the attachment link in UD but when i click the attachment, an information message comes "Operation could not be carried out" and not able to open the attachment.
Let me know what is the problem.
Regards,
Vinoth

Hi,
Thank you for your reply Vijay. I checked in SWIA, its not opening. I found the problem. It is because i am not giving the file type to SAP_WAPI_ATTACHMENT_ADD FM. After giving the file type, the attachment is opening.
One more issue, How to convert the PDF file to string or binary format. So i can put in the container while calling the FM- EWW_WORKFLOW_START. Currently i am using Text file but user will upload PDF file also. I am not using Web dynpro ABAP. Its pure ABAP.
Regards,
Vinoth

Similar Messages

  • Creating Attachment in Workitem

    Hi All,
    Kindly read the whole scenario and reply me ....
       I want to create a attachment in the Workitem.
    I am Using BUS2105 - Purchase Requisitions.
    At  -- Release Step Created Event... I am triggering my workflow and sending the workitem to SAP Inbox of User....
    My requirement is to create the attachment in WorkItem right side.
    Kindly help me, Searched a lot in sdn but could not get the solution.
    Thanks.
    Uday.

    Hi,
    Step-1
    Go to the Start Event
    Step-2
    Do the Binding as shown below
    Step-3
    In the Activity Step of the workflow template,go to the Control Tab and do the Binding as show below
    This Object instance link will be available in 'Objects and Attachments '.
    If user clicks on that link PR will be displayed.
    Thanks n Regds
    Pksurya

  • How to get the mime type of the workflow attachment attached to workitem id

    Hi Experts,
    I can attach different types of attachment to the workitem id, lets suppost the attachment type attached is pdf, for this attachment I have an requirement to send the mime type as well. In this case the mime type is 'application/pdf' for pdf files.(for text file it is 'text/plain' and for zip file it is 'application/zip' and so on)
    Do I have any place in ABAP world where I can get the mime type for different types of attachments.
    I dont want to hard code the mime types, and I have checked the transaction 'SMW0', but not sure if this is the correct place to get the mime type.
    Do you see any other way or tables which stores all these mime types.
    Any help/suggestion would be appreciated.
    Thanks and Regards,
    Neerup.

    Hello,
    Perhaps this can help:
    http://help.sap.com/saphelp_nw04/helpdata/en/ad/ebe5cc1d75aa43a2871717d76f475d/content.htm
    If you want to know the table name, turn on tracing (ST05) when accessing the MIME types.
    regards
    Rick Bakker
    Hanabi Technology

  • Create attachment to workitem

    Hi All,
    Can any one point me to FM's to create an attachment to a workitem so can be used to display the attachment in the subsequent steps.
    I am confused with the SAPI_WAPI* ones and SO_ATTACHMENT_INSERT. Which one would be the right ones.
    I just need a text attachment of type RAW.
    Thanks,
    Chandran

    Hi,
    Thanks
    It Worked but I have four diffrent lines of information and this way it takes all in one line and dumps into the FM.
    How can I put these as separate lines like when we create a note through GUI.
    Regards,
    Chandran

  • Attachment with workitem

    Hi,
      Is it possible to display an attachment in the SAP-Inbox along with work item. Please give some inputs.
    Thanks,
    Lakshmi.

    Hi,
    I am working on FI AP approval workflow and I am using the business object FIPP.
    The image of the invoice is linked with the bsiness object IMAGE.
    Please tell me how to forward the image of the invoice with the Workitem to the approver?
    Regards,
    Ashu Arora

  • Add attachment to workitem in the outbox

    hi experts,
    does anybody know if it´s possible to add an attachment to a workitem in the OUTBOX=> "workitems executed by me"?
    Nez

    I think you might add attachment to the Main workitem or TOP WI_ID provided it is not completed.
    I think once it gets completed you are not allowed to change container element which includes addition of attachment.
    Thanks
    Arghadip

  • Forward mail with attachment (not WorkItem) from SBWP to Outlook

    Hallo,
    we want to forward mails (not WorkItems) form SBWP to Outlook.
    The forwarding works fine for the mail but if the mail includes an attachment from type object  (e.g. send object with note in MM03) we are not able to open the object in the mail. We want to open the object so that automatically SAP GUI is started and the corresponding object is shown in SAP.
    In SBWP we are able to open the attachment in Outlook not. Are there any settings in SAP where we can define that.
    Have we to define something parameters of the Integrated ITS?
    We want the same behaviour for mails with attachments as for WorkItems if they are forwarded to Outlook.
    We get an HTML mail in Outlook like
    If you are not forwarded automatically, use the following link:
    If the link is not to a valid server, log on to the SAP system and check the following object:
    System: XYZ 
    Client: 300 
    BOR Object Type BUS1001006 
    BOR Object Key 0000700075 
    But there is no link to follow in the mail and nothing happens.
    Thanks
    Edited by: Arnfried Doetsch on Sep 29, 2010 10:28 AM

    Hello,
    Check if your SMTP node in transaction SCOT is configured to send attachments of all types.
    Have a look at the following link:
    http://help.sap.com/saphelp_47x200/helpdata/en/08/e043c4c18711d2a27b00a0c943858e/frameset.htm
    Regards,
    Siddhesh

  • How to use send attachment with workitem?

    Hi,
    I am invlolved in creation of workflow for Trip request.
    Whenever the request is rejected, I am using the CREATE method of SOFM business object to create a document for entering the rejection reason. I want this document to be sent as attachment along with next step of the workflow which is sent to the initiator to make changes in the request.
    I am able to create the document. But i am not able to see the document anywhere. Plz help me in this regard.
    Thanks in advance,
    Sivagami

    Therez a standard method which will pop up a window to enter text and save. This will go as attachment to the next step.

  • Maximize window in executable attachment + complete workitem automatically

    Hi!
    Workflow for purchase requisition release is created as copy of standard workflow WS00000038 and everything works OK.
    We are using program RSWUWFML2 to send work tasks to users.
    In step considering Release Requisition TS00007986 we are sending executable work item to managers. That shortcut have windows size Normal Window.
    How we can set that executable item has windows size Maximized through RSWUWFML2?
    Steps TS00008014 and TS00008018 that informs users that requisition is approved or rejected are send to users also. (Step send mail is not option as we don't want to forward all items to users). Problem is that sometimes users don't execute that info workitem so they are not closed.
    Is there any job we can schedule to automatically complete that tasks or we can setup in task something to do that? (Let say if task is not executed 24h we can close it).
    I know that with SWIA we can execute tasks but that requires manual work every time.
    Best Regards,
    Nenad

    Hi Nanad,
    You can set the deadline monitoring for your Task.
    Set the latest end - 1 day for the task. Then in the latest end outcome you can use the process control step to kill the work item.
    So if the manager didnt take action for a day, the deadline is triggered and the work item will be completed automatically.
    Thanks,
    Viji.

  • Excel Attachment - in workitem itself

    Hi All,
    My Busniess need..
    1. FI People use fill upload the Excel Document in business workplace - Through Atach Icon and click continue button.
    2. After Clicking continue Button it will go the Manager with excel sheet and Manager can open the Excel Document and edit some of the columns and save the docuemnt and click continue button .. and it will go to Manager supervisor for Approval along with the updated Excel document..
    3. Supervisor can edit the document and approve the same...
    please let me know how i can acheive this scenario.. please let me know whether it is possible in Worklfow..
    Thanks,
    Ram

    I think you can use Document from Template step. This will help you to define the process you want.
    Thanks
    Arghadip

  • Content in .txt attachment

    Hello Everyone,
    I need to send some internal table data to the user decision as an attachment in TEXT format(.TXT). The attachment should consist of header, body (itab data in tab format) and a footer.
    Presently i am able to send the mail with attachment, but the data in the notepad is not coming in a correct format.The data has been messed up and randomly distributed....Could any one suggest me how to convert internal table data to text file format..
    Can anybody refer me some sample examples of it...
    Thanks in advance,
    Sangeeta

    Report ZFILE_APPSERVER is used to upload the file & to trigger the workflow. BO "ZFS1" is the customized business.
    Method "attachdoc" is created for attachment to workitem.
    REPORT  ZFILE_APPSERVER.
    *INCLUDE <CNTAIN>.
    INCLUDE <CNTN01>.
    DATA: BEGIN OF l_filedata OCCURS 0,
            text(200) TYPE c,
          END OF l_filedata.
    DATA: BEGIN OF l_readdata OCCURS 0,
            text(200)    TYPE c,
          END OF l_readdata.
    DATA: L_READDATA1 TYPE ZFILE_DATA1 with header line.
    DATA: BEGIN OF l_read_bin OCCURS 0,
            buffer type xstring,
          END OF l_read_bin.
    DATA: LENG TYPE I,
          ZVAR1 TYPE I VALUE 0.
    DATA:  v_filepath     type rlgrap-filename VALUE '/usr/iffsap/data/test/workflow/new.txt'.
    DATA myref    TYPE REF TO CX_SY_FILE_OPEN_MODE.
    DATA err_text TYPE string.
    DATA: OBJECT TYPE swc_object,
          OBJKEY TYPE SWR_STRUCT-OBJECT_KEY,
          IT_AGENTS TYPE SWHACTOR OCCURS 0,
          GV_INITIATOR LIKE SWWWIHEAD-WI_CREATOR.
    SWC_CONTAINER CONTAINER.             "Declaration
    SWC_CREATE_CONTAINER CONTAINER.      "Initialization
    SWC_CREATE_OBJECT OBJECT 'ZFBS1' 'ZUNAME'.
    DATA: BEGIN OF CONTAINER OCCURS 0.
         INCLUDE STRUCTURE SWCONT.
    DATA: END OF CONTAINER.
    SELECT-OPTIONS / PARAMETERS                                          *
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS: p_file  LIKE rlgrap-filename
                        DEFAULT 'd:\data'.
    SELECTION-SCREEN END OF BLOCK blk1.
    AT SELECTION-SCREEN                                                  *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name = p_file.
    START-OF-SELECTION.
    Perform file_upload.
    try.
    OPEN DATASET V_FILEPATH FOR output IN TEXT MODE ENCODING DEFAULT.
    CATCH cx_sy_file_open_mode INTO myref.
          err_text = myref->get_text( ).
    ENDTRY.
    if sy-subrc = 0.
    Loop at l_filedata.
    TRANSFER L_FILEDATA TO V_FILEPATH.
    endloop.
    endif.
    CLOSE DATASET V_FILEPATH.
    if sy-subrc = 0.
    write: 'File uploaded successfully'.
    endif.
    OPEN DATASET V_FILEPATH FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    *OPEN DATASET V_FILEPATH FOR INPUT IN BINARY MODE.
    DO.
    READ DATASET V_FILEPATH INTO l_readdata LENGTH LENG.
      append l_readdata.
    ZVAR1 = ZVAR1 + LENG.
    WRITE: ZVAR1.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    ENDDO.
    CLOSE DATASET V_FILEPATH.
    IF SY-SUBRC = 0 AND NOT L_READDATA[] IS INITIAL.
    SWC_SET_TABLE CONTAINER 'L_READDATA' L_READDATA.
    SWC_SET_ELEMENT CONTAINER 'ZVAR1' ZVAR1.
    SWC_SET_ELEMENT CONTAINER 'ZFBS1' OBJECT.
    GV_INITIATOR = SY-UNAME.
    CALL FUNCTION 'SWW_WI_START_SIMPLE'
      EXPORTING
       CREATOR                             = GV_INITIATOR
      PRIORITY                           = SWFCO_NO_PRIO
        TASK                               = 'WS90600147'
       CALLED_IN_BACKGROUND                = 'X'
      DEADLINE_DATA                      = ' '
      NO_DEADLINE_PARAMETERS             = ' '
    IMPORTING
      WI_ID                              =
      WI_HEADER                          =
      RETURN                             =
      WI_RESULT                          =
      SWF_RETURN                         =
      TABLES
        AGENTS                             = IT_AGENTS
      DEADLINE_AGENTS                    =
      DESIRED_END_AGENTS                 =
      LATEST_START_AGENTS                =
      EXCLUDED_AGENTS                    =
      NOTIFICATION_AGENTS                =
      SECONDARY_METHODS                  =
       WI_CONTAINER                        = CONTAINER.
    CHANGING
      WI_CONTAINER_HANDLE                =
    EXCEPTIONS
      ID_NOT_CREATED                     = 1
      READ_FAILED                        = 2
      IMMEDIATE_START_NOT_POSSIBLE       = 3
      EXECUTION_FAILED                   = 4
      INVALID_STATUS                     = 5
      OTHERS                             = 6
    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.
    ENDIF.
    FORM file_upload .
      DATA: l_filename TYPE string.
      l_filename := p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = l_filename
         has_field_separator     = ' '
         has_field_separator     = 'X'  "file is TAB delimited
        TABLES
          data_tab                = l_filedata.
       EXCEPTIONS
    ENDFORM.                    " file_upload
    BEGIN_METHOD ATTACHDOC CHANGING CONTAINER.
    DATA: L_READDATA TYPE ZFILE_DATA1 with header line,
          ZSWR_ATT_ID LIKE SWR_ATT_ID,
          ZSWR_ATT_HEADER TYPE SWR_ATT_HEADER,
          WORKITEMID LIKE SWR_STRUCT-WORKITEMID,
          ZXSTRING TYPE XSTRING,
          ZSTRING TYPE STRING,
          ZVAR1 TYPE I,
          ZLEN TYPE I,
          SOFM TYPE SWC_OBJECT.
    SWC_GET_TABLE CONTAINER 'L_READDATA' L_READDATA[].
    SWC_GET_ELEMENT CONTAINER 'WORKITEMID' WORKITEMID.
    SWC_GET_ELEMENT CONTAINER 'ZVAR1' ZVAR1.
    CALL FUNCTION 'SCMS_BINARY_TO_STRING'
      EXPORTING
        INPUT_LENGTH        = 9000
        FIRST_LINE          = 0
        LAST_LINE           = 6
      MIMETYPE            = ' '
      ENCODING            =
      IMPORTING
        TEXT_BUFFER         = ZSTRING
      OUTPUT_LENGTH       =
      TABLES
        BINARY_TAB          = l_readdata
    EXCEPTIONS
      FAILED              = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBE
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3
    ENDIF.
    TO FILL THE HEARDER CONTENTS
    ZSWR_ATT_HEADER-FILE_TYPE = 'T'.
    ZSWR_ATT_HEADER-FILE_NAME = 'ACCRUAL'.
    ZSWR_ATT_HEADER-FILE_EXTENSION = 'EXC'.
    ZSWR_ATT_HEADER-LANGUAGE = 'EN'.
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
      EXPORTING
        WORKITEM_ID          = WORKITEMID
        ATT_HEADER           = ZSWR_ATT_HEADER
       ATT_TXT              = ZSTRING
      ATT_BIN              = ZXSTRING
      DOCUMENT_OWNER       = SY-UNAME
      LANGUAGE             = SY-LANGU
      DO_COMMIT            = 'X'
      IMPORTING
      RETURN_CODE          =
        ATT_ID               = ZSWR_ATT_ID
    TABLES
      MESSAGE_LINES        =
      MESSAGE_STRUCT       =
    SWC_SET_ELEMENT CONTAINER 'ZSWR_ATT_ID' ZSWR_ATT_ID.
    SWC_SET_ELEMENT CONTAINER 'SOFM' ZSWR_ATT_ID-DOC_ID.
    END_METHOD.
    Thanks & Regards,
    Sangeeta
    Edited by: sangeeta tahiliani on Dec 1, 2009 1:27 PM

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

  • Webdynpro abap application attached to SWFVISU is tested from se80

    hi,
    when webdynpro ABAP application is attached to workitem in SWFVISU the the workitem id is passed via url when calling the application. (though the url seen in the application in se80 in the webdynrpo abap component does not have workitem id paramter)
    [link1|http://forums.sdn.sap.com/thread.jspa?threadID=1209159]
    [link2|http://forums.sdn.sap.com/thread.jspa?threadID=226957]
    [link3|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f4843e-314f-2a10-2a88-8c4afa20dda6?QuickLink=index&overridelayout=true]
    I am running this application from se80 - application - right click - test. (this is required to troubleshoot one of the issues.)
    at this time it does not ask for workitem id and directly runs the application . It picks the same workitem id everytime. I tried doing this with a couple of different user ids. but I cant figure out from where it picks this particular workitem id. the status of this workitem is complete in the system.
    thanks
    bhakti

    Hi-
    (though the url seen in the application in se80 in the webdynrpo abap component does not have workitem id paramter)
    It is required to have a parameter WI_ID (as an Application parameter) in your WDA. And via this Application parameter WDA will receive the workitem id, when the task is exceuted from UWL (provided configuration is done in swfvisu)
    Could you confirm, there is no Application parameter (WI_ID) in your WDA?
    It picks the same workitem id everytime. I tried doing this with a couple of different user ids. but I cant figure out from where it picks this particular workitem id
    If you defined WI_ID in Application parameter and there is an option to provide value and it seems, you have defined some value over there or other way might be in your method (inbound plug), you may gave default value to WI_ID in the parameter
    If your application is working properly from UWL and for testing purpose, you could put a breakpoint and change the workitem id, when executing from se80
    Vinoth

  • Problem in Sending attachement title in Workflow

    Hi,
    We have created a workflow.It pick up the data from the application server and is send as attachement in workitem using oject type SOFM..The problem Know is  we want to send the attachement another set of user through mail.We are able to send the attachement in mail but it does not give TItle of attachments in mail.
    So, how can I get the Title of the attachment in the mail.......
    if u have any solution please reply to this thread...
    thanks in advance............

    How are you sending it in mail; manually or using a program? If you are using a program you must have forgotten to set the title, which is part of the structure you have to fill for every attachment.

  • Regarding description of attachment in workflow.

    Hi,
    New Year greetings to all.
    I have a question regarding attachments is workflow.
    In the decision screen the description of the attachment is the subject which is provided by the user creating the attachment.
    Is it possible that the description reflects the name of the user who created it?
    Actually according to the requirement we should be able to differentiate between the attachments based on the creator
    of the attachment.
    Regards
    Shraddha

    Hi,
    It looks an interesting requirement, I suggest the following solution for this
    1. All workflow attachments infact gets stored as SOFM Objects and the The title of attachment link that you get in workitem comes from Default Attribute of SOFM Object i.e SOFM.Description ( You can check this by going to SWO1 give SOFM as BO and Go To -> Basic Data -> Defaults Tab and check for Attribute)
    2. So, if we can change the default attribute to something else which will have User Name as the value, User Name will appear as the title of the attachment in workitem and that should solve your problem.
    You can do this by following
      a. Create a New ZSOFM Object delegate it to SOFM
      b. Create a New Virtual Attribute on ZSOFM ( say NewTitle) and in the logic of this attribute, assign SOFM.OWNER->Name to this new variable 'NewTitle'. ( good idea can be to have original description of SOFM + Owner Name as the New Title)
      c. Set the ZSOFM defalut attribute as 'NewTitle'
    By doing this, whenever SOFM is refered, in runtime ZSOFM will be called ( this is because of delegation) and as we set 'NewTitle' as default attribute this value will appear as the title of the attachment in your workitem.
    Hope this helps you !!
    Regards
    Krishna Mohan

Maybe you are looking for

  • Field Status review between Dev and Prod.

    Hello All, During solving one of the ticket, I found that there are some difference in selection of some of fields as suppress,optional and compulsory for account groups with screen layout (customers) - (T. Code - OBD2) between Development and Produc

  • Why does the "find" feature suck in Lion?

    In Leopard, I'd type "apple f" and could find my files easily.   Now when I use "apple f" and type in a file name, dozens of files come up that have nothing to do with what I typed in.  Sometimes, even files that have the exact name won't show up at

  • How do I get a 23.98 sequence onto a dvd(29.97) without adding 3:2pulldown?

    Hello, I am having a hard time finding a process for burning 23.98 footage onto a DVD without having the method of 3:2 pulldown effecting the overall look. I have a sequence in Final Cut Pro that is 23.98. I'd like to burn it to a DVD but when the 3:

  • My roommates computers can't connect to the router!

    Hey, so I've got this Cisco Lynksys E1200 and I've got internet going to it. When I first tried to connect to it my computor automaticaly set it up (giving the network a name, changing it from tehdefault "Cisco67809" to my perfered natwork name, etc.

  • Post a file?

    I have a servlet that processes incoming files (chosen using the filechooser on a form). I'd like to be able to create a new file, either in a jsp or servlet, and pass it to this servlet. How do I pass files over to the servlet without using a form (