Send a mail thro abap report

Hi,
   i am using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to send a mail of my text file to the customer.
My problem is, the attachment file alignment is not correct. that means it is not aligning to the left or right.
i am using tables parameters as
   contents_bin = objbin (attachment of mail)
   contents_txt = objtxt ( contents of mail)
  how can i rectify the alignment problem?
Regards,
Neptune.M

hi,
the below program will help you to send email with any kind of attachment.It is working fine for me.Just try it.
REPORT ZSAMPL_001 .
INCLUDE ZINCLUDE_01.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
*PARAMETERS : appfn(150) TYPE c LOWER CASE OBLIGATORY.
DATA : pos TYPE i.
DATA : len TYPE i.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
*file_name = appfn.
*OPEN DATASET appfn FOR INPUT IN BINARY MODE.
*DO.
READ DATASET appfn INTO ITAB.
IF SY-SUBRC EQ 0.
*APPEND ITAB.
ELSE.
*APPEND ITAB.
EXIT.
ENDIF.
*ENDDO.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
***INCLUDE ZINCLUDE_01 .
Data
tables crmrfcpar.
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
data v_rfcdest               LIKE crmrfcpar-rfcdest.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
SELECT SINGLE * FROM crmrfcpar WHERE consumer = 'CRM'.
v_rfcdest = crmrfcpar-rfcdest.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' DESTINATION v_rfcdest
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
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
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
FORM
FORM ml_saveforbp USING jobname jobcount.
Data
*data : yhead like yhrt_bp_head.
*DATA : ydocdata LIKE yhrt_bp_docdata,
*yobjtxt LIKE yhrt_bp_objtxt OCCURS 0 WITH HEADER LINE,
*yreclist LIKE yhrt_bp_reclist OCCURS 0 WITH HEADER LINE.
*DATA : seqnr TYPE i.
Head
*yhead-jobname = jobname.
*yhead-jobcount = jobcount..
*MODIFY yhrt_bp_head FROM yhead.
Doc Data
*ydocdata-jobname = jobname.
*ydocdata-jobcount = jobcount.
*MOVE-CORRESPONDING docdata TO ydocdata.
*MODIFY yhrt_bp_docdata FROM ydocdata.
Objtxt
*seqnr = 0.
*LOOP AT objtxt.
*seqnr = seqnr + 1.
*yobjtxt-jobname = jobname.
*yobjtxt-jobcount = jobcount.
*yobjtxt-seqnr = seqnr.
*MOVE-CORRESPONDING objtxt TO yobjtxt.
*MODIFY yhrt_bp_objtxt FROM yobjtxt.
*ENDLOOP.
RecList
*seqnr = 0.
*LOOP AT reclist.
*seqnr = seqnr + 1.
*yreclist-jobname = jobname.
*yreclist-jobcount = jobcount.
*yreclist-seqnr = seqnr.
*MOVE-CORRESPONDING reclist TO yreclist.
*MODIFY yhrt_bp_reclist FROM yreclist.
*ENDLOOP.
ENDFORM. "ml_saveforbp
FORM
FORM ml_fetchfrombp USING jobname jobcount.
*CLEAR docdata.
*REFRESH objtxt.
*REFRESH reclist.
*SELECT SINGLE * FROM yhrt_bp_docdata
*INTO corresponding fields of docdata
*WHERE jobname = jobname
*AND jobcount = jobcount.
*SELECT * FROM yhrt_bp_objtxt
*INTO corresponding fields of TABLE objtxt
*WHERE jobname = jobname
*AND jobcount = jobcount
*ORDER BY seqnr.
*SELECT * FROM yhrt_bp_reclist
*INTO corresponding fields of TABLE reclist
*WHERE jobname = jobname
*AND jobcount = jobcount
*ORDER BY seqnr.
ENDFORM. "ml_fetchfrombp
Regards,
Abdul Hakim

