SAPBRAINSONLINE.com
SAP Training, Tutorials, Certification and Jobs Materials
HOME TUTORIALS ARTICLES PROJECTS JOBS TOOLS REFERENCES CHAT FORUM GUESTS
Related 10 Sample ProgramsTutorials
ABAP Program for Execute Unix command from within SAP
ABAP Program to Upload table using new function GUI_UPLOAD
ABAP Program for Sending SAP Mail
ABAP Program for Sapscript PerForm Module
ABAP Program for Search Layout sets for given String
ABAP program to send a report to an external mail-id
ABAP Program for Submitting report with selection table
ABAP Program for Lock All Users
ABAP Program for Output Table Fields to a List
ABAP Program for Module Pool containing screen loop processing

  ABAP Program for Sending SAP Mail

A D V E R T I S E M E N T
home--> ABAP --> Sample Programs
Sample ABAP program to show Sending SAP Mail using ABAP programming.
*&---------------------------------------------------------------------*
*& Form SEND_MAIL
*&---------------------------------------------------------------------*
* send email to current user *
*----------------------------------------------------------------------*
FORM SEND_MAIL.

* PARAMETERS FOR SO_NEW_DOCUMENT_SEND_API1
DATA: W_OBJECT_ID LIKE SOODK,
W_SONV_FLAG LIKE SONV-FLAG.
DATA: T_RECEIVERS LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE,
W_OBJECT_CONTENT LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE,
W_DOC_DATA LIKE SODOCCHGI1 OCCURS 0 WITH HEADER LINE.
*
DATA: W_DATE(10).
CLEAR T_RECEIVERS.
T_RECEIVERS-RECEIVER = SY-UNAME.
T_RECEIVERS-REC_TYPE = 'B'.
T_RECEIVERS-EXPRESS = ' '.
APPEND T_RECEIVERS.

W_DOC_DATA-OBJ_DESCR = 'Change Expiry date'.


* Delivery NO
CONCATENATE 'Delivery No' M_VMVMA-VBELN INTO W_OBJECT_CONTENT
SEPARATED BY ' '.
APPEND W_OBJECT_CONTENT.
* material Batch
CONCATENATE 'Material' ZGREC-MATNR 'Batch' ZGREC-CHARG
INTO W_OBJECT_CONTENT SEPARATED BY ' '.
APPEND W_OBJECT_CONTENT.
* Expiry date
WRITE B_VFDAT TO W_DATE DD/MM/YYYY.
CONCATENATE 'Change expiry date to' W_DATE
INTO W_OBJECT_CONTENT SEPARATED BY ' '.
APPEND W_OBJECT_CONTENT.
*
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOC_DATA
PUT_IN_OUTBOX = ' '
TABLES
OBJECT_CONTENT = W_OBJECT_CONTENT
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.
ENDFORM. " SEND_MAIL
Email this Tutorial to my friend
Your Mail ID :
Friend mail ID:
Also send to me

Latest Added Tutorials

SAP PRE-SALE(very urgent requirement) - SAP JOBS INDIA
SAP PRE-SALE(very urgent requirement) - SAP JOBS INDIA
Experiense Required for this job: 6-9 years exp
Job Locations: Mumbai
Apply for this SAP Job in INDIA
SAP ABAP Professionals - SAP JOBS INDIA
SAP ABAP Professionals - SAP JOBS INDIA
Experiense Required for this job: 5 - 7 years exp
Job Locations: Bengaluru / Bangalore, Chennai, Others
Apply for this SAP Job in INDIA
Junior SAP Consultants - SAP JOBS INDIA
Junior SAP Consultants - SAP JOBS INDIA
Experiense Required for this job: 0-5 years exp
Job Locations: Bengaluru/Bangalore
Apply for this SAP Job in INDIA
SAP Plant Maintanence with ETM module - SAP JOBS INDIA
SAP Plant Maintanence with ETM module - SAP JOBS INDIA
Experiense Required for this job: 2-7 years exp
Job Locations: Pune
Apply for this SAP Job in INDIA
SAP Plant Maintainence /PM Consultant/Sr.consultant/TL - SAP JOBS INDIA
SAP Plant Maintainence /PM Consultant/Sr.consultant/TL - SAP JOBS INDIA
Experiense Required for this job: 3-8 years exp
Job Locations: Gurgaon, Kolkata
Apply for this SAP Job in INDIA
Immediate position for SAP ABAP Professionals. - SAP JOBS INDIA
Immediate position for SAP ABAP Professionals. - SAP JOBS INDIA
Experiense Required for this job: 5-9 years exp
Job Locations: Bengaluru/Bangalore, Chennai, Gurgaon
Apply for this SAP Job in INDIA
SAP - IS Retail (SRS) Consultant - SAP JOBS INDIA
SAP - IS Retail (SRS) Consultant - SAP JOBS INDIA
Experiense Required for this job: 5-8 years exp
Job Locations: Bengaluru/Bangalore
Apply for this SAP Job in INDIA
SAP BPC/EPM - SAP JOBS INDIA
SAP BPC/EPM - SAP JOBS INDIA
Experiense Required for this job: 4-9 years exp
Job Locations: Bengaluru/Bangalore, Hyderabad / Secunderabad, Pune
Apply for this SAP Job in INDIA
LOOKING FOR TECHNICAL AND FUNCTIONAL LEADS AND MANAGERS(SAP) - SAP JOBS INDIA
LOOKING FOR TECHNICAL AND FUNCTIONAL LEADS AND MANAGERS(SAP) - SAP JOBS INDIA
Experiense Required for this job: 3-8 years exp
Job Locations: Bengaluru/Bangalore, Chennai
Apply for this SAP Job in INDIA
SAP FICO Consultant - SAP JOBS INDIA
SAP FICO Consultant - SAP JOBS INDIA
Experiense Required for this job: 5-10 years exp
Job Locations: Hyderabad / Secunderabad
Apply for this SAP Job in INDIA

