OOTB Approval Workflow for a Content Type sends emails for 2 content types

My environment: SP 2013 Server (WFE-APP) + SQL
I have a few Content Types configured in a document library. Every content type has an OOTB approval workflow to fire an e-mail to the approver on each new/edit.
When I create a new file for testing, it first becomes checked out with no properties added. I then edit the properties to specify its content type and other fields. When I check in the document, SharePoint sends out an e-mail to the approver for that content
type which is correct. What SharePoint also does for this very same file is sends out an approval request e-mail for the default content type for that library which is something else than a desired content type.
This is something I cannot understand. I thought that the workflows start on a file 'Check in'. If I check in a file that is a certain content type, why does the approval for a default content type for a library trigger as well? 

Hi,
Is it SharePoint 2013 workflow or previous 2010 model workflow? If it's SharePoint 2013, how are you associating workflow to content type. As per
MSDN "Unlike previous versions, SharePoint 2013 does not support workflows that are scoped to a
content type. However, the messaging infrastructure is extensible, so it can support
any arbitrary scope. As a developer, you can set to", workflow association with content type (which was possible in SharePiont 2010) is no longer available out of the box. You need to do it manually, (not sure how as there's no documentation yet
from MS) and programmatically.
Thanks,
Sohel Rana
http://ranaictiu-technicalblog.blogspot.com

