How to send HTML page via an email
Hi..
I wanna send HTML page with images via an email, it should not go as an attachment.
Is there any Tool or Software available to send HTML Pages via email.
i just wanna send my advertisement as a HTML page via email
So plz. help me out
Java Message Service (JMS) For more info u can visite http://java.sun.com/products/jms/tutorial/
It is usefull only when u r using some Application servers like WebLogic, WebSpeher, or JBoss
Bye
Similar Messages
-
How to send html newsletter via Mail app
I want crystal and clear instruction as all the ones I have found either old fashioned and not relevant or skip that interesting part.
I have already done html page (newsletter). Now I want to transform it somehow and send via Mail app so my contacts could receive it as html newsletter. If I need to attach txt message please add it to the instruction. I need complete how to send html newsletter.alabanco wrote:
thanks. Now we've got to the most interesting part and intriguing one. Why should I upload html page to the server. I do understand uploading the images to server which will be used as links in my html mail. But why and how should I store that page in my server if I have CMS post instead from which I used pictures as links. SHould I create yet another type of post in CMS that is my html newsletter? That's not cool. What is the industry standard approach for that?
By the way Mail.app uses that baby design templates for your messages. Why don't we have an option to delete all these creepy childish templates and store solid bold corporate style templates for newsletters and send it somehow? Or will it just attach the images to the message then? If so then it is not what I want and it is really depressing.
The industry convention/"standard" is not to use html in email. Wheteher or not your html newsletter displays as you intended is at the mercy of the recipient and their email client settings.
If you want to preserve your html layout and styles, save your newsletter as a pdf document and attach the pdf document to your email. Or, as already suggested, use a web server to serve your html newsletter. -
How to send html page in outlook wihtout gibberish
i have html page that i tried to send in outlook with send web page by email
the problem is it add the following thing before the html:
ן»¿
the questions are:
from where does it come from? and how to fixed it so it does not show?thank you for the answer but saving it as ansi or unicode make things worse and in that encoding
it is not possible to see the page
the page is mainly photos some text and links
is there any other
possibility that cause this or it is only encoding of the page? -
Outlook 2013 How to send web page as an email?
I have done a web page with CSS styles in the HTML file. Still when I try to send the file as an attachment as text the styles don't render well, for example divs have borders and links doesn't work at all. I try to send a newsletter.
Hi,
Would you please attach a screenshot to help us understand the issue? If your account is not verified to attach images, please share the screenshot to us via sending it to
GBSD TN Office Information Collection [email protected]
(The email subject should be the thread link)
Thanks,
Steve Fan
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to send HTML link in the email through BRFplus
Hi All,
I want to send an HTML link embedded into the email body , as shown below.
Hello Friends,
Please find below path for error occurred during triggering of materials.
Http://documents/error/doc.htm
Thanks & Regards
Khushbu
And when the user clicks on the HTML link , it should directly take user to the browser.
Kindly suggest how to implement this functionality.
Regards,
KhushbuI have tried using HTML code for writing the email body, but its not working.Its not converting HTML code , its taking them as characters only.I know how pass HTML link in email from ABAP but here email are sent from SEND email action of BRFplus.
-
How do I send a page via email in the body of the mail and not as an attachment?
I wish to send a page via email in the body of the mail. The only option to send a page appears to be to save it first and then attatch to the mail.
When you are in the Plan View, right click on the icon for the page that you want to omit from the menu. Near the bottom, you'll see Menu Options, click on that and you'll have the choice to Exclude Page from Menus.
-
How to send HTML email (like a Apple eNews) ?
Hello My name is Daniel... I'm a graphic designer.
My questions is... I'm doing a Newspaper eMail for a couple of clients... I already have 1 HTML page with images and text its a very simple design only four or five images witn a text and a couple of tables....
How can I do to send this HTML by mail to a ten or twenty persons? like a Apple eNews emails.... and this email can be seen in some email programs like a Outlook, Mail, Eutorage, hotmail and gmail sites... only the page without folders or images attachment ....
I have this problem for almost 4 or 5 moths... I'll appreciate your help...
Thanks a lot
Daniel
PD: Sorry about my english, I know that is very bad... I'm sorry.Try viewing your html with Safari and using the menu option to send the page as an email. You might try sending it to yourself first to test what it looks like. As for what it will look like on all those other mail clients, you will just have to test it to find out.
-
How to send HTML email to End User using OOTB email processs?
Hi,
We are using OOTB Send email process to send email to end user.
Templates has been created inside /etc/workflow/ProjectName/email folder.
Its working properly for plain text email.but for html template ,It send the email with html tags.
Any pointer on how to write html template for OOTB email process and activate email type as html ?
Thanks
DeepikaThanks Sham..
I am able to send HTML email following above link.
The problem i am facing is,When i am deploying the code through crxde.Code is working fine.
But using maven deploy..Bundle get activated ..But at line:
messageGateway = this.messageGatewayService.getGateway(HtmlEmail.class);
,it gives null Pointer exception.
Any pointer,why its not working from maven deployment.
Regards
Deepika -
How to send html email made in dreamweaver
how to send html email made in dreamweaver
Make sure you upload all of the images used in your email to a server you control. Then, change your image paths to point to those uploaded images with absolute links.
You will get marked as spam if you attempt to send images as attachments to a large list of recipients and most email clients won't download images to begin with, so make sure your html email makes sense with broken pictures.
CSS support is spotty across email clients, if you use css, make sure it's inline, not embedded in the <head> or externally linked in the <head>. Some email clients strip out the <head> section entirely.
Basically, you need to design your html email as if you haven't moved out of the 90's yet, as far as web design is concerned, in order to get maximum cross client compatibility.
Then, when you're ready, I would suggest using a service like www.icontact.com or www.constantcontact.com if your subscriber list is anywhere over 100 or so recipients. -
How to send .CSV file via email in Oracle10g/11g PL/SQL
Hi Guys,
Can any one let me know or suggest me how to send .csv file via email attachment using Oracle PL/SQL.
Thanks in advance!
Regards,
LRKA FAQ. Use UTL_MAIL (if attachment is 32KB less). Else use UTL_SMTP. Search this forum. Search using google.
-
Send HTML as attachment in email in Stored Procedure
Hi Guys,
I am writing a stored procedure to send HTML attachment. Below is my code but no html attachment sent in mail. Kindly advise.
USE [CarsemERP]
GO
/****** Object: StoredProcedure [dbo].[DBA_CarsemERP_SQLBlocks] Script Date: 04/01/2015 15:14:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <THARMENDRAN>
-- Create date: <2014FEB21>
-- Description: TO CHECK ANY LOCKS MORE THN 20 SEC IN SQL SERVER
-- =============================================
ALTER PROCEDURE [dbo].[DBA_CarsemERP_SQLBlocks]
AS
BEGIN
DECLARE @iCnt As Int
DECLARE @ICnt2 As Int
DECLARE @SendEmail AS VARCHAR(3)
DECLARE @Temp_DetailReq1 TABLE (
idx smallint Primary Key IDENTITY(1,1),
DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
LoginName varchar (30), HostName varchar (30))
DECLARE @Temp_DetailReq2 TABLE (
idx smallint Primary Key IDENTITY(1,1),
DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
LoginName varchar (30), HostName varchar (30))
SET @SendEmail = 'NO'
SELECT @iCnt= COUNT(*) FROM DBA_SQLBlocksViewTharmen
IF @iCnt > 0
BEGIN
Insert Into @Temp_DetailReq1
Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
END
WAITFOR DELAY '00:00:20'
select @iCnt2= COUNT(*) FROM DBA_SQLBlocksViewTharmen
IF @iCnt2 > 0
BEGIN
DECLARE @columnHeaders NVARCHAR(MAX)
DECLARE @tableHTML NVARCHAR(MAX)
DECLARE @body NVARCHAR(MAX)
Insert Into @Temp_DetailReq2
Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
SET @SendEmail = 'YES'
BEGIN
SET @columnHeaders = 'DBName</th><th>RequestId</th><th>BlockingId</th><th>BlockedObjectName</th><th>LockType</th><th>RequestingText</th><th>BlockingText</th><th>LoginName</th><th>HostName'
set @tableHTML =
'<div><b>There is blocking in VERPSVR02-02.</b></div><br>' + -- This is the bold text at the top of your email
'<table border="0" cellpadding="5"><font face="Calibri" size=2>' +
'<tr><th>' + @columnHeaders + '</th></tr>' +
convert(nvarchar(max),
select td = [DBName], '', -- Here we put the column names
td = [RequestId], '',
td = [BlockingId], '',
td = [BlockedObjectName], '',
td = [LockType], '',
td = [RequestingText], '',
td = [BlockingText], '',
td = [LoginName], '',
td = [HostName], '' -- Here we put the column names
from @Temp_DetailReq2
for xml path('tr'), type)) +'</font></table>'
END
END
IF @SendEmail = 'YES'
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MyDBMailProfileName',
@recipients = '[email protected]',
@body = 'Please refer the attachment' ,
@body_format = 'HTML',
@subject = 'Alert! Blocking On ERPSVR02-02 Live Server',
@file_attachments = @tableHTML,
@importance = 'High';
END
ENDHi Guys,
I need help on how to generated HTML as attachment to email. I have write below stored procedure but the html did not send as attachment. Kindly guide me on how to save the generated HTML as a file and send it as attachment.
USE [CarsemERP]
GO
/****** Object: StoredProcedure [dbo].[DBA_CarsemERP_SQLBlocks] Script Date: 04/01/2015 15:14:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <THARMENDRAN>
-- Create date: <2014FEB21>
-- Description: TO CHECK ANY LOCKS MORE THN 20 SEC IN SQL SERVER
-- =============================================
ALTER PROCEDURE [dbo].[DBA_CarsemERP_SQLBlocks]
AS
BEGIN
DECLARE @iCnt As Int
DECLARE @ICnt2 As Int
DECLARE @SendEmail AS VARCHAR(3)
DECLARE @Temp_DetailReq1 TABLE (
idx smallint Primary Key IDENTITY(1,1),
DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
LoginName varchar (30), HostName varchar (30))
DECLARE @Temp_DetailReq2 TABLE (
idx smallint Primary Key IDENTITY(1,1),
DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
LoginName varchar (30), HostName varchar (30))
SET @SendEmail = 'NO'
SELECT @iCnt= COUNT(*) FROM DBA_SQLBlocksViewTharmen
IF @iCnt > 0
BEGIN
Insert Into @Temp_DetailReq1
Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
END
WAITFOR DELAY '00:00:20'
select @iCnt2= COUNT(*) FROM DBA_SQLBlocksViewTharmen
IF @iCnt2 > 0
BEGIN
DECLARE @columnHeaders NVARCHAR(MAX)
DECLARE @tableHTML NVARCHAR(MAX)
DECLARE @body NVARCHAR(MAX)
Insert Into @Temp_DetailReq2
Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
SET @SendEmail = 'YES'
BEGIN
SET @columnHeaders = 'DBName</th><th>RequestId</th><th>BlockingId</th><th>BlockedObjectName</th><th>LockType</th><th>RequestingText</th><th>BlockingText</th><th>LoginName</th><th>HostName'
set @tableHTML =
'<div><b>There is blocking in VERPSVR02-02.</b></div><br>' + -- This is the bold text at the top of your email
'<table border="0" cellpadding="5"><font face="Calibri" size=2>' +
'<tr><th>' + @columnHeaders + '</th></tr>' +
convert(nvarchar(max),
select td = [DBName], '', -- Here we put the column names
td = [RequestId], '',
td = [BlockingId], '',
td = [BlockedObjectName], '',
td = [LockType], '',
td = [RequestingText], '',
td = [BlockingText], '',
td = [LoginName], '',
td = [HostName], '' -- Here we put the column names
from @Temp_DetailReq2
for xml path('tr'), type)) +'</font></table>'
END
END
IF @SendEmail = 'YES'
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MyDBMailProfileName',
@recipients = '[email protected]',
@body = 'Please refer the attachment' ,
@body_format = 'HTML',
@subject = 'Alert! Blocking On ERPSVR02-02 Live Server',
@file_attachments = @tableHTML,
@importance = 'High';
END
END -
How to include HTML page on a screen
Hi,
How to include HTML page on a module-pool screen. i want to handle hyperlinks on that page. how ca n i do that?....plz send me reply vvvery fastHi Amarnath,
1. RSDEMO_HTML_VIEWER
Check the above program.
Regards,
Amit M. -
How to send ALV Grid report to Email?
hai all,
How to send ALV Grid report to Email.
please its very urgent.....Hi,
when u run the Alv, u will button 'Mail Recepiant' in tool bar.When u click it and enter to new screen, go to the Recipient Tab(down) enter ur maild id and click 'Send' button on tool bar.
or.
if u want to send the Alv content to mail id thru prg, go thru the following code.
TABLES
TABLES: BSID. " Accounting: Secondary Index for Customers.
TYPE-POOLS
TYPE-POOLS: SLIS.
INTERNAL TABLES
Internal table to hold Customer data.
DATA: BEGIN OF TB_BSID OCCURS 0,
BUKRS LIKE BSID-BUKRS, " Company code
KUNNR LIKE BSID-KUNNR, " Customer number
AUGDT LIKE BSID-AUGDT, " Clearing Date
BLDAT LIKE BSID-BLDAT, " Doc date in document
SHKZG LIKE BSID-SHKZG, " Debit/credit indicator
DMBTR LIKE BSID-DMBTR, " Amount in local currency
ZFBDT LIKE BSID-ZFBDT, " Baseline date for due date calc
ZBD1T LIKE BSID-ZBD1T, " Cash discount days 1
ZBD2T LIKE BSID-ZBD2T, " Cash discount days 2
ZBD3T LIKE BSID-ZBD3T, " Net Payment Terms Period
REBZG LIKE BSID-REBZG, " No Of the Inv the Tran Belongs to
REBZT LIKE BSID-REBZT, " Follow-On Document Type
END OF TB_BSID.
Internal table to hold Open Items.
DATA: TB_BSID_OPEN LIKE TABLE OF TB_BSID WITH HEADER LINE.
Internal table to hold Cleared Items.
DATA: TB_BSAD_CLEAR LIKE TABLE OF TB_BSID WITH HEADER LINE.
Internal table to hold General Data in Customer Master
DATA: BEGIN OF TB_KNA1 OCCURS 0,
KUNNR LIKE KNA1-KUNNR, " Customer Number
NAME1 LIKE KNA1-NAME1, " Name Line 1
TELF1 LIKE KNA1-TELF1, " Telephone Number
ADRNR LIKE KNA1-ADRNR, " Address
END OF TB_KNA1.
Internal table to hold Customer Master (Company Code)
DATA: BEGIN OF TB_KNB1 OCCURS 0,
KUNNR LIKE KNB1-KUNNR, " Customer Number
BUKRS LIKE KNB1-BUKRS, " Company code
ERDAT LIKE KNB1-ERDAT, " Rec Created Date
ZAMIB LIKE KNB1-ZAMIB, " DMS Managed Indicator
END OF TB_KNB1.
Internal table to hold Final Output Data
DATA: BEGIN OF TB_FINAL OCCURS 0,
KUNNR LIKE KNA1-KUNNR, " Customer Number
NAME1 LIKE KNA1-NAME1, " Name Line 1
ADDRESS1(25) TYPE C, " Address line 1
ADDRESS2(25) TYPE C, " Address line 2
ADDRESS3(25) TYPE C, " Address line 3
ADDRESS4(25) TYPE C, " Address line 4
PHONE LIKE KNA1-TELF1, " Telephone Number
DAYS_SLOW(3) TYPE C, " Days Slow
LAST_DATE(8) TYPE C, " Date of Last Invoice
AVG(4) TYPE C, " Average Days to Pay
CURRENT(10) TYPE N, " Current
AVG_1_30(10) TYPE N, " 1-30 past due
AVG_31_60(10) TYPE N, " 31-60 past due
AVG_61_90(10) TYPE N, " 61-90 past due
AVG_90G(10) TYPE N, " 90+ past due
END OF TB_FINAL.
ALV Internal tables
DATA : TB_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, " Field Catalog
TB_EVENTS TYPE SLIS_T_EVENT, " ALV Events
TB_COMMENTS TYPE SLIS_T_LISTHEADER. " Comment
Internal tables for the sending mail data
DATA: TB_OBJPACK TYPE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE,
TB_OBJHEAD TYPE SOLISTI1 OCCURS 1 WITH HEADER LINE,
TB_OBJTXT TYPE SOLISTI1 OCCURS 10 WITH HEADER LINE,
TB_RECLIST TYPE SOMLRECI1 OCCURS 5 WITH HEADER LINE,
TB_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
TB_DOC_CHNG TYPE SODOCCHGI1.
Internal table to get mail Receivers Address
DATA: TB_ZRECEIVE LIKE YSMTP_ADDRESS OCCURS 0 WITH HEADER LINE.
STRUCTURES
DATA: X_SADR TYPE SADR, " For Address
X_FIELDCAT TYPE SLIS_FIELDCAT_ALV, " For Field Catalog
X_LAYOUT TYPE SLIS_LAYOUT_ALV, " For Layout
X_EVENTS TYPE SLIS_ALV_EVENT, " For Events
X_COMMENTS TYPE SLIS_LISTHEADER, " For Comments
X_ADDR1_SEL LIKE ADDR1_SEL, " For Address
WA_FAEDE TYPE FAEDE. " For FAEDE struct
VARIABLES
DATA: G_REPID LIKE SY-REPID, " Prog ID
G_DAYS_SLOW(3) TYPE N, " Days Slow
G_OPEN TYPE I, " Counter
G_AVG(4) TYPE C, " Avg Days
G_COUNT TYPE I, " Counter
G_TITLE TYPE SOLISTI1-LINE, " Description
G_TAB_LINES TYPE SY-TABIX, " Internal data count
G_REC_COUNT TYPE I, " Total records
G_CURR_BAL TYPE N, " Account balance
G_FILE_NAME LIKE EDI_PATH-PTHNAM. " Output File Name
CONSTANTS
CONSTANTS: C_D TYPE C VALUE 'D', " Account type
C_X TYPE C VALUE 'X', " Check Value
C_0(4) TYPE N VALUE '0.00', " Constant for char
C_1(2) TYPE C VALUE '01', " Posting key const
C_H TYPE C VALUE 'H', " For Commenet-Type
C_TXT(3) TYPE N VALUE 'TXT', " File type
C_RAW(3) TYPE C VALUE 'RAW', " File type
C_DELIMITER TYPE X VALUE '09', " ASCII CODE LINE
C_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
C_INTERFACE TYPE YWFSALOFFICNOTIF-INTERFACE_ID VALUE 'AP',
C_FILENAME(20) TYPE N VALUE 'TEXT.TXT'," File name
C_TITLE(30) TYPE N VALUE 'Z21614_DB_CREDIT_AGENCY',
C_Z001 TYPE RF035-RASID VALUE 'Z001'." Net 30/60/90/120/150
SELECTION SCREEN.
Selection Screen for Selection Criteria.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
SELECT-OPTIONS: S_BUKRS FOR BSID-BUKRS OBLIGATORY, " Company Code
S_BLDAT FOR BSID-BLDAT," OBLIGATORY, " Doc Date
S_KUNNR FOR BSID-KUNNR, " Cust No
S_ZUONR FOR BSID-ZUONR. " Assignment
PARAMETERS: P_GRACE(2) TYPE N OBLIGATORY, " Grace Days
P_ZAMIB LIKE KNB1-ZAMIB AS CHECKBOX. " DMS Indicator
SELECTION-SCREEN END OF BLOCK B1.
Selection Screen for Output Options.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-T02.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 01.
PARAMETERS: P_REPORT RADIOBUTTON GROUP R1. " Report Only
SELECTION-SCREEN COMMENT 5(25) TEXT-016.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 01.
PARAMETERS: P_DOWN RADIOBUTTON GROUP R1. " Dwnld to Unix
SELECTION-SCREEN COMMENT 5(25) TEXT-017.
SELECTION-SCREEN POSITION 30.
PARAMETERS: P_FILE LIKE FILENAME-FILEINTERN DEFAULT
'Z21614_DB_CREDIT_AGENCY'. " File Name
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
Selection Screen for E-mail.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-T03.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 01.
PARAMETERS: P_EMAIL AS CHECKBOX. " E-mail
SELECTION-SCREEN COMMENT 5(25) TEXT-018.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B3.
INITIALIZATION
INITIALIZATION.
G_REPID = SY-REPID.
AT SELECTION SCREEN. *
AT SELECTION-SCREEN.
Validation of selection screen entries
perform validate_data.
START-OF-SELECTION
START-OF-SELECTION.
Select Data from Customer Master (Company Code)
PERFORM SELECT_KNB1.
Select Custmer Open Items.
PERFORM SELECT_CUSTOMER_OPEN_ITEMS.
Select Custmer Cleared Items.
PERFORM SELECT_CUSTOMER_CLEARED_ITEMS.
Select General Data in Customer Master
PERFORM SELECT_KNA1.
Populate Final Output Data.
PERFORM POPULATE_TB_FINAL.
End of selection *
END-OF-SELECTION.
If both display report and send email is checked
IF P_REPORT = C_X AND P_EMAIL = C_X.
MESSAGE E999 WITH
'Select One Among Report Only & Send E-mail'(023).
When Radiobutton for Email or if the program is run background
ELSEIF ( P_EMAIL = C_X OR SY-BATCH = C_X ).
To send the mail
PERFORM SEND_EMAIL.
ELSEIF P_REPORT = C_X .
To display the Final Output data using ALV's
PERFORM DISPLAY_ALV_REPORT.
ENDIF.
Transfering data to file when downloading to Unix
IF P_DOWN = C_X.
IF G_REC_COUNT IS INITIAL.
MESSAGE I999 WITH
'No Records Found For Selection Criteria'(024).
EXIT.
ELSE.
IF NOT G_FILE_NAME IS INITIAL.
Trasefering data to file
PERFORM TRANSFER_DATA_FILE.
Interface Audit report
PERFORM WRITE_REPORT.
ENDIF.
ENDIF.
ENDIF.
F O R M S
*& Form VALIDATE_DATA
Validating selection-screen entries
FORM VALIDATE_DATA.
Local variables
DATA : L_BUKRS LIKE BSEG-BUKRS, " For Company Code
L_KUNNR LIKE BSEG-KUNNR. " For Customer Number
Validate the Company code.
SELECT SINGLE BUKRS
INTO L_BUKRS
FROM T001
WHERE BUKRS IN S_BUKRS.
IF SY-SUBRC <> 0.
MESSAGE E999 WITH 'Enter valid Company Code'(025).
ENDIF.
Validate the Customer number
IF NOT S_KUNNR[] IS INITIAL.
SELECT SINGLE KUNNR
INTO L_KUNNR
FROM KNA1
WHERE KUNNR IN S_KUNNR.
IF SY-SUBRC <> 0.
MESSAGE E999 WITH 'Enter valid Customer Number'(026).
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_DATA
*& Form SELECT_KNB1
Select Data from Customer Master (Company Code)
FORM SELECT_KNB1 .
CLEAR: TB_KNB1,
TB_KNB1[].
SELECT KUNNR
BUKRS
ERDAT
ZAMIB
FROM KNB1
INTO TABLE TB_KNB1
WHERE BUKRS IN S_BUKRS
AND KUNNR IN S_KUNNR.
IF SY-SUBRC = 0.
Sort TB_KNB1 by Customer no & Rec Created Date
SORT TB_KNB1 BY KUNNR ERDAT DESCENDING.
ENDIF.
ENDFORM. " SELECT_KNB1
*& Form SELECT_CUSTOMER_OPEN_ITEMS
Select Custmer Open Items.
FORM SELECT_CUSTOMER_OPEN_ITEMS .
CLEAR: TB_BSID,
TB_BSID[].
SELECT A~BUKRS
B~KUNNR
B~AUGDT
B~BLDAT
B~SHKZG
B~DMBTR
B~ZFBDT
B~ZBD1T
B~ZBD2T
B~ZBD3T
B~REBZG
B~REBZT
INTO TABLE TB_BSID
FROM BKPF AS A JOIN BSID AS B
ON ABUKRS = BBUKRS
AND ABELNR = BBELNR
AND AGJAHR = BGJAHR
WHERE A~BUKRS IN S_BUKRS
AND A~BLDAT IN S_BLDAT
AND B~KUNNR IN S_KUNNR
AND B~ZUONR IN S_ZUONR
AND B~BSCHL = C_1.
IF SY-SUBRC = 0.
DMS Managed Indicator = X.
IF P_ZAMIB = C_X.
LOOP AT TB_KNB1 WHERE ZAMIB = SPACE.
DELETE TB_BSID WHERE BUKRS = TB_KNB1-BUKRS
AND KUNNR = TB_KNB1-KUNNR.
ENDLOOP.
ENDIF.
Transfering Open Items from TB_BSID to TB_BSID_OPEN
TB_BSID_OPEN[] = TB_BSID[].
ENDIF.
ENDFORM. " SELECT_CUSTOMER_OPEN_ITEMS
*& Form SELECT_CUSTOMER_CLEARED_ITEMS
Select Custmer Cleared Items.
FORM SELECT_CUSTOMER_CLEARED_ITEMS .
CLEAR: TB_BSAD_CLEAR,
TB_BSAD_CLEAR[].
SELECT A~BUKRS
B~KUNNR
B~AUGDT
B~BLDAT
B~SHKZG
B~DMBTR
B~ZFBDT
B~ZBD1T
B~ZBD2T
B~ZBD3T
B~REBZG
B~REBZT
INTO TABLE TB_BSAD_CLEAR
FROM BKPF AS A JOIN BSAD AS B
ON ABUKRS = BBUKRS
AND ABELNR = BBELNR
AND AGJAHR = BGJAHR
WHERE A~BUKRS IN S_BUKRS
AND A~BLDAT IN S_BLDAT
AND B~KUNNR IN S_KUNNR
AND B~ZUONR IN S_ZUONR
AND B~BSCHL = C_1.
IF SY-SUBRC = 0.
DMS Managed Indicator = X.
IF P_ZAMIB = C_X.
LOOP AT TB_KNB1 WHERE ZAMIB = SPACE.
DELETE TB_BSID WHERE BUKRS = TB_KNB1-BUKRS
AND KUNNR = TB_KNB1-KUNNR.
ENDLOOP.
ENDIF.
Sort TB_BSID_CLEAR by Customer number
SORT TB_BSAD_CLEAR BY KUNNR.
ENDIF.
Append lines of TB_BSID_CLEAR to table TB_BSID
APPEND LINES OF TB_BSAD_CLEAR TO TB_BSID.
Sort TB_BSID by Cust num AND Doc date in document
SORT TB_BSID BY KUNNR BLDAT.
ENDFORM. " SELECT_CUSTOMER_CLEARED_ITEMS
*& Form SELECT_KNA1
Select General Data in Customer Master
FORM SELECT_KNA1.
CLEAR: TB_KNA1,
TB_KNA1[].
SELECT KUNNR
NAME1
TELF1
ADRNR
INTO TABLE TB_KNA1
FROM KNA1
WHERE KUNNR IN S_KUNNR.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " SELECT_KNA1
*& Form POPULATE_TB_FINAL
Populate Final Output Data.
FORM POPULATE_TB_FINAL.
Local variable
DATA: L_DAYS_SLOW(3) TYPE N. " Days Slow
CLEAR: TB_FINAL,
TB_FINAL[].
LOOP AT TB_KNA1.
Move-corresponding TB_KNA1 to TB_FINAL.
TB_FINAL-KUNNR = TB_KNA1-KUNNR. " Customer Number
TB_FINAL-NAME1 = TB_KNA1-NAME1. " Name Line 1
TB_FINAL-PHONE = TB_KNA1-TELF1. " Telephone Number
To get Customer Address.
PERFORM GET_CUSTOMER_ADDRESS.
To get Date of Last Invoice.
READ TABLE TB_BSID WITH KEY KUNNR = TB_KNA1-KUNNR.
IF SY-SUBRC = 0.
TB_FINAL-LAST_DATE = TB_BSID-BLDAT.
ENDIF.
To get past due and current details.
PERFORM GET_PAST_DUE_CURRENT.
To get Days Slow.
CLEAR WA_FAEDE .
LOOP AT TB_BSID_OPEN WHERE KUNNR = TB_KNA1-KUNNR.
WA_FAEDE-SHKZG = TB_BSID-SHKZG.
WA_FAEDE-ZFBDT = TB_BSID-ZFBDT.
WA_FAEDE-ZBD1T = TB_BSID-ZBD1T.
WA_FAEDE-ZBD2T = TB_BSID-ZBD2T.
WA_FAEDE-ZBD3T = TB_BSID-ZBD3T.
WA_FAEDE-REBZG = TB_BSID-REBZG.
WA_FAEDE-REBZT = TB_BSID-REBZT.
WA_FAEDE-KOART = C_D.
To Determine Due Date.
CALL FUNCTION 'DETERMINE_DUE_DATE'
EXPORTING
I_FAEDE = WA_FAEDE
IMPORTING
E_FAEDE = WA_FAEDE
EXCEPTIONS
ACCOUNT_TYPE_NOT_SUPPORTED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
CLEAR WA_FAEDE.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: L_DAYS_SLOW.
L_DAYS_SLOW = SY-DATUM - WA_FAEDE-NETDT - P_GRACE.
G_DAYS_SLOW = G_DAYS_SLOW + ABS( L_DAYS_SLOW ).
G_OPEN = G_OPEN + 1.
ENDLOOP.
IF G_OPEN IS INITIAL.
TB_FINAL-DAYS_SLOW = G_DAYS_SLOW / G_OPEN. " Days Slow
ENDIF.
To get Average days to Pay.
PERFORM GET_AVG_DAYS_PAY.
Calculating total records .
G_REC_COUNT = G_REC_COUNT + 1.
APPEND TB_FINAL.
CLEAR TB_FINAL.
ENDLOOP.
Current account balance.
G_CURR_BAL = TB_FINAL-CURRENT + TB_FINAL-AVG_1_30 +
TB_FINAL-AVG_31_60 +
TB_FINAL-AVG_61_90 +
TB_FINAL-AVG_90G .
ENDFORM. " POPULATE_TB_FINAL
*& Form GET_PAST_DUE_CURRENT
To get past due and current details.
FORM GET_PAST_DUE_CURRENT.
Local Varaibles.
DATA: L_RF035_SFAE1 TYPE RF035-SFAE1,
L_RF035_SFAE2 TYPE RF035-SFAE2,
L_RF035_SFAE3 TYPE RF035-SFAE3,
L_RF035_SFAE4 TYPE RF035-SFAE4,
L_RF035_SFAE5 TYPE RF035-SFAE5,
L_RF035_SFAE6 TYPE RF035-SFAE6,
L_RF035_SFAEL TYPE RF035-SFAEL,
L_RF035_SNFA1 TYPE RF035-SNFA1,
L_RF035_SNFA2 TYPE RF035-SNFA2,
L_RF035_SNFA3 TYPE RF035-SNFA3,
L_RF035_SNFA4 TYPE RF035-SNFA4,
L_RF035_SNFA5 TYPE RF035-SNFA5,
L_RF035_SNFA6 TYPE RF035-SNFA6,
L_RF035_SNFAE TYPE RF035-SNFAE.
LOOP AT TB_KNB1 WHERE KUNNR = TB_KNA1-KUNNR.
CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'
EXPORTING
BUKRS = TB_KNB1-BUKRS
KKBER = ' '
KUNNR = TB_KNB1-KUNNR
RASID = C_Z001
IMPORTING
SFAE1 = L_RF035_SFAE1
SFAE2 = L_RF035_SFAE2
SFAE3 = L_RF035_SFAE3
SFAE4 = L_RF035_SFAE4
SFAE5 = L_RF035_SFAE5
SFAE6 = L_RF035_SFAE6
SFAEL = L_RF035_SFAEL
SNFA1 = L_RF035_SNFA1
SNFA2 = L_RF035_SNFA2
SNFA3 = L_RF035_SNFA3
SNFA4 = L_RF035_SNFA4
SNFA5 = L_RF035_SNFA5
SNFA6 = L_RF035_SNFA6
SNFAE = L_RF035_SNFAE
EXCEPTIONS
INVALID_RASTER = 1
NO_OPEN_ITEMS = 2
OTHERS = 3
IF SY-SUBRC = 0.
TB_FINAL-AVG_1_30 = TB_FINAL-AVG_1_30 + L_RF035_SFAE1.
TB_FINAL-AVG_31_60 = TB_FINAL-AVG_31_60 + L_RF035_SFAE2.
TB_FINAL-AVG_61_90 = TB_FINAL-AVG_61_90 + L_RF035_SFAE3.
TB_FINAL-AVG_90G = TB_FINAL-AVG_90G + L_RF035_SFAE4
+ L_RF035_SFAE5
+ L_RF035_SFAE6.
TB_FINAL-CURRENT = TB_FINAL-CURRENT + L_RF035_SNFAE.
ELSE.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
ENDFORM. " GET_PAST_DUE_CURRENT
*& Form GET_CUSTOMER_ADDRESS
To get Customer Address.
FORM GET_CUSTOMER_ADDRESS.
X_ADDR1_SEL-ADDRNUMBER = TB_KNA1-ADRNR.
CALL FUNCTION 'ADDR_GET'
EXPORTING
ADDRESS_SELECTION = X_ADDR1_SEL
IMPORTING
SADR = X_SADR
EXCEPTIONS
PARAMETER_ERROR = 1
ADDRESS_NOT_EXIST = 2
VERSION_NOT_EXIST = 3
INTERNAL_ERROR = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ADDRESS LINE 1.
TB_FINAL-ADDRESS1 = X_SADR-STRAS.
ADDRESS LINE 2.
CONCATENATE X_SADR-PFACH 'CODE' X_SADR-PSTL2 INTO TB_FINAL-ADDRESS2
SEPARATED BY SPACE.
ADDRESS LINE 3.
CONCATENATE X_SADR-ORT01 X_SADR-ORT02 ',' X_SADR-REGIO X_SADR-PSTLZ
INTO TB_FINAL-ADDRESS3 SEPARATED BY SPACE.
ADDRESS LINE 4.
TB_FINAL-ADDRESS4 = X_SADR-LAND1.
ENDFORM. " GET_CUSTOMER_ADDRESS
*& Form GET_AVG_DAYS_PAY
To get Average days to Pay.
FORM GET_AVG_DAYS_PAY.
*Local variable
DATA: L_DAYS TYPE N . " Number of Days
LOOP AT TB_BSAD_CLEAR WHERE KUNNR = TB_KNA1-KUNNR.
L_DAYS = TB_BSAD_CLEAR-AUGDT - TB_BSAD_CLEAR-BLDAT.
G_AVG = G_AVG + L_DAYS.
G_COUNT = G_COUNT + 1.
ENDLOOP.
IF NOT G_COUNT IS INITIAL.
TB_FINAL-AVG = G_AVG / G_COUNT. " Average days to Pay.
ENDIF.
ENDFORM. " GET_AVG_DAYS_PAY
*& Form DISPLAY_ALV_REPORT
text
FORM DISPLAY_ALV_REPORT.
For Populating Field Catalog.
PERFORM RPT_BUILD_FIELDCATLOG.
For Modifying Field Catalog.
PERFORM RPT_MODIFY_FIELDCATLOG.
For TOP_OF_PAGE Event.
PERFORM RPT_GET_EVENTS.
For Displaying Output in Grid Format.
PERFORM RPT_GRID_DISPLAY.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form RPT_BUILD_FIELDCATLOG
text
FORM RPT_BUILD_FIELDCATLOG.
To build the Field Catlog.
DATA : L_TABNAME TYPE SLIS_TABNAME. " Table Name
L_TABNAME = 'TB_FINAL'.
REFRESH : TB_FIELDCAT.
CLEAR : TB_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = G_REPID
I_INTERNAL_TABNAME = L_TABNAME
I_INCLNAME = G_REPID
CHANGING
CT_FIELDCAT = TB_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
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. " RPT_BUILD_FIELDCATLOG
*& Form RPT_MODIFY_FIELDCATLOG
text
FORM RPT_MODIFY_FIELDCATLOG.
Getting the Header Text for the Coloumns
DATA : L_TABIX LIKE SY-TABIX, " Index
L_DDICTXT TYPE C VALUE 'L'. " Flag
Getting the Header Text for the Coloumns
LOOP AT TB_FIELDCAT INTO X_FIELDCAT.
CLEAR L_TABIX.
L_TABIX = SY-TABIX.
CASE X_FIELDCAT-FIELDNAME.
WHEN 'KUNNR'. " Customer Number
X_FIELDCAT-SELTEXT_L = 'Customer Number'(001).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'NAME1'. " Name Line 1
X_FIELDCAT-SELTEXT_L = 'Name'(002).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'ADDRESS1'. " Address line 1
X_FIELDCAT-SELTEXT_L = 'Address 1'(003).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'ADDRESS2'. " Address line 2
X_FIELDCAT-SELTEXT_L = 'Address 2'(004).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'ADDRESS3'. " Address line 3
X_FIELDCAT-SELTEXT_L = 'Address 3'(005).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'ADDRESS4'. " Address line 4
X_FIELDCAT-SELTEXT_L = 'Address 4'(006).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'PHONE'. " Telephone Number
X_FIELDCAT-SELTEXT_L = 'Telephone Number'(007).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'DAYS_SLOW'. " Days Slow
X_FIELDCAT-SELTEXT_L = 'Days Slow'(008).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'LAST_DATE'. " Date of Last Invoice
X_FIELDCAT-SELTEXT_L = 'Date of Last Invoice'(009).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'AVG'. " Average Days to Pay
X_FIELDCAT-SELTEXT_L = 'Average Days to Pay'(010).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'CURRENT'. " Current
X_FIELDCAT-SELTEXT_L = 'Aging Category 1'(011).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'AVG_1_30'. " 1-30 past due
X_FIELDCAT-SELTEXT_L = 'Aging Category 2'(012).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'AVG_31_60'. " 31-60 past due
X_FIELDCAT-SELTEXT_L = 'Aging Category 3'(013).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'AVG_61_90'. " 61-90 past due
X_FIELDCAT-SELTEXT_L = 'Aging Category 4'(014).
X_FIELDCAT-DDICTXT = L_DDICTXT.
WHEN 'AVG_90G'. " 90+ past due
X_FIELDCAT-SELTEXT_L = 'Aging Category 5'(015).
X_FIELDCAT-DDICTXT = L_DDICTXT.
ENDCASE.
MODIFY TB_FIELDCAT FROM X_FIELDCAT INDEX L_TABIX.
ENDLOOP.
ENDFORM. " RPT_MODIFY_FIELDCATLOG
*& Form RPT_GET_EVENTS
text
FORM RPT_GET_EVENTS.
DATA : L_TABIX TYPE SY-TABIX. " Index
CLEAR : TB_EVENTS,
TB_EVENTS[].
To get the events from this function module
for ALV display
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = TB_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE I999 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Modifing Top of Page event
READ TABLE TB_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO X_EVENTS.
IF SY-SUBRC = 0.
CLEAR L_TABIX.
L_TABIX = SY-TABIX.
X_EVENTS-FORM = C_TOP_OF_PAGE.
MODIFY TB_EVENTS FROM X_EVENTS INDEX L_TABIX.
CLEAR X_EVENTS.
ENDIF.
ENDFORM. " RPT_GET_EVENTS
*& Form TOP_OF_PAGE
Top Of Page for the ALV format
FORM TOP_OF_PAGE.
REFRESH TB_COMMENTS.
For heading
CLEAR X_COMMENTS.
X_COMMENTS-TYP = C_H.
X_COMMENTS-INFO = 'D&B Credit Agency Interface'(019).
APPEND X_COMMENTS TO TB_COMMENTS.
This module outputs formatted simple header information at TOP-OF-PAGE
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = TB_COMMENTS.
ENDFORM. " TOP_OF_PAGE
*& Form RPT_GRID_DISPLAY
text
FORM RPT_GRID_DISPLAY.
Layout Settings
CLEAR X_LAYOUT.
X_LAYOUT-ZEBRA = 'X'.
X_LAYOUT-COLWIDTH_OPTIMIZE = C_X.
X_LAYOUT-NO_COLHEAD = SPACE.
To Display the Output in ALV Format
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = TB_FIELDCAT
IT_EVENTS = TB_EVENTS
TABLES
T_OUTTAB = TB_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. " RPT_GRID_DISPLAY
*& Form SEND_EMAIL
text
--> p1 text
<-- p2 text
FORM SEND_EMAIL.
Prepare the mail
PERFORM SEND_MAIL USING C_INTERFACE.
Sending the mail to Receivers
PERFORM SENDING_MAIL.
ENDFORM. " SEND_EMAIL
*& Form SEND_MAIL
Sending the Mail
FORM SEND_MAIL USING P_C_INTERFACE TYPE YWFSALOFFICNOTIF-INTERFACE_ID.
Populating Report name
G_TITLE = C_TITLE.
PERFORM POPULATE_EMAIL_REF_DATA USING G_TITLE.
IF NOT G_REC_COUNT IS INITIAL.
To populate the data to table tb_objbin
PERFORM POPULATE_DATA_OBJBIN.
To get the attached file for the mail
CLEAR G_TAB_LINES.
DESCRIBE TABLE TB_OBJBIN LINES G_TAB_LINES.
TB_OBJHEAD = C_FILENAME.
APPEND TB_OBJHEAD.
CLEAR TB_OBJHEAD.
Creation of the entry for the mail
TB_OBJPACK-TRANSF_BIN = C_X.
TB_OBJPACK-HEAD_START = C_1.
TB_OBJPACK-HEAD_NUM = C_1.
TB_OBJPACK-BODY_START = C_1.
TB_OBJPACK-BODY_NUM = G_TAB_LINES.
TB_OBJPACK-DOC_TYPE = C_TXT.
TB_OBJPACK-OBJ_NAME = G_REPID.
TB_OBJPACK-OBJ_DESCR = 'Interface Audit Report'(020).
TB_OBJPACK-DOC_SIZE = G_TAB_LINES * 255.
APPEND TB_OBJPACK.
ENDIF.
ENDFORM. " SEND_MAIL
*& Form SENDING_MAIL
FORM SENDING_MAIL.
Function Module to send mail along with attached file
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = TB_DOC_CHNG
TABLES
PACKING_LIST = TB_OBJPACK
OBJECT_HEADER = TB_OBJHEAD
CONTENTS_BIN = TB_OBJBIN
CONTENTS_TXT = TB_OBJTXT
RECEIVERS = TB_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.
CASE SY-SUBRC.
WHEN 0.
MESSAGE S999 WITH 'Mail has been sucessfully sent'(029).
WHEN 1.
MESSAGE S999 WITH 'Too Many Parameters'(030).
WHEN 2.
MESSAGE S999 WITH 'Doc Could Not Be Sent'(031).
WHEN 4.
MESSAGE S999 WITH 'No Authority To Send'(032).
WHEN 99.
MESSAGE S999 WITH 'Error While Sending'(033).
ENDCASE.
ENDFORM. " SENDING_MAIL
*& Form POPULATE_EMAIL_REF_DATA
Poplulating the body of the mail
FORM POPULATE_EMAIL_REF_DATA USING TEXT TYPE SOLISTI1-LINE.
Setting up Mail Subject
TB_DOC_CHNG-OBJ_DESCR = 'Interface Audit Report'(020).
Populating body of the mail
TB_OBJTXT-LINE = 'Interface Audit Report'(020).
APPEND TB_OBJTXT.
CLEAR: TB_OBJTXT.
DESCRIBE TABLE TB_OBJTXT LINES G_TAB_LINES.
READ TABLE TB_OBJTXT INDEX G_TAB_LINES.
*To determine the document size
TB_DOC_CHNG-DOC_SIZE = ( G_TAB_LINES - 1 ) * 255 + STRLEN( TB_OBJTXT ).
Creation of the entry for the Mail Contents
CLEAR TB_OBJPACK-TRANSF_BIN.
TB_OBJPACK-HEAD_START = C_1.
TB_OBJPACK-HEAD_NUM = C_0.
TB_OBJPACK-BODY_START = C_1.
TB_OBJPACK-BODY_NUM = G_TAB_LINES.
TB_OBJPACK-DOC_TYPE = C_RAW.
APPEND TB_OBJPACK.
ENDFORM. " POPULATE_EMAIL_REF_DATA
*& Form POPULATE_DATA_OBJBIN
Populating table for file attachment -
How to send HTML mail with images multipart/related message
Hi,
Could any body tell me how to send HTML mail with images in "multipart/related" message,if any body can give the code ,it would be helpful.
ThanksHi,
Could any body tell me how to send HTML mail with
ith images in "multipart/related" message,if any body
can give the code ,it would be helpful.
ThanksHi!
Refer to
http://developer.java.sun.com/developer/onlineTraining/JavaMail/index.html
I've found it very helpful.
Look at the last part for a code showing how to send HTML mail!
Regards -
How to send purchase order via e-mail.
Please could someone let me know how to send purchase order via e-mail.
I am an BC.
e-mailing is functionning however I am not very familiar in settings for MMNo, you do not need to touch ME_PRINT_PO. You need to put code before and after ME_PRINT_PO in the print program.
Step 1 - Copy the standard print program SAPFM06P to make a Z version, lets call it ZSAPFM06P
Step 2 - Copy include FM06PE02 to make a Z version, lets call that ZFM06PE02.
Step 3 - ZSAPFM06P change the statement "Include FM06PE02" to read "Include ZFM06PE02".
Step 4 - In include ZFM06PE02 you will find a subroutine called "ENTRY_NEU". In this subroutine you will see it first calls ME_READ_PO_FOR_PRINTING then calls ME_PRINT_PO. Before it calls ME_PRINT_PO just put:
l_nast-nacha = 1.
CLEAR l_nast-dimme.
This means that ME_PRINT_PO will not e-mail, it will create a spool request.
Step 5 - Still in ZFM06PE02, after ME_PRINT_PO has been called, add new code. First check that ent_retco EQ 0. If it does not then exit.
Step 6 - Get the spool ID created by ME_PRINT_PO by either moving sy-msgv1 to a variable or select from NAST.
Step 7 - Call function CONVERT_OTFSPOOLJOB_2_PDF using the spool ID from step 6, and put the result from table PDF into an internal table you can use later. ALso store the export variable pdf_bytecount, you will need it later.
Step 8 - Call function SX_TABLE_LINE_WIDTH_CHANGE using the table from step 7 as content_in and put the results from content_out into a new internal table.
Step 9 - Add some text into a internal table of type solisti1, this will be the body text of the e-mail.
Step 10 - Add whatever receivers you want into an internal table of type somlreci1. If you just want it to go to the address that the PO would have gone to anyway, select the e-mail address from ADR6 where the address number = l_doc-xekko-adrnr, that is the data from the PO.
Step 11 - Populate an internal table of type sopcklsti1 with data relevant to your PDF table from step 8 and the text table from step 9. You will have to put the size of the PDF from step 7 (pdf_bytecount) on the PDF line and the size of the text will be the number of lines of text * 255.
Step 12 - Add info to a structure of type sodocchgi1. You can add the e-mail title in here, field obj_descr. Also add the size of the PDF and the size of the text from step 12 into doc_size, and give the doc a name in field obj_name. This can be anything, ZPDFPO for example.
Step 13 - Call SO_DOCUMENT_SEND_API1 using the tables from steps 8, 9, 10 and 11 and the structure from step 12. You can amend the sending e-mail also. Set commit_work to space.
Step 14 - That is all you need, but I actually call function RSPO_R_RDELETE_SPOOLREQ to delete the spool request created in step 4, then call NAST_PROTOCOL_UPDATE to add some more messages to the processing log of the PO.
That is all.
Maybe you are looking for
-
Error while deploying application to weblogic 10.3
Hello! I am getting below error while deploying my portal application in weblogic 10.3 server. The application code was migrated in weblogic workshop from version 8.1 SP3. I believe I might be missing some reference of library. If anyone can point ou
-
MacBook No Longer Recognizes WD External Hard Drive
I've trying to back up to my WD 1tb external hard drive, but my MacBook (2009) doesn't recognize it, which is strange because I've never had this problem before. I tried opening Disk Utilities but it doesn't show up there, either. I guess it's possib
-
TS3899 the links in my email are not live, I can click on them but they no longer open up
The links in my emails are not live, I can click on them but they no longer open up the web pages
-
Error Creating Web Service Proxy in JDeveloper wizard
Hi, I'm trying to create a Web Service Proxy from a WDSL file with JDeveloper wizards, the problem is when i click Finish in the last step an exception occurs. java.lang.NullPointerException at oracle.jdeveloper.webservices.model.proxy.WebServic
-
I know this has been posted many times, but I can't seem to fix the problem. I have my video that I shot with my Canon T2i, which was transcoded to Apple ProRes 422 (LT). I've used Final Cut many times using those settings and the T2i... I first t