Most readed 5 Tutorials

List of SAP MM Transaction codes
This documentation covers the details of SAP MM Transaction codes
WRITE - Output to a list ( SAP ABAP Keyword)
WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details.
FI Accounts Receivable and Accounts Payable | SAP FI PDF manual
The following topics are an introduction to the Accounts Receivable and Accounts Payable application components.
List of SAP HR TABLES and Infotypes tables
Detailed full list of tables and infotypes used in SAP HR module.
Report Programming in HR | SAP PDF study material )
This document is intended for all persons who would like to program their own reports in SAP HR or customize standard ones. The documentation is not intended to be an introduction to programming. It contains just the special features that form part of programming in SAP HR.A general knowledge of ABAP programming and HR applications is a prerequisite. This can be acquired by reading the relevant documentation and attending the courses.This document provides information which enables programmers to become acquainted with the special features of programming in HR.
  

CATEGORIES

  ABAP
  Advanced ABAP
  SAP JOBS
  SAP Functional Modules
  SAP R/3
  SAP NetWeaver
   
SAP Technical PDF Tutorials

ABAP
DICTIONARY
INTERNAL TABLES
ALV Reports
SAPSCRIPTS
SMARTFORMS
LSMW
BDC
ALE
IDOC
USER EXITS
TRANSPORTING
ITS


SAP Functional PDF  Tutorials

FI (Financial)
CO (Controlling)
HR (Human Resource)
LO (Logistics)
MM (Materials Management)
PP (Production Planning)
QM (Quality Management)
SD (Sales and Distribution)
TR (Treasury and cash)
WM (Warehouse Management)
PS (project Systems)
PM (plant Maintenance)
CA (Cross Application)


SAP References

transaction codes
System Fields
Function Modules
SAP TABLES
code optimization


TOOLS

SQL Trace tool
Runtime Analysis
LSMW
ABAP Query
CTS


SAP Emerging Technologies

SAP Advanced Planner and Optimizer (APO)
SAP Business Information Warehouse
(BW)

SAP Business Intelligence
(BI)

SAP Customer Relationship Management
(CRM)
SAP Enterprise Portal (EP)
SAP Exchange Infrastructure
(XI)

Human Resource Management Systems
(HRMS)
SAP Manufacturing
SAP Master Data Management
(MDM)

SAP Knowledge Warehouse
(KW)

SAP Product Lifecycle Management
(PLM)

SAP Service and Asset Management

SAP Strategic Enterprise Management
(SEM)

SAP Solutions for mobile business

SAP Solution Manager

SAP Training and Event Management
(TEM)
SAP Web Application Server
(Web AS)
SAP xApps



Jobs in Kerala

 
Custom Search
  site contact sapbrain.support@gmail.com All of the product names here are trademarks of their respective companies. The site www.sapbrainsonline.com no way affiliated with SAP AG. Use information on this site at your own risk. Information furnished in the site is collected from various sites and posts from users. This site does not host any files on its server. If any compliants about the posts please contact us at sapbrain.support@gmail.com, we are ready to move the posts.
Complete SAP Study materials | SAP JOBS | PDF Tutorials web counter