HTML Formatted Links in Dynamic TextField Trigger Popup Blocker
I recently updated the flash on my site to load all text
content as HTML from an XML file and display it in a couple of
dynamic text fields. Everything works as expected except that links
in the HTML text with a "_blank" target trigger popup blocking in
IE and Firefox. Any thoughts on why this is happening and what I
can do to fix it?
J
as3 textfields have a TextEvent.LINK you can use.
Similar Messages
-
Apex_mail.send / HTML formatting Ignored When Sent via Trigger
I have a PL/SQL procedure that sends a formatted email using the apex_mail.send procedure. This procedure works 100% perfectly if I run the procedure either from a scheduled job (using dbms_scheduler), or when I siimply call the procedure "ad hoc" from the APEX SQL Editor. However, when the exact same procedure gets invoked/called from a DB trigger, some of the formatting instructions get ignored with regards to font face and font size. I am stumped by this. Any ideas?
BTW, I'm using APEX 4.2.
Thanks in advanceSorry totally my fault - no issue at all... more a problem with the tester! users with an external email address are receiving the email it just seems when the email is sent from Apex standalone is appears in the inbox but when it is sent from within an iframe it is sent straight to the junk mail by the email client... still a little strange there is a difference in behaviour but at least it doesn't totally fail as I first thought.
-
Calling function from html tag in dynamic textfield
Hi!
Tried several approaches for making this happen, but can't seem to do it. I could really use an example of how to do this in my particular case, since I'm not exactly a code - guru.....
I have a sprite menu which populates a dynamic textfield with textlabels as users click individual items in the menu in addition to ordinary actions(gotoAndStop).
As these labels appear in the textfield, I want to be able to link them to the frames assosciated with the menu - item frames. As you can understand from this, I am working with the timeline.
By enabling html rendering of text in the textfield, I have been able to link these output labels via a a href - tag, but I am not able to call a function from this html. The function I am trying to call uses a switch statement to take the appropriate actions according to which label is being clicked, but the only effect I get is the html opening a browser window...... Unfortunately I do not know how to explain this any better, but here is my code for the following:
Main Timeline, frame 1, actions layer:
[AS]import flash.display.*;
import flash.events.*;
import flash.display.Stage;
var buttonTrace:TextField;
var sectionNames:Array = new Array("Frontpage","Introduction",
"Designparadigm", "Tooling", "Maya & c++ API", "Geometric Vectors","Lindenmayer systems","Artificial Life",
"Projects","Litterature","Disclaimer","Site credits","Newsletter & Rss",
"Blogging","Plugins","LINKS");
var sectionCount: int = sectionNames.length;
var menu:Sprite = new Sprite();
menu.x = 452;
menu.y = 172;
this.addChild(menu);
buildMenu();
function buildMenu():void {
for(var i:int=0; i < sectionCount ; i++){
var item:MovieClip = new MenuItem();
item.labelName = sectionNames[i];
item.targetClip = this;
if(i<4){
item.y = i*125
menu.addChild(item)}
else if (i>3 && i<8){
item.y = (i-4)*125
item.x = 125
menu.addChild(item)}
else if (i>7 && i<12){
item.y = (i-8)*125
item.x = 250;
menu.addChild(item)}
else if (i>11 && i<16){
item.y = (i-12)*125
item.x = 375
menu.addChild(item)}
}[\A]
Then, for the movieclip called MenuItem, I have button placed on the first frame of the timeline, and this code in the actions layer:
[AS]import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.display.Stage;
import flash.text.TextField;
import flash.events.Event;
import flash.events.TextEvent;
var buttonTrace:TextField;
var labelName:String;
var targetClip:MovieClip;
clickButton.addEventListener(MouseEvent.CLICK, onClick);
function onClick(evt:MouseEvent):void {
trace(labelName);
targetClip.gotoAndStop(labelName);
MovieClip(root).buttonTrace.appendText("\n" + labelName);
MovieClip(root).buttonTrace.addEventListener(TextEvent.LINK,linkHandler);
function linkHandler(linkEvent:TextEvent):void {
switch (linkEvent.text) {
case"Introduction":
var text= "Introduction";
text.addEventListener(TextEvent.LINK,"Introduction");
trace("Listening");
Intro();
break;
case "Designparadigm":
DP();
break;
case"Tooling":
Tooling();
break;
case "Maya & c++ API":
MayaAPI();
break;
case "Geometric Vectors":
GeometricVectors();
break;
case "Lindenmayer systems":
Lsystems();
break;
case "Artificial Life":
AL();
break;
case "Projects":
Projects();
break;
case "Litterature":
Litterature();
break;
case "Disclaimer":
Disclaimer();
break;
case "Site credits":
Sitecredits();
break;
case "Newsletter & Rss":
Rss();
break;
case "Blogging":
Blogging();
break;
case "Plugins":
Plugins();
break;
case "LINKS":
LINKS();
function Intro():void {
targetClip.gotoAndStop(2);
function DP():void {
targetClip.gotoAndStop(3);
function Tooling():void {
targetClip.gotoAndStop(4);
function MayaAPI():void {
targetClip.gotoAndStop(5);
function GeometricVectors():void {
targetClip.gotoAndStop(6);
function Lsystems():void {
targetClip.gotoAndStop(7);
function AL():void {
targetClip.gotoAndStop(8);
function Projects():void {
targetClip.gotoAndStop(9);
function Litterature():void {
targetClip.gotoAndStop(10);
function Disclaimer():void {
targetClip.gotoAndStop(11);
function Sitecredits():void {
targetClip.gotoAndStop(12);
function Rss():void {
targetClip.gotoAndStop(13);
function Blogging():void {
targetClip.gotoAndStop(14);
function Plugins():void {
targetClip.gotoAndStop(15);
function LINKS():void {
targetClip.gotoAndStop(16);
MovieClip(root).buttonTrace.htmlText="<a href=\'function:linkHandler,?????'>History</a>";
[\A]as3 textfields have a TextEvent.LINK you can use.
-
How can i send data POST with a html link in a textfield
Hello,
This is my problem : I generate (from a php script) html
links in a textfield. I would like for each link to send data with
the POST method to an other script.
My problem is that the getURL("lien", "", "POST") function
can be use only by a movieclip or button event ... and not from a
html link ...
How can i do it ?
Have you a small idea???
Thanks ....yes, thanks but now my problem is in my function associated
to this link :
function SendPost()
var toto="toto";
getURL("
http://127.0.0.1/board/scheduledfirst.php",
"_blank", "GET");
The function is executed but after in php i can get anything
with echo ($_GET["toto"]); echo ($_POST["toto"]);
Why ? -
[Q] how to change lines in dynamic textfield
Hi, I am struggling to change lines of loaded text from xml.
Basically I wrote few sentences in one child of xml file but
when i loaded it to dynamic textfield I cant change the lines.
(i tried with <br> /n both didnt work, textfield was
multilined)
thank you for your timehow much text are we talking about?
What parameters have you set for the text field? multilane?
html?
What size is your text field?
Just some basic questions to think about. I actually link to
an external text file if I have too much text to deal with. However
I usually write text box's in the code.
You already have the text field, so you shouldn't need the
create command, which I probably got wrong anyway.
my_TXT.createTextFeild(name,depth, x, y, width, hight)
my_TXT = new textformat ("my_format")
my_format.size = 27
my_format.mutilne = ture
my_TXT.html = true
my_TXT.htmltxt = "bla bla <b>bla</b>"
my_TXT.format(my_format)
Again I can't be sure I got all the names right, but
that’s about how it works.
Again you don't have to use that, but to get the text to work
you at least need mutiline to be on. To get html to work, you need
html to be on, and you need to use the htmltxt to write it to the
txt field in code. However I’m not 100% on if that’s
the correct way to write it. -
HTML format report for Daily basis Oracle Database health Checkup
Hi All,
Can anyone provide me the script which I can schedule in BAT file to run againt all the database and gather most of the health check related data and present the same in HTML format.
Regards,
SphinxHi,
Database Health report can be obtain from my below link:
http://rafioracledba.blogspot.com/search/label/DBA%20Daily%20activities
It is a detailed one.Make use of point 20 in the above link to get the report you want.Hope it helps.
Best regards,
Rafi.
http://rafioracledba.blogspot.com -
Unable to receive email in HTML format on BB Torch 9860 with BIS
I recently purchased BB Torch 9860 with OS 7 and configured by personal and work email on BIS. I am receiving emails only in text format. In some emails with images that have hyperlink, I just see a link and images not displayed. All the images comes as an attachment in the email. My friend having another BB Torch is able to view emails as HTML. But he is with BES.
Is there any solution for my issue? I am not receiving any options in the email preference to enable HTML format for emails.
Appreciate if anyone could help me with this.
Regards,
MidhunHi Midhun,
Welcome to the Community
To help you with the issues you're having, on your Blackberry go to your mailbox, press menu, choose options, then Email Preferences and check the box for Enable HTML Email, Download Images Automatically and Confirm External Image Download. The screen may look like the screenshot below:
For more information please check these links:
Blackberry Tips and Tricks
Blackberry 101
Enjoy!
Ron
Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up Blackberry Battery Saving Tips | Follow me on Twitter -
Hi
When I try to open the jasper report on browser ,It displays
the report but not clear.The image does not display on the client.
below is my code ,please help me......
MY Code:
/*3 Preview in HTML format */
File imagedir=null;
JRHtmlExporter exp = new JRHtmlExporter();
StringBuffer sbuf = new StringBuffer();
exp.setParameter(JRHtmlExporterParameter.JASPER_PRINT, print);
exp.setParameter(JRHtmlExporterParameter.OUTPUT_STRING_BUFFER, sbuf);
exp.setParameter(JRHtmlExporterParameter.IMAGES_DIR,imagedir);
exp.exportReport();
out.print(sbuf.toString());
Thanks
By satheshAlright there is a dedicated ImageServlet(provided in jasper reporting framework) which is used to Link Static image content along with your HTML report content.
and here is how you have to do it is ??
is by setting few parameters for JRExporter Object and making use of image servlet provided under jasper libraries.
ImageServlet configurations in web.xml:
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>
net.sf.jasperreports.j2ee.servlets.ImageServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImageServlet</servlet-name>
<url-pattern>/imageServlet</url-pattern>
</servlet-mapping>Html Exporter code..
JRExporter exporter = null;
JasperPrint jasperPrint = null;
Connection conn = null;
String sourceFile = ReportService.getReportSourceFile(request);
Map map = ReportService.getParameterMap(sourceFile,request);
String contentType = ReportService.getContentType(sourceFile,request);
if(contentType.startsWith("text/html")){
PrintWriter printWriter = response.getWriter();
try{
/* Fetching Connection from a Connection Pool VIA a service*/
conn = DbUtils.getConnection();
/* Creating a JasperPrint Object*/
jasperPrint = JasperFillManager.fillReport(sourceFile,map,conn);
exporter = new JRHtmlExporter();
request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint);
/* printWriter here is a reference for response.getWriter() */
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER,printWriter);
// gonna set url pattern given for Image servlet with a reponse parameter <url-pattern>/imageServlet</url-pattern>
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"imageServlet?image=");
response.setContentType(contentType);
/* Would write the HTML content to ServletStream Provided */
exporter.exportReport();
}catch(Exception exp){
exp.printStackTrace();
}finally{
try{
if(conn != null && !conn.isClosed())
conn.close();
}catch(Exception ep){
ep.printStackTrace();
}finally{
conn = null;
sourceFile = null;
map = null;
}For any other issues with report format and others try to go through my post.However, you might have to edit your customized settings in terms of image rendering problems or to some customized implementations.
http://forum.java.sun.com/thread.jspa?threadID=5203324&messageID=9811077
Hope that might help :)
REGARDS,
RaHuL -
Can I force mail to be sent in HTML format (ActiveSync, EX2010)
We use a corporate disclaimer, signature, logo at the end of all our emails, but when emails are sent via iPhone, the recipient only receives a "?" in place of the signature.
I'm assuming this is due to the message being sent out in either Rich Text or Plain Text.
Is there a way for me to have our corporate owned iPhones send messages in HTML so that this signature will appear in all outgoing email? I have set my ActiveSync rules to allow HTML, but I'm thinking that is only for incoming, since this isn't working for me.
I appreciate your help in advance.We are facing the same issue. We have a transport rule that grabs the user's info out of Active Directory and populates the fields we tell it to and then adds an image of our company logo at the bottom. We have looked at how other companies have done it and it seems like they are attaching several images to each message. I would rather avoid that kind of overhead.
The signature works fine in Outlook, but when Apple users send a message, the link for the image shows up as a link instead of the image. If you use any html formatting in the email, it gets sent as html and the signature shows up fine. I tested this by just changing some text to bold. Several of our execs use iPhones and Macs and asking them to do this just to 'trick' it into html format isn't going to work. -
FF is default browser. A week ago, no problem. no changes in SW or hardware except I did update IE to vers 8, but kept FF as default.
Using XP Prof. Now when I am on a website and want to send the link to my email (E Link Total Access), and go to Send, the link shows up in my email as text, not underlined in html format.
E link Tech support couldn't fix today, but I wasn't talking with a high level tech person. Any ideas will be appreciated.Hi Midhun,
Welcome to the Community
To help you with the issues you're having, on your Blackberry go to your mailbox, press menu, choose options, then Email Preferences and check the box for Enable HTML Email, Download Images Automatically and Confirm External Image Download. The screen may look like the screenshot below:
For more information please check these links:
Blackberry Tips and Tricks
Blackberry 101
Enjoy!
Ron
Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up Blackberry Battery Saving Tips | Follow me on Twitter -
Smartforms output in HTML format
Hi Experts,
I want to save my smartforms in HTML format.Is there any Standard programe is available for it.
Like as RSTXPDFT4 for converting output in PDF format.Hi,
Check this link.In that,I am converting the output of smartform to PDF and then attaching it through mail.
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/smartforms/smartform in abap.pdf -
KM Doc iView to display in HTML format
Dear KM friends
I created a KM Document iView to display a MS Excel file.
My requrirement is
1. I want to diplay that iView on click on HTMLB link
2. I want to display that MS Excel file in HTML format, just like a link in Search result.
plz reply me
Thanx in advance
LakshmikanthaHi,
You could call com.sap.km.cm.document iview with the RID of the document in order to display it's Excel content from the HTMLB Link:
Link nameLink = new Link(resourceName);
nameLink.setReference(docUri + resource.getRID());
where docUri is:
IURLGeneratorService urlService =
(IURLGeneratorService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
docUri = urlService.getRelativeUri(PathKey.CONTENT_ACCESS_PATH).toString();
Hope this helps.
Romano
PS: about showing the HTML content of the Excel file - If I am right - I think that the HTML content of the Excel (PDF, DOC or other resources) is created on the TREX server and is available only when showing found indexed documents.
I've found the class, that manages this HTMLVersion, maybe you can have use of it (or just have a look):
<i>package: com.sapportals.wcm.control.search
class: HighlightedContentControl
method: renderHTMLVersion</i> -
Capturing cursor output in HTML format
Hi,
I want to capture Cursor's output in html format.
following is the current query which is giving me output as mentioned below it
Query:-
declare
v_msgtext varchar(4000);
cursor c_query IS
select emp_no,emp_name,salary
from employees
where dept_id = 100;
begin
for v_query in c_query LOOP
v_msgtext = v_msgtext ||
'empno:'|| v_query.emp_no||','||
'emp_name:'||v_query.emp_name||'.'||
'emp_salary:'||'v_query.salary'||
char(13)||char(10);
END LOOP;
utl_mail.send(v_sender, v_recipient, NULL, NULL, v_subject, v_msgText, 'text/html; charset=windows-1250', NULL);
end;
o/p:-
empno: 123,emp_name:sagar,emp_salary:10,000
empno: 124,emp_name:neeraj,emp_salary:20.000
empno: 125,emp_name:ashish,emp_salary:18.000
empno: 126,emp_name:ramesh,emp_salary:5.000
empno: 127,emp_name:suresh,emp_salary:30.000
I want to generate the output as HTML report in tabular format with the below columns
(empno,emp_name,salary) and send this html file via email to user.
Can anybody please suggest a solution ASAP.
Thanks in advance.Hi ,
Please follow the below link may it will be useful for you.It shows how to generate a HTML format output through the query.
oracle - Within a PL/SQL procedure, wrap a query or refcursor in HTML table - Stack Overflow -
Error in converting Spool to HTML format.
Hi Gurus,
I am reading SPool and converting that into HTML formt. Please do find below code for the same.
Submit report to convert the spool to HTML format
SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
WITH rqident = p_spoolno.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = gt_listobj
EXCEPTIONS
not_found = 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.
Convert the spool to HTML format
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME =
template_name = 'WEBREPORTING_REPORT'
TABLES
html = p_html_tab
listobject = gt_listobj.
>>>>>>>>>>>>>>>>>>>
And i send p_html_tab as attachement to email.
When I opened the attachement, i can view only half page in htm.
How can i get the full page in htm.First convert the spool to internal table by using FM
RSPO_RETURN_ABAP_SPOOLJOB
Next from internal table to HTML....
Link: /people/rammanohar.tiwari/blog/2006/01/29/abap-utility-print-screen-to-html
or try the following
Please try the follwoing:
1. define HTML internal table with ref to type W3HTML
2. download it as BIN type and give total lenght of the strings as a parameter in the down load.
See the code extract below:
describe table html lines entries.
read table html into w_html index entries.
size = ( entries - 1 ) * 255 + strlen( w_html ).
concatenate p_path file into file.
call function 'WS_DOWNLOAD'
exporting
bin_filesize = size
filename = file
filetype = 'BIN'
tables
data_tab = html -
Need to send my spool in HTML format as Email attachment
Hi All,
Can anyone let me know how to send a HTML attachment in a mail.
I have a ALV Report, when i execute, my report should pick the ALV Report output from spool, and should send a mail with spool output as HTML attachment.
Please explain me how i need to do the above.
Regards
NandaHi Nanda,
You can use 2 reports for this.
In one report just display the ALV..
and in the second report submit this first report to memory and get it html format and then send it as an email.
Just check this code (instead of alv...this is a normal report that is sent as HTML attachment)
*--Tables
TABLES: VBRK.
TYPES DECLARATION *
TYPES: BEGIN OF TY_VBRK,
KUNAG TYPE KUNAG," Payer Id
END OF TY_VBRK,
*-- customer details
BEGIN OF TY_KNA1,
KUNNR TYPE KUNNR," Customer Id
NAME1 TYPE NAME1," Customer Name
ADRNR TYPE ADRNR," Address No
END OF TY_KNA1,
*-- Mailing details
BEGIN OF TY_ADDR,
ADDRNUMBER TYPE AD_ADDRNUM, " Address No
MAIL_ID TYPE AD_SMTPADR, " Email Address
END OF TY_ADDR,
*-- Log details
BEGIN OF TY_MSG,
STR1 TYPE AD_SMTPADR, " Email Address
STR2 TYPE KUNNR, " Payer Id
STR3 TYPE NAME1, " Payer Name
STR4 TYPE D, " Date
STR5 TYPE T, " Time
END OF TY_MSG.
I N T E R N A L T A B L E S *
DATA: RECEPIENTS TYPE TABLE OF AD_SMTPADR, "table for email id's
LISTOBJECT TYPE TABLE OF ABAPLIST, "table with displayed list
HTML TYPE TABLE OF W3HTML, "html container
RETURN TYPE TABLE_OF_STRINGS, "message table
IT_VBRK TYPE TABLE OF TY_VBRK, "Billing Details
IT_KNA1 TYPE TABLE OF TY_KNA1, "Customer Details
IT_ADDR TYPE TABLE OF TY_ADDR, "Mail id
IT_MSG TYPE TABLE OF TY_MSG. "Log Details
*-- Structure Declarations
DATA: WA_REC TYPE AD_SMTPADR,
WA_KNA1 TYPE TY_KNA1,
WA_ADDR TYPE TY_ADDR,
WA_MSG TYPE TY_MSG.
Declarations for Sending mail *
*-- To Create link and add recepients address
DATA: SEND_REQUEST TYPE REF TO CL_BCS.
*-- To Create HTML document
DATA: DOCUMENT TYPE REF TO CL_DOCUMENT_BCS.
*-- To Create Sender Id
DATA: SENDER_ID TYPE REF TO IF_SENDER_BCS.
*-- To Create recepient address
DATA: RECIPIENT TYPE REF TO IF_RECIPIENT_BCS.
*-- To Handle Exceptions
DATA: BCS_EXCEPTION TYPE REF TO CX_BCS.
*-- To check if the mail is sent to all recepients
DATA: SENT_TO_ALL TYPE OS_BOOLEAN.
DATA: CONLENGTHS TYPE SO_OBJ_LEN . "To calculate length of the HTML file
V A R I A B L E S *
DATA: REPORT TYPE PROGRAMM, "Report name
SENDER TYPE AD_SMTPADR, "Sender Address
SUBJECT TYPE SO_OBJ_DES. "Subject
DATA: BCS_MESSAGE TYPE STRING ."String to store exceptions
DATA: V_KUNAG TYPE KUNAG. "Payer Id
DATA: V_MAIL TYPE AD_SMTPADR, "Mail Address
V_DATE TYPE ZZBCDATE. "To Validate Entered Date
S E L C T I O N - S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_ZZBCDA FOR VBRK-ZZBCDAT. "Billing Complete Date
PARAMETERS: P_MAILFT TYPE AD_SMTPADR, "Mail id
P_MAILSC TYPE AD_SMTPADR. "Mail id
SELECTION-SCREEN END OF BLOCK B1.
At Selection Screen *
AT SELECTION-SCREEN.
*-- Validate the dates entered
SELECT ZZBCDAT UP TO 1 ROWS
FROM VBRK
INTO V_DATE
WHERE ZZBCDAT IN S_ZZBCDA.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Dates Not Found In The Given Range'(002).
ENDIF.
S T A R T - O F - S E L E C T I O N *
CONCATENATE SY-UNAME '@YAHOO.COM'(003) INTO SENDER.
*-- Populating the Subject Line
MOVE 'Invoice Due Date Details'(004) TO SUBJECT.
*-- Selecting the Payer Details Based on Input Dates
SELECT KUNAG
FROM VBRK
INTO TABLE IT_VBRK
WHERE ZZBCDAT IN S_ZZBCDA.
*-- Selecting the Address Number from Customer Master
SELECT KUNNR
NAME1
ADRNR
FROM KNA1
INTO TABLE IT_KNA1
FOR ALL ENTRIES IN IT_VBRK
WHERE KUNNR = IT_VBRK-KUNAG.
*-- Selecting the Mail Id's
SELECT ADDRNUMBER
SMTP_ADDR
FROM ADR6
INTO TABLE IT_ADDR
FOR ALL ENTRIES IN IT_KNA1
WHERE ADDRNUMBER = IT_KNA1-ADRNR.
*-- Getting all the selected mail Id's
RECEPIENTS = IT_ADDR[].
MOVE (your first report name) TO REPORT.
IF NOT RECEPIENTS[] IS INITIAL .
LOOP AT IT_KNA1 INTO WA_KNA1.
AT NEW KUNNR.
READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNA1-KUNNR
BINARY SEARCH.
REFRESH RECEPIENTS.
*-- Populating the Recepients Mail Id's for the Particular Kunnr
LOOP AT IT_ADDR INTO WA_ADDR WHERE ADDRNUMBER = WA_KNA1-ADRNR.
IF NOT WA_ADDR IS INITIAL.
TRANSLATE WA_ADDR-MAIL_ID TO UPPER CASE.
APPEND WA_ADDR-MAIL_ID TO RECEPIENTS.
ENDIF.
ENDLOOP.
*-- Appending the mail id's from the input fields when not initial
IF NOT P_MAILFT IS INITIAL.
TRANSLATE P_MAILFT TO UPPER CASE.
APPEND P_MAILFT TO RECEPIENTS.
ENDIF.
IF NOT P_MAILSC IS INITIAL.
TRANSLATE P_MAILSC TO UPPER CASE.
APPEND P_MAILSC TO RECEPIENTS.
ENDIF.
*-- Sending the Kunnr while Submitting the Report
V_KUNAG = WA_KNA1-KUNNR.
TRANSLATE REPORT TO UPPER CASE .
*--Submitting the Report Exporting the List to Memory
SUBMIT (REPORT) WITH S_ZZBCDA IN S_ZZBCDA
WITH P_KUNAG = V_KUNAG
EXPORTING LIST TO MEMORY AND RETURN.
CLEAR: LISTOBJECT , HTML .
REFRESH : LISTOBJECT, HTML .
*-- Calling the Fn Module to get the list from the Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTOBJECT.
*-- Calling Fn Module to get the List in HTML Format
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME = REPORT
TABLES
HTML = HTML
LISTOBJECT = LISTOBJECT.
*-- Getting the Size of the Html Document
DATA: V_LINES TYPE I.
DESCRIBE TABLE HTML LINES V_LINES.
CLEAR CONLENGTHS .
CONLENGTHS = V_LINES * 255.
TRY.
CLEAR SEND_REQUEST .
SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
CLEAR DOCUMENT .
*-- Creating the Document
DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
I_TYPE = 'HTM'
I_TEXT = HTML
I_LENGTH = CONLENGTHS
I_SUBJECT = SUBJECT ).
*-- add document to send request
CALL METHOD SEND_REQUEST->SET_DOCUMENT( DOCUMENT ).
CLEAR SENDER_ID .
*-- Creating the internet address for the sender id.
SENDER_ID = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( SENDER ).
CALL METHOD SEND_REQUEST->SET_SENDER
EXPORTING
I_SENDER = SENDER_ID.
CLEAR WA_REC .
*-- Creating the Recepients address
LOOP AT RECEPIENTS INTO WA_REC .
CLEAR RECIPIENT .
RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
WA_REC ).
add recipient with its respective attributes to send request
CALL METHOD SEND_REQUEST->ADD_RECIPIENT
EXPORTING
I_RECIPIENT = RECIPIENT
I_EXPRESS = 'X'.
ENDLOOP .
CALL METHOD SEND_REQUEST->SET_STATUS_ATTRIBUTES
EXPORTING
I_REQUESTED_STATUS = 'E'
I_STATUS_MAIL = 'E'.
CALL METHOD SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
*-- Sending the Document
CALL METHOD SEND_REQUEST->SEND(
EXPORTING
I_WITH_ERROR_SCREEN = 'X'
RECEIVING
RESULT = SENT_TO_ALL ).
IF SENT_TO_ALL = 'X'.
*-- Getting the details to display the Job Log
LOOP AT RECEPIENTS INTO V_MAIL.
WA_MSG-STR1 = V_MAIL.
WA_MSG-STR2 = WA_KNA1-KUNNR.
WA_MSG-STR3 = WA_KNA1-NAME1.
WA_MSG-STR4 = SY-DATUM.
WA_MSG-STR5 = SY-UZEIT.
APPEND WA_MSG TO IT_MSG.
ENDLOOP.
ELSE.
APPEND 'Mail not sent'(005) TO RETURN.
ENDIF.
COMMIT WORK.
CATCH CX_BCS INTO BCS_EXCEPTION.
BCS_MESSAGE = BCS_EXCEPTION->GET_TEXT( ).
APPEND BCS_MESSAGE TO RETURN .
EXIT.
ENDTRY.
ENDAT.
ENDLOOP.
ELSE .
APPEND 'Specify email address for sending'(006) TO RETURN .
ENDIF .
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
*-- Displaying the Job Log
FORMAT COLOR 1 INTENSIFIED ON.
WRITE:/ SY-ULINE(121),
(40) 'Mail Sent to'(007),
SY-VLINE,
(12) 'Payer Id'(008),
SY-VLINE,
(35) 'Payer Name'(009),
SY-VLINE,
(10) 'Sent Date'(010),
SY-VLINE,
(10) 'Sent Time'(011),
SY-VLINE,
SY-ULINE(121).
LOOP AT IT_MSG INTO WA_MSG.
FORMAT COLOR 2 INTENSIFIED ON.
WRITE:/ SY-ULINE(121),
(40) WA_MSG-STR1,
SY-VLINE,
(12) WA_MSG-STR2,
SY-VLINE,
(35) WA_MSG-STR3,
SY-VLINE,
(10) WA_MSG-STR4 DD/MM/YYYY,
SY-VLINE,
(10) WA_MSG-STR5 USING EDIT MASK '__:__:__',
SY-VLINE,
SY-ULINE(121).
ENDLOOP.
Maybe you are looking for
-
How can i delete purchased items from the cloud in iTunes
how can i delete purchased items from the cloud in iTunes
-
A question about SKTO in condition tab
Hi all, i am a starter in SD, and trying to figure out how to create a sales deal, so i created one sales deal with payment term ZB03. And conditon K007 5% discount for customer1 ist created under this sales deal. customer1 master data has payment ZB
-
How To select maximum Value in a specifieid field in internal table.
How To select maximum Value in a specifieid field in internal table?
-
Filter Criteria with where condition in graph api query
Hi Filter criteria in graph api is working fine through this api https://graph.windows.net/adummydirectory.onmicrosoft.com/users?$filter=displayName eq 'Ashok'&api-version=1.5 Select criteria is also working fine through this api https://graph.win
-
Can't open Photoshop, -the PNG_file couldn't be analyzed? help!
I just paid for PS and LR, - both downloaded via CC and LR opens fine, -but PS just shows a dialogbox with the classical white X on red bg, saying that PS could not open, cause the PNG-file couldn't be analyzed. What to do here? Regards Mikkel Denmar