Duplicate E-mail sent through Human Task Workflow - random behaviour

Hello All,
We have Human Work Flow implemented for a process to wait for human intervention to approve a task.
Whenever a new task is attempted, it goes for an email approval to a DL by sending notification.
This should happen only once and after approval the BPEL Process should complete.
All works fine, an email is sent and approved and process completes.
Sometimes, the notification is sent again exactly after 24 hours, with the same content though there is no other BPEL  process triggering it.
And on opening the Workflow List, there is nothing to approve as it has been already approved the previous day.
Not sure why this happen. This is in Prod server and this thing happens randomly with no fixed pattern. Has been never reproduced in development box.
No specific pattern is visible in MW logs to.
Any help for this issue shall be helpful.
Thanks and Regards,
Mithun S.

If you are having errors in your Calendar or Address Book on your BlackBerry, and you wish to delete the entire Calendar (or Address Book) database on your BlackBerry, follow the directions below. Make certain you have a good copy of your Calendar or Contacts elsewhere, as this procedure will complete delete ALL Calendar entries and/or Address Book entries on your BlackBerry.
1. Open Desktop Manager on your PC.
2. Open up Backup/Restore > Advanced.
3. From Advanced you'll see a split pane screen. The left pain is what is going to be backed up from your device and the right is a list of the currently existing databases.
3. Highlight on the right side your Address Book database (or your Calendar database) and click the arrow in the middle pointing to the left. This will copy the information over and prepare it for back-up.
4. Once the back-up has completed, hit the Clear button at the bottom to erase and clean out the entire address book database (or Calendar database).
5. After it's finished, it will ask you if you want to save the back-up you've created, say yes and check the device to make sure the address book (or calendar) has been properly cleared out. Now, resync the necessary contact information and you should be set to go.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4   Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA   Display/Scan Bar Code