Similar Messages

  • OOTB Approval workflow and content approval

    I have successfully utilized the OOTB Approval workflow to manage the content approval status for document libraries.
    But when I attempt the same on a list (custom, links, announcements...etc)..... the approval goes through without a problem but the content approval status remains in "Pending" status.
    Does the approval workflow NOT work for lists? (And only document libraries?)
    I found this article that describes that the solution is to uncheck the "start this workflow when an item is changed":
    http://support.microsoft.com/kb/2908491
    ...which is somewhat ridiculous and pretty much forces the user to have to initiate the workflow manually each time they change the item?
    At any rate... I did what the article suggested and manually initiated the WF and the approval status still remains in pending mode.
    Can someone help clarify this for me?
    Thanks in advance

    Please make sure that Publishing Approval Workflow feature is enabled in Site Collection Features. Otherwise their should be no issue.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • OOTB Approval Workflow on Custom List does not Update Approval Status

    I have a custom list on which I've required content approval.  I then created a workflow instance from the "Approval - SharePoint 2010" template.  For this workflow I have selected "Update the approval status after the workflow
    is completed (use this workflow to control content approval".  When I approve the list item via the workflow task item the status of the item is not updated but stays at pending even though the
    workflow shows "Completed" with the Outcome of "approved".  Is this the expected behavior, i.e. does "Update the approval status after the workflow is completed (use this workflow to control content approval"
    not work for custom lists?  Does it work on any of the lists?

    Hi Kalos1840,
    If you check "Require Content Approval" setting, only the way above can update the approval status due to the approval status is for this approval workflow. As this approval workflow cannot achieve your demand, I recommend you un-check "Require Content Approval"
    setting and create a custom workflow such as the OOTB Approval Workflow or SharePoint Designer workflow.
    Here is the steps of a SharePoint Designer workflow:
    1.Go to your custom list , click Create a Workflow in SharePoint Designer.
    2.Add a “Start a task process” action in your workflow.
    3.Click “these users” and Start a Task Process edit page will pop up.
    4.In the Participants field, input your  approvers based on the order of approval.
    5.In the right of Participants field, select “Serial (one at a time)”.
    Best  Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • To avoid the attachment for the body content while sending email from ABAP

    SAP Version : 4.7
       When i tried to send an external email from the abap report program, the body content of the mail is coming as an attachment for the same. I need to avoid this. Please give the suggestion. Am attaching the code.
                        DECLARATION PART                                 *
    TYPE-POOLS : SLIS.
    TABLES : VBAK.
    DECLARATION FOR ALV.
    DATA : F_FIELD TYPE SLIS_T_FIELDCAT_ALV,
           W_FIELD TYPE SLIS_FIELDCAT_ALV,
           L_HEADER TYPE SLIS_T_LISTHEADER,
           W_HEADER TYPE SLIS_LISTHEADER,
           W_LAYOUT TYPE SLIS_LAYOUT_ALV,
           t_sort type slis_t_sortinfo_alv,
           w_sort type slis_sortinfo_alv.
    TYPES : BEGIN OF T_VBAK,
              VBELN    LIKE VBAK-VBELN,
              VKGRP    LIKE VBAK-VKGRP,
              KUNNR    LIKE VBAK-KUNNR,
              ERDAT    LIKE VBAK-ERDAT,
              VTWEG    LIKE VBAK-VTWEG,
              LIFSK    LIKE VBAK-LIFSK,
              VKBUR    LIKE VBAK-VKBUR,
            END OF T_VBAK.
    TYPES : BEGIN OF T_VBAP,
              VBELN    LIKE VBAP-VBELN,
              POSNR    LIKE VBAP-POSNR,
              MATNR    LIKE VBAP-MATNR,
              WERKS    LIKE VBAP-WERKS,
              ARKTX    LIKE VBAP-ARKTX,
              KWMENG   LIKE VBAP-KWMENG,
              CUOBJ    LIKE VBAP-CUOBJ,
              NETWR    LIKE VBAP-NETWR,
              ZSCHL_K  LIKE VBAP-ZSCHL_K,
              KONDM    LIKE VBAP-KONDM,
              ZZURWN   LIKE VBAP-ZZURWN,
            END OF T_VBAP.
    TYPES : BEGIN OF T_LIPS,
              VBELN    LIKE LIPS-VBELN,
              POSNR    LIKE LIPS-POSNR,
              VGBEL    LIKE LIPS-VGBEL,
              VGPOS    LIKE LIPS-VGPOS,
            END OF T_LIPS.
    TYPES : BEGIN OF T_KNA1,
              KUNNR    LIKE KNA1-KUNNR,
              NAME1    LIKE KNA1-NAME1,
              ADRNR    LIKE KNA1-ADRNR,
            END OF T_KNA1.
    TYPES : BEGIN OF T_VBKD,
              VBELN    LIKE VBKD-VBELN,
              POSNR    LIKE VBKD-POSNR,
              BSTKD    LIKE VBKD-BSTKD,
              BSTDK    LIKE VBKD-BSTDK,
              KURSK    LIKE VBKD-KURSK,          " CURRENCY CHECK
              BZIRK    LIKE VBKD-BZIRK,          " SALES DISTRICT
              KDGRP    LIKE VBKD-KDGRP,
              IHREZ    LIKE VBKD-IHREZ,
            END OF T_VBKD.
    TYPES : BEGIN OF T_LIKP,
              VBELN    LIKE LIKP-VBELN,
              ERDAT    LIKE LIKP-ERDAT,
            END OF T_LIKP.
    TYPES : BEGIN OF T_ADR6,
              ADDRNUMBER LIKE ADR6-ADDRNUMBER,
              SMTP_ADDR  LIKE ADR6-SMTP_ADDR,
            END OF T_ADR6.
    DATA  : BEGIN OF IT_CUST OCCURS 0,
              KUNNR LIKE VBAK-KUNNR,
            END OF IT_CUST.
    TYPES : BEGIN OF T_VBUP,
              VBELN    LIKE VBUP-VBELN,
              POSNR    LIKE VBUP-POSNR,
              KOSTA    LIKE VBUP-KOSTA,
              WBSTA    LIKE VBUP-WBSTA,
            END OF T_VBUP.
    TYPES : BEGIN OF T_TVLST,
              LIFSP    LIKE TVLST-LIFSP,
              VTEXT    LIKE TVLST-VTEXT,
            END OF T_TVLST.
    TYPES : BEGIN OF T_CONFIG.
            INCLUDE STRUCTURE CONF_OUT.
    TYPES : END OF T_CONFIG.
    DATA  : TMP LIKE VBAK-KUNNR.
    DATA  : NAME_TEXT LIKE THEAD-TDNAME.
    DATA  : TLINE1 LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA  : TMP_BRAKET LIKE CONF_OUT-ATWRT,
            TMP_BRAKET1 LIKE CONF_OUT-ATWRT.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
              WERKS   LIKE VBAP-WERKS,
              VBELN   LIKE VBAP-VBELN,
              POSNR   LIKE VBAP-POSNR,
              KUNNR   LIKE VBAK-KUNNR,
              NAME1   LIKE KNA1-NAME1,
              VBELN1  LIKE LIKP-VBELN,
              ERDAT   LIKE LIKP-ERDAT,
              LIFSK   LIKE VBAK-LIFSK,
              ZZURWN  LIKE VBAP-ZZURWN,
              IHREZ   LIKE VBKD-IHREZ,
              ERDAT1  LIKE VBAK-ERDAT,
              NETWR(25) type C,
              BSTKD   LIKE VBKD-BSTKD,
              BSTDK   LIKE VBKD-BSTDK,
              SALORD(17)  TYPE C,
              PUMP_TYPE LIKE CONF_OUT-ATWRT,
              PUMP_SIZE LIKE CONF_OUT-ATWRT,
              VTEXT     LIKE TVLST-VTEXT,
              KWMENG(25) TYPE C,
              FOOTER(330) TYPE C,
              ITMTXT(330) TYPE C,
           END OF IT_FINAL.
    DATA : IT_VBAK TYPE STANDARD TABLE OF T_VBAK,
           IT_VBAP TYPE STANDARD TABLE OF T_VBAP,
           IT_VBKD TYPE STANDARD TABLE OF T_VBKD,
           IT_LIKP TYPE STANDARD TABLE OF T_LIKP,
           IT_LIPS TYPE STANDARD TABLE OF T_LIPS,
           IT_VBUP TYPE STANDARD TABLE OF T_VBUP,
           IT_KNA1 TYPE STANDARD TABLE OF T_KNA1,
           IT_ADR6 TYPE STANDARD TABLE OF T_ADR6,
           IT_FINAL1 LIKE IT_FINAL OCCURS 0 with header line,
           IT_TVLST TYPE STANDARD TABLE OF T_TVLST,
           IT_CONFIG TYPE STANDARD TABLE OF T_CONFIG,
           W_VBAK TYPE T_VBAK,
           W_VBAP TYPE T_VBAP,
           W_VBKD TYPE T_VBKD,
           W_LIKP TYPE T_LIKP,
           W_ADR6 TYPE T_ADR6,
           W_LIPS TYPE T_LIPS,
           W_VBUP TYPE T_VBUP,
           W_KNA1 TYPE T_KNA1,
           W_TVLST TYPE T_TVLST,
           W_CONFIG TYPE T_CONFIG.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
                        SELECTION-CRITERIA                               *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : R2 RADIOBUTTON GROUP G1 USER-COMMAND radio DEFAULT 'X',
                 R1 RADIOBUTTON GROUP G1 .
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-002.
    PARAMETERS:  p_email TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    PARAMETERS : P_VTWEG LIKE W_VBAK-VTWEG ,
                 P_WERKS LIKE W_VBAP-WERKS.
    select-options : s_vkgrp for w_vbak-vkgrp,
                     s_ERDAT for w_LIKP-ERDAT.
    selection-screen end of block b2.
                              Initialization
    INITIALIZATION.
      s_vkgrp-sign = 'I'.
      s_vkgrp-option = 'BT'.
      s_vkgrp-low = '313'.
      s_vkgrp-high = '324'.
      APPEND s_vkgrp.
      s_erdat-sign = 'I'.
      s_erdat-option = 'BT'.
      s_erdat-low = '20080108'.
      s_erdat-high = '20080108'.
    s_erdat-low = '20070101'.
    s_erdat-high = sy-datum.
      APPEND s_erdat.
                      selection-screen validations
    AT SELECTION-SCREEN.
      Validation for Plant.
      IF p_werks NE '7210'.
        MESSAGE : 'Plant entered should be 7210' TYPE 'E'.
      ENDIF.
                   START OF SELECTION                                    *
    start-of-selection.
    GETTING THE DATA FROM THE DATABASE TABLE
      PERFORM DATA_FETCH.
    FILLING THE FINAL INTERNAL TABLE
      PERFORM FILL_FINAL.
    GETTING THE LIST FOR SENDING MAIL OR DISPLAY.
    IF R1 = 'X'.
      Populate table with details to be entered into .xls file
      LOOP AT IT_CUST.
        PERFORM build_xls_data_table using it_cust-kunnr.
      ENDLOOP.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
        PERFORM initiate_mail_execute_program.
    ELSEIF R2 = 'X'.
      PERFORM LIST_DISPLAY.
    ENDIF.
                   END OF SELECTION                                      *
    end-of-selection.
    *&      Form  DATA_FETCH
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_FETCH .
       SELECT VBELN
              VKGRP
              KUNNR
              ERDAT
              VTWEG
              LIFSK
              VKBUR
       INTO TABLE IT_VBAK
       FROM VBAK
       WHERE VTWEG = P_VTWEG
       AND   VKGRP IN S_VKGRP
       AND   LIFSK NE ''.
    IF IT_VBAK[] IS NOT INITIAL.
      SELECT  LIFSP
              VTEXT
      INTO TABLE IT_TVLST
      FROM TVLST
      FOR ALL ENTRIES IN IT_VBAK
      WHERE  LIFSP = IT_VBAK-LIFSK
      AND    SPRAS = 'EN'.
      SELECT  VBELN
              POSNR
              MATNR
              WERKS
              ARKTX
              KWMENG
              CUOBJ
              NETWR
              ZSCHL_K
              KONDM
              ZZURWN
      INTO TABLE IT_VBAP
      FROM VBAP
      FOR ALL ENTRIES IN IT_VBAK
      WHERE VBELN = IT_VBAK-VBELN
      AND   WERKS = P_WERKS.
      SELECT KUNNR
             NAME1
             ADRNR
      INTO TABLE IT_KNA1
      FROM KNA1
      FOR ALL ENTRIES IN IT_VBAK
      WHERE   KUNNR = IT_VBAK-KUNNR.
      SELECT  VBELN
              POSNR
              BSTKD
              BSTDK
              KURSK
              BZIRK
              KDGRP
      INTO TABLE IT_VBKD
      FROM VBKD
      FOR ALL ENTRIES IN IT_VBAK
      WHERE VBELN = IT_VBAK-VBELN.
    ENDIF.
    IF IT_VBAP[] IS NOT INITIAL.
      SELECT VBELN
             POSNR
             VGBEL
             VGPOS
      INTO TABLE IT_LIPS
      FROM LIPS
      FOR ALL ENTRIES IN IT_VBAP
      WHERE VGBEL = IT_VBAP-VBELN
      AND   VGPOS = IT_VBAP-POSNR.
    ENDIF.
    IF IT_LIPS[] IS NOT INITIAL.
      SELECT VBELN
             ERDAT
      INTO TABLE IT_LIKP
      FROM LIKP
      FOR ALL ENTRIES IN IT_LIPS
      WHERE VBELN = IT_LIPS-VBELN
      AND   ERDAT IN S_ERDAT.
      SELECT VBELN
             POSNR
             KOSTA
             WBSTA
      INTO TABLE IT_VBUP
      FROM VBUP
      FOR ALL ENTRIES IN IT_LIPS
      WHERE VBELN = IT_LIPS-VBELN
      AND   POSNR = IT_LIPS-POSNR
      AND   KOSTA EQ 'C'
      AND   WBSTA NE 'C'.
    ENDIF.
    IF IT_KNA1[] IS NOT INITIAL.
      SELECT ADDRNUMBER
             SMTP_ADDR
      INTO TABLE IT_ADR6
      FROM ADR6
      FOR ALL ENTRIES IN IT_KNA1
      WHERE ADDRNUMBER = IT_KNA1-ADRNR.
    ENDIF.
    ENDFORM.                    " DATA_FETCH
    *&      Form  LIST_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM LIST_DISPLAY .
    REFRESH F_FIELD.
      IF R2 = 'X'.
        W_FIELD-col_pos = 1.
        W_FIELD-fieldname = 'WERKS'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Plant'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 2.
        W_FIELD-fieldname = 'VBELN'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Sales Order'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 3.
        W_FIELD-fieldname = 'KUNNR'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Customer Code'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 4.
        W_FIELD-fieldname = 'NAME1'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Customer Name'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 5.
        W_FIELD-fieldname =  'VBELN1'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Delivery Number'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 6.
        W_FIELD-fieldname = 'ERDAT'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Delivery Date'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 7.
        W_FIELD-fieldname = 'LIFSK'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Delivery Block'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 8.
        W_FIELD-fieldname = 'PUMP_TYPE'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Pump Type'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 9.
        W_FIELD-fieldname = 'PUMP_SIZE'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_l = 'Pump Size'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 10.
        W_FIELD-fieldname = 'ZZURWN'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Pump Srno'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 11.
        W_FIELD-fieldname = 'IHREZ'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Indent No.'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 12.
        W_FIELD-fieldname = 'ERDAT'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Order Booking Dt'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 13.
        W_FIELD-fieldname = 'NETWR'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C710'.
        W_FIELD-seltext_m = 'Net Value'.
        w_field-do_sum = 'X'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 14.
        W_FIELD-fieldname = 'KWMENG'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C710'.
        W_FIELD-seltext_m = 'Qty'.
        w_field-do_sum = 'X'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 15.
        W_FIELD-fieldname = 'BSTKD'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Customer PONO'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 16.
        W_FIELD-fieldname = 'BSTDK'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Customer PODT'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 17.
        W_FIELD-fieldname = 'SALORD'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Sales Order/Item'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 18.
        W_FIELD-fieldname = 'VTEXT'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Delivery Block Desc.'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 19.
        W_FIELD-fieldname = 'FOOTER'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Footer Text'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        W_FIELD-col_pos = 20.
        W_FIELD-fieldname = 'ITMTXT'.
        W_FIELD-tabname = 'IT_FINAL'.
        W_FIELD-emphasize = 'C410'.
        W_FIELD-seltext_m = 'Item Text'.
        APPEND W_FIELD TO F_FIELD.
        CLEAR W_FIELD.
        PERFORM SORT_FIELD.
        PERFORM LAYOUT_DISPLAY.
        PERFORM GRID_DISPLAY.
      ENDIF.
    ENDFORM.                    " LIST_DISPLAY
    *&      Form  FILL_FINAL
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_FINAL .
    REFRESH IT_FINAL.
    LOOP AT IT_VBUP INTO W_VBUP.
        READ TABLE IT_LIPS INTO W_LIPS WITH KEY VBELN = W_VBUP-VBELN POSNR = W_VBUP-POSNR.
        READ TABLE IT_LIKP INTO W_LIKP WITH KEY VBELN = W_LIPS-VBELN.
        IF SY-SUBRC EQ 0.
        READ TABLE IT_VBAP INTO W_VBAP WITH KEY VBELN = W_LIPS-VGBEL POSNR = W_LIPS-VGPOS.
        READ TABLE IT_VBAK INTO W_VBAK WITH KEY VBELN = W_VBAP-VBELN.
        READ TABLE IT_VBKD INTO W_VBKD WITH KEY VBELN = W_VBAK-VBELN.
        READ TABLE IT_KNA1 INTO W_KNA1 WITH KEY KUNNR = W_VBAK-KUNNR.
        READ TABLE IT_TVLST INTO W_TVLST WITH KEY LIFSP = W_VBAK-LIFSK.
          IT_FINAL-WERKS   = W_VBAP-WERKS.
          IT_FINAL-VBELN   = W_VBAP-VBELN.
          IT_FINAL-KUNNR   = W_VBAK-KUNNR.
          IT_FINAL-NAME1   = W_KNA1-NAME1.
          IT_FINAL-VBELN1  = W_LIKP-VBELN.
          IT_FINAL-ERDAT   = W_LIKP-ERDAT.
          IT_FINAL-LIFSK   = W_VBAK-LIFSK.
          IT_FINAL-ZZURWN  = W_VBAP-ZZURWN.
          IT_FINAL-IHREZ   = W_VBKD-IHREZ.
          IT_FINAL-ERDAT1  = W_VBAK-ERDAT.
          IT_FINAL-NETWR   = W_VBAP-NETWR.
          IT_FINAL-BSTKD   = W_VBKD-BSTKD.
          IT_FINAL-BSTDK   = W_VBKD-BSTDK.
          IT_FINAL-POSNR   = W_VBAP-POSNR.
          IT_FINAL-VTEXT   = W_TVLST-VTEXT.
          IT_FINAL-KWMENG  = W_VBAP-KWMENG.
          CONCATENATE W_VBAP-VBELN W_VBAP-POSNR INTO IT_FINAL-SALORD SEPARATED BY '/'.
          IF W_VBAP-CUOBJ NE '000000000000000000'.
            REFRESH IT_CONFIG.
              CALL FUNCTION 'VC_I_GET_CONFIGURATION'
                EXPORTING
                  INSTANCE            = W_VBAP-CUOBJ
                  LANGUAGE            = SY-LANGU
                TABLES
                  CONFIGURATION       = IT_CONFIG
                EXCEPTIONS
                  INSTANCE_NOT_FOUND  = 1
                  INTERNAL_ERROR      = 2
                  NO_CLASS_ALLOCATION = 3
                  INSTANCE_NOT_VALID  = 4
                  OTHERS              = 5.
              IF SY-SUBRC = 0.
                READ TABLE IT_CONFIG INTO W_CONFIG WITH KEY ATNAM = 'IN_PUMP_TYPE'.
                IT_FINAL-PUMP_TYPE = W_CONFIG-ATWRT.
                CLEAR W_CONFIG.
                READ TABLE IT_CONFIG INTO W_CONFIG WITH KEY ATNAM = 'IN_PUMP_SIZE' .
                IT_FINAL-PUMP_SIZE = W_CONFIG-ATWRT.
                CLEAR W_CONFIG.
              ENDIF.
          ENDIF.
            move w_vbap-vbeln to name_text.
            CALL FUNCTION 'READ_TEXT'
              EXPORTING
                id       = 'ZKT1'
                language = 'E'
                name     = name_text
                object   = 'VBBK'
              TABLES
                lines    = tline1
              EXCEPTIONS
                OTHERS   = 8.
          LOOP AT TLINE1.
            CONCATENATE IT_FINAL-FOOTER TLINE1-TDLINE+0(65) INTO IT_FINAL-FOOTER.
            CLEAR : TLINE1.
          ENDLOOP.
          clear : name_text,tline1[].
          concatenate w_vbap-vbeln w_vbap-posnr into name_text.
            CALL FUNCTION 'READ_TEXT'
              EXPORTING
                id       = 'ZKT3'
                language = 'E'
                name     = name_text
                object   = 'VBBP'
              TABLES
                lines    = tline1
              EXCEPTIONS
                OTHERS   = 8.
          LOOP AT TLINE1.
            CONCATENATE IT_FINAL-ITMTXT TLINE1-TDLINE+0(65) INTO IT_FINAL-ITMTXT.
            CLEAR : TLINE1.
          ENDLOOP.
          APPEND IT_FINAL.
        ENDIF.
       CLEAR : IT_FINAL,W_VBAP,W_VBKD,W_VBUP,W_LIPS,W_LIKP,W_KNA1,W_VBAK,W_TVLST,name_text,tline1[].
    ENDLOOP.
    IT_FINAL1[] = IT_FINAL[].
    SORT IT_FINAL1 BY KUNNR.
    LOOP AT IT_FINAL1.
      IF TMP NE IT_FINAL1-KUNNR.
       IT_CUST-KUNNR = IT_FINAL1-KUNNR.
       APPEND IT_CUST.
       clear : tmp,it_cust.
       TMP = IT_FINAL1-KUNNR.
      ENDIF.
      CLEAR : IT_FINAL1.
    ENDLOOP.
    ENDFORM.                    " FILL_FINAL
    *&      Form  LAYOUT_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT_DISPLAY .
      W_LAYOUT-colwidth_optimize = 'X'.
    ENDFORM.                    " LAYOUT_DISPLAY
    *&      Form  GRID_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM GRID_DISPLAY .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
           I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
           I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
         IS_LAYOUT                         = W_LAYOUT
         IT_FIELDCAT                       = F_FIELD
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
         IT_SORT                           = T_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
          TABLES
            T_OUTTAB                          = IT_FINAL
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GRID_DISPLAY
    *&      Form  SORT_FIELD
          text
    -->  p1        text
    <--  p2        text
    FORM SORT_FIELD .
      w_sort-spos = 1.
      w_sort-fieldname = 'KUNNR'.
      w_sort-up = 'X'.
      append w_sort to t_sort.
      clear w_sort.
      w_sort-spos = 2.
      w_sort-fieldname = 'VBELN'.
      w_sort-up = 'X'.
      append w_sort to t_sort.
      clear w_sort.
    ENDFORM.                    " SORT_FIELD
    *&      Form  TOP_OF_PAGE
          text
    FORM top_of_page.
      IF R2 = 'X'.
        REFRESH l_header.
        w_header-typ = 'S'.
        w_header-key = 'Delivery Block : '.
        w_header-info = 'Outbound delivery created but not despatched'.
        APPEND w_header TO l_header.
        CLEAR w_header.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary = l_header.
      ENDIF.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table using custcode.
    CONSTANTS: con_cret TYPE X VALUE '0D',  "OK for non Unicode
                con_tab TYPE x VALUE '09'.   "OK for non Unicode
    data : it_custcode like vbak-kunnr.
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    constants:
        con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
        con_cret type c value cl_abap_char_utilities=>CR_LF.
    clear : it_attach,it_attach[].
      CONCATENATE 'Customer PONO' 'Customer PODT' 'Sales Order No' 'Item No'
                  'Pump Type' 'Pump Size' 'Order Value Rs' 'Delivery No.' 'Delivery Dt.'
                  'Quantity' 'Reasons for not getting Despatch'
              INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      it_custcode = custcode.
    CLEAR : W_KNA1,W_ADR6.                                             "Code need to be added once testing is over.
    READ TABLE IT_KNA1 INTO W_KNA1 WITH KEY KUNNR = IT_CUSTCODE.
    READ TABLE IT_ADR6 INTO W_ADR6 WITH KEY ADDRNUMBER = W_KNA1-ADRNR.
    P_EMAIL = W_ADR6-SMTP_ADDR.
      LOOP AT it_final where kunnr = it_custcode.
        CONCATENATE
                    IT_FINAL-BSTKD
                    IT_FINAL-BSTDK
                    IT_FINAL-VBELN
                    IT_FINAL-POSNR
                    IT_FINAL-PUMP_TYPE
                    IT_FINAL-PUMP_SIZE
                    IT_FINAL-NETWR
                    IT_FINAL-VBELN1
                    IT_FINAL-ERDAT
                    IT_FINAL-KWMENG
                    IT_FINAL-VTEXT
        INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
        clear it_final.
      ENDLOOP.
      if R1 = 'X'.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'AWAITING DESPATCH CLEARANCE'
                                          'XLS'
                                          'Delivery_Block'
                                          'Delivery_Blk'
                                          '[email protected]'
                                          'INT'
                                 changing gd_error
                                          gd_reciever.
      endif.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR : w_doc_data,w_cnt.
      DESCRIBE TABLE it_attach LINES w_cnt.
    READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                object_header              = objhead
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'We have manufactured the pump/s against your purchase order and regret to inform'.
      APPEND it_message.
      it_message = 'you that same cannot be despatched for the reason/s indicated below.'.
      APPEND it_message.
      it_message = ' '.
      APPEND it_message.
      it_message = 'Please find the below attachment "Delivery_Blk.xls" for the details.'.
      APPEND it_message.
      it_message = ' '.
      APPEND it_message.
      it_message = 'We now request you to send the required detail/s by return mail/post to enable us '.
      APPEND it_message.
      it_message = 'to despatch the pump/s at the earliest.'.
      APPEND it_message.
      it_message = ' '.
      APPEND it_message.
      it_message = ' '.
      APPEND it_message.
      it_message = 'Best Regards'.
      APPEND it_message.
      it_message = 'O.E. ENGINEER'.
      APPEND it_message.
    endform.                    " POPULATE_EMAIL_MESSAGE_BODY

    Hi,
    Refer to the following piece of code. This is the simple code to send email with content and attachment.
    Declaration
      DATA:    lwa_hd_change TYPE sood1,
               lt_objcont    TYPE STANDARD TABLE OF soli,
               lwa_objcont   TYPE soli,
               lt_receivers  TYPE STANDARD TABLE OF soos1,
               lwa_receivers TYPE soos1 ,
               lt_att_cont   TYPE STANDARD TABLE OF soli,
               lwa_att_cont  TYPE soli,
               lt_packing    TYPE STANDARD TABLE OF soxpl,
               lwa_packing   TYPE soxpl,
               lf_sent       TYPE sonv-flag,
               lf_size       TYPE i.
      CONSTANTS: lc_obj(11)  TYPE c VALUE 'BOMSouthco',
                 lc_desc(20) TYPE c VALUE 'BOM Download',
                 lc_lang(1)  TYPE c VALUE 'E',
                 lc_raw(3)   TYPE c VALUE 'RAW',
                 lc_net(1)   TYPE c VALUE 'U',
                 lc_mail(4)  TYPE c VALUE 'MAIL',
                 lc_xls(3)   TYPE c VALUE 'XLS',
                 lc_ext(3)   TYPE c VALUE 'EXT'.
    Passing values to the strutures used in SO_OBJECT_SEND function module
      lwa_hd_change-objla      = lc_lang.
      lwa_hd_change-objnam     = lc_obj.
      lwa_hd_change-objdes     = lc_desc.
      lwa_hd_change-objlen     = 255.
      lwa_objcont-line = text-t29.
      APPEND lwa_objcont TO lt_objcont.
      CLEAR lwa_objcont.
      lwa_receivers-recextnam  = text-t31.
      lwa_receivers-recesc     = lc_net.
      lwa_receivers-sndart     = lc_mail.
      lwa_receivers-sndex      = 'X'.
      lwa_receivers-sndpri     = 1.
      lwa_receivers-mailstatus = 'E'.
      APPEND lwa_receivers TO lt_receivers.
      CLEAR lwa_receivers.
      lwa_receivers-recextnam  = text-t30.
      lwa_receivers-recesc     = lc_net.
      lwa_receivers-sndart     = lc_mail.
      lwa_receivers-sndex      = 'X'.
      lwa_receivers-sndpri     = 1.
      lwa_receivers-mailstatus = 'E'.
      APPEND lwa_receivers TO lt_receivers.
      CLEAR lwa_receivers.
    Passing values for the attachment file
      LOOP AT gt_output INTO gwa_output.
        CONCATENATE gf_lf  gwa_output-matnr  gf_etb  gwa_output-idnrk  gf_etb
                    gwa_output-type   gf_etb  gwa_output-menge   gf_etb
                    gwa_output-meins  gf_etb  gwa_output-comp    gf_etb
          INTO lwa_att_cont-line.
        APPEND lwa_att_cont TO lt_att_cont.
        CLEAR lwa_att_cont.
      ENDLOOP.
      CHECK lt_att_cont IS NOT INITIAL.
      DESCRIBE TABLE lt_att_cont LINES lf_size.
      lwa_packing-transf_bin = ' '.
      lwa_packing-head_start = 1.
      lwa_packing-head_num   = 0.
      lwa_packing-body_start = 1.
      lwa_packing-body_num   = lf_size.
      lwa_packing-file_ext   = lc_xls.
      lwa_packing-objlen     = lf_size * 255.
      lwa_packing-objtp      = lc_ext.
      lwa_packing-objdes     = lc_desc.
      lwa_packing-objnam     = lc_obj.
      APPEND lwa_packing TO lt_packing.
      CLEAR lwa_packing.
      CHECK gf_error IS NOT INITIAL. "Check if unix file is written
    FM to send email to the intended recipients
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change           = lwa_hd_change
          object_type                = lc_raw
        IMPORTING
          sent_to_all                = lf_sent
        TABLES
          objcont                    = lt_objcont
          receivers                  = lt_receivers
          packing_list               = lt_packing
          att_cont                   = lt_att_cont
        EXCEPTIONS
          active_user_not_exist      = 1
          communication_failure      = 2
          component_not_available    = 3
          folder_not_exist           = 4
          folder_no_authorization    = 5
          forwarder_not_exist        = 6
          note_not_exist             = 7
          object_not_exist           = 8
          object_not_sent            = 9
          object_no_authorization    = 10
          object_type_not_exist      = 11
          operation_no_authorization = 12
          owner_not_exist            = 13
          parameter_error            = 14
          substitute_not_active      = 15
          substitute_not_defined     = 16
          system_failure             = 17
          too_much_receivers         = 18
          user_not_exist             = 19
          originator_not_exist       = 20
          x_error                    = 21
          OTHERS                     = 22.
      IF sy-subrc = 0.
        MESSAGE s004 WITH text-t34.
      ENDIF.
      COMMIT WORK.
    Reward if helpful.
    Regards,
    Ramya

  • Customize SP2010 OOTB approval workflow using SP designer

    Hi,
    Even though it has been long time i raised the following question:
    http://social.msdn.microsoft.com/Forums/office/en-US/1efa6726-5790-4930-9520-4ef6398c503c/customize-ootb-approval-workflow-using-spd-2010?forum=sharepointcustomizationprevious
    but i never created the workflow using the proposed solution until now. After doing some testing i can verify the proposed solution doesn't work for the following reason:
    1.If i use 'user who created current item' and at the time of submitting the workflow add a different user email address in the 'Approver' field. It doesn't assign task to the user who has been manually added into approver field. It would still assign the
    task to the user who created the current item which is incorrect.
    2.If i use 'user who created current item' and a user who created the page has moved from his/her role, when submitting the workflow manually, the system will assign the task to the user who created the original item not the one who has just modified the
    item
    Ideally we would like to add the 'Approver' when submitting the workflow manually. Is there any other way of doing this? or i have tried the following:
    Copy default approval workflow -> Edit Workflow -> Initiation Form Parameters -> Modify Approvers -> Change 'Collect from parameter during:' to Initiation (starting the workflow) -> Next -> Finish -> OK -> Save -> Publish
    This lets you add the approver and would assign the task to the correct user. Is this a correct approach?
    Any help would be appreciated.
    Regards,
    Kash

    By collecting the values during initiation, you would be able to make it work correctly.  The only down side to this approach is that there are no default values, but that's a small price to pay for a working process.
    If you tested this and it works correctly, I would say that you have a good solution without having to dive too deep into custom code.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • OOTB Approval Workflow CC field issue

    I have a OOTB Approval Workflow that functions as expected but for the CC field. The email goes to only the first user mentioned in the CC field and not to the ones thereafter. I have checked the Approval Workflow steps using SharePoint Designer but nothing
    seems to be off. I have run out of ideas as to why only the first name in the CC gets an email but not the rest.

    Yes I did try changing the order. Still emails the first user mentioned in the order.
    KP
    Hi Kartik,
    Do you mean if you change the order of users in CC field, only the first user can recieve the email?
    Could you please contact SMTP administrator and see if message is sent from SharePoint workflow and recieved by user account? If you are using Exchange server as SMTP server, you could check message tracking log per timestamp.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Restrict Broadcaster to not send Emails for certain Queries

    Hi,
    is there any possibility to restrict a user on sending Emails for certain queries?
    With the existing authorizaion objects S_RS_BCS and S_RS_ADMWB it is not possible to do so.
    He will need S_RS_COMP to be able to open the Query.
    With S_OC_SEND I just be able to take his ability to send Emails, but the user will need this option.
    Does anybody has an idea?
    Thanks and best regards
    Sascha

    The Workspace User role ony controls whether the user is allowed to use Workspace or not.  A user will only be able to Start a Process in Workspace if they a) are a Workspace User and b) the process security settings allow them to by having the INVOKE_PERM enabled.  The INVOKE_PERM setting is usually controlled from within Application Management area in the Adminui and would be set per process to define who is allowed to invoke (start) that service (process).  Take a look at your processes and see if they are defined for the All Principals group having the INVOKE_PERM as this is one way in which everybody can start a process.
    I'm unfamiliar with the Services User role but if it sounds like maybe this has the INVOKE_PERM so this could be why all your users can start processes, presuming they are all in this role.
    But however the INVOKE_PERM priviledge is being granted, it is not via the Workspace User role.
    Hope that helps.
    Jon

  • I have not been able to send email for some time but now i have stopped being able to recieve email.

    i have not been able to send emails for some time but in the last two days ive stopped being able to receive, the message says 'username or password incorrect' ive checked all the settings, ive deleated accout and set up again, ive rebooted phone. i tried to sync with pc but this also fails any ideas

    That is correct, They don't seem to know about Mac, never got a single scrap of help from  them.  Try recreating your account from scratch, delete the account, (write down all your settings first) and add an account, see if that works, and if it does, delete the first account to prevent things doubling up on you.  I think that's what I did, it was quite a while ago.  Hope this helps, or gets you pointed in the right direction.  Maybe go to At&t and try creating another account, and if ti works, delete the first.
    One other tihing I did was to reset Safari, as AT&T uses the net, that's about all I can remember, like I said it was awhile ago.

  • How can i send email for suport to rest my questions' please helpe'

    how can i send email for suport to rest my questions' please helpe'

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (109789)

  • Send Email with Contents of List Item (not from workflow)

    End users have requested the capability to email a single list item, with all its data (by which they mean the data they see in their view), to an address to be entered on the fly. In other words, they want an option in the ECB or ribbon where
    they would fill in a box with an email address (not necessarily a SharePoint user) and the contents of the selected list item would be sent out by the portals email, which is already configured.
    My searching has found similar solutions involving workflows, but nothing in the way of an 'on-demand' type of process. If this is something that needs to be developed, I am not afraid to jump in, but am hoping there might be something I can leverage already
    in place.
    I would appreciate any ideas on this.
    Echo Train Nashville TN

    Hi Echo Train,
    I would still look at using a Workflow for this. Easiest option to setup and maintain, and
    you can still enter an email (or multiple emails) on demand.
    For the List Workflow click on Initiation Parameters and add one with
    Field name of Email for example.
    Description (something like): "Please enter the email(s) you wish to send the list item information. Separate each email with a semi colon ;"
    Information type: Single line of text
    Default value: leave it blank
    Next add a Send an Email action with the following settings:
    To: Select from existing Users and Groups > Workflow Lookup for a User...
    > Data source: Workflow Variables and Parameters
    > Field from source: Parameter: Email
    > Return field as: As String
    Then setup your Subject and Body using the Fields from the Current List Item
    Save the Workflow then go back into the Workflow settings and ensure that: Allow this workflow to be manually started is the only option selected.
    Publish the workflow and your users should now be able to click on the Workflow with the ability to enter one or more emails.
    There are other options apart from using a Workflow such as setting up an Action with some ECMA script, but much more difficult to create and maintain, which in this instance I would still opt for the Workflow solution.

  • Action to send email for multiple recipients

    Hi gurus,
    Currently the user needs to send a email for multiples recipients according to the organization structure.
    For example:
    The user generates a complaint and the systems must notify by email the department responsible to solve this complaint, sending an email for all employees assigned into this organizational unit.
    How should I configure the action to send an email for the whole departament?
    Best Regards,
    Gabriel Santana

    HI Gabriel,
    Get the email ID's of all the recipents from orgunit using FMs <b>RH_STRUC_GET</b> and <b>BAPI_BUPA_ADDRESS_GETDETAIL</b> into internal table <b>et_mailid</b> and then using FM <b>SO_NEW_DOCUMENT_ATT_SEND_API1</b>.
    For reference check the code below:
    <b>*i_message has contents of mail body</b>
    DATA:    g_sent_all(1) TYPE c,
             g_doc_data LIKE sodocchgi1,
      DATA:  i_message      LIKE solisti1   OCCURS 0 WITH HEADER LINE,
             i_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
             i_receivers    LIKE somlreci1  OCCURS 0 WITH HEADER LINE.
    Fill the document data.
        g_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
        g_doc_data-obj_langu = sy-langu.
        g_doc_data-obj_name  = 'SAPRPT'.
        CONCATENATE g_sdltime0(2) ':' g_sdltime2(2) ':' g_sdltime+4(2) INTO g_time.
        CONCATENATE c_subject g_time INTO g_doc_data-obj_descr SEPARATED BY space.
        g_doc_data-sensitivty = 'F'.
    Describe the body of the message
    Information about structure of data tables
        CLEAR i_packing_list.
        REFRESH i_packing_list.
        i_packing_list-transf_bin = space.
        i_packing_list-head_start = 1.
        i_packing_list-head_num = 0.
        i_packing_list-body_start = 1.
        DESCRIBE TABLE i_message LINES i_packing_list-body_num.
        i_packing_list-doc_type = 'RAW'.
        APPEND i_packing_list.
    Add the recipients email address
        LOOP AT et_mailid.
          CLEAR i_receivers.
          i_receivers-receiver = et_mailid-email_id.
          i_receivers-rec_type = 'U'.
          i_receivers-com_type   = 'INT'.
          i_receivers-notif_del  = 'X'.
          i_receivers-notif_ndel = 'X'.
          APPEND i_receivers.
        ENDLOOP.
    Call the FM to post the message to SAPMAIL
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = g_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          IMPORTING
            sent_to_all                = g_sent_all
          TABLES
            packing_list               = i_packing_list
            contents_txt               = i_message
            receivers                  = i_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.
    Regards,
    Amit
    *Always reward points for helpful answers
    Message was edited by:
            Amit Kumar

  • Email Activity not sending emails for one domain - 10.1.3.4 MLR#10

    I have four domains in my BPELConsole. My evey BPEL process has CatchAll block and I'm sending email notification with fault details.
    Somehow, my BPEL processes from three domains are sending emails properly but myDomain4 is not sending emails even after successful execution of Email Activity.
    1) I have compared the Email code with processes in other domain and they are similar.
    2) orabpel.bpelnotification is not logging any error for this notification.
    3) I never received any email from this domain. There was no error in logs during domain creation.
    3) I am getting following in logs that sending email was successfully executed. It received Notification ID too
    <2010-09-22 07:24:44,530> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.QueueConnectionPool::QueueConnectionPool> Fetched a queue connection from pool java:comp/env/jms/Queue/NotificationSenderQueueConnectionFactory, available connections=4
    <2010-09-22 07:24:44,534> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Start of send(type,caller,message) type = email caller = BPEL
    <2010-09-22 07:24:44,534> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Notification ID 12834c63e81c20d0:-71064af1:42b35e5dab4:-7283
    Please help/hint for any possible solution/debugging.

    sometimes i have seen emails not being sent when the async invokes takes more time than the overall completion.. And yes, we might still see successful log as emails sent. FYI - I am with 10.1.3.3.1 MLR #8.
    did you try just creating a email only process? switch off all other processes in that domain and initiate only this email process to see what happens..

  • Unable to send email from content server

    Hi,
    I have a requirement of sending the notification email to user from the stellent when he subscribe to it.To test it i logged in to content server as sysadmin.
    Administration->Actions->Send test email.
    I had filled some dummy data and when i click on send it gives me a error
    Content Server Request Failed
    Unable to send email. Could not send mail message from [email protected] with subject line: Test email from Content Server.
    intradoc.common.ServiceException: !csMailCouldNotSend,[email protected],Test email from Content Server
         at intradoc.server.InternetFunctions.sendMailToEx(Unknown Source)
         at intradoc.server.SystemAuditHandler.sendEmail(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at intradoc.common.IdcMethodHolder.invokeMethod(Unknown Source)
         at intradoc.common.ClassHelperUtils.executeMethodReportStatus(Unknown Source)
         at intradoc.server.ServiceHandler.executeAction(Unknown Source)
         at intradoc.server.Service.doCodeEx(Unknown Source)
         at intradoc.server.Service.doCode(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.doAction(Unknown Source)
         at intradoc.server.Service.doAction(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.doActions(Unknown Source)
         at intradoc.server.Service.doActions(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.executeActions(Unknown Source)
         at intradoc.server.Service.executeActions(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.doRequest(Unknown Source)
         at intradoc.server.Service.doRequest(Unknown Source)
         at intradoc.server.ServiceManager.processCommand(Unknown Source)
         at intradoc.server.IdcServerThread.run(Unknown Source)
    Caused by: intradoc.common.ServiceException:
         at intradoc.common.SmtpClient.sendMail(Unknown Source)
         at intradoc.server.InternetFunctions.sendMail(Unknown Source)
         ... 21 more
    Caused by: java.lang.Exception: !csSMTPInvalidMessage,"System Administrator" <[email protected]>!csSMTPUnableToFindRecipients,1
         at intradoc.common.SmtpClient.writeMultiMsg(Unknown Source)
         ... 23 more
    Caused by: java.lang.Exception: !csSMTPResponseIndicatesFailure,550 5.7.1 Unable to relay for [email protected]
         at intradoc.common.SmtpClient.writeMsg(Unknown Source)
         ... 24 more
    I had set the internet configration in admin server to this values..
    HttpServerAddress=blrdxp-rchithul.corp.capgemini.com
    MailServer=BLREX002.corp.capgemini.com
    [email protected]
    SmtpPort=25
    HttpRelativeWebRoot=/idc/
    CgiFileName=idcplg
    UseSSL=No
    WebProxyAdminServer=true
    But i am still getting the error.kindly help me...
    Thanks in Advance
    Regards
    Rakesh

    Hi Rakesh,
    You have to request you Network team to add the ip address of the machine where you have installed content server to your Exchange Server.
    Let me know if it works.
    Deepak

  • BODS 3.1 :SMTP configuration to send email for success or failure of job

    Hi.
    This is further to this post : http://forums.sdn.sap.com/thread.jspa?threadID=1965129&tstart=0
    Thanks to all for the help.
    I did not find a complete set of information as things to do (for a person who is new to BODS).
    Hence sharing the workflow which works for me when tested on a simple workflow  :
    Pre-requisite : SMTP service to be made available on the BODS server and port 25 to be opened up.
    This is done by the IT dept of the company.
    When smtp service is activated and port 25 is opened up, telnet IP address 25 should say, service is available.
    Suggestion : create a email group like : bods at company.com which can be used to be used for the BODS JOBs. Which does not prompt for a password. This also is done by the IT dept of the company.
    1) On the BODS server :
    1) Click open Data Services Server Manager
    2) SMTP settings for smtp_to functions :
    Add the IP Address of the SMTP server
    Add the email address of the sender. Eg. bodsjobs at companyname,com
    3)Apply/Restart the server.
    2) Login to BODS Designer :
    Create a test job :
    TRY ==>DF===> Script for success ===> CATCH script for failure
    In the script for success : add the following :
    print (' IN TRY BLOCK Before email ' );
    smtp_to('bodsjobs at abc,com', ' SUCCESS OF JOB  :  '
    || job_name(),'Job completed successfully ', 0, 0);
    print('After Email ');
    In the script for Catch add the following :
    print (' IN CATCH BLOCK Before email ' );
    smtp_to('bodsjobs at abc,com', 'FAILURE OF JOB : '
    || job_name(),
    error_number( ) || 'Error message: ' || error_message( ) ||
    'check details', 50, 50);
    print('After Email ');
    Note : In the catch : select all exceptions on the check box.
    Save all.
    Click on the job and say execute.
    The job will run and if it is successful. You will receive the succes mail.
    If there is any error in the DF before the catch, you will receive a mail, which says failure.
    The above workflow, when tested atleast works for me.
    Hope this  helps.
    Regards
    indu

    Hi Arun.
    Am really not aware as to how to make things work from the console.
    I work on windows environment both at client and on the server.
    It looks like you got a bit confused on suggestion of a email group account.
    I never did anything on outlook configuration for activation of smtp for bods.
    I think you should not mess with outlook.
    I dont know from the client side how things work.
    But i have worked directly on the BODS server where the bods installation was done.
    It is relatively very simple to do and to test.
    But to even test why you get that error.
    All you need is just a email id. Which could be yours ???
    Put your email id as the source of email in that box in the job server.
    And put only your email id in smtp_to and test it.
    Run a test job. If it completes successfully. You will receive a mail.
    In the catch, if you have checked all the boxes for error capture,
    if the job fails, it would throw a dump of the errors in the email.
    Once everything works well and you receive emails for any jobs you are running.
    Then you could decide for the source of your email id and for the receipients of your emails of the jobs.
    You could put a group id of your team as source. And also in smtp_to script in case you want everyone to receive the alert that the job has been done or it has errors.
    Or include only those email ids in the smtp_to whom you feel, should receive the mail.
    Hope this idea helps.
    Please dont mess with outlook for any smtp activation for bods.
    It is not required if you are working on a windows environment.
    You just need a email id for testing.
    Outlook configuration does not come into picture at all.
    if there is any other unix environment involved. I have no idea.
    And i really do not know how things would be from a client side to configure.
    Server configurations i do from the server.
    I did all configurations on the main server machine. Not from the client.
    And I have only one job server so i did everything there.
    I did not do anything from management console.
    I use management console only for monitoring of jobs on a daily basis, the dashboard which gives you details of the data pulled, time taken etc etc.
    cheers
    indu.
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:05 AM
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:09 AM
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:17 AM
    Edited by: Indumathy Narayanan on Oct 22, 2011 8:18 AM

  • Campaign execution not send emails for contact persons

    Hi All!
    I'm facing a problem with Campaigns (communication medium - E-mail): Those are the steps i'm following:
    1.Start the campaign, and on the "campaign: Schedule job" screen, i choose  "immediately". If i look at the campaign details after scheduled the job, the status is now "job started".
    2. To check wich mails were sent, I also had a look at the business partner account that belongs to the target group used. On the "Interaction History" block, there is a line: "Outgoing Email" - on the details of this outgoing email I can see the "To" (Receivers). And here, I have emails from the business Partner contact persons and from the business partner itself (the email that is on the header level of the business partner account, on the "main address and communication data" area). So far so good. That's exactly what i need but,
    3. If i go to the tcode, i only have a send request for the business partner itself and none for his contact persons (although those emails are on the "To" line for the interaction history).
    I'm working on the Webclient UI, of the CRM 7.0
    Does someone knows why the emails are not being sent also for the contact persons?
    Thanks in advance.
    Inê

    I have achieved this by implementing the BADI : CRM_MKT_ADR_SEARCH
    In this BADI's method : CHANGE_SEARCH_RESULTS you can modify the data which is being sent back to system for campaign execution.
    NOTE: I am using Address Independent Communication Data of Business Partner
    Below is my sample code for contact person email :
      data: wa_bp_cp_channel type crmt_bp_cp_channel.
      field-symbols: <fs_bp_cp_channel> type crmt_bp_cp_channel.
      types: begin of ty_cp,
              partner type but000-partner,
              address type but000-addrcomm,
             end of ty_cp,
             begin of ty_bpcp,
               partner1 type but051-partner1,
               partner2 type but051-partner2,
             end of ty_bpcp.
      data: it_cp type table of ty_cp,
            wa_cp type ty_cp.
      data: it_bpcp type table of ty_bpcp,
            wa_bpcp type ty_bpcp.
      data: it_bp type table of ty_cp,
            wa_bp type ty_cp.
      read table ct_bp_cp_channel into wa_bp_cp_channel with key com_channel = '03'.
      if sy-subrc = 0.
        select partner addrcomm
          from but000
            into table it_cp
              for all entries in ct_bp_cp_channel
                where
                  partner = ct_bp_cp_channel-cp_number.
        select partner1 partner2
          from but051
            into table it_bpcp
              for all entries in ct_bp_cp_channel
                where
                  partner1 = ct_bp_cp_channel-bp_number.
        if it_bpcp[] is not initial.
          select partner addrcomm
            from but000
              into table it_bp
                for all entries in it_bpcp
                  where
                    partner = it_bpcp-partner2.
        endif.
        sort it_cp by partner.
        sort it_bp by partner.
        sort it_bpcp by partner1.
        loop at ct_bp_cp_channel assigning <fs_bp_cp_channel> where com_channel = '03'.
          read table it_cp into wa_cp with key partner = <fs_bp_cp_channel>-cp_number binary search.
          if sy-subrc = 0.
            <fs_bp_cp_channel>-addrnumber = wa_cp-address.
            clear <fs_bp_cp_channel>-bp_number.
            clear <fs_bp_cp_channel>-bp_guid.
          else.
            read table it_bpcp into wa_bpcp with key partner1 = <fs_bp_cp_channel>-bp_number binary search.
            if sy-subrc = 0.
              read table it_bp into wa_bp with key partner = wa_bpcp-partner2 binary search.
              if sy-subrc = 0.
                <fs_bp_cp_channel>-addrnumber = wa_bp-address.
                clear <fs_bp_cp_channel>-bp_number.
                clear <fs_bp_cp_channel>-bp_guid.
              endif.
            endif.
          endif.
        endloop.
      endif.

Maybe you are looking for

  • Hotmail sign in problems

    hotmail accepts email address and password on home computer but not on iPhone, does anyone have this problem? thanks

  • Public folders are not wisible in exchange 2007 EMS

    Hello! I'm experiencing some troubles with public folders. Few months ago I migrated to exchange 2013 CU3, server OS is 2012R2. All public folders are working OK, users can see them in outlook, can send mail to and from them. But in EMS I cannot see

  • Sort order of file names in list windows

    Why is the sort order of file names in the File > Open File... list window other than in a normal Finder list window? Example: File > Open...: @@@2Know.pages @@@2KnowQ.pages @@@@@2Do.pages @@@@eBayAmaz.pages @@@@pws.pages @@@@Sold-DE.pages @@@@Sold-U

  • Connect nas drive to mac

    We have a CoolMax NAS drive CN-330; all the PC's on the network can access it just fine. However we have a MAC, which opens up the shares just fine... however trying to save anything on the NAS from MAC gives the error "action could not be completed

  • 501 error when searching in iTunes 7.0.2.16

    All of a sudden when I put in a search term (in the upper right hand bar) that isn't something other than a popular band's name, it searches forever and then I get an error saying that something's wrong with the store. This search issue has been goin