Smartform(Spool) to Workflow Workitem attachment

Hi Friends,
                I have a requirement related to workflow attachment.
I have a invoice no and i can generate spool related to this .
Withh using CONVERT_OTFSPOOLJOB_2_PDF , I am able to create TLINE format.
Can you help me to convert to BINARY Format and folder .
So that i can attach that folder to Workflow task.
Thanks.
Balaji.T.

Hi-
If you have the data in TLINE format, then you can pass it to import parameter- ATT_BIN in FM-SAP_WAPI_ATTACHMENT_ADD along with wi id, header data  (file type...).
From this FM, get the doc id and create SOFM instance with this doc id and bind this SOFM to ATTACH_OBJECTS in workflow
Vinoth

Similar Messages

  • Dipslay Workflow (workitem) attachment

    Hello gurus,
    ive got a requirement in dipsplaying WF attachment. What i mean is that we added a PDF document to WF.
    Now we are able to get the attachment using FM: SAP_WAPI_GET_ATTACHMENT.
    We can see the SOFM object, but whats next? How to display the document in normal format (PDF)?
    Regards
    Laurynas Prikockis

    HI
    May be you can try the below steps to create a custom report
    1. First by making use of SWWWIHEAD table get the workitems which fall under the user specified Date range.
    2. Check for the fecthed workitems is the  field NOTE_COUNT which gives you a number of how many attachments are availbale for the workitem. if this field is not initial then proceed to step 3.
    3. The by making use of the standard sap provided function module SAP_WAPI_GET_ATTACHMENTS , by passing the workitem ID.
    Regards
    Pavan

  • Workflow PDF attachment Issue

    In one of the dev instance here in Client's side we are facing one issue regarding workflow notification attachment.
    We have built a custom workflow which send notification with PDF as an attachment.In ebs workflow list when user try to open the attachment we are getting following error
    ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "APPS.WF_NOTIFICATION", line 8114 ORA-06512: at line 1
    This error is not occurring in another dev instance and happening at the client side.
    Please let me know if any one have come across this error before
    I guess this may be some setup at the server side which causing this error.
    we are creating custom directory for the above.

    hi pavan ,
       i want to send po output in pdf format to external addresses to multiple receipients i have tried and written code in EXIT_SAPMM06E_013 now iam getting pdf for multiple receipients but unable to print dynamic data(main window data) me getting only hardcoded data in smartform. plz correct me and let me know how dynamic data will be passed from into script.
    regards,
    chandu...

  • ESS TRIP Workitem Attachment

    Hi experts,
    I am currently working on a Travel expenses workflow .The workflow when tested from r3 side it all works fine. My problem is that i could not open the workitem attachment from ESS portal. My requirement is, When i click on the workitem attachment from ESS , It should open a adobe form showing travel expense details.
    From my research i figured out it a has something to with transaction SWFVISU. If yes, can anyone provide me with detail steps of what needs to be configured.
    Is it the workflow configuration side or the portal configuration that needs to be done.
    Please help.

    hi NK_ABAPER
       I have done Travel management in ESS. I am getting every thing fine in portal. No need of task registration on swfvisu since ur using only decision step not any task has its decribed in standard workflow. To get the attachment you need to tell the EP person to do the setting for the display. The solution to display the adobe form search in ESS. Even i had the same problem from that search i found one solution i solved that.
    Regards
    vijay

  • To convert smartform spool to pdf

    Hi all,
    I need to convert smartfom spool to pdf..
    When i executed the smartform it is generating a spool number and
    tsp01-rqdoctype =  'SMART'.
    To convert Spool to PDF Iam using the following function module
    'CONVERT_ABAPSPOOLJOB_2_PDF'
    It is converting to pdf only if the document type is 'LIST'.
    can any one suggest me how to convert smartform spool to pdf?
    Regards
    cnu

    Hi
    Refer to this link :
    Re: smartform output to mail
    Reward if useful
    Thanks
    Krushna

  • Workflow not attached to a SharePoint item

    Hi All,
    After published a workflow (runs on item created and changed), workflow not attached to an item and error occurs, this is my workflow status:

    Hi Sam,
    Do you see any workflows attached at the corresponding list/library level?
    Go to List/Library settings-->workflow settings and can see any workflows attached/added?
    Please remember to mark this post/reply  as answered & Vote helpful,if this solves/helps your problem. 
    s p kumar

  • How to receive/execute workflow workitems in MS outlook

    Hi,
    I was told that it is possible to receive/execute workflow workitems in MS outlook or other supported mail clients (not SAP INBOX).   I have tried to research (SDN, OSS) and so far just found documentations to set up workflow notification to MS outlook.  Nothing about receive/execute workflow workitems.  I'd like to be able to set this up without buying a third-party vendor product.  I would really appreciate it if someone could give me some guidance on where to find some helpful documentations or some brief description how to configure this.
    Thank you.
    Jennifer

    Hi Jennifer,
    I've heard it could be possible with the SOAP adapter. I never used it but I found these links in SAP Help:
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/fdca3f01f33e1ce10000000a114084/frameset.htm">General info</a>
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/fdca3f01f33e1ce10000000a114084/frameset.htm">SOAP adapter</a>
    This should allow you to approve without direct access to SAP.
    If you want to execute with direct access to SAP you can use program RSWUWFML2 which allows you to send mails with executable attachments. But the user needs sapgui installed on his pc, and be able to reach the SAP system.
    Regards,
    Martin

  • Sending smartform through email as PDF attachment

    Hi,
    I want to send a smartform through email as pdf attachment.In the code I have hardcoded the receiver mail id.But I don't want this to be sent only to a particular receiver.I want this to be sent as many people as I can without hardcoding their mail id's in the program.How can I do that?
    Regards,
    Hema

    **Data Declarations
    **Internal Table
    DATA : BEGIN OF it_spfli OCCURS 0,
              carrid LIKE spfli-carrid,
              connid LIKE spfli-connid,
           END OF it_spfli.
    DATA:   it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            it_contents     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    storing receivers      
            it_receivers    LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    **storing file attachment data
            it_attachment   LIKE solisti1 OCCURS 0 WITH HEADER LINE,                    gd_doc_data     LIKE sodocchgi1,
            gd_error        TYPE sy-subrc,
            l_gntxt         LIKE t357g_t-gntxt,
            lv_message(100) TYPE c.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE. "storing mail body
    DATA : psubject(30) TYPE c VALUE 'Sample Mail'. "subject of the mail
    DATA : ld_format TYPE so_obj_tp , "file format
           ld_attfilename TYPE so_obj_des, "file name
           w_cnt TYPE i.
    **Selecting the data
    SELECT carrid connid INTO TABLE it_spfli FROM spfli WHERE carrid EQ 'AA'.
    **Perform for populating mail body
    PERFORM populate_message.
    **Perform for populating file attachment
    PERFORM populate_attachment.
    **Perform for populating mail characteristic info
    PERFORM populate_pack.
    **Perform for populating receivers
    PERFORM populate_receivers.
    **Perform to send mail
    PERFORM send_mail.
    *&      Form  populate_message
          text
    -->  p1        text
    <--  p2        text
    FORM populate_message .
    **Populating the body
      lv_message = 'Sample mail for testing purpose.'.
      APPEND lv_message TO it_message.
    ENDFORM.                    " populate_message
    *&      Form  populate_attachment
          text
    -->  p1        text
    <--  p2        text
    FORM populate_attachment .
    **Populating the attachment file with the data from final intenal table
      CONCATENATE 'CARRIER ID'
                  'CONNECTION ID'
                  INTO it_attachment SEPARATED BY
                  cl_abap_char_utilities=>horizontal_tab.
      CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
      it_attachment.
      APPEND it_attachment.
      LOOP AT it_spfli.
        CONCATENATE it_spfli-carrid it_spfli-connid INTO it_attachment SEPARATED BY
                 cl_abap_char_utilities=>horizontal_tab.
        CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO
        it_attachment.
        APPEND it_attachment.
      ENDLOOP.
    ENDFORM.                    " populate_attachment
    *&      Form  populate_receivers
          text
    -->  p1        text
    <--  p2        text
    FORM populate_receivers .
    **Populating Mail Recepients
    **If there are more than one mail recepient then loop and append them to it_receivers
      it_receivers-receiver = '[email protected]'.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      it_receivers-express = 'X'.
      APPEND it_receivers.
    ENDFORM.                    " populate_receivers
    *&      Form  populate_pack
          text
    -->  p1        text
    <--  p2        text
    FORM populate_pack .
    **File Type
      ld_format = 'XLS'.
    **File Name
      ld_attfilename = 'File1'.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject .
      gd_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR gd_doc_data.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      READ TABLE it_attachment INDEX w_cnt.
      gd_doc_data-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_attachment ).
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    **Describe the attachment info
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES  it_packing_list-body_num.
      it_packing_list-doc_type = ld_format.
      it_packing_list-obj_name = ld_attfilename.
      it_packing_list-obj_descr = ld_attfilename.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      APPEND it_packing_list.
    ENDFORM.                    " populate_pack
    *&      Form  send_mail
          text
    -->  p1        text
    <--  p2        text
    FORM send_mail .
    **Function Module to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    ENDFORM.                    " send_mail

  • Workitem attachment to be done

    Hi ,
    I have a workitem waiting with approver 2 .Now approver 1 calls and tell he forgot to add an attachement before approval .
    how can we do this so that approver 1 is given an option( Transaction )  so that he can upload another
    attachment and approver 2 also sees it before his approval .
    I dont't want approver2 to add the attachment of approver1 .
    Regards
    Abhilash

    Thanks for the quick reply I will try it out soon .
    I have completed the workitem attachment deletion program . it is working fine now . I will try the addtion .
    REPORT  ZWF_ATTACH_DELETE.
    INCLUDE <CNTN01>.
    TYPE-POOLS: SWLC.
    include <symbol>.
    DATA :
        lv_header        TYPE swr_att_header,
        lv_objsofm       TYPE swotobjid-objtype,
        lv_objtkey       TYPE swotobjid-objkey.
       ls_fitment       TYPE   r_fitment_mstr,
    data :     lv_xstring TYPE xstring,
        att_id type  SWR_ATT_ID,
        lv_return  TYPE sy-subrc.
    data :  bo_sofm TYPE SWC_OBJECT .
    data : att type SWR_ATT_ID.
    data : w_msg type SWR_MSTRUC occurs 0 .
    data : wa_msg type SWR_MSTRUC.
    selection-screen begin of block b1 with frame.
    parameters: WRK_ID  like SWR_STRUCT-WORKITEMID obligatory ,
                zATT_ID like SWR_ATT_ID-DOC_ID obligatory.
    selection-screen end of block b1.
    start-of-selection .
      att-DOC_CAT ='AT'.
      att-DOC_ID = zATT_ID .
      CALL FUNCTION 'SAP_WAPI_ATTACHMENT_DELETE'
        EXPORTING
          WORKITEM_ID          = WRK_ID
          ATT_ID               =  att
         LANGUAGE             = SY-LANGU
         DO_COMMIT            = 'X'
       IMPORTING
         RETURN_CODE          = lv_return
       TABLES
         MESSAGE_LINES        =
        MESSAGE_STRUCT       = w_msg
      write : ' Return code : ' ,  lv_return.
      loop at w_msg into wa_msg.
      write : /5 wa_msg-MSGID,
              15  wa_msg-MSGTY,
              25   wa_msg-MSGNO.
      skip 2 .
       write :/5 'Message details : '.
      write : /5  wa_msg-MSGV1,
              30  wa_msg-MSGV2,
              50  wa_msg-MSGV3,
              60  wa_msg-MSGV4.
      endloop.

  • Font size increases when smartform is sent as email attachment

    Hi,
    I am facing a problem with font size  of smartforms. when the output medium is printer, the form looks good. but when i convert smartform into PDF and send as email attachment, the font siz increases and text is getting truncated. Please help me solve this problem.
    Thanks,
    Hari

    Hi,
    Check the given below links and compare your code with them:
    http://sapient.wordpress.com/2007/06/19/smartform-to-mail-as-pdf-attachment/
    http://sap4.com/wiki/index.php?title=Envio_smartform_por_mail
    If still there is a problem, please do share a code.
    Also check sending a PDF document from your system via a Email(Outlook), and open the same in a different system and look for the changes.

  • Delete workflow workitem

    Hi Experts,
    How can i delete a workflow workitem? regardless of the status?
    Thanks.
    Best Regards,
    PRS Helpdesk

    Hi
    Good
    Use the tcode SWIA.
    Thanks
    mrutyun^

  • Workflow Workitem approval from Handled Device.

    Hello,
    In SAP users will use handled device to approve SAP Workflow Workitems. Below are my questions.
    1. Is this possible with SAP Technology or we have to make use of some other application out of SAP.
    2. Is there any specific setting or configuration in SAP to enable users to approve workflow from Handled Device.
    3. Can link to SAP workitem be send in mail to  handled device and workitems can be opened from handled device.
    Any links or PDFs related to Handled Workflow Development / COnfiguration is much appriciated.
    Thanks in Advance.

    Hi,
    You will not be able to execute SAP work items in Blackberry or Iphone because of their technological restrictions. You have to develop BSP application and certain necessary customizing, SWNCONFIG, SCOT etc, have to be done.
    Regards

  • Extract interactive form attachment from workflow workitem

    Hi Friends,
    I created a Webdynpro Java application which has an interactive form.
    The user fills out the form, and submits.
    The submission action triggers a simple workflow and adds the interactive form as an attachment to the workitem. (Using SAP_WAPI_START_WORKFLOW and SAP_WAPI_ATTACHMENT_ADD)
    The new task shows up in UWL with the attached pdf form.
    When user clicks the on the task in UWL, I want to launch another web dynpro application which will read the workitem id and get and display the interactive form in the web dynpro java application.
    How do I extract the interactive pdf form from workflow in binary format?
    so that I can display the form in my Web dynpro java application and bind it to the pdfSource context??

    I thought I could just call the  SAP_WAPI_GET_ATTACHMENTS, however this only returns some docId information for example:
    OBJECT_ID                                                                                DESCRIPT             SHORTTEXT
    SOFM      FOL18          4 EXT34000000000023                                     Office Document      Office Document
    I need to get the binary for this pdf interactive form.
    Edited by: K Ferguson on Jan 16, 2009 5:54 PM

  • Issue in workflow workitem that gets triggered to two users at one time.

    Hi All,
    Below are the query  details:
    Module:  HR
    Area:      Workflow
    Process: Hiring
    There is an workflow in HR module that is triggered when an hiring action is run against an candidate.
    There are two or three maximum approvers  which is based on the position to which the candidate is hired.
    Issue:
    During the hiring process some times the workitem is getting triggered to two users at once.
    One is the actual approver who should receive the workitem in his UWL and other is the user of our service center who is no where involved in the approval process.
    Analysis Done:
    We checked the workflow log and found that the actual approver's ID is getting displayed under agent and workflow is complete. But the other user's ID is no where shown in the log but he has received an workitem in his UWL that makes the issue still confusing.
    Awaiting for experts suggestions.

    Reply to Susan Questions:
    You say that 'the workitem is getting triggered to two users at once' - do you mean that there are two workflow instances that are being kicked off at the same time when the hiring action is performed? Or is it that the workflow is generating two tasks that go to these different users?
    Ans : There is a single task attached to the activity.
    Is this a custom workflow?
    Ans : Yes.
    Are you certain that the erroneous task is only going to the user in the service center, or is it perhaps going to everybody (marked as a general task)?
    Ans : The task is marked as general but the workitem is received by only one user of the service center at a time.
             As this issue has taken place 4 times in the past year all the 4 receiver were different belonging to different position.
    Reply to Pavan Questions:
    1. Did you try to check the SPRO settings with respect to Hiring Process ,is there any where based on the position does workflow is forwarding the workitem to the other user.
    2. Check the other user Roles and in the Org Structure where he is located , there could be a possibility of wrong position holding.
    Ans : We checked the org structure, but org structure of both the centers are different and independent there is no linkage    between the two.
    *3. IF you are using custom workflow then check if any standard workflow is also getting triggered. Check *
    Ans : Yes this is a custom workflow, but no other Standard workflow is being called.
    4. Check in the SWEHR3 is any custom entries maintained.
    Ans : No, entries are maintained in SWEHR3.
    Additional Info :
    The task that triggers the workitem has an send mail step before it.
    The send mail activity is to notify receiver that there is an workitem lying in the UWL.This mail is received by the actual user and not by the other one.The next step is the task that creates workitem which gets triggered totwo different IDs.
    This scenarios mostly has come up when the number of approver is 1. If the approver is more than 1 the  workflow runs fine without  deviating the workitem to any worng user.

  • Workitem attachment missing in mail Outlook/Lotus

    When an email is generated from a particular workflow. I get the following message in my
    outlook inbox
    Subject :Please release purchase requisition 0013001141
    Body : Work item in R/3 System: DEV
    Please log on to the R/3 System and look in your inbox
    Please execute the work item by opening the attachment
    however the attachment(link) to the workitem is not present.
    Please guide me as I am new to this.

    Am I correct in thinking that your e-mail is the result of a SendMail step in a workflow?
    If so, the standard solution doesn't have any support for attachments as far as I know. Attachments, e.g. to enter SAP Business Workplace or display the work item, is something that the work item notification report adds to the mail messages.
    If your e-mail is the result of work item notification, make sure you have selected the attachment options if you are using RSWUWFML2, or that your customizing specifies inclusion of attachments if you are using the extended work item notification solution in more recent releases.

Maybe you are looking for