Similar Messages

  • Sending a mail Thro abab report

    Hi Experts,
              I want to send a Excel file to my cusomer while i am running analysis report. what FMs are available for sending Local Excel file? and what is procedure to send a local PC Excel file to somebody thro abap report?
    Thanks,
    Neptune.M

    Hi Neptune,
    To send the excel file in your local system, check this following code.
    Sending mail with attachment
    This program will allowed you to send email with attachment.
    First, specify the attachment file from your local hardisk and execute.
    Next, specify the sender email address and click the send button.
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                   http://www.sap-img.com
    report y_cr17_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara  like selc occurs 0 with header line.
    data g_objparb  like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
      text(4096) type c,
       end of g_files.
    data : fold_number(12) type c,
           fold_yr(2) type c,
           fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
       user                            = g_user
       PREPARE_FOR_FOLDER_ACCESS       = ' '
    importing
       user_data                       = g_user_data
    EXCEPTIONS
       USER_NOT_EXIST                  = 1
       PARAMETER_ERROR                 = 2
       X_ERROR                         = 3
       OTHERS                          = 4
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number =  g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
      g_objhead,
      g_objpara,
      g_objparb,
      g_receipients,
      g_attachments,
      g_references,
      g_files.
    method1 = 'SAVE'.
    g_document-foltp  = fold_type.
    g_document-folyr   = fold_yr.
    g_document-folno   = fold_number.
    g_document-objtp   = g_user_data-object_typ.
    *g_document-OBJYR   = '27'.
    *g_document-OBJNO   = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes   = 'sap-img.com testing by program'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = sy-uname
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
      FOLMEM_DATA        =
      RECEIVE_DATA       =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append  g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header.
    *-- End of Program
    Thanks,
    Susmitha

  • Steps involved to send a mail in abap.

    hi experts,
                can anyone help me with the process involved in  sending a mail to a specific email id obtained form database.
    it will be helpful if u can provide me with the material or the code.
    thanks in advance,
    abhilash.

    Hi,
    Please visit the links for sending a mail in ABAP:
    1. http://www.sap-img.com/fu016.htm
    2. http://www.sap-basis-abap.com/abap011.htm
    May this helps you.
    Regards.
    Deepak Sharma.

  • Set Sender of Mail from Abap

    Hi,
    I use SO_NEW_DOCUMENT_SEND_API1 function module to send a mail from abap code.
    But I want to set the sender. Can I realize it?
    Regards
    Angela

    Refer this thread -
    Fill "sender id" in SO_NEW_DOCUMENT_SEND_API1
    Regards,
    Amit

  • Sending e-mail from ABAP

    We need to send email to an external adress from ABAP. Does anybody know a function module or method to do this, maybe even with sample coding?
    Best regards
       Dirk

    There are some weblogs here:
    4.6x and lower:
    /people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
    6.10 and higher:
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface

  • Send a mail via ABAP program

    Hello Experts,
    I want to send mail via ABAP program with the following requirements :
    1. Recipient is OUTLOOK email -id
    2. Sender address has to be an external email-id
    3. Send mail as CC and BCC also to other email-id.
    Is there any function module which can satisfy all the above requirements.
    Regards,
    Mansi.

    hi,
    this code will definately help you just go through it:
    firstly  exported the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    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.
    Hope it will help you
    regards
    Rahul sharma

  • Not sending a mail from ABAP SAP R/3

    Using call function "SO_NEW_DOCUMENT_ATT_SEND_API1" in specific program in SAP R/3, i would like to know if it is possible to send a mail on Outlook webmail box in 4.0B Version of SAP?
    Regards, Vincent

    There is two way, you could add plugin to see mail from SAP to your Outlook, or you could send mail from sap to a SMTP.
    To send mail from SAP to SMTP see transaction SCOT. (if you are running an Unix SAP server, that would be easy)
    Regards

  • Sender/receiever assignment to abap report

    Hi guys,
    I have a query  which has assigned to user. now the requirement is we should merge these report with ecc abap report  and  Make sure when the query jumps to ECC, the logged on user id should be of the user.
    can anyone suggest me.

    Hi,
    If the user has access to the ECC ABAP report, the automatically the User Login Id should be populated in Logon screen.
    Regards,
    Suman

  • Abt sending a mail from abap to yahoo

    Anyone can guide with the code of how to send mail from SAP to Yahoo using the ABAP code

    Try this....
    <a href="http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm">http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm</a>

  • Need to send Automatic mails when the report successful or Fail.

    Hello Experts,
    Created one report for reconciliation to check BW and R/3 figures.
    There are exceptions designed using reporting Agent settings on the same report.
    (When the values from R/3 to BW are matching it shows Green color and if the values are not matching report shows red color in the columns.)
    There are some mandatory variables for Company code, Period and Currency Type.
    Selections for  Company code and Period are fixed but We have three currency types (00,10,30)
    Reports needs to be executed for three currency types.
    Requirement is that
    when the report is executed for One currency type  (Ex u2013 00)
    If the key figure column shows Green color , Immediately mail has to be sent to necessary mail IDs saying the status successful.
    If the key figure column shows Red color , Immediately mail has to be sent to necessary mail IDs saying the status Failed.
    Like this the same report has to be executed for other two currency types and send the the same status as above phenomenon.
    Sending mails can be taken care by BASIS people with SMTP configuration.
    I want to know the development needs to be done from BW side.
    Are there are any settings in BW to send the message as Successful  when the report shows green color and message as failed when red color appears in the report.
    Regards,
    Siva.

    Hi,
    As i understand you need to set up an alert framework.
    Please check :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b6d59590-0201-0010-5f9d-adb9f6b14d80?quicklink=index&overridelayout=true
    This can also be achieved using BEx broadcaster
    Please check :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/efdbd593-0e01-0010-4eb1-a09ffedd550a?quicklink=index&overridelayout=true
    Hope this helps.
    -Vikram

  • Sending E-Mail with ABAP List as Attachment with custom Extension

    Hello everyone.
    I have the following problem:
    I want to send a ABAP list as an attachment to an external e-mail address with a <b>custom file extension</b>.
    Everything works fine, exept the thing with the file extension.
    I am using FB 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    When I choose 'ALI' as Packing_List-Doc_Type everything works fine, but the attached file has the extension 'txt'.
    When I choose e.g. 'lbl' as Doc_Type, the extension is correct, but the file contains invalid data.
    Packinglist code:
    <i>AttType = 'ALI'.
    Describe Table ObjBin Lines TabLines.
    Read Table ObjBin Index TabLines.
    ObjPack-Doc_Size = ( TabLines - 1 ) * 255 + strlen( ObjBin ).
    ObjPack-Transf_Bin = 'X'.
    ObjPack-Head_Start = 1.
    ObjPack-Head_Num = 1. "0.
    ObjPack-Body_Start = 1.
    ObjPack-Body_Num = TabLines.
    ObjPack-Doc_Type = AttType.
    ObjPack-Obj_Name = 'ATTACHMENT'.
    ObjPack-Obj_Descr = cFileName.
    Append ObjPack.</i>
    function call:
    <i>Call Function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                Document_Data              = DocData
                Put_in_Outbox              = 'X'
           TABLES
                Packing_List               = ObjPack
                Object_Header              = ObjHeader
                Contents_Bin               = ObjBin
                Contents_Txt               = ObjTxt
                Receivers                  = RecList
           EXCEPTIONS
                Too_Many_Recievers         = 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.</i>
    Thanks for your help,
    Arndt

    Hi,
    look here:
    Re: How to email an attachment with more than 255 characters?
    Andreas

  • Send E-mail from Interactive Report, mulitple e-mail addresses

    I am using Apex 4.1. I would like to enter multiple e-mail addresses in the TO field of the download, e-mail section of an interactive report. To be clear when I click on download from the actions menu of an interactive report and choose E-mail, you are presented with the form that has To, CC, BCC, etc. I would like to enter multiple e-mail addresses in the TO text box. I have tried separating them with semi-colons, commas, and even spaces. Whenever I enter two addresses, I do not get any mail. How can I address an interactive report to multiple e-mail addresses. Thank you so much.

    Hi,
    We misread the documentation and the Actions > Download > Email option does not support multiple email addresses, I have tried it on my workspace and it is throwing ORA-29279: SMTP permanent error: 553 5.1.3 which is because of unsupported multiple emails.
    In this doc says that it is allowed to use multiple emails under
    Actions > Subscription (and this is entirely different from above)

  • How to convert script output to excel and send through mail in the report

    I need a solution for Converting script into EXCEL  and sending Excel as a attachment to the mail. In my current Program I am getting OTF data from script and converting into PDF using Function module ' CONVERT_OTF'
    And sending PDF as a mail attachment using Function module 'SO_NEW_DOCUMENT_SEND_API1' it is working fine but
    My current requirement is I need to send Excel as a mail attachment instead of PDF.
    Hope it is clear for you, please give me possible solutions with sample code..

    hi
    good
    CONSTANTS: CON_CRET TYPE X VALUE '0D',  "OK for non Unicode
                 CON_TAB TYPE X VALUE '09'.   "OK for non Unicode
    *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.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO IT_ATTACH SEPARATED BY CON_TAB.
      CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.
      APPEND  IT_ATTACH.
      LOOP AT IT_EKPO INTO WA_CHAREKPO.
        CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
                    WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
               INTO IT_ATTACH SEPARATED BY CON_TAB.  " Check here
        CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.  " Check here
        APPEND  IT_ATTACH.
      ENDLOOP.
    thanks
    mrutyun^

  • Help for-offline interactive forms based on sending receiving mails in ABAP

    hello friends i am struck with a requirement of my client.
    I am new to Forms and WEBDYNPRO and I have to cover a scenario where I have to develop,'offline interactive forms based on sending receiving emails '..
    i browsed a bit and with all the luck found a very good resource.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cacb9a7d-0c01-0010-1281-be4962c9ab3e
    but the problem is it is in JAVA.. I dont know JAVA..I know ABAP..
    can any one give me similar tutorial in ABAP or any other related links ..
    waiting to give Big Reward Points...

    Try these links...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/lw/uuid/90e279fe-0107-2a10-bc85-bd96ab9738a7
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5087262b-59ef-2910-abb1-957000b7c3d4
    Hope they help.....
    Rao

  • Sending e-mail from ABAP Code

    Dear All,
    I am try to send mail using FM --> SO_DOCUMENT_SEND_API1.
    But mail not yet received. I am getting error - RAW3500000000099.
    Giving the error as
    No suitable conversion found for XLS and not getting the data in english i.e. getting data in ASCII format
    I think some Setting problem in SCOT.
    Please help me to do the Setting in SCOT or some other place also.
    Kindly help me... i am waiting for your valuable responsible.
    Regards
    Sudhakar

    Hi All,
    Any body has the idea to maintain SX_OBJECT_CONVERT*  function module to convert excel format.
    Please guide me what are the FM to convert data from ascii to raw because i am getting the data in ascii format when i am sending  email to customer. My login language is english.
    Thanks in advance
    Regards
    Sudhakar

Maybe you are looking for

  • Streaming 3d movies to my Samsung 3DTV using AirPort express and a wireless LAN adapter has not worked.   What is my cheapest option for making this happen?

    I need a transfer rate minimum of 9mbps.  My AirPort express and 3DTV are on different floors, so I cannot directly connect with an ethernet cable.  Can I buy an older AirPort express, use it as a bridge, and connect my TV to it via an ethernet cable

  • 5.5 Rolling Credits with gutter?

    We run 5.5 on Mac. I see in the title tool you can make them roll or crawl, but is there a trick to formatting the text in the typical Hollywood style with a gutter down the middlle? In FCP you just put a * and the justifications and space happen aut

  • What is the -k option for of the Ping utility in OS X?

      Hi, May I know what is the -k option for of the Ping utility in OS X? It doesn't seem to be a ICMP protocol standards-relates. Below is the description of this option copied from Yosemite. -k trafficlass              Specifies the traffic class to

  • ODI topology import error

    Hi All, I am facing the following error when trying to import topology objects using : $START_COMMAND OdiImportObject -FILE_NAME=CONN_XML_FILE0.xml -WORK_REP_NAME=work -IMPORT_MODE=SYNONYM_INSERT_UPDATE java.lang.RuntimeException: oracle.odi.oditools

  • Incompatibility of iPhoto 6.0.6 and CS2 Photoshop

    Up until recently (before updating to 6.0.6) everything worked fine. Now, all of a sudden pictures kept in the iPhoto Library that have been opened in Photoshop (with no changes made to them) will appear as thumbnails but won't enlarge. All I get is