¡Caminando hacia el éxito!

Aprende en Comunidad

Avalados por :

Cómo agregar direcciones de correo en CC o BCC al enviar un informe por correo

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 6 Vistas
0
Cargando...

Hola a todos,

He creado un informe que envía la salida del informe a direcciones de correo externas. Quiero poner algunas direcciones de correo en CC o BCC.

Por favor, guíame para que pueda proceder con el desarrollo.

Gracias y saludos,

Syed

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

4 Respuestas

0
Cargando...

Utiliza la función de módulo SO_NEW_DOCUMENT_ATT_SEND_API1 en este campo para pasar el parámetro (new object id).

SOFOLENTI1-COPY - para copia de carbono

SOFOLENTI1-BLIND_COPY - para copia de carbono oculta

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

just go through below code and


        *&---------------------------------------------------------------------*
        *& Report  Z_TTTT
        *&
        *&---------------------------------------------------------------------*
        *&
        *&
        *&---------------------------------------------------------------------*

        REPORT  Z_TTTT1.
        ************************************************************************
        *TABLE DECLARATIONS
        ************************************************************************
        TABLES: SOLI.

        SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT_B1 NO INTERVALS.
        SELECTION-SCREEN BEGIN  OF LINE .
        PARAMETERS SAPID RADIOBUTTON GROUP ADDR.
        SELECTION-SCREEN COMMENT 5(20) T_SAPID.
        PARAMETERS EMAIL_ID RADIOBUTTON GROUP ADDR.
        SELECTION-SCREEN COMMENT 30(20) T_EMAIL.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN END OF BLOCK B1.

        SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT_B2 NO INTERVALS.
        SELECTION-SCREEN BEGIN  OF LINE .
        SELECTION-SCREEN COMMENT 5(20) TXT_ID.
        SELECT-OPTIONS: ID FOR SOLI-LINE NO INTERVALS.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN BEGIN  OF LINE .
        SELECTION-SCREEN COMMENT 5(20) TXT_CC.
        SELECT-OPTIONS: CC FOR SOLI-LINE NO INTERVALS.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN BEGIN  OF LINE .
        SELECTION-SCREEN COMMENT 5(20) TXT_BCC.
        SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN END OF BLOCK B2.

        SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT_B5.
        SELECTION-SCREEN BEGIN OF LINE.
        PARAMETERS P_ATTACH AS CHECKBOX USER-COMMAND RAD1.
        SELECTION-SCREEN COMMENT 5(20) T_ATTACH.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 5(20) T_FLNAME.
        PARAMETERS P_FLNAME  TYPE RLGRAP-FILENAME MODIF ID M1.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN END OF BLOCK B5.

        ************************************************************************
        *Data Declarations
        ************************************************************************

        DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
              SUBJECT_LINE LIKE SOOD1-OBJDES.
        DATA : SENDER TYPE SY-UNAME,
              IT_REC type SOLI OCCURS 0 WITH HEADER LINE.

        ************************************************************************
        *INITIALIZATION Block
        ************************************************************************

        INITIALIZATION.
            TEXT_B1 = 'Output Specification'.
            T_SAPID = 'SAP User ID'.
            T_EMAIL = 'Email ID'.
            TXT_ID = 'Receipient Id'.
            TXT_CC = 'CC'.
            TXT_BCC = 'BCC'.
            TEXT_B2 = 'Receipient'.
            TEXT_B5 = 'Attachment'.
            T_ATTACH = 'Attachment'.
            T_FLNAME = 'File name'.
        *  TXT_SEND = 'Sender Name'.

        AT SELECTION-SCREEN OUTPUT.
            LOOP AT SCREEN.
                IF P_ATTACH <> 'X'.
                    IF SCREEN-GROUP1 = 'M1'.
                        SCREEN-INPUT = 0. " Disable for input.
                        MODIFY SCREEN.
                    ENDIF.
                ENDIF.
            ENDLOOP.

        AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FLNAME.
            PERFORM GET_FILENAME.

        ************************************************************************
        *start of selection Block
        ************************************************************************

        START-OF-SELECTION.
        *  LOOP AT TEXT1.
        *    MOVE TEXT1-LOW TO MAIL_CONTENT-LINE.
        *    APPEND MAIL_CONTENT.
        *  ENDLOOP.

        ****  Mail Body
            MOVE 'Hi' TO MAIL_CONTENT-LINE.
            APPEND MAIL_CONTENT.
            MOVE 'This is Test mail' TO MAIL_CONTENT-LINE.
            APPEND MAIL_CONTENT.
            MOVE 'Thanxs' TO MAIL_CONTENT-LINE.
            APPEND MAIL_CONTENT.

        ****  Mail Heading
            MOVE 'Test Mail' TO SUBJECT_LINE.
            PERFORM SEND_EMAIL  TABLES MAIL_CONTENT USING SUBJECT_LINE.

        *&---------------------------------------------------------------------
        *& Form SEND_EMAIL
        *&---------------------------------------------------------------------

        FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
                        USING TITLE LIKE SOOD-OBJDES.

            DATA: RECEIVERS TYPE  SOOS1 OCCURS 0 WITH HEADER LINE,
                  TSOOD1 TYPE SOOD1,
                  PACKING_LIST TYPE SOXPL OCCURS 0 WITH HEADER LINE,
                  OBJCONT1 type SOLI OCCURS 0 WITH HEADER LINE.

            DATA: BEGIN OF AT_HEADER OCCURS 1.
                      INCLUDE STRUCTURE SOLI.
            DATA: END OF AT_HEADER.

            CLEAR: TSOOD1,
                   RECEIVERS.

            REFRESH RECEIVERS.

            MOVE: SY-LANGU TO TSOOD1-OBJLA,
                  'Email Notice' TO TSOOD1-OBJNAM,
                  'C' TO TSOOD1-OBJSNS,
                  TITLE TO TSOOD1-OBJDES,
                  'Rajan' TO TSOOD1-OWNNAM.

        *loop through each ID and move them to recipient table
            LOOP AT ID.
        *    TRANSLATE ID-LOW TO UPPER CASE.
                IF SAPID = 'X'.
                    MOVE: SY-DATUM TO RECEIVERS-RCDAT,
                          SY-UZEIT TO RECEIVERS-RCTIM,
                          ' ' TO RECEIVERS-RECESC,
                          ID-LOW TO RECEIVERS-RECNAM,
                          'X' TO RECEIVERS-SNDEX.
                ELSE.
                    MOVE: SY-DATUM TO RECEIVERS-RCDAT,
                          SY-UZEIT TO RECEIVERS-RCTIM,
                          'U' TO RECEIVERS-RECESC,
                          'U-' TO RECEIVERS-RECNAM,
                          ID-LOW TO RECEIVERS-RECEXTNAM.
                ENDIF.
                APPEND RECEIVERS.
                CLEAR RECEIVERS.
            ENDLOOP.

        *loop through each CC and move them to recipient table
            LOOP AT CC.
                TRANSLATE CC-LOW TO UPPER CASE.
                IF SAPID = 'X'.
                    MOVE: SY-DATUM TO RECEIVERS-RCDAT,
                          SY-UZEIT TO RECEIVERS-RCTIM,
                          ' ' TO RECEIVERS-RECESC,
                          CC-LOW TO RECEIVERS-RECNAM,
                          'X' TO RECEIVERS-SNDEX,
                          'X' TO RECEIVERS-SNDCP.
                ELSE.
                    MOVE: SY-DATUM TO RECEIVERS-RCDAT,
                          SY-UZEIT TO RECEIVERS-RCTIM,
                          'U' TO RECEIVERS-RECESC,
                          'U-' TO
        
Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Consulta el foro, este tema se ha discutido muchas veces.

Verifica los parámetros de los destinatarios. Allí puedes encontrar los parámetros responsables de CC y BCC.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Consulta en el foro, se ha discutido muchas veces en el foro.

Verifica los parámetros de los receptores. allí puedes encontrar los parámetros responsables de CC y BCC.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?