- 浏览: 406316 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
yiming163:
thank you!
eCATT, LSMW in detail -
泡泡蓝:
把WITH INCLUDES.改成 WITH ANALYSI ...
User Exits,Customer Exits,BAdI and BTE -
泡泡蓝:
王弈争 写道泡泡蓝 写道SCAN ABAP-SOURCE SO ...
User Exits,Customer Exits,BAdI and BTE -
王弈争:
泡泡蓝 写道SCAN ABAP-SOURCE SOURCETA ...
User Exits,Customer Exits,BAdI and BTE -
jgtang82:
泡泡,我没遇到你所说的问题呀
User Exits,Customer Exits,BAdI and BTE
report zrich_0002.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
start-of-selection.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
mailtxt = '<html>'.
append mailtxt.
mailtxt = '<body>'.
append mailtxt.
mailtxt = '<b>This is SAP</b>'.
append mailtxt.
mailtxt = '<a href="#" target="_blank">SAP Hyperlink</a> '.
append mailtxt.
mailtxt = '</body>'.
append mailtxt.
mailtxt = '</html>'.
append mailtxt.
mailrec-receiver = 'you@yourcompany.com'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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.
---------------------------------------------------------------------------------------------
REPORT zsendmail.
DATA: lv_title TYPE so_obj_des,
send_request TYPE REF TO CL_BCS,
document TYPE REF TO CL_DOCUMENT_BCS,
conlengths TYPE so_obj_len,
html TYPE STANDARD TABLE OF w3html,
wa_html TYPE w3html,
sender_id TYPE REF TO IF_SENDER_BCS,
recipient TYPE REF TO IF_RECIPIENT_BCS,
sent_to_all TYPE os_boolean,
bcs_exception TYPE REF TO cx_bcs,
bcs_message TYPE string.
lv_title = 'This is the title'.
wa_html-line = '<html><body>'.
APPEND wa_html TO html.
...
wa_html-line = '</body></html>'.
APPEND wa_html TO html.
TRY.
CLEAR send_request.
send_request = cl_bcs=>create_persistent( ).
CLEAR document .
document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_text = html
i_length = conlengths
i_subject = lv_title ).
* Add document to send request
CALL METHOD send_request->set_document( document ).
* Construct sender and receiver
CLEAR: sender_id , recipient .
sender_id = cl_cam_address_bcs=>create_internet_address( 'abc@zh.cn' ).
recipient = cl_cam_address_bcs=>create_internet_address( 'bcd@zh.cn' ).
* Set sender
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender_id.
* Add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
* Set E-mail sending options
CALL METHOD send_request->set_status_attributes
EXPORTING
i_requested_status = 'E'
i_status_mail = 'E'.
CALL METHOD send_request->set_send_immediately( 'X' ).
* Send document
CALL METHOD send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = sent_to_all ).
IF sent_to_all = 'X'.
MESSAGE 'Mail sent successfully ' TYPE 'S'.
ENDIF.
COMMIT WORK.
CATCH cx_bcs INTO bcs_exception.
bcs_message = bcs_exception->get_text( ).
MESSAGE bcs_exception TYPE 'E'.
EXIT.
ENDTRY.
******************************************
<!----> * get sender email address.
<!----> CALL FUNCTION 'SUSR_USER_ADDRESS_READ'
EXPORTING
USER_NAME = LV_BNAME
* READ_DB_DIRECTLY = ' '
IMPORTING
USER_ADDRESS = FS_ADDR
USER_USR03 = FS_USR03
EXCEPTIONS
USER_ADDRESS_NOT_FOUND = 1
OTHERS = 2.
评论
发表评论
-
Sap Number Range Object (SNRO)
2010-12-21 16:11 1829Brief Example http://www.sapte ... -
SAP R/3 Security Tables
2010-12-09 15:27 1617Below the list of SAP R/3 Sec ... -
Class def & impl, Inherit & overwriting, interface & using it, event & handler
2010-12-08 10:05 1149Below codes is a simply and rou ... -
IDOC_INPUT_ORDERS with error msg RV45A-VBAP_SELKZ (2) is not input field
2010-11-08 14:51 2404[Issue] Hi I am creating a mul ... -
SAP ALV Trees
2010-11-05 14:07 2154BCALV_GRID_DND_TREE ALV Grid: D ... -
Creating a SAP shortcut for any transaction and sending it by mail
2010-11-02 11:12 2005Refer to SAP wiki: http://wiki. ... -
Note 573128 - Debugging programs in the background
2010-11-01 20:13 1177Note 573128 - Debugging program ... -
Function Module related on Date calculations (ZT)
2010-07-20 17:00 1693http://wiki.sdn.sap.com/wiki/di ... -
SAP SDN Interesting Topics
2010-06-29 09:48 985Web Dynpro ABAP Performance Too ... -
SE16N &SAP_EDIT, ICON at Selection Screen
2010-06-12 17:35 1733摘录From blog of 翱翔云天 1. SE16N & ... -
Debug background processes, update/system code,model dialog...
2009-12-18 13:55 1197How do I debug running backgrou ... -
ABAP character variables vs. string variables
2009-11-16 11:23 2948Chinese Version: http://blog.cs ... -
ECC6 ALV Dump
2009-10-21 15:20 1034[Dump] 1. Use system reserved ... -
Simple Transfermation Program
2009-08-07 23:42 1994Have you been requested to gene ... -
eCATT, LSMW in detail
2009-02-15 10:14 3453eCATT : http://sap.iteye.com/bl ... -
Trigger ABAP program using UNIX script
2009-01-09 13:27 22431. Create a batch job in SM37 f ... -
How to cancel active job, del/change schedule job
2008-12-26 09:56 2306if the job is active and you wa ... -
How to Run UNIX script from ABAP?
2008-12-19 12:52 2527Look at SM69, SM49 and Functio ... -
REUSE_ALV_GRID_DISPLAY事件子过程和cl_gui_grid类的事件对应关系
2008-12-04 18:46 3856一、SLIS定义的ALV的事件名称* Eventsslis_e ... -
DDIC info related tables
2008-12-03 09:58 1943Data elementsDD04L Data elem ...
相关推荐
根据给定的文件信息,我们可以深入探讨"SAP RFC Programming in ABAP"这一主题,这是一个在SAP系统中非常重要的技术领域,特别是在企业级应用集成和跨系统数据交换方面。 ### SAP RFC编程基础 SAP Remote Function...
A complete description of all ABAP keywords in their relevant context. ABAP - Quick Reference A short overview of all statements, ordered alphabetically. ABAP - Release-Specific Changes List ...
SAP BC415 Communication Interfaces in ABAP
【Enabling ABAP in Eclipse】是一项让ABAP开发者能够在Eclipse集成开发环境中进行开发的工作。这一功能的引入为ABAP程序员提供了更为现代化和灵活的开发工具,与传统的SAP Development Workbench相比,Eclipse提供...
Eclipse ABAP插件是开发SAP ABAP应用程序的一个强大工具,它允许开发人员在集成的开发环境中(IDE)编写、测试和调试ABAP代码。Eclipse作为一个高度可扩展的平台,通过添加特定的插件,如ABAP插件,可以支持多种编程...
This book assumes a basic familiarity with the ABAP language (formerly known as ABAP/4) and builds upon it, exposing the reader to ABAP's considerable customization and transaction-handling power ...
ABAP in BW是SAP BW(商务仓库)系统中用于编程和增强后端功能的ABAP(高级企业应用编程)技术的专称。本知识点将从ABAP在BW中的应用、性能优化、增强机制以及数据处理等方面进行详细解读。 首先,ABAP in BW的学习...
The ABAP/4 Development Workbench contains all the tools you need to create and maintain ABAP/4 programs, however the standard SAP ABAP/4 editor does not have the features like the development tools ...
在ABAP编程环境中,TCP/IP套接字编程是实现与外部系统进行网络通信的重要手段。TCP/IP协议族是互联网上最广泛使用的通信协议,而ABAP作为SAP系统的编程语言,支持通过TCP/IP进行socket通信,允许ABAP程序直接与任何...
在SAP系统中,ABAP调用ABAP Proxy是一种常见的技术操作,用于在不同系统间或者同一系统内的组件之间实现通信。ABAP Proxy是SAP提供的一个强大的接口技术,它允许开发者创建安全、高效的远程调用机制。接下来,我们将...
ABAP 函数调用方法详解 ABAP 函数调用是 SAP 系统中的一种常用技术,用于实现业务逻辑的复杂处理。该技术可以实现同步调用和异步调用两种方式,本文将对这两种方式进行详细的介绍。 1. 异步调用 异步调用是指在主...
### SAP ABAP in 21 Days #### 一、引言与学习目标 《SAP ABAP in 21 Days》是一本旨在帮助初学者快速掌握SAP ABAP编程语言的指南书。这本书通过为期三周的教学计划,系统地介绍了ABAP的基础知识和技术要点。作者...
The User's Guide is a manual on the external ABAP/4 editor developed by Attila Borka (X-Direct Ltd.). Its aim is to • Describe the functions and the usage of the editor • Guide SAP Basis ...
### SAP Note 176336: Flat and Deep Structures in ABAP #### 概述 SAP Note 176336 主要关注 ABAP 编程语言中的扁平(flat)结构与深层(deep)结构的概念。在 ABAP 中,结构是一种复杂的数据类型,用于组织和...
abap tips abap tips abap tips abap tips abap tips
### ABAP常用字符串操作知识点详解 #### 一、字符串连接 在ABAP中,字符串连接是一种常见的操作方式,用于将两个或多个字符串合并成一个新的字符串。实现字符串连接的方法主要是通过`CONCATENATE`语句。 **语法...
《SAP ABAP 4.7开发指南》 在企业级信息技术领域,SAP系统扮演着至关重要的角色,尤其在企业资源规划(ERP)方面。SAP ABAP(Advanced Business Application Programming)是SAP系统中的一种编程语言,用于开发、...
本培训课程"Remote Function Calls in ABAP"旨在教授开发人员如何有效地利用RFC进行跨系统交互。 RFC是一种标准化的接口技术,使得ABAP程序能够调用远程系统中的函数模块,就像它们是本地函数模块一样。这在分布式...
标题“Developing UI5 Apps Purely in ABAP”指出,这个压缩包可能包含关于如何在ABAP环境中开发UI5应用程序的资源。UI5是SAP提供的一个开源框架,用于构建企业级的用户界面,而ABAP(Advanced Business Application...