Similar Messages

  • Send email through human task in bpel

    hi everybody,
    I am badly stuck in sending email through human task using bpel.
    I have used reminder facility and enabled send email in .task file.but no email
    is sent so anyone please help me out and please provide me with full detailed solution what I have to do like change any xml file setting etc.
    Also I was trying to send email using email activity by changing the ns_emails.xml in .........bpel/systems/services/config & in .......integration/esb/config but I was not succeeded. So please provide me with complete solution like what parameters to pass in smtp server,port no,protocols etc and which file to change in which directory. my work is pending just because of this.
    I would be very grateful to you.
    thanks in advance.
    mansoor.

    Hi mansoor,
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="EMAIL">
         <EmailAccount>
              <Name>Default</Name>
              <GeneralSettings>
                   <FromName>BPEL POC</FromName>
                   <FromAddress></FromAddress>
              </GeneralSettings>
              <OutgoingServerSettings>
                   <SMTPHost>mail.oracle.com</SMTPHost>
                   <SMTPPort>25</SMTPPort>
              </OutgoingServerSettings>
              <IncomingServerSettings>
                   <Server>mail.oracle.com</Server>
                   <Port>993</Port>
                   <Protocol>IMAP</Protocol>
                   <UserName>xxxxxx</UserName>
                   <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService"></Password>
                   <UseSSL>false</UseSSL>
                   <Folder>Inbox</Folder>
                   <PollingFrequency>1</PollingFrequency>
                   <PostReadOperation>
                   <MarkAsRead/>
                   </PostReadOperation>
              </IncomingServerSettings>
         </EmailAccount>

  • Yahoo mail sent through Mail app do not appear when login into Yahoo mail

    Hi everybody,
    I have a problem that annoying me very much. I've used Yahoomail for very long before I bought a MBA. For the first time I use Mac OSX, I try to use Mac mail combine with my old Yahoo mail. Actually, I have done the config. But anything I do with my Yahoo mail through Mail app can't appear when I login into original Yahoo mail. For example: I sent a Yahoo mail through Mac mail, it's shown that the mail was sent sucessfully, but when I try to login into Yahoo mail on Web, the sent mail doesn't exist. And the same happen when I do the opposite: the mail I sent on Yahoo mail doesn't exist on Mac mail. It's a big trouble if I use other lap and try to contact with someone. So is there any solution can fix it?
    Many thanks

    I'm having the same problem, and the only help I ever seem to find suggested anywhere is "make sure its set up as an IMAP account"
    BUT it is! Mail automaticly sets all yahoo accounts up as IMAP. So is this just a yahoo problem? Is there anyway to fix this?
    For me the bigger issue isnt that I need to be able to check my e-mail through a web browser regulerly, but on my Iphone and Ipad the account, which is through the mail app, also dosnt show sent mail sent through the mac app.
    I agree this makes mail on my mac totally usless.

  • How to fire diffent queries through Human Task

    hi',
    I am designing work-flow for my application where Sales Manager(Human Task) will get one order and it is up to him to approve or reject. I want to fire different queries for when he approve or reject, please guide me how to achieve this.
    thanks
    Yatan

    Usually when the user approves the task workflow API will be invoked and the response will initiate the BPEL process. If you want to fire different queries you may have to use ADF or use some external portal applications and jse java to call the work flow API's and complete the task.
    Steps:
    1. Add the workflow process activity in the BPEL process which initiate the task, this will generate the email notification. In this notification send the portal UI link.
    2. Once user access the link and approve in the back end all the workflow API's in your case you can fire other queries and then call the workfloe API's and finish the waiting the task to be complieted.
    Let me know if you have any questions.
    Thanks
    Ramana.

  • Human task workflow dependancy

    Is that possible in case of human task while two parallel task are there after completion of one task another task should be initiated????
    means in two parallel task Second task should be dependent on completion of first one.
    if dependency is possible please guide me on that.....

    I'm not sure I understand your use case.
    Parallel flows are for executing n number of processes independent of each other. Once they all return compare notes then proceed. A good example is getting a quote for some service, you send it off to all parties, when they return you have the option of selecting the cheapest quote.
    What I'm struggling with in your use case is that you have 2 human tasks that you want to fire in parallel. This is fine. What I don't understand in your logic is how you expect to fire 2 human workflows at the same time, but the second human task is based off the response of the first. This is why in my previous post the solution was sequential.
    The example that Sirin has described unfortunately shows how parallel flows work. The only link between the 2 flows is that the external services have the same payload definition, so you only need to populate one variable instead of 2.
    cheers
    James

  • Where do i look for mail sent through thunderbird that does not get delivered

    I have two email clients. One is thunderbird and the other through my local server. I know some of my emails are not being received because of address changes.where do i find or set up undelivered mail notification in thunderbird . To address airmails answer;Thunderbird is being promoted as an open source stand alone email client if i'm not mistaken

    There is no such thing as a Thunderbird email account so not sure what you are talking about there. I am not even sure if you are talking about mail you have sent or mail you are expecting to receive.
    Thunderbird connects to your actual email providers server Inbox and downloads what is there. Maybe you should contact your email provider. You could check your providers Spam folder to see if mail is getting filtered there.

  • Stored reference of mail sent through "SO_DOCUMENT_SEND_API1"

    Dear experts,
    I am using  FM "SO_DOCUMENT_SEND_API1" to send mails to external systems in a program for enduser. Now i want to trace which mails are send through this program. Is there any standard table where the reference for sent mails and its return code are stored ?
    also, i am posting an external URL(POST method) using
    CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL. I also want to trace the posted URL and its result at the end of a week or month. is there any standard for the same storing the details??
    Thankx in advance.
    Krishan Kumar birmiwala.

    Hi,
    You can trace all the outgoing mails from the transaction SOST. i.e. internally search where this data is saved.
    Here you can differentiate internet address / SAP user id / etc..
    Specifically if you want to trace with respect to this program based on the date and user etc.. you can refer to the transaction STAD (Analysis by User), it will have all the info.
    Find where internally in which table this data is saved.
    Regards,
    Santhosh.

  • Modifying the notification mail sent by Invoice Approval Workflow - AP

    Hi,
    We have a requirement to modify the standard mail notification email body sent to the approver to approve the invoice.
    When have check the message attribute in the workflow and it has a constant value.
    JSP:/OA_HTML/OA.jsp?page=/oracle/apps/ap/invoice/request/negotiation/webui/NotifPGRN&INVOICEID=-&INVOICE_ID-
    We are unable to figure which region needs to be modified or which controller needs to be extended.
    At also I want to know if the notification email body and the notification on the the user home screen are derived from the same source.
    Thanks for your help.
    Thanks,
    MJ

    Hi,
    You need to modify the region NotifPGRN in specified in the path.
    Go to Functional Administrator and give the path /oracle/apps/ap/invoice/request/negotiation/webui/NotifPGRN.
    You will able to find the region.
    Thanks,
    Mamen.

  • Supress e-mail sent through SUS for PO creation

    We want to suppress e-mails going out to suppliers whenever a PO is created in the system. I have disabled the e-mail notification in SPRO->Supplier Self Services-> master data-> Settings for BP. However it seems the e-mails are still sent out. any help is greatly appreciated.
    Jay

    Hi Jai,
    I suppose I have a similar requirement. In my case invoices are e-mailed to customers whenever they are created. But instead of sending multiple e-mails with one invoice each as an attachment, customer wants one e-mail with multiple attachments of invoices generated in a day.
    I think on lines of suppressing e-mail that generates for every invoice and generating one e-mail at a particular time in a day which has to pick up all invoices created for a customer in a day.
    How to achieve this? I look forward to your help in this regard.
    Thanks for your time and effort spent for me in advance.
    Regards
    Jawahar

  • Subject in the mail sent through Batch Job

    Hi,
    We have a batch job which is running daily.
    Consumer wants the output of the batch job (spool request) in mail. We generally send the mail from batch job by filling the mail id in "Title field".. there is some third party involved in managing spool requests..
    But now consumer wants to send the mail with a subject line filled..
    I could not find any field or option in SM36 where i can fill in the subject..
    Please help. Now we are getting the subject as user id + spool request + system number.

    Check the below Code.
    DATA: NUMBYTES TYPE TST01-DSIZE,
            PDFSPOOLID TYPE TSP01-RQIDENT.
      DATA: BEGIN OF PDFDATA OCCURS 0.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF PDFDATA.
      DATA: G1_LINES_TXT  TYPE I.
      DATA  : L_DOCUMENT_DATA    TYPE SODOCCHGI1,
              T_PACKING_LIST     TYPE STANDARD TABLE OF SOPCKLSTI1,
              W_OBJHEAD TYPE SOLI_TAB,
              T_OBJBIN TYPE STANDARD TABLE OF SOLISTI1,
              T_OBJTXT  TYPE STANDARD TABLE OF SOLISTI1,
              LW_PACKING_LIST    TYPE SOPCKLSTI1,
              L_LINES            TYPE I,
              W_RECEIVER        TYPE SOMLRECI1,
              T_RECEIVER         TYPE STANDARD TABLE OF SOMLRECI1.
      DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
      DATA: OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
      DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
      DATA: OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
      DATA: RECLIST LIKE SOMLRECI1  OCCURS  5 WITH HEADER LINE.
      DATA: DOC_CHNG LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
    *...Read the Spool request number generated.
      SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
                            FROM TSP01
                            WHERE RQCLIENT = SY-MANDT AND
                            RQOWNER = SY-UNAME.
    *....Convert Spool to PDF
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = G_SPOOL_NUM
          NO_DIALOG                = 'X'
          DST_DEVICE               = G_PDEST
        IMPORTING
          PDF_BYTECOUNT            = NUMBYTES
        TABLES
          PDF                      = PDFDATA
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 9
          ERR_BTCJOB_SUBMIT_FAILED = 10
          ERR_BTCJOB_CLOSE_FAILED  = 11
          OTHERS                   = 12.
    *...Convert 132 char to 255 char
      LOOP AT PDFDATA.
        TRANSLATE PDFDATA USING ' ~'.
        CONCATENATE GD_BUFFER PDFDATA INTO GD_BUFFER.
      ENDLOOP.
      TRANSLATE GD_BUFFER USING '~ '.
      DO.
        IT_MESS_ATT = GD_BUFFER.
        APPEND IT_MESS_ATT.
        SHIFT GD_BUFFER LEFT BY 255 PLACES.
        IF GD_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Creating the document attachment
      LOOP AT IT_MESS_ATT.
        OBJBIN = IT_MESS_ATT.
        APPEND OBJBIN.
        CLEAR: OBJBIN,
               IT_MESS_ATT.
      ENDLOOP.
    Creating the document to be sent
      DOC_CHNG-OBJ_NAME = 'IG Balance'.
    *.....Subject of the email.
      CONCATENATE 'Intragroup Confirmation from AoO: ' P_ZAOO INTO DOC_CHNG-OBJ_DESCR.
    DOC_CHNG-OBJ_DESCR = 'Intragroup Confirmation from AoO '.
    *...Body of the email
      OBJTXT = 'Please find attached a summary and details '.
      APPEND OBJTXT.
      OBJTXT = 'Any queries regarding the attached should be addressed to the contact names on the Report.'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creating the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'RAW'.
      APPEND OBJPACK.
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = 'Balace.PDF'. APPEND OBJHEAD.
    Creating the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'PDF'.
      OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
      OBJPACK-OBJ_DESCR = 'Balance Report'.
      OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK..
    Entering names in the distribution list
      DATA: L_CNT TYPE I.
      LOOP AT T_EMAIL INTO W_EMAIL.
        IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ENDIF.
        APPEND RECLIST.
        CLEAR: RECLIST,
               W_EMAIL.
      ENDLOOP.
      SELECT SINGLE ZAOO
                     ZCONTACT1
                     ZCONTACT2 FROM ZFI_MT_RPTRMAP INTO W_EMAIL
                     WHERE ZAOO EQ P_ZAOO.
      IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ENDIF.
    Sending the document
      IF L_CNT > 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            DOCUMENT_DATA              = DOC_CHNG
            PUT_IN_OUTBOX              = 'X'
            COMMIT_WORK                = 'X'
          TABLES
            PACKING_LIST               = OBJPACK
            OBJECT_HEADER              = OBJHEAD
            CONTENTS_BIN               = OBJBIN
            CONTENTS_TXT               = OBJTXT
            RECEIVERS                  = RECLIST
          EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            OPERATION_NO_AUTHORIZATION = 4
            OTHERS                     = 99.
        CASE SY-SUBRC.
          WHEN 0.
            WRITE 'Email sent successfully'.
          WHEN 1.
            WRITE: / 'no authorization to send to the specified number of recipients!'.
          WHEN 2.
            WRITE: / 'document could not be sent to any of the recipients!'.
          WHEN 4.
            WRITE: / 'no authorization to send !'.
          WHEN OTHERS.
            WRITE: / 'error occurred during sending !'.
        ENDCASE.
      ELSE.
        MESSAGE S000 WITH TEXT-018.
        STOP.
      ENDIF.
    *...Delete Spool Request.
      DATA: SPOOLID TYPE TSP01_SP0R-RQID_CHAR.
      SPOOLID = G_SPOOL_NUM.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          SPOOLID             = SPOOLID
      IMPORTING
        RC                  =
        STATUS              =
        ERROR_MESSAGE       =

  • Mail sent through JavaMail gets sent back

    We use JavaMail to send e-mails out with PDF attachments. About 15% of the time, the mail comes back with the message javax.mail.MessagingException. When we send the same e-mail a few minutes later, it goes through without any problem.
    Any ideas what could be causing this?

    You need to look at the details. All MessagingException is telling you is that something
    failed. You need to know what failed. Print out the details of the exception, possibly
    including the stack trace. Also, you might want to turn on session debugging and look
    at the protocol trace it prints out.

  • Attachment name in mail sent through Bursting

    Hi Gurus,
    We have a requirement to Burst the output of a program and store the file in UNIX as well as mail. But the file name in UNIX is different from the one that has to appear in e-mail attachment. I am only able to set the file name same for UNIX and email attachment. Could someone help?
    EBS version: R12
    Bursting control file:
    <xapi:delivery>
    <xapi:filesystem output="${F_OUTPUT}" />
    <xapi:email server="${HOST_NAME}" port="25" from="${F_MAIL_ID}" reply-to="">
    <xapi:message id="123" to="${MAIL_TO}" attachment="true" subject="${F_MAIL_SUBJECT}">${F_MAIL_BODY}</xapi:message>
    </xapi:email>
    <xapi:document key="${F_ORDER_NUMBER}" output-type="pdf" delivery="123">
    <xapi:template type="rtf" locale="${CURR_FORMAT}" location="${TEMP_LOC}" />
    </xapi:document>
    </xapi:delivery>

    Add output key in the document key element as below
    <xapi:document key="${F_ORDER_NUMBER}" output-type="pdf" output="FileName you want.pdf" delivery="123">
    This should do the trick. Let me know if you still have issues.
    Thanks
    Shree

  • Delay in receiving mail sent through Javamail

    Hi all,
    n the code given in http://www.javacommerce.com/destination65673/18274/SendMailUsingAuthentication.java
    the, mail is received after 2-3 minutes after executing the code. How can I avoid that delay?
    Also, how can I have a message, if we try to send the mail to an invalid 'To address'?
    Regards,
    Rony

    There is website version and stand-alone version for sending mails. Website version is done using php and stand-alone is done using java. I work with stand-alone application and I use the code given in the link for sending mails.
    In website version, the mail is received within 2 - 3 seconds, whereas, using the Java code, it is taking 2 - 3 minutes.
    So, is this a problem of server?
    Rony

  • Unable to open PDF document when run through task/workflow

    Hi all,
    I am currently usign a background method to send a smartform as a PDF document to all the agents who approve.
    When i send the smartform in mail as a PDF documetn throught the task i get an error message when opening the PDF document which says that 'The file could nto be opened because it was either not a supported file type or because the file was damaged(for example, it was sent as an email attachment and wasn't decoded correectly'.
    The below is the code i am using to send the smartform
    { CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZFI_ASSET_PDA_NOTIF'
        IMPORTING
          fm_name            = lv_form_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.}
    { ls_ctrlop-getotf    = 'X'.
      ls_ctrlop-no_dialog = ''.
      ls_compop-tdnoprev  = 'X'.
    ls_ctrlop-DEVICE = 'LOCL'.
      ls_ctrlop-preview   = 'X'.
      ls_ctrlop-no_dialog = 'X'.}
      CALL FUNCTION lv_form_name
        EXPORTING
          control_parameters = ls_ctrlop
          output_options     = ls_compop
          user_settings      = 'X'
          gv_prctr_txt       = gv_prctr_txt
          gv_cc_text         = gv_cc_text
          gv_class_txt       = gv_class_txt
          gv_lname           = gv_lname
          gv_fname           = gv_fname
          gv_position        = gv_position
          gv_initiator       = gv_initiator
          gv_bookcost        = gv_bookcost
          gv_bookvalue       = gv_bookvalue
          gv_date            = gv_date
          gv_prctr           = gv_prctr
          gs_anla            = gs_anla
          gv_emv             = gv_emv
          gv_cond            = gv_cond
          gv_operable        = gv_operable
          gv_action          = gv_action
          gv_justify         = gv_justify
          gv_replace         = gv_replace
          gv_replace_comment = gv_replace_comment
          gv_process         = gv_process
        IMPORTING
          job_output_info    = lt_job_output
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          OTHERS             = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S'  NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT lt_job_output-otfdata INTO ls_otf.
        lt_otf = ls_otf.
        APPEND lt_otf.
        CLEAR lt_otf.
      ENDLOOP.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = lv_len_in
        TABLES
          otf                   = lt_otf
          lines                 = lt_tline
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
    Fehlerhandling
      IF sy-subrc EQ 0.
      ENDIF.
      LOOP AT lt_tline.
        TRANSLATE lt_tline USING '~'.
        CONCATENATE ls_buffer lt_tline INTO ls_buffer.
      ENDLOOP.
      TRANSLATE ls_buffer USING '~'.
      append ls_buffer TO lt_objbin.
    DATA  lv_counter         TYPE i.
      DO.
        lt_record = ls_buffer.
        APPEND lt_record.
        SHIFT ls_buffer LEFT BY 255 PLACES.
        IF ls_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Attachment
      REFRESH:
      lt_reclist,
      lt_objtxt,
      lt_objbin,
      lt_objpack.
      CLEAR ls_objhead.
      lt_objbin[] = lt_record[].
    lt_objhex[] = lt_record[].
      CLEAR lv_descp.
      CONCATENATE 'Asset'
                  gs_anla-anln1
                  'Approval details'
             INTO lv_descp
    SEPARATED BY space.
    Create Message Body
    Title and Description
      CONCATENATE  'Please find attached the approval details of asset : '
                   gs_anla-anln1
              INTO lv_mail_descp
             SEPARATED BY space .
      lt_objtxt = lv_mail_descp.
      APPEND lt_objtxt.
      CLEAR  lv_mail_descp .
    appending space lines into text of mail.
    DO 3 times.
      CLEAR lt_objtxt.
      APPEND lt_objtxt .
    ENDDo.
    CONCATENATE 'This is an automatically generated message.'
                 'Please do not reply to this mail.'
           INTO lv_mail_descp
         SEPARATED BY space .
    lt_objtxt = lv_mail_descp.
    APPEND lt_objtxt.
      DESCRIBE TABLE lt_objtxt LINES lv_lines_txt.
      READ     TABLE lt_objtxt INDEX lv_lines_txt.
      ls_doc_chng-obj_name = 'smartform'.
      ls_doc_chng-expiry_dat = sy-datum + 10.
      ls_doc_chng-obj_descr = lv_descp.
      ls_doc_chng-sensitivty = 'F'.
      ls_doc_chng-doc_size = ( lv_lines_txt - 1 ) * 255  + STRLEN( lt_objtxt ) .
    Main Text
    wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt ).
      CLEAR lt_objpack-transf_bin.
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = lv_lines_txt.
    lt_objpack-doc_type = 'RAW'.
        lt_objpack-doc_type = 'TXT'.
      APPEND lt_objpack.
    Attachment
    (pdf-Attachment)
      lt_objpack-transf_bin = 'X'.
      lt_objpack-head_start = 1.
      lt_objpack-head_num   = 0.
      lt_objpack-body_start = 1.
      DESCRIBE TABLE lt_objbin LINES lv_lines_bin.
      READ TABLE lt_objbin INDEX lv_lines_bin.
      lt_objpack-doc_size = ( lv_lines_bin - 1 ) * 255 + STRLEN( lt_objbin ) .
      lt_objpack-body_num = lv_lines_bin.
      lt_objpack-doc_type = 'PDF'.
      lt_objpack-obj_name = 'ATTACHMENT'.
      lt_objpack-obj_descr = lv_descp.
      APPEND lt_objpack.
      LOOP AT t_mail_addr.
        CLEAR lt_reclist.
        lt_reclist-receiver = t_mail_addr-mailid.
        lt_reclist-rec_type = 'U'.
        APPEND lt_reclist.
      ENDLOOP.
      IF t_mail_addr[] IS INITIAL.
        CLEAR lt_reclist.
        lt_reclist-receiver = mail id.
        lt_reclist-rec_type = 'U'.
        APPEND lt_reclist.
      ENDIF.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = ls_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = lt_objpack
          object_header              = ls_objhead
          contents_bin               = lt_objbin
          contents_txt               = lt_objtxt
          receivers                  = lt_reclist
         CONTENTS_HEX                = lt_objbin
        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.
      DATA: l TYPE sy-subrc.
      l = sy-subrc.
    When i run the above code in Se38, I get an email with a attachment that i am able to open. The problem seems to be with user WF_BATCH.
    I have already checked all the existing threads on this. I did this coding as per one of the SDN threads itself.
    I am able to open the PDF attachment even when i test the method. The problem is only when it is run through a task/workflow.
    Please advice.
    Thanks and Regards,
    Soumya Gayatri.
    Edited by: Soumya Gayatri on Apr 14, 2009 8:40 PM
    Edited by: Soumya Gayatri on Apr 14, 2009 8:44 PM
    Edited by: Soumya Gayatri on Apr 14, 2009 8:45 PM
    Edited by: Soumya Gayatri on Apr 14, 2009 8:47 PM
    Edited by: Soumya Gayatri on Apr 14, 2009 8:47 PM

    Hello,
    You should see an "Edit" in the top right of your post, you can use that to edit it.
    As I said, use  before and after the coding, but without the spaces (after "{" and before "}" ).
    Try it!
    Testing:
    this is code
    regards
    Rick Bakker
    Hanabi Technology

  • What is best implementation for two human tasks?

    I am trying to find the best way to do this,
    I have two human task workflows that I have created. The application we are making uses one of these workflows based on a parameter you give it through a text box. So lets say you have workflow A and B. If you select A it will run and do workflow A and vice versa. These workflow also have different inputs associated with them for review.
    My question is what is the best way to implement this?
    My first thought is to create two separate projects, one that does workflow A and the other does workflow B and deploy both composites to the server, and have two separate form projects in the Application deployment.
    There is also another way I was thinking about doing this which is to have a mediator that takes in input and either goes from one bpel process or another bpel process, my problem with this is I don't know how to make certain fields in the webservice payload not mandatory. So any advice on this would be helpful.
    Is there any difference in the performance of these two ways? Which way is better?

    I am trying to find the best way to do this,
    I have two human task workflows that I have created. The application we are making uses one of these workflows based on a parameter you give it through a text box. So lets say you have workflow A and B. If you select A it will run and do workflow A and vice versa. These workflow also have different inputs associated with them for review.
    My question is what is the best way to implement this?
    My first thought is to create two separate projects, one that does workflow A and the other does workflow B and deploy both composites to the server, and have two separate form projects in the Application deployment.
    There is also another way I was thinking about doing this which is to have a mediator that takes in input and either goes from one bpel process or another bpel process, my problem with this is I don't know how to make certain fields in the webservice payload not mandatory. So any advice on this would be helpful.
    Is there any difference in the performance of these two ways? Which way is better?

Maybe you are looking for