How to use the output types e-mail in script?and other output types

how to e -mail a script?and fax?

hi,
check the example
Just try by using the below code may be it will helpful to you.
REPORT Z_RMTIWARI_SEND_SPOOL_MAIL_ATT .
PARAMETERS : P_SPOOL TYPE TSP01-RQIDENT OBLIGATORY .
PARAMETERS : P_MAIL TYPE char100 OBLIGATORY .
TYPES : TY_LINE type string.
DATA: IT_ATTACHMENT TYPE soli OCCURS 0 WITH HEADER LINE.
DATA: IT_ATTACHMENT_LONG TYPE TY_LINE OCCURS 0 WITH HEADER LINE.
DATA: LV_PDF_SIZE type i.
DATA: LT_PDF type standard table of tline with header line.
PERFORM SEND_EMAIL USING P_SPOOL P_MAIL.
FORM send_email
--> X_SPOOL_ID
--> X_EMAIL
FORM send_email USING X_SPOOL_ID X_EMAIL.
DATA: LT_OBJPACK LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE,
LT_OBJHEAD LIKE solisti1 OCCURS 1 WITH HEADER LINE,
LT_OBJBIN LIKE solisti1 OCCURS 10 WITH HEADER LINE,
LT_OBJTXT LIKE solisti1 OCCURS 10 WITH HEADER LINE,
LT_RECLIST LIKE somlreci1 OCCURS 5 WITH HEADER LINE,
LV_DOCUMENT_DATA TYPE sodocchgi1.
DATA: L_ATT_LINES TYPE i.
DATA : LV_SPOOL_DESC(68) type c.
CHECK NOT ( X_EMAIL IS INITIAL ).
CLEAR: LT_RECLIST, LT_RECLIST[],
LT_OBJHEAD, LT_OBJHEAD[],
LT_OBJTXT, LT_OBJTXT[],
LT_OBJBIN, LT_OBJBIN[],
LT_OBJPACK, LT_OBJPACK[].
CLEAR LV_DOCUMENT_DATA.
Read spool and get the pdf internal table and name of spool
PERFORM READ_SPOOL USING X_SPOOL_ID LV_SPOOL_DESC.
CHECK NOT ( LT_PDF[] IS INITIAL ).
Convert pdf itab to 255 line itab.
data :LV_COUNTER type i.
data :LV_FROM type i.
loop at LT_PDF.
translate LT_PDF using ' ~' .
concatenate IT_ATTACHMENT_LONG LT_PDF into it_attachment_long.
endloop.
translate IT_ATTACHMENT_LONG using '~ ' .
append IT_ATTACHMENT_LONG.
clear : LV_COUNTER.
DO.
LV_COUNTER = strlen( IT_ATTACHMENT_LONG ).
if LV_COUNTER ge 255.
IT_ATTACHMENT = IT_ATTACHMENT_LONG(255).
append IT_ATTACHMENT.
SHIFT IT_ATTACHMENT_LONG by 255 places.
else.
IT_ATTACHMENT = IT_ATTACHMENT_LONG(lv_counter).
append IT_ATTACHMENT.
exit.
endif.
ENDDO.
Body of email
MOVE 'Email sent to you from SAP' TO LT_OBJTXT.
APPEND LT_OBJTXT.
LV_DOCUMENT_DATA-obj_name = 'SpoolMail'.
Title of the email as spool name
LV_DOCUMENT_DATA-obj_descr = LV_SPOOL_DESC.
LV_DOCUMENT_DATA-sensitivty = 'O'.
LV_DOCUMENT_DATA-expiry_dat = SY-datum + 15.
LV_DOCUMENT_DATA-doc_size = STRLEN( LT_OBJTXT ).
e-mail body
CLEAR LT_OBJPACK.
LT_OBJPACK-head_start = 1.
LT_OBJPACK-head_num = 0.
LT_OBJPACK-body_start = 1.
LT_OBJPACK-body_num = 1.
LT_OBJPACK-doc_type = 'RAW'.
LT_OBJPACK-doc_size = STRLEN( LT_OBJTXT ).
APPEND LT_OBJPACK.
For e-mail attachment
DESCRIBE TABLE IT_ATTACHMENT LINES L_ATT_LINES.
READ TABLE IT_ATTACHMENT INDEX L_ATT_LINES.
CLEAR LT_OBJPACK.
LT_OBJPACK-transf_bin = 'X'.
LT_OBJPACK-head_start = 1.
LT_OBJPACK-head_num = 1.
LT_OBJPACK-body_start = 1.
LT_OBJPACK-body_num = L_ATT_LINES.
LT_OBJPACK-doc_type = 'PDF'.
LT_OBJPACK-obj_name = 'email'.
LT_OBJPACK-obj_descr = LV_SPOOL_DESC.
LT_OBJPACK-doc_size = ( 255 * ( L_ATT_LINES - 1 ) ) + STRLEN( IT_ATTACHMENT-line ).
APPEND LT_OBJPACK.
make recipient list
LT_RECLIST-receiver = X_EMAIL.
LT_RECLIST-rec_type = 'B'. "To external email id
APPEND LT_RECLIST.
send mail with attachment
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = LV_DOCUMENT_DATA
put_in_outbox = 'X'
TABLES
packing_list = LT_OBJPACK
object_header = LT_OBJHEAD
contents_bin = IT_ATTACHMENT
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.
If SY-subrc = 0.
write:/ 'Message sent'.
else.
write:/ 'Error encountered'.
endif.
ENDFORM. " send_email
*& Form read_spool
FORM read_spool USING X_SPOOL_ID Y_SPOOL_DESC.
DATA : LV_SPOOL_TYPE TYPE TSP01-RQDOCTYPE.
SELECT SINGLE RQDOCTYPE RQTITLE
INTO (lv_spool_type, y_spool_desc)
FROM TSP01
WHERE RQIDENT eq X_SPOOL_ID.
IF Y_SPOOL_DESC IS INITIAL.
concatenate 'Spool-' X_SPOOL_ID into Y_SPOOL_DESC.
ENDIF.
IF LV_SPOOL_TYPE eq 'LIST'. " If spool is a list
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = X_SPOOL_ID
NO_DIALOG =
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
PDF_BYTECOUNT = LV_PDF_SIZE
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
PDF = LT_PDF
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE. " If spool is OTF
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = X_SPOOL_ID
NO_DIALOG =
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
PDF_BYTECOUNT = LV_PDF_SIZE
PDF_SPOOLID =
OTF_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
PDF = LT_PDF
EXCEPTIONS
ERR_NO_OTF_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DSTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " read_spool
http://www.sap-img.com/abap/sending-fax-from-abap.htm
http://www.sap-img.com/abap/sending-email-with-attachment.htm

