Label with multiple sizes

I need to see if in Crystal I can create a report has two different label sizes per line. It would be landscape with a 1x3 label then it starts 1x1 labels to the right of it.  It is east to do with the mailing label wizard with either version but I have yet to find a way with multiple column format to do two sizes on the page, a 1x3 label on the left column down then 3" from the left side start my 1x1 label.  I also looked at sub reports but since you can not define the mailing label in number per row it combines the data.  Any ideas that I should look into?

Hi Eric,
Sure, but let me know is this the same requirement you
want or you have something different.
Please add more details of your requirement.
Regards,
Raghwendra

Similar Messages

  • Question - create pdf with multiple size pages

    Is there a way to create a pdf from a book file with multiple size pages? Frame 11

    Theoretically possible by component file, but not within a single file.
    See:
    http://forums.adobe.com/message/4013068#4013068
    http://forums.adobe.com/message/3519366#3519366
    http://forums.adobe.com/thread/485331?tstart=0

  • IMovie Web Gallery Issues with Multiple Size Movie

    If I upload a medium and large size versions of the same movie to my web gallery it stores the two movies successfully. If I visit the site I'm presented with my album of the two sized movies. I click on that thumbnail and another page opens up showing the medium movie downloading. There is text to click for Medium and Large verions of the movie below the display area. If I click Large a refreshed page appears. I have to wait for the medium moving to finish downloading before the large movie starts. Why doesn't the medium move abort when you click the Large link? Despite both movies have been downloaded if I click on the medium movie text link the movie starts downloading again.
    Also, I can't delete the medium movie from the web gallery without deleting the large movie. I have to upload the large movie again.
    Any work-a-rounds. This doesn't sound right.
    Kelvin

    I don't know the answer (..so perhaps I shouldn't be replying..) but I can confirm that the same thing happens for me.
    There's no × available at the top-left of the gallery page, either, to stop the download, to enable quicker swapping to another size.
    Send Feedback to Apple at http://www.apple.com/feedback/imovie.html

  • Form Size issue with multiple Digital Signatures

    I have created a form (liveCycle 8) with multiple digital signatures required.  When each user signs the form, that section of the form is locked using collections.  The form is workflow through email after each user signs it.  Each time the user signs and forwards the form, the form's size becomes too large.
    How can the form be optimized to compress each time an users signs the form?
    Thank you,
    Lori

    Steve,
       After your request to post the form, I wanted to removal some company items like the Logo.  Once I removed the Logo, I found the biggest issue was a Logo image size that was making the file so large.  Once I reduced the image size, the signatures only added 46kb at each signature level.
    Thank you for your help,
    Lori

  • Change the popup window size in the "optional label with help" template?

    G'Day Apex/javascript gurus,
    I am using Apex 4.0 where I coded an HTML table for help text in one item. Now, when an user click for help in this item then the HTML table is bigger than the size of the pop up window so the client has to re size it a bit to see it fully. To fix this, I tried to create a new "optional level with help" template where I can control the size of the pop up window and make it bigger to fit my HTML table so the client does not have to resize but I could not find any parameter in the original template:
    <label for="#CURRENT_ITEM_NAME#"><span class="t9optionalwithhelp"> "javascript:popupFieldHelp('#CURRENT_ITEM_ID#','&SESSION.')" tabindex="999" that help me to achieve that
    I am not an expert in javascript but I appreciate greatly if somebody here could help me to create a new label (with help) template where I can control the size of the popup window.
    Kind regards
    Carlos
    Edited by: creyes on Aug 1, 2011 1:22 AM

    Hello Carlos,
    You can overload the APEX javascript with your own, on the page you want it to happen. You can do that in the Page Definition - Function and Global Variable Declaration.
    Copy the below code into there and change the width and height of the popup.
    function popupFieldHelp(pItemId, pSessionId){
        // Show jQuery div based dialog if not running in screen reader mode, if not fall back to old popup
        if (!$x('pScreenReaderMode')) {
            apex.jQuery.getJSON(
            'wwv_flow_item_help.show_help?p_item_id=' + pItemId + '&p_session=' + pSessionId + '&p_output_format=JSON',
            function(pData){
              var lDialog = apex.jQuery("#apex_popup_field_help");
              if (lDialog.length===0) {
                // add a new div with the retrieved page
                lDialog = apex.jQuery('<div id="apex_popup_field_help">'+pData.helpText+'</div>');
                // open created div as a dialog
                lDialog
                  .dialog({
                    title: pData.title,
                    bgiframe: true,
                    width: 500,
                    height: 350,
                    show: 'drop',
                    hide: 'drop' });
              } else {
                // replace the existing dialog and open it again
                lDialog
                  .html(pData.helpText)
                  .dialog('option', 'title', pData.title)
                  .dialog('open');
        } else {
            popupFieldHelpClassic(pItemId, pSessionId);
        return;
    }; // popupFieldHelpHope that makes sense,
    Dimitri
    http://dgielis.blogspot.com
    http://www.apex-evangelists.com

  • Can a single HID report descriptor support multiple touch screens with different sizes?

    Hi Experts:
    I have a question for specifying touch monitor sizes in the HID report descriptor:
    Can ONE HID report descriptor support multiple touch monitors with different sizes ?
    Thanks in advance
    leo

    My screen shot is from AA9, and I have seen that the UI for AAX is vastly different, but...
    Choose Paper Source from Page Size should be the "one-touch" solution your looking for.
    In my test, my Konica-Minolta Bizhub failed to detect the proper paper trays, but Acrobat correctly spooled the pages.

  • Can you send an email with multiple photos from iPhoto in reduced size?

    I want to send an email with multiple photos attached with a reduced size. How do I accomplish this?

    Hi Igmatteson,
    If you are using regular Mac Mail, and you are on Mountain Lion, this is what I can do:
    1. Go into Mail, and start a new message
    2. At the top, you will see 4 icons - the third one over brings up the Photo Browser from iPhoto
    3. Go through your pics and select the one you want and drag it onto the mail page
    4. Once you have done that, a small bar on the right-hand side will show up that will allow you to select whether you want the image size to be small, medium, or large. Once you select a size, all photos you add will be that same size.
    Hope this works for you!
    Cheers,
    GB

  • Multiple masters with DIFFERENT sizes?

    Hi,
    I think this is a NO, but I have to ask.
    Is it possible to have different master pages in a single document, each with a different size?
    If not, how do I tackly my problem?
    I am making a sales matrix and it will be comprised of 3.5 inch by 7 inch pages with some 3.5 by 3.5 inch pages interspersed throughout.
    I don't want to have two InDesign files, so it would be great if I could have masters with different sizes, OR if there was a way to use the larger of the two sizes, 3.5x7 and then set my square 3.5x3.5 pages doubled up on the larger page.
    I know I can use the 'book' feature, but sometimes that is more trouble than it's worth, especially with different size pages. What do you suggest?

    Peter,
    why do you say easier to work the other way?
    I think this spread thing may just work.
    I normally have facing pages in all of my saddlestitched letter size docs and output via Export to PDF with trim marks on. That gives me a pdf and eachpage has trim marks.
    Doing it this way with a 3.5x3.5 document and outputting spreads, I get exactly what I want. A pdf with one 7 inch page and 4 3.5 inch pages all with trim marks at the right places.
    Before I proceed though, I want to hear why this might be a bad idea....

  • Bug with multiple swingworkers working at same time

    Dear Friends:
    First I have to request apologizes about my bad English. I will try to explain my problem, to see if someone has a tip.
    I want to show in my UI the result of multiple database querys. Each query (for example, 12 queries), return a count (for example "select count(*) from clients).
    The point is to show the results of the queries, to wait x seconds for each query, and repeat them. The wait period may vary between queries.
    I have a custom JPane class that extends Jpane (call it, "MyPersonalJPane), and has a JLabel for the query result, and a Jprogressbar, to show the countdown to the next iteration of the query.
    Inside "MyPersonalJPane, I have two swingworkers. One of them called "Timer", that receives a number of seconds, counts that amount of time, and then fires a "done" property:
    {code}
    public class MyTimer extends SwingWorker {
    private int duration= 100;
    private int elapsedTime= 0;
    public MyTimer(int SECONDS) {
    duration= SECONDS;
    @Override
    protected Object doInBackground() throws Exception {
    long start= System.currentTimeMillis();
    do {
    try {
    Thread.sleep(1000);
    } catch (InterruptedException ignore) {
    long end= System.currentTimeMillis();
    elapsedTime= (int) (end - start) / 1000;
    firePropertyChange("myprogres",null,duration - elapsedTime);
    } while (elapsedTime < duration);
    return null;
    @Override
    protected void done() {
    firePropertyChange("done", null, null);
    {code}
    Then I Have an "Executor" swingworker, that performs the database query, and returns the result:
    {code}
    public class Executor extends SwingWorker<String, Void> {
    private String sql;
    private JLabel myLabel;
    public Ejecutor(JLabel ET, String SQL) {
    sql = SQL;
    myLabel= ET;
    @Override
    protected String doInBackground() throws Exception {
    String cc = "????";
    try {
    ResultSet or = os.executeQuery(sql);
    if (or.next()) {
    cc = or.getString(1);
    } catch (Exception e) {
    System.out.println(e.toString());
    return cc;
    @Override
    protected void done() {
    try {
    myLabel.setText(get());
    } catch (Exception e) {
    System.out.println(e.toString());
    firePropertyChange("done", null, null);
    {code}
    Then, in MyPersonalJPane class, the class that has a label and a JprogressBar and the two singworkers all together, I do the following:
    {code}
    public MyPersonalJPane(){
    initComponents();
    launchMyTimer();
    private void launchMyTimer() {
    jProgressBar.setIndeterminate(false);
    MyTimer t = new MyTimer(100);
    PropertyChangeListener MyTimerListener= new PropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
    String p = evt.getPropertyName();
    if (p.equalsIgnoreCase("myprogress")) {
    int progress = (Integer) evt.getNewValue();
    jProgressBar.setValue(progress);
    if (p.equalsIgnoreCase("done")) {
    //Countdown is finished. Time to query the db again
    launchExecutor();
    t.addPropertyChangeListener(MyTimerListener);
    try {
    jProgressBar.setIndeterminate(false);
    jProgressBar.setValue(duration);
    t.execute();
    } catch (Exception ee) {
    System.out.println(ee.toString());
    private void launchMyExecutor() {
    Executor e = new Executor(sql);
    PropertyChangeListener MyExecutorListener = new PropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
    String p = evt.getPropertyName();
    if (p.equalsIgnoreCase("done")) {
                   //here, the Label with the query result is already updated by the Executor swingworker. Time to wait again for the next query
    launchMyTimer();
    e.addPropertyChangeListener(MyExecutorListener);
    try {
    jProgressBar.setIndeterminate(true);
    e.execute();
    } catch (Exception ee) {
    System.out.println(ee.toString());
    {code}
    My intention is: In my JPanel class constructor, to launch the timer. While my timer counts down, the progressbar is refreshed. When the timer reaches 0, then the MyTimerSwinworker launch the "done" property event, and dissapears. Then, I launch the Executor swingworker, who retrieves from the database some piece of information, refreshes a Jlabel, and when it is finished, it throws a "done" event, the Executor swingworker dissapears, I launch another MyTimer swingworker, and and and and and, etc.
    It works well... with one, perhaps two diferent Jpanels, with two different queries. But my problem is that when I use, for example, 25 Jpanels with 25 different queries, that is, 25 Jpanels with 25 jprogress bar and each JPanel with tho swingworkers (one executor, and one timer), strange thing happens.
    For example, when the Jpanel nº 3 countdown reaches 0, the Jpanel nº5 is refreshed, and when the Jpanel nº7 makes a query, the result is painted in the Jlabel of the Jpanel nº1, etc.
    I suppose I'm doing something very wrong, but I don't know what.
    Any ideas?

    roquec wrote:
    It works well... with one, perhaps two diferent Jpanels, with two different queries. But my problem is that when I use, for example, 25 Jpanels with 25 different queries, that is, 25 Jpanels with 25 jprogress bar and each JPanel with tho swingworkers (one executor, and one timer), strange thing happens.
    For example, when the Jpanel nº 3 countdown reaches 0, the Jpanel nº5 is refreshed, and when the Jpanel nº7 makes a query, the result is painted in the Jlabel of the Jpanel nº1, etc.
    I suppose I'm doing something very wrong, but I don't know what.
    Any ideas?Please look into javax.swing.Timer to do the work of your "MyTimer" class. The reason your implementation of a Timer class with SwingWorker won't work with 25 instances is because each SwingWorker executes on a thread from SwingWorker's thread pool which has a limited size (I believe it is 10). With javax.swing.Timer, you can use as many countdowns as you want with no problem because they will all use a shared Thread.

  • "detected a page fragment with multiple root components" warning

    I am getting a warning on the standalone WLS when I run my page that contains a taskflow as region. I am using a page fragment in my taskflow.
    <Warning> <oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer> <ADF_FACES-60099> <The region component with id: ptMain:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.>
    The warning states the obvious, I have everything within a panelheader in my page fragment. Also, I do not get the warning on the integrated WLS. Any ideas as to why this warning is still popping up in the log? I am using JDev 11.1.1.3.
    Thanks,
    Jessica

    Thank you for responding. I do not have any popups. I do, however, have another region nested within this fragment ( have this warning on another fragment that doesn't have a nested region though). Here is the code for my fragment.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core">
    <af:panelHeader text="Pawn"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.ph1}"
    id="ph1" type="default">
    <af:panelFormLayout id="pfl2">
    <af:panelSplitter binding="#{backingBeanScope.backing_Fragments_PawnSearch.ps1}"
    id="ps1" orientation="vertical" splitterPosition="62"
    inlineStyle="width:775px; height:660px;">
    <f:facet name="first">
    <af:panelBox text="Search #{bindings.agency.inputValue} Data to Update"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.pb1}"
    id="pb1">
    <f:facet name="toolbar"/>
    <af:panelGroupLayout id="pgl3" layout="horizontal">
    <af:inputText value="#{bindings.control_number.inputValue}"
    label="Control Number" required="true"
    columns="#{bindings.control_number.hints.displayWidth}"
    maximumLength="#{bindings.control_number.hints.precision}"
    shortDesc="#{bindings.control_number.hints.tooltip}"
    id="it1">
    <f:validator binding="#{bindings.control_number.validator}"/>
    </af:inputText>
    <af:inputDate value="#{bindings.trans_date.inputValue}"
    label="Date" required="true"
    shortDesc="#{bindings.trans_date.hints.tooltip}"
    id="id1">
    <f:validator binding="#{bindings.trans_date.validator}"/>
    <af:convertDateTime pattern="#{bindings.trans_date.format}"/>
    </af:inputDate>
    <af:inputText value="#{bindings.agency.inputValue}" simple="true"
    required="#{bindings.agency.hints.mandatory}"
    columns="#{bindings.agency.hints.displayWidth}"
    maximumLength="#{bindings.agency.hints.precision}"
    shortDesc="#{bindings.agency.hints.tooltip}"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.it2}"
    id="it2" visible="false">
    <f:validator binding="#{bindings.agency.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"
    text="Search"
    disabled="#{!bindings.ExecuteWithParams.enabled}"
    id="cb5"
    returnListener="#{backingBeanScope.backing_Fragments_PawnSearch.refreshPage}"
    action="#{backingBeanScope.backing_Fragments_PawnSearch.RenderMe}">
    <af:setActionListener from="#{bindings.PawnItemView1Iterator.currentRowKeyString}"
    to="#{requestScope.pawnkey}"/>
    </af:commandButton>
    <af:spacer width="10" height="10"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.s1}"
    id="s1"/>
    <af:goButton text="Clear Values and Create New" id="gb1"
    destination="index.jspx"
    rendered="#{backingBeanScope.backing_Fragments_PawnSearch.saveButtonRendered}"/>
    </af:panelGroupLayout>
    </af:panelBox>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout binding="#{backingBeanScope.backing_Fragments_PawnSearch.pgl4}"
    id="pgl4" layout="scroll" partialTriggers=""
    visible="true">
    <af:panelGroupLayout binding="#{backingBeanScope.backing_Fragments_PawnSearch.pgl6}"
    id="pgl6" inlineStyle="width:775px;"
    visible="#{backingBeanScope.backing_Fragments_PawnSearch.renderTF}">
    <af:region value="#{bindings.PawnEntryFormTF1.regionModel}"
    id="r1" inlineStyle="width:750px;"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout binding="#{backingBeanScope.backing_Fragments_PawnSearch.pgl5}"
    id="pgl5" layout="horizontal"
    visible="#{backingBeanScope.backing_Fragments_PawnSearch.renderMessage}">
    <af:outputFormatted value="No #{bindings.agency.inputValue} Pawn data matching the Control Number and Transaction Date from above."
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.of1}"
    id="of1"
    inlineStyle="font-weight:bolder; font-size:small;"/>
    <af:spacer width="10" height="10"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.s2}"
    id="s2"/>
    <af:goButton text="Clear Search and Start Again"
    binding="#{backingBeanScope.backing_Fragments_PawnSearch.gb2}"
    id="gb2" destination="index.jspx"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:panelFormLayout>
    </af:panelHeader>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Fragments_PawnSearch-->
    </jsp:root>

  • UI Design help / Slider with multiple thumbs?

    I've got an application which is trying to set multiple bounds
    around a single value. For instance, if my value was "temperature",
    possible bounds might be cold, temperate, hot.
    I want my user to be able to assign all of those ranges.
    My first thought was to use a slider with multiple thumbs. I could
    have 0 and 100 as min and max, say, with 2 sliders. Everything
    to the left of the first slider is "cold", everything between the two
    sliders is "temperate", and everything to the right of the second
    slider is "hot.
    Of course, JSlider does not have support for multiple thumbs.
    So, I was hoping someone could either suggest a freeware/LGPL
    widget that did *or* could propose a clever redesign to obviate
    the need for one.
    In reality, my problem is more complex -- multiple values with
    varying start values, end values, and number of thresholds. I'm
    using multiple sliders right now, and it's functional, but really fugly.
    Thanks for any help you might be able to provide!
    Eric

    Have found this triple slider from Gene Vishnevsky. Needs some work to adapt to your needs :
    * TripleSlider_Test.java
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import javax.swing.*;
    public class TripleSlider_Test extends JFrame {
        public TripleSlider_Test() {
            setTitle("TripleSlider Test");
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setSize(400,300);
            setLocationRelativeTo(null);
            MyTripleSlider slider = new MyTripleSlider();
            add(slider, BorderLayout.NORTH);
        public static void main(String args[]) {
            new TripleSlider_Test().setVisible(true);
        class MyTripleSlider extends TripleSlider{
             * This method is called when the "thumb" of the slider is dragged by
             * the user. Must be overridden to give the slider some behavior.
            public void Motion(){
                // TODO add your handling code here:
    * TripleSlider
    * Description:     Slider with two thumbs that divide the bar
    *   into three parts. Relative size of each part is
    *   the value of that part, so the three values add up to 1.
    * Author: Gene Vishnevsky  Oct. 15, 1997
    * This class produces a slider with 2 thumbs that has 3 values.
    class TripleSlider extends JPanel  {
        private final static int THUMB_SIZE = 14;
        private final static int BUFFER = 2;
        private final static int TEXT_HEIGHT = 18;
        private final static int TEXT_BUFFER = 3;
        private final static int DEFAULT_WIDTH = 300; //200;
        private final static int DEFAULT_HEIGHT = 15;
        /** Array that holds colors of each of the 3 parts. */
        protected Color colors[];
        private boolean enabled=true;
        private Dimension preferredSize_;
        /* this value depends on resizing */
        protected int pixMin_, pixMax_, width_;
        private int pix1_, pix2_;               // pixel position of the thumbs
        private double values[];                    // the 3 values
        /** current font of the labels. */
        protected Font font;
         * Enables/disables the slider.
        public void setEnabled( boolean flag ) {
            enabled = flag;
         * Constructs and initializes the slider.
        public TripleSlider() {
            values = new double[3];
            colors = new Color[3];
            preferredSize_ = new Dimension( DEFAULT_WIDTH,
                    DEFAULT_HEIGHT + TEXT_HEIGHT + TEXT_BUFFER );
            font = new Font("TimesRoman", Font.PLAIN, 12);
            pixMax_ = DEFAULT_WIDTH - THUMB_SIZE - 1;
            pixMax_ = DEFAULT_WIDTH - THUMB_SIZE - 1;
            width_ = DEFAULT_WIDTH;
            resize( width_, DEFAULT_HEIGHT + TEXT_HEIGHT /*�+ TEXT_BUFFER*/ );
            setValues( 0.33333, 0.33333 );
            setColor( 0, Color.blue );
            setColor( 1, Color.green );
            setColor( 2, Color.red );
            addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent evt) {
                    mouseDown(evt);
            addMouseMotionListener(new MouseMotionAdapter() {
                public void mouseDragged(MouseEvent evt) {
                    mouseDrag(evt);
         * Sets color of a part.
        public void setColor( int part, Color color ) {
            colors[part] = color;
         * Returns color of a part.
         * @return current part's color.
        public Color getColor( int part ) {
            return colors[part];
         * This method is called by the runtime when the slider is resized.
        public void reshape( int x, int y, int width, int height ) {
            // setBounds() is not called.
            super.reshape(x, y, width, height);
            width_ = width;
            pixMin_ = THUMB_SIZE;
            pixMax_ = width - THUMB_SIZE - 1;
            // recompute new thumbs pixels (for the same values)
            setValues( values[0], values[1], values[2] );
            repaint();
        private void setValues( double a, double b, double c ) {
            // we know the values are valid
            values[0] = a;
            values[1] = b;
            values[2] = c;
            double total = (double)( width_ - THUMB_SIZE * 4 ); // sum
            pix1_ = (int)(a * total) + THUMB_SIZE;
            pix2_ = (int)(b * total) + pix1_ + THUMB_SIZE * 2;
         * Sets new values of the slider.
         * is 1 - a - b.
        public void setValues( double a, double b ) {
            double sum_ab = a + b;
            if( sum_ab > 1. || sum_ab < 0. ) {
                /* invalid input: should throw exception */
                System.out.println("invalid input");
                return;
            /* call this private method */
            setValues( a, b, 1 - sum_ab );
            repaint();
        private void updateValues() {
            double total = (double)( width_ - THUMB_SIZE * 4 ); // sum
            int a = pix1_ - THUMB_SIZE;
            int b = pix2_ - pix1_ - THUMB_SIZE * 2;
            int c = width_ - (pix2_ + THUMB_SIZE);
            values[0] = (double)a / total;
            values[1] = (double)b / total;
            values[2] = (double)c / total;
         * Returns value for a part.
         * @return value for the part.
        public double getValue( int part ) {
            return values[part];
         * This method is called when the "thumb" of the slider is dragged by
         * the user. Must be overridden to give the slider some behavior.
        public void Motion() {
         * Paints the whole slider and labels.
        public void paint( Graphics g ) {
            int width = size().width;
            int height = size().height;
            g.setColor( Color.lightGray );          // bground
            g.fillRect( 0, 0, width, TEXT_HEIGHT );
            g.setColor( colors[0] );
            g.fillRect( 0, TEXT_HEIGHT,
                    pix1_ - THUMB_SIZE, height - TEXT_HEIGHT );
            g.setColor( colors[1] );
            g.fillRect( pix1_ + THUMB_SIZE, TEXT_HEIGHT,
                    pix2_ - pix1_ - THUMB_SIZE * 2, height - TEXT_HEIGHT );
            g.setColor( colors[2] );
            g.fillRect( pix2_ + THUMB_SIZE, TEXT_HEIGHT,
                    width_ - pix2_ - THUMB_SIZE, height - TEXT_HEIGHT );
            /* draw two thumbs */
            g.setColor( Color.lightGray );
            g.fill3DRect( pix1_ - THUMB_SIZE, TEXT_HEIGHT /*+ BUFFER*/,
                    THUMB_SIZE * 2 + 1, height /*- 2 * BUFFER*/ - TEXT_HEIGHT,
                    true);
            g.fill3DRect( pix2_ - THUMB_SIZE, TEXT_HEIGHT /*+ BUFFER*/,
                    THUMB_SIZE * 2 + 1, height /*- 2 * BUFFER*/ - TEXT_HEIGHT,
                    true);
            g.setColor( Color.black );
            g.drawLine(pix1_, TEXT_HEIGHT + BUFFER + 1,
                    pix1_, height - 2 * BUFFER);
            g.drawLine(pix2_, TEXT_HEIGHT + BUFFER + 1,
                    pix2_, height - 2 * BUFFER);
            g.setFont(font);
            // center each value in the middle
            String str = render( getValue(0) );
            g.drawString(str,
                    pix1_ / 2 - (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
            str = render( getValue(1) );
            g.drawString(str,
                    (pix2_ - pix1_ ) / 2 + pix1_ -
                    (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
            str = render( getValue(2) );
            g.drawString(str,
                    (width_ - pix2_ ) / 2 + pix2_ -
                    (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
        private String render(double value){
            DecimalFormat myF = new DecimalFormat("###,###,###.#");
            return myF.format(value);
         * An internal method used to handle mouse down events.
        private void mouseDown(MouseEvent e) {
            if( enabled ) {
                HandleMouse((int)e.getPoint().getX());
                Motion();
         * An internal method used to handle mouse drag events.
        private void mouseDrag(MouseEvent e) {
            if( enabled ) {
                HandleMouse((int)e.getPoint().getX());
                Motion();
         * Does all the recalculations related to user interaction with
         * the slider.
        protected void HandleMouse(int x) {
            boolean leftControl = false;
            int left = pix1_, right = pix2_;
            int xmin = THUMB_SIZE;
            int xmax = width_ - THUMB_SIZE;
            // Which thumb is closer?
            if( x < (pix1_ + (pix2_ - pix1_) / 2 ) ) {
                leftControl = true;
                left = x;
            } else {
                right = x;
            /* verify boundaries and reconcile */
            if( leftControl ) {
                if( left < xmin ) {
                    left = xmin;
                } else if( left > (xmax - THUMB_SIZE*2) ) {
                    left = xmax - THUMB_SIZE*2;
                } else {
                    if( left > (right - THUMB_SIZE * 2) && right < xmax ) {
                        // push right
                        right = left + THUMB_SIZE * 2;
            } else {
                // right control
                if( right > xmax ) {
                    right = xmax;
                } else if( right < (xmin + THUMB_SIZE*2) ) {
                    right = xmin + THUMB_SIZE*2;
                } else {
                    if( right < (left + THUMB_SIZE * 2) && left > xmin ) {
                        // push left
                        left = right - THUMB_SIZE * 2;
            pix1_ = left;
            pix2_ = right;
            updateValues();
            repaint();
         * Overrides the default update(Graphics) method
         * in order not to clear screen to avoid flicker.
        public void update( Graphics g ) {
            paint( g );
         * Overrides the default preferredSize() method.
         * @return new Dimension
        public Dimension preferredSize() {
            return preferredSize_;
         * Overrides the default minimumSize() method.
         * @return new Dimension
        public Dimension minimumSize() {
            return preferredSize_;
    }

  • Sending mail with multiple attachment

    hi.
    i want to send mail with multiple attachment.
    i m succeed in sending multiple attachment but the second pdf is not open.
    its given error like "This file is damaged and could not be open.
    pls check my code. and
    give the solution....
    point should be assured...........
    hope all u r understand my problem..
    & tell me where is i m missing something.
    REPORT  YSDPASALE1_MAIL LINE-SIZE 110.
    data : year_month(6) type c.
    data : from_date like sy-datum,to_date like sy-datum.
    INITIALIZATION.
    year_month = sy-datum+0(6).
    CONCATENATE year_month '01' into from_date.
    to_date = sy-datum.
    ranges : temp for mkpf-budat.
    temp-low = from_date.
    temp-high = to_date.
    append temp to temp.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
           jobname like TBTCJOB-JOBNAME,
           L_RELEASE(1) TYPE c.
    CONSTANTS : l_c_device(4)    VALUE 'LOCL'.
    DATA : t type i value 0.
    DATA : p_email1 like somlreci1-receiver,
            p_sender LIKE somlreci1-receiver.
    Data Declaration
    DATA: gd_recsize TYPE i,gd_recsize1 TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject  LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att2 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_desc1 TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des,
          gd_mtitle LIKE sodocchgi1-obj_descr.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    DATA: BEGIN OF mailstr OCCURS 0,
            p_email like somlreci1-receiver,
          END OF mailstr.
    DATA: mailtab like STANDARD TABLE OF mailstr WITH HEADER LINE.
    DATA: ypp18tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ymis008tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ysd15tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ymis10tab like STANDARD TABLE OF mailstr WITH HEADER LINE.
    SUBMIT YSDPASALE1 with bdt in temp
                           to sap-spool
                          with line-size = '255'
                           with KEEP_IN_SPOOL = 'X'
                           with IMMEDIATELY = ' '
                           WITHOUT SPOOL DYNPRO
                           AND RETURN
       NEW-PAGE PRINT ON
       DESTINATION l_c_device
       IMMEDIATELY ' '
       KEEP IN SPOOL 'X'
       NEW LIST IDENTIFICATION 'X'
       NO DIALOG.
       new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf.
        select yemail as p_email into CORRESPONDING FIELDS OF TABLE ymis008tab
          from ymail
          where ytcode = 'YMIS008'.
    ELSE.
       SKIP.
       WRITE:/ 'Program must be executed in background in-order for spool & mail sending',
               'request to be created.'.
      ENDIF.
    wait up to 3 seconds.
      submit YSD_MONTHLY_SALES
                                USING SELECTION-SET 'MAIL'
                                to sap-spool
                               with KEEP_IN_SPOOL = 'X'
                               with IMMEDIATELY = ' ' "SPACE
                               WITHOUT SPOOL DYNPRO
                               AND RETURN
       NEW-PAGE PRINT ON
       DESTINATION l_c_device
       IMMEDIATELY ' '
       KEEP IN SPOOL 'X'
       NEW LIST IDENTIFICATION 'X'
       NO DIALOG.
       new-page print off.
        IF sy-batch EQ 'X'.
        gd_attachment_desc1  = 'YMIS10'.
        gd_mtitle = 'Monthly Sales Report'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf1.
       loop at it_mess_att.
        move it_mess_att1 to it_mess_att.
        APPEND it_mess_att.
       endloop.
       APPEND LINES OF it_mess_att1 to it_mess_att.
       free it_mess_att1.
        it_mess_att[] = it_mess_att1[].
        insert LINES OF it_mess_att1 into it_mess_att.
        APPEND LINES OF it_mess_att2 to it_mess_att .
         insert LINES OF it_mess_att1 into it_mess_att.
         insert LINES OF it_mess_att2 into it_mess_att.
       loop at ymis008tab into mailstr.
         p_email1 = mailstr-p_email.
          p_email1 = '[email protected]'.
           PERFORM process_email.
       endloop.
           clear mailstr.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
      ELSE.
        SKIP.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           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.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
    FORM convert_spool_to_pdf1.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           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.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att1 = gd_buffer.
        APPEND it_mess_att1.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      DESCRIBE TABLE it_mess_att1 LINES gd_recsize1.
      CHECK gd_recsize > 0 or gd_recsize1 > 0.
      PERFORM send_email." USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email." USING p_email.
    CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = gd_attachment_desc1 .
    gd_attachment_desc = 'YPP18 - Daily Highlights'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Dear Sir,'.
      APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
      it_mess_bod        = ' '.
      APPEND it_mess_bod.
      it_mess_bod        = 'kindly find the attached document'.
      APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
    it_mess_bod        = 'Do not reply on this mail, It is generated from SAP'.
    APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
      it_mess_bod        = ' '.
      APPEND it_mess_bod.
      it_mess_bod        = 'Regards,'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Arpit Shah'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                          it_mess_att1
                                    using "p_email
                                          gd_mtitle
                                         'Testing mail generated from SAP'
                                         'Daily Highlights Abstract Report - YPP18'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                              it_attach1
                                        using "p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1,w_doc_data1 like sodocchgi1.
    ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data1-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    For 2nd Attachments
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach1 INDEX w_cnt.
      w_doc_data-doc_size = w_doc_data1-doc_size +
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach1 ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
    APPEND LINES OF it_attach1 to t_attachment.
      t_attachment[] = it_attach1[].
    APPEND LINES OF it_attach1 to t_attachment.
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = 1.
    DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
      DESCRIBE TABLE it_attach LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  'YMIS008'."ld_attdescription.
      t_packing_list-obj_name   =  'YMIS008'."ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
      clear t_packing_list.
    for 2 attachments
      data : a type i,b type i.
       a = t_packing_list-body_num.
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = a + 1. "1
    DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
      DESCRIBE TABLE it_attach1 LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  'YMIS10'."ld_attdescription.
      t_packing_list-obj_name   =  'YMIS10'."ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    a = t_packing_list-body_num.
    clear t_packing_list.
    * Create attachment notification
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 1.
    t_packing_list-head_num   = 1.
    t_packing_list-body_start = a + 1.
    t_packing_list-body_num = t_packing_list-body_num + 1.
    DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
    t_packing_list-body_num = a + t_packing_list-body_num .
    t_packing_list-doc_type   =  ld_format.
    t_packing_list-obj_descr  =  'YMIS10'."ld_attdescription.
    t_packing_list-obj_name   =  'YMIS10'."ld_attfilename.
    t_packing_list-doc_size   =  t_packing_list-body_num * 255.
    APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
    loop at ymis008tab into mailstr.
      t_receivers-receiver = mailstr-p_email.  "ld_email.
      t_receivers-receiver = p_email1.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'. "X   "Read Acknoledgement
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
    endloop.
       CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Rgds.
    Arpit

    Hi Arpit,
    Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
    Regards,
    John.

  • Find and replace with multiple files and with a watch folder

    I am trying to create a watch folder that uses red_menace script to:
    1. Have a folder that receives multiple xml files that run the script one by one.
    2. then move the files to an output folder.
    I tried modifying the set TheFIle to choose file -- the original text file to:
    with multiple selections allowed
    But that doesn't seem to work. I know i'm missing a step. Any help is much appreciated!
    Thanks!
    The way i'd like to setup things is having an input folder on the desktop (or just have the application on the desktop and I can drag the files onto it), and let it do it's thing. Once it's done have it export the xml files into an output folder.
    Here's what i got so far:
    on open
    set TheFIle to choose file -- the original text file
    set TheFolder to ("Macintosh HD:Users:user1:Desktop:out") -- the folder for the output file
    set TheName to (GetUniqueName for TheFIle from TheFolder) -- the name for the output file
    set TheText to read TheFIle -- get the text to edit
    set Originals to {"KPCALDATE", "KPCALEVENT", "KPCALDAY", "KPCALBODY", "obituaries name", "" & return & "</cstyle></pstyle>" & return & "<pstyle name=\"obituaries text\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>", " .com", " .net", " .org", " .edu", "www .", "www. ", "Ho- nolulu", "<pstyle name=\"kicker 12\"><cstyle allcaps=\"1\">fashion news</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "<component name=\"Headline 1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline 1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 36\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>-", "-", "
    Per serving:", "<pstyle name=\"Titlebar - mini, red\"><cstyle allcaps=\"1\">NATION & World </cstyle><cstyle allcaps=\"1\">Report</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "</cstyle></pstyle>"} -- the terms that can be replaced
    set Replacements to {"subhed", "subhed", "subhed", "Normal", "obituaries text", ", ", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>
    ", ".com", ".net", ".org", ".edu", "www.", "www.", "Honolulu", "", "<component name=\"Headline1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 27\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>—", " —", "
    Per serving:", "","" & return & "</cstyle></pstyle>"} -- the replacement terms
    repeat with AnItem from 1 to count Originals
    set TheText to (replaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
    end repeat
    try -- write a new output file
    tell application "Finder" to make new file at TheFolder with properties {name:TheName}
    set OpenFile to open for access (result as alias) with write permission
    write TheText to OpenFile starting at eof
    close access OpenFile
    on error errmess
    try
    log errmess
    close access OpenFile
    end try
    end try
    end open
    to GetUniqueName for SomeFile from SomeFolder
    check if SomeFile exists in SomeFolder, creating a new unique name if needed
    parameters - SomeFile [mixed]: a source file path
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique file name and extension
    set {Counter, Divider} to {"00", "_"}
    -- get the name and extension
    set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
    if TheExtension is missing value then set TheExtension to ""
    set TheName to text 1 thru -((count TheExtension) + 2) of TheName
    set NewName to TheName & "." & TheExtension
    tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & "." & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
    displays a dialog for multiple item edit (note that a return is used between each edit item)
    for each of the items in SomeItems, a line containing it's text is placed in the edit box
    the number of items returned are padded or truncated to match the number of items in SomeItems
    parameters - SomeItems [list]: a list of text items to edit
    TheTitle [boolean/text]: use a default or the given dialog title
    ThePrompt [boolean/text]: use a default or the given prompt text
    returns [list]: a list of the edited items, or {} if error
    set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
    if TheCount is less than 1 then return {} -- error
    if ThePrompt is in {true, false} then -- "with" or "without" Prompt
    if ThePrompt then
    set ThePrompt to "Edit the following items:" & return -- default
    else
    set ThePrompt to ""
    end if
    else -- fix up the given prompt a little
    set ThePrompt to ThePrompt & return
    end if
    if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
    set TheTitle to "Multiple Edit Dialog" -- default
    else
    set TheTitle to ""
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
    set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
    repeat with AnItem from 1 to TheCount -- pad/truncate entered items
    try
    set the end of TheItems to (item AnItem of TheInput)
    on error
    set the end of TheItems to ""
    end try
    end repeat
    return TheItems
    end EditItems
    to replaceText of SomeText from OldItem to NewItem
    replace all occurances of OldItem with NewItem
    parameters - SomeText [text]: the text containing the item(s) to change
    OldItem [text]: the item to be replaced
    NewItem [text]: the item to replace with
    returns [text]: the text with the item(s) replaced
    set SomeText to SomeText as Unicode text -- TID's are case insensitive with Unicode text
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
    set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
    set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
    return SomeText
    end replaceText
    Message was edited by: gamebreakers

    When you use the open or adding folder items to handlers, you need to add the parameters for the file items passed to them.
    I'll go ahead and post the applet/droplet version of my original script from the previous topic for reference:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- search and replace multiple items applet/droplet/folder action
    -- the terms to replace - edit as needed
    property EditableItems : {¬
    "one", ¬
    "two", ¬
    "three", ¬
    "four", ¬
    "five", ¬
    "six", ¬
    "seven", ¬
    "eight", ¬
    "nine", ¬
    "ten", ¬
    "eleven", ¬
    "twelve", ¬
    "thirteen", ¬
    "fourteen", ¬
    "fifteen", ¬
    "sixteen", ¬
    "seventeen", ¬
    "eighteen", ¬
    "nineteen", ¬
    "twenty"}
    -- the folder for the output file(s) - change as needed
    property TheFolder : (path to desktop)
    property LastEditItems : EditableItems
    on run
    the applet/droplet was double-clicked
    open (choose file with multiple selections allowed)
    end run
    on open TheItems
    items were dropped onto the applet/droplet
    parameters - TheItems [list]: a list of the items (aliases) dropped
    returns nothing
    repeat with AnItem in TheItems
    ReplaceMultipleItems from AnItem
    end repeat
    end open
    on adding folder items to this_folder after receiving these_items
    folder action - items were added to a folder
    parameters - this_folder [alias]: the folder added to
    these_items [list]: a list if items (aliases) added
    returns nothing
    repeat with AnItem in these_items
    ReplaceMultipleItems from AnItem
    end repeat
    end adding folder items to
    to ReplaceMultipleItems from SomeFile
    replace multiple text items in SomeFile
    parameters - SomeFile [alias]: the file to replace items in
    returns nothing
    set TheName to (GetUniqueName for SomeFile from TheFolder) -- the name for the output file
    set TheText to read SomeFile -- get the text to edit
    set Originals to (choose from list EditableItems default items LastEditItems with prompt "Select the terms to replace:" with multiple selections allowed) -- the specific terms to replace
    set LastEditItems to Originals
    set Replacements to (EditItems of Originals with Title given Prompt:"Edit the following replacement terms:") -- the replacement terms
    repeat with AnItem from 1 to count Originals
    set TheText to (ReplaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
    end repeat
    try -- write a new output file
    tell application "Finder" to make new file at TheFolder with properties {name:TheName}
    set OpenFile to open for access (result as alias) with write permission
    write TheText to OpenFile starting at eof
    close access OpenFile
    on error errmess
    try
    log errmess
    close access OpenFile
    end try
    end try
    end ReplaceMultipleItems
    to GetUniqueName for SomeFile from SomeFolder
    check if SomeFile exists in SomeFolder, creating a new unique name if needed
    parameters - SomeFile [mixed]: a source file path
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique file name and extension
    set {Counter, Divider} to {"00", "_"}
    -- get the name and extension
    set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
    if TheExtension is in {missing value, ""} then
    set TheExtension to ""
    else
    set TheExtension to "." & TheExtension
    end if
    set {NewName, TheExtension} to {TheName, (ChangeCase of TheExtension to "upper")}
    set TheName to text 1 thru -((count TheExtension) + 1) of TheName
    tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
    displays a dialog for multiple item edit (note that a return is used between each edit item)
      for each of the items in SomeItems, a line containing it's text is placed in the edit box
        the number of items returned are padded or truncated to match the number of items in SomeItems
    parameters - SomeItems [list]: a list of text items to edit
    TheTitle [boolean/text]: use a default or the given dialog title
    ThePrompt [boolean/text]: use a default or the given prompt text
    returns [list]: a list of the edited items, or {} if error
    set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
    if TheCount is less than 1 then return {} -- error
    if ThePrompt is in {true, false} then -- "with" or "without" Prompt
    if ThePrompt then
    set ThePrompt to "Edit the following items:" & return -- default
    else
    set ThePrompt to ""
    end if
    else -- fix up the given prompt a little
    set ThePrompt to ThePrompt & return
    end if
    if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
    set TheTitle to "Multiple Edit Dialog" -- default
    else
    set TheTitle to ""
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
    set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
    repeat with AnItem from 1 to TheCount -- pad/truncate entered items
    try
    set the end of TheItems to (item AnItem of TheInput)
    on error
    set the end of TheItems to ""
    end try
    end repeat
    return TheItems
    end EditItems
    to ReplaceText of SomeText from OldItem to NewItem
    replace all occurances of OldItem with NewItem
    parameters - SomeText [text]: the text containing the item(s) to change
    OldItem [text]: the item to be replaced
    NewItem [text]: the item to replace with
    returns [text]: the text with the item(s) replaced
    set SomeText to SomeText as text
    if SomeText contains OldItem then
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
    try
    set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
    set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
    on error ErrorMessage number ErrorNumber -- oops
    set AppleScript's text item delimiters to TempTID
    error ErrorMessage number ErrorNumber
    end try
    end if
    return SomeText
    end ReplaceText
    to ChangeCase of SomeText to CaseType
    changes the case or capitalization of SomeText to the specified CaseType using Python
    parameters - SomeText [text]: the text to change
    CaseType [text]: the type of case desired:
    "upper" = all uppercase text
    "lower" = all lowercase text
    "title" = uppercase character at start of each word, otherwise lowercase
    "capitalize" = capitalize the first character of the text, otherwise lowercase
    returns [text]: the changed text 
    set SomeText to SomeText as text
    if CaseType is not in {"upper", "lower", "title", "capitalize"} then return SomeText
    return (do shell script "/usr/bin/python -c \"import sys; print unicode(sys.argv[1], 'utf8')." & CaseType & "().encode('utf8')\" " & quoted form of SomeText)
    end ChangeCase
    </pre>
    Edit: how does the choose from list dialog handle those big strings? I'm guessing not very well - is that why you avoided using them?
    Message was edited by: red_menace

  • How to manage multiple sizes of the same image?

    I recently took up LightRoom for all the good things it does. One of the things I need to do, however, is to create and manage multiple sizes of the same image needed for different purposes. I always found this cumbersome. I totally expected that the LR library would offer a solution for this but I looked and I didn't see anything. Sure you can export and resize in the process but then you're on your own. Am I missing something? Isn't there a better way? What does Adobe have in mind for best practices and how do you handle this?

    I can't speak for 99jon, but when I need multiple sizes, I export at the desired sizes, and then make use of the exported photos (upload, e-mail, whatever) and then delete the exports. Thus, there's really no need for me to keep track of the photo at this specific size, knowing that if I ever need it again -- unlikely -- I can regenerate it with the export pre-set, so I put no effort (zero!) into keeping track of photos at different sizes.
    The idea of adding it back into the catalog doesn't get me excited, and I would advise against it. I don't need this, and I don't see the benefit of keeping this particular size export for the long-term. As I said, I can always recreate it — but maybe you have such a need to keep these exports long-term and recreating it at a later point in time doesn't meet your needs? Can you explain?
    By the way, you can't resize a virtual copy, so that won't work here. The only time you can resize is on export.

  • Replenishment in SAP Retail - Article with multiple UOM/EAN

    Dear all,
    I am using SAP Retail. I have an article with multiple unit of measurement as well as multiple EAN. A good example of this article will be canned soft drinks. It comes in pack size of each, 6, 12, 24. I have only one article number for this soft drink but I maintained multiple UOM and EAN for this article.
    When I run auto-replenishment, I can only run it based on one of the packed size (fixed it as the default ordering unit).
    Is it possible to run auto-replenishment for the various packed size?
    Best Regards
    Junwen

    Hi,
    One suggestion. You can buy it in UOM bottle, minimum qty: 6 bottle. Multiples: Your vendor that decide the package size. When you do the GR then set the UOM of the size package, set a lot size calculation (each 6 units) or rounding profile.
    Regards,
    Eduardo

Maybe you are looking for

  • Need help regarding Apache httpd.conf and PHP setup.

    Hi, I am facing problem setting up my PHP and apache setup. I have installed Apache2.2 Root path = C:\Program Files\Apache Software Foundation\Apache2.2 I have also installed PHP in my C:\PHP drive earlier. I moved this PHP folder to C:\Program Files

  • Quick mask mode no longer works for Photoshop CC

    I have the latest version of Photoshop CC,  and  the  quick-mask-mode no longer functions as it should. When I try to modify an existing mask with the quick-mask-mode the highlighted read only appears on some of the photo being edited. In additions,

  • Can't move mpeg clip from Iphoto to imovie

    Im a new MacBook Pro owner. I have done my first upload of pictures and video from my digital camera. Everything is visible and and video plays in Iphoto. In imovie, I cannot get the video clips to transfer to imovie to add to my project to my dismay

  • Firefox process won't die

    When I quit/close Firefox, wait 1 minute, then reopen Firefox, Firefox does not open...it just hangs. When looking in my Task Manager, there are two firefox.exe processes running. Killing the process via the Task Manager is required to get Firefox to

  • Application for lost passport

    Dear Sirs,  I have a BlackBerry Curve 8310 Smartphone terminal / IMEI 358516028578832 / PIN 25958CF4 who want to install the e-mail settings but I do not have the "password" and I have changed operator, who was VODAFONE and the current operator is YO