Similar Messages

  • How To Use The Pen Tool in Adobe Illustrator, Photoshop and InDesign CS6 | Creative Suite Podcast: Designers | Adobe TV

    In this episode of the Adobe Creative Suite Podcast Terry White shows how to use the Pen Tool to create Art, Frames and to trace images in Photoshop CS6. If you've never used the Pen Tool before, this is your video!
    http://adobe.ly/STegFg

    With the pen tool in Indesign, is there a way of making the points not join if you want to make a few single lines?

  • I want to learn how to use the existing stationary in Mail and add my own stationary.

    I use the stationary in my Mail program often.  I would like to learn more about using it, changing it, making my own stationary to use in Mail - and also to allow PC users to receive it.

    Here's a thread that will possibly help:
    https://discussions.apple.com/message/18175872#18175872
    Mail templates use HTML, so those receiving your e-mail should able to view the stationery. It doesn’t matter if they’re on a PC or Mac.

  • How to use the Idoc number.(generated by prgram) and ALE

    Hi All
    I have a problem to use Idocs. I go thru the following steps but can not able to see the final output.
    1.Create Segment ( WE31)
    2.Create Idoc Type ( WE30 )
    3.Create Message Type ( WE81 )
    4.Assign Idoc Type to Message Type ( WE82 )
    5.Make a report which gives us Idoc number.
    Now my problem is where this Idoc number can we used .and how to relate this with ALE.
    Regards
    Manoj

    Hi Manoj,
    Use transaction code we02 or we05 to get the idoc no.
    The table used are
    EDIDC - Control record
    EDID4 - Data record
    EDIDS - Status record
    Regards
    Arun

  • How to use the Rectangle class to draw an image and center it in a JPanel

    I sent an earlier post on how to center an image in a JPanel using the Rectangle class. I was asked to send an executable code which will show the malfunction. The code below is an executable code and a small part of a very big project. To simplifiy things, it is just a JFrame and a JPanel with an open dialog. Once executed the JFrame and the FileDialog will open. You can then navigate to a .gif or a .jpg picture and open it. What I want is for the picture to be centered in the middle of the JPanel and not the upper left corner. It is also important to stress that, I am usinig the Rectangle class to draw the Image. The region of interest is where the rectangle is created. In the constructor of the CenterRect class, I initialize the Rectangle class. Then I use paintComponent in the CenterRect class to draw the Image. The other classes are just support classes. The MyImage class is an extended image class which also has a draw() method. Any assistance in getting the Rectangle to show at the center of the JPanel without affecting the size and shape of the image will be greatly appreciated.
    I have divided the code into three parts. They are all supposed to be on one file in order to execute.
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class CenterRect extends JPanel {
        public static Rectangle srcRect;
        Insets insets = null;
        Image image;
        MyImage imp;
        private double magnification;
        private int dstWidth, dstHeight;
        public CenterRect(MyImage imp){
            insets = getInsets();
            this.imp = imp;
            int width = imp.getWidth();
            int height = imp.getHeight();
            ImagePanel.init();
            srcRect = new Rectangle(0,0, width, height);
            srcRect.setLocation(0,0);
            setDrawingSize(width, height);
            magnification = 1.0;
        public void setDrawingSize(int width, int height) {
            dstWidth = width;
            dstHeight = height;
            setSize(dstWidth, dstHeight);
        public void paintComponent(Graphics g) {
            Image img = imp.getImage();
         try {
                if (img!=null)
                    g.drawImage(img,0,0, (int)(srcRect.width*magnification), (int)(srcRect.height*magnification),
              srcRect.x, srcRect.y, srcRect.x+srcRect.width, srcRect.y+srcRect.height, null);
            catch(OutOfMemoryError e) {e.printStackTrace();}
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Opener().openImage();
    class Opener{
        private String dir;
        private String name;
        private static String defaultDirectory;
        JFrame parent;
        public Opener() {
            initComponents();
         public void initComponents(){
            parent = new JFrame();
            parent.setContentPane(ImagePanel.panel);
            parent.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            parent.setExtendedState(JFrame.MAXIMIZED_BOTH);
            parent.setVisible(true);
        public void openDialog(String title, String path){
            if (path==null || path.equals("")) {
                FileDialog fd = new FileDialog(parent, title);
                defaultDirectory = "dir.image";
                if (defaultDirectory!=null)
                    fd.setDirectory(defaultDirectory);
                fd.setVisible(true);
                name = fd.getFile();
                if (name!=null) {
                    dir = fd.getDirectory();
                    defaultDirectory = dir;
                fd.dispose();
                if (parent==null)
                    return;
            } else {
                int i = path.lastIndexOf('/');
                if (i==-1)
                    i = path.lastIndexOf('\\');
                if (i>0) {
                    dir = path.substring(0, i+1);
                    name = path.substring(i+1);
                } else {
                    dir = "";
                    name = path;
        public MyImage openImage(String directory, String name) {
            MyImage imp = openJpegOrGif(dir, name);
            return imp;
        public void openImage() {
            openDialog("Open...", "");
            String directory = dir;
            String name = this.name;
            if (name==null)
                return;
            MyImage imp = openImage(directory, name);
            if (imp!=null) imp.show();
        MyImage openJpegOrGif(String dir, String name) {
                MyImage imp = null;
                Image img = Toolkit.getDefaultToolkit().getImage(dir+name);
                if (img!=null) {
                    imp = new MyImage(name, img);
                    FileInfo fi = new FileInfo();
                    fi.fileFormat = fi.GIF_OR_JPG;
                    fi.fileName = name;
                    fi.directory = dir;
                    imp.setFileInfo(fi);
                return imp;
    }

    This is the second part. It is a continuation of the first part. They are all supposed to be on one file.
    class MyImage implements ImageObserver{
        private int imageUpdateY, imageUpdateW,width,height;
        private boolean imageLoaded;
        private static int currentID = -1;
        private int ID;
        private static Component comp;
        protected ImageProcessor ip;
        private String title;
        protected Image img;
        private static int xbase = -1;
        private static int ybase,xloc,yloc;
        private static int count = 0;
        private static final int XINC = 8;
        private static final int YINC = 12;
        private int originalScale = 1;
        private FileInfo fileInfo;
        ImagePanel win;
        /** Constructs an ImagePlus from an AWT Image. The first argument
         * will be used as the title of the window that displays the image. */
        public MyImage(String title, Image img) {
            this.title = title;
             ID = --currentID;
            if (img!=null)
                setImage(img);
        public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
             imageUpdateY = y;
             imageUpdateW = w;
             imageLoaded = (flags & (ALLBITS|FRAMEBITS|ABORT)) != 0;
         return !imageLoaded;
        public int getWidth() {
             return width;
        public int getHeight() {
             return height;
        /** Replaces the ImageProcessor, if any, with the one specified.
         * Set 'title' to null to leave the image title unchanged. */
        public void setProcessor(String title, ImageProcessor ip) {
            if (title!=null) this.title = title;
            this.ip = ip;
            img = ip.createImage();
            boolean newSize = width!=ip.getWidth() || height!=ip.getHeight();
         width = ip.getWidth();
         height = ip.getHeight();
         if (win!=null && newSize) {
                win = new ImagePanel(this);
        public void draw(){
            CenterRect ic = null;
            win = new ImagePanel(this);
            if (win!=null){
                win.addIC(this);
                win.getCanvas().repaint();
                ic = win .getCanvas();
                win.panel.add(ic);
                int width = win.imp.getWidth();
                int height = win.imp.getHeight();
                Point ijLoc = new Point(10,32);
                if (xbase==-1) {
                    xbase = 5;
                    ybase = ijLoc.y;
                    xloc = xbase;
                    yloc = ybase;
                if ((xloc+width)>ijLoc.x && yloc<(ybase+20))
                    yloc = ybase+20;
                    int x = xloc;
                    int y = yloc;
                    xloc += XINC;
                    yloc += YINC;
                    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
                    count++;
                    if (count%6==0) {
                        xloc = xbase;
                        yloc = ybase;
                    int scale = 1;
                    while (xbase+XINC*4+width/scale>screen.width || ybase+YINC*4+height/scale>screen.height)
                        if (scale>1) {
                   originalScale = scale;
                   ic.setDrawingSize(width/scale, height/scale);
        /** Returns the current AWT image. */
        public Image getImage() {
            if (img==null && ip!=null)
                img = ip.createImage();
            return img;
        /** Replaces the AWT image, if any, with the one specified. */
        public void setImage(Image img) {
            waitForImage(img);
            this.img = img;
            JPanel panel = ImagePanel.panel;
            width = img.getWidth(panel);
            height = img.getHeight(panel);
            ip = null;
        /** Opens a window to display this image and clears the status bar. */
        public void show() {
            show("");
        /** Opens a window to display this image and displays
         * 'statusMessage' in the status bar. */
        public void show(String statusMessage) {
            if (img==null && ip!=null){
                img = ip.createImage();
            if ((img!=null) && (width>=0) && (height>=0)) {
                win = new ImagePanel(this);
                draw();
        private void waitForImage(Image img) {
        if (comp==null) {
            comp = ImagePanel.panel;
            if (comp==null)
                comp = new JPanel();
        imageLoaded = false;
        if (!comp.prepareImage(img, this)) {
            double progress;
            while (!imageLoaded) {
                if (imageUpdateW>1) {
                    progress = (double)imageUpdateY/imageUpdateW;
                    if (!(progress<1.0)) {
                        progress = 1.0 - (progress-1.0);
                        if (progress<0.0) progress = 0.9;
    public void setFileInfo(FileInfo fi) {
        fi.pixels = null;
        fileInfo = fi;
    }

  • How to use  the same channel to send a file and messages to the server

    I'm trying to develop a simple program that will send and receive files from the server and in the same time I need to communicate with the server through the messages
    I'm using TCP Socket
    my problem is
    I have only one channel
    so, I have no option, either I can use it for sending the file itself or sending the message .. but not both !
    my question is : How can I use the same channel for sending and receiving (file & message)
    I would appreciate for any clue or hint
    best

    kajbj wrote:
    kmarwani wrote:
    Thanks for reply
    yes, that what I'm thinking to do
    but, in case of sending binary file, if I attached a flag on its header, will it corrupt the file ?
    bestThe other end would of course need to decode the messages that you get, and only write the "data" part to the file.Thanks
    I'm gonna try to hard-code what you suggest and i will post what happen with me here
    even though I'm not sure how can I add header to a binary file and remove it from the file at other end. (coz I read it as stream and send as array without touching its contents)
    this how I'm sending the file
    ConnSocket = CSocket.accept();
    ToClient = new DataOutputStream(ConnSocket.getOutputStream());
    File myFile = new File("abc.jpg");
    FileInputStream myFileInStream = new FileInputStream(myFile);
    BufferedInputStream mybuffInStream = new BufferedInputStream(myFileInStream);
    myBytArray = new byte[(int) myFile.length()];
    mybuffInStream.read(myBytArray, 0, myBytArray.length);
    ToClient.write(myBytArray, 0, myBytArray.length);
    ToClient.flush();
    myFileInStream.close();best

  • How to use the same variable value for data entry and the planning sequence

    Hi,
    the scenario is the following:
    Using the WAD template a user enters cost center plan data. The cost center is selected by the chosen value for the variable "V1".
    Afterwards he shall push a button which starts a planning sequence (including saving the data and further functions). This planning sequence uses a filter that also contains the variable "V1".
    What or where has it to be defined that the planning sequence uses automatically the same value for the variable "V1" as selected for the data entry?

    You have to define in the planning function. The planning sequence is only a sequence and it read the planning functions underneath it.
    Ravi Thothadri

  • Missing files using the same library on two different macs and other minor problems

    Hi everybody,
    I'm working on a long documentary and I'm new to FCPX (coming from Avid NC and Edius)...I have and external HD where I stored all the media I'm working with (about 1/2T - 1000 clips)...The library (about 100gb) is stored on the internal drive of my iMac and into the iCloud.
    Yesterday, I received my new MacBook and today I tried to work on it. I followed this steps: I downloaded from iCloud the same library I was working with, I put it on the same folder (movies) it was stored on my iMac and I connected my external HD with all the media...Results? All the clips where gone and the red missing file warning was all over the place.
    FIRST QUESTION: How can I work on both computer overcoming this missing files problem? I know I should have put the library on the same external drive but It was a move aiming to
    SUB QUESTION 1:
    I went back to my iMac and everything worked fine except for a warning about one of my events (the exclamation point) as you can see from this pic:
    I tried to relink the file...but no files to be linked popped up in the relink file window....HOW CAN I KNOW what's wrong in that event in order to fix it?
    SUB QUESTION 2:
    I checked the Library info and - as you can see in the pic below - there are 43mb of media in my internal HD...is this maybe the problem preventing me from working on different macs? I tried to consolidate everything to the external HD but still the 43mb thing persist in being on the internal HD. How can I find where exactly it is located? How can I move it to the external HD given that the consolidate option isn't working?
    Thank you in advance for your help
    Nico

    1) Don't know why this is happening. It may have something to do with
    I downloaded from iCloud the same library I was working with
    I'm not clear what procedure you're using here. Using a cloud for storage might change some file tags. Generally users I think keep the library on the same drive as the media, keeping the library backups on the system. There is no real benefit in keeping the media in a separate location. Often users will keep the library in the same folder as the media. It makes backing up using tools like Carbon Copy Cloner very efficient.
    1a) This can be difficult to find as there sometimes is no obvious indicator. It might be a missing element in a compound clip, a missing or altered layer in a graphics file, a missing font, a missing effect. These will show up inside the item involved, but may not be apparent in the browser. A missing transition for instance will not be seen until you skim over the project or try to export it.
    2) The 43 MB is a small amount of optimized media. This never prevents relinking. The library is always looking for original media, or proxy media if you're in proxy playback. It never looks for optimized media. If it has it, it uses it, if it doesn't, it uses the original media. If you are using original/optimized playback, you must have the original files. The optimized files are not enough.

  • How to use the same external hard drive for OSX and XP

    Hello to all. First off, thanks for all of the helpful comments that have been posted in the discussion board, they have helped me a lot with my problems and curiosities. My question has been touched on in the past, but nothing concrete so I figured I'd ask a bit more specifically.
    I recently loaded Windows XP (FAT32)onto my MacBook. Everything is running smoothly, but I was just curious how I could format my external HD so that both operating systems can read it, i.e. I only have 20 GB's partitioned for Windows XP, and i'll be using it to download music and movies. I would like to be able to play these straight from my external rather than use up the disc space. Let me know if anybody can help! Thanks.

    Unfortunately, Disk Utility doesn't just move everything around. It has to erase everything, and then resize. I find it a little odd, seeing as other disk utilities can resize everything just fine. Anyway, yes, you will have to erase your drive to reformat it as FAT32. What I usually do is try to copy everything from the drive to free space in the internal drives. I haven't had too much data on my drive yet, so I've been lucky so far. I don't know if you have enough free space on whatever drives you have, but that's probably the best way to do it.
    1) Transfer everything over to a folder on the internal drive
    2) Use Disk Utility to reformat the drive as FAT32
    3) Transfer everything back to the external drive
    2.0GHz MacBook 1st Gen   Mac OS X (10.4.8)   2GB RAM

  • How to use classes of packages in flex mx:Script/ or mxml/

    Hi.I am just learning Flex using Flex Builder 3 facing one problem,
    Suppose I declare one package with name alert.as
    package
    import mx.controls.Alert;
    public class alert
    public function alertBtn()
    Alert("Hello btn 1");
    Now in want to use the function in mxml that I declared in a package.
    <mx:Button label="btn1" click="alertBtn();"  />
    I have few questions
    1)How to Import the class alert.as in <mx:Script> and where should i store the file alert.as in the directory folder of flex?
    2)How to call the function alertBtn() when btn1 is clicked.
    Thanks so much!
    Regards
    Ankur

    Hi Greg.I think I was not able to clear my problem properly.Let me try this time again.
    What I wanted to do was that in the below written code I have the full access of the id=panel1 in the  script tag .This works properly.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import flash.display.Sprite;
    import mx.core.UIComponent;
    private function addChildToPanel():void {
    var circle:Sprite = new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(0, 0, 20);
    var c:UIComponent = new UIComponent();
    c.addChild(circle);
    panel1.addChild(c);
    ]]></mx:Script>
    <mx:Panel id="panel1" height="100" width="100"/>
    <mx:Button id="myButton" label="Click Me" click="addChildToPanel();"/>
    </mx:Application>
    This above functionality when I tried to do using class Outside the code ,its not working !
    Here is with the package:-
    But suppose I make One package 
    package
    import flash.display.Sprite;
    import mx.core.UIComponent;
    class getPanel extends Sprite
    public function addChildToPanel():void {
    var circle:Sprite = new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(0, 0, 20);
    var c:UIComponent = new UIComponent();
    c.addChild(circle);
    panel1.addChild(c);
              }//class
                        }//package
    Now in MXML
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import getPanel;
    ]]></mx:Script>
    <mx:Panel id="panel1" height="100" width="100"/>
    <mx:Button id="myButton" label="Click Me" click="getPanel.addChildToPanel();"/>
    </mx:Application>
    So My problem is that this code doesnt do anything.
    Neither the addChild function is working in it ,Nor the Panel1 is accessible here.
    Can u pls help me here.
    Thanks
    Ankur

  • Does anyone know how to use the bcc functionality for apple mail while accessing it on the cloud from my PC?

    I am currently away from my MAC and want to send an email through apple mail with the bcc functionality.  I am using the cloud to get to my mail, however, I can't figure out how to use the BCC functionality, please help.  Thanks!

    Open your mail,
    lower left corner click on settings,
    go to composing and check BCC, save and your done

  • How to use the Output clause for the updated statment

    How to use the output clause for the below update stament,
    DECLARE @MyTableVar table(
        sname int NOT NULL)
    update A set stat ='USED' 
    from (select top 1 * from #A 
    where stat='AVAILABLE' order by sno)A
    Output inserted.sname
    INTO @MyTableVar;
    SELECT sname
    FROM @MyTableVar;
    Here am getting one error incorrect syntax near Output
    i want to return the updated value from output clause

    see
    http://blogs.msdn.com/b/sqltips/archive/2005/06/13/output-clause.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to use the customer types in customer master data

    how to use the customer types in customer master data?
    menu path is Extras -> account group info -> customer types

    hi,
    This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
    default sp ,consumer.
    See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
    I hope this clarifies your quiery.Reward points if so.
    Thanking you,
    Best regards,
    R.Srinivasan

  • HT4796 I have made a file using the Pages app.I mailed it to a friend.When she tried opening the same file on her pc at home , It did not open.Please help me as to how to open the file in the Microsoft word format on her pc.

    I have made a file using the Pages app.I mailed it to a friend.When she tried opening the same file on her pc at home , It did not open.Please help me as to how to open the file in the Microsoft word format on her pc.

    Send it as a PDF.

  • [svn:osmf:] 13113: Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.

    Revision: 13113
    Revision: 13113
    Author:   [email protected]
    Date:     2009-12-21 01:08:10 -0800 (Mon, 21 Dec 2009)
    Log Message:
    Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/.flexLibProperties
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/ScrubBar.as
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/URLInput.as
    Added Paths:
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/fonts/
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/fonts/Fonts.as
    Removed Paths:
        osmf/trunk/libs/ChromeLibrary/assets/images/stop_up.png_1

    Your site was built using tables, whose sizes are defined in your site.
    If we look at your first table definition, we can see:
    <table width="861" height="1449" border="3" cellpadding="0" cellspacing="0" bordercolor="#868787">
    Your table has a width of 861 pixels and an overall height of 1449 pixels. Anything you put into that overall box must fit those dimensions, else
    it won't be visible. Anything you add above it will push everything down. You can redefine your sizing to let you edit more inside of the table elements.
    This is why, when you type in more text, things act weird. If you are in Dreamweaver, you must find the right cell to put your text into and then enter
    text there. Unfortunately, this is going to push things around, which were all lined up using tables. And this gets everything offset with respect to
    everything else in your website.
    And that is why everyone is saying, "Start Over!"
    I just inherited a website that has been put together using tables. I'm going to have to expend considerable effort in rewriting the entire design of the
    website because of that. because everything I intend to add to the pages on the site is going to need to be deconstructed in order to get it to work
    properly if I'm adding text and pictures that need to line up with each other.
    You need something done quick and dirty and the only way I can recommend you do that is to use Dreamweaver to show you the tables you have
    and put what you need in a new table that is defined above or below the tables you all ready have defined. Do that and then get back to someone here
    who knows how to make a website correctly to clean up your entire website and make it editable -- which will cost you some money, but it will be
    money well-spent.
    I like to quote this maxim: Good, Fast, Cheap. Pick any two. This works for website design. You can get it fast and cheap, but it won't be good. I
    think you may have chosen that route.

  • HT201320 I have two email accounts. However, the iPad automatically uses the account that I only want to use for business. How can I change the account from which mail is sent and received?

    I have two email accounts. However, the iPad automatically uses the account that I only want to use for business. How can I change the account from which mail is sent and received?

    You are most welcome

Maybe you are looking for

  • Where Can I Get an Older Version of iTunes?

    iTunes 10.6.1 has frozen and stopped functioning on a perfectly-maintained Windows XP machine. Where can I download the two versions previous to 10.6.1? Thank you.

  • Nokia N95 - Faulty ?

    Hi Everyone I am new here... I dont know if this post is in the right place.. but my question is I have a Nokia N95 which is N95 RM-159 v21.0.016 Well the problem, I have is when I switch my Nokia N95 on... The Keypad lights will show up.. after the

  • CS5 - Clone and Healing stop working

    Hi, I'm using PS CS5, Windows XP Home, fast CPU, 4GB RAM. I was working on a file today -- D3 NEF opened from LR3 into CS5 -- and created about a dozen layers, some adjustment layers and other empty layers for healing and cloning (using Sample All La

  • Skype does NOT start up with Windows

    When I boot up Windows, Skype refuses to load with it even though it is enabled to do so in the Skype settings. Windows 7 Skype 6.21.0.104 Solutions tried: removing and reinstalling Skype and checking/unchecking the Start Skype with Windows checkbox.

  • Firefox will not connect to the internet, but I can still load Internet Explorer and use it to browse.

    I alredy tried a deinstall and reinstall Attempted to configure internet settings, not sure if I did it right.