Dynamic change in Background Picture for Smartform

Hi,
I need to keep a background Image in smartform only in specific condition.
I have done like this :
I have taken one variable in the intialization and I am filling with the image name for a specific condition.
This variable , I am giving it in the Background Picture Tab.
But I am getting run time error as Graphic cannot be displayed.
Here I am giving the code In the initialization:
Here p_obnam is my variable of type TDOBNAME
SAMPLE is my image name which is in SE78
CASE p_biltyp.
    WHEN 'ZRE' OR
         'G2'.
      p_obnam = space.
    WHEN 'ZF5'.
      p_obnam = 'SAMPLE'.
    WHEN OTHERS.
      p_obnam = 'SAMPLE'.
  ENDCASE.
Please let me know...how can I do this.
Regards
Sandeep

Hi,
In the Initialization tab specify the condition..
ex:
    if you want to print the symbol of the currency in the background according to the currency..
if w_currency = 'USD'. "---->Data received
w_name = 'DOLLAR'   "--->Image in SE78
elseif w_currency = 'INR'.
w_name = 'RUPEE'.   "--->Image in SE78
endif.
now you mention w_name as &w_name& in the background picture of the smartform.
This will print the symbol according to the currency you received from the driver program or in the smartform itself.
Thanks & Regards
Sarves

Similar Messages

  • BackGround picture for a Swing application??

    hi,
    once I got a nice idea while watching some webpages. we can give a background picture for a webpage in <body> tag?
    I want to do same thing for any Swing application. Currently I am working on that issue. Any suggestions are welcome!!
    santhosh

    Hi everybody!
    Finally I got it. now Using this We can enable background for any swing application.
    the complete code is shown here. If you have any problems regarding this code, please mail to [email protected]
    /******************************[TexturedImageIcon.java]***********************/
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    /* this is used to generate a tiled image from a given image file.*/
    public class TexturedImageIcon extends ImageIcon
         private Dimension size = new Dimension(10, 10);
         BufferedImage bimg1,bimg;
         Graphics2D g2;
         ComponentListener cl = new ComponentAdapter(){
              public void componentResized(ComponentEvent ce){
                   Component c = (Component)ce.getSource();
                   size = c.getSize();
                   createImage();
         public void setImage(String filename){
              super.setImage(new ImageIcon(filename).getImage());
              bimg1=null;
              createImage();
         public TexturedImageIcon(Component comp, Image img){
              super(img);
              addListener(comp);
         public TexturedImageIcon(Component comp, String filename){
              super(filename);
              addListener(comp);
         public TexturedImageIcon(Component comp, URL url){
              super(url);
              addListener(comp);
         private void addListener(Component comp){
              comp.addComponentListener(cl);
         private void createImage(){
              bimg = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
              g2 = bimg.createGraphics();
              Rectangle2D rect = new Rectangle2D.Float(0,0,size.width-1, size.height-1);
              Rectangle2D tr = new Rectangle2D.Double(0,0,super.getIconWidth(), super.getIconHeight());
              if(bimg1==null){
                   bimg1 = new BufferedImage(super.getIconWidth(), super.getIconHeight(), BufferedImage.TYPE_INT_RGB);
                   Graphics2D g = bimg1.createGraphics();
                   g.drawImage(super.getImage(), null, null);
              TexturePaint tp = new TexturePaint(bimg1, tr);
              g2.setPaint(tp);
              g2.fill(rect);
         public int getIconWidth(){ return size.width; }
         public int getIconHeight(){ return size.height; }
         public Image getImage(){
              System.out.println("asked");
              return bimg;
         public void paintIcon(Component c, Graphics g, int x, int y){
              Graphics2D g2d =(Graphics2D)g;
              g2d.drawImage(bimg, null, null);
         public static void main(String[] args){
              JFrame f = new JFrame();
              f.setSize(300,300);
              JLabel label = new JLabel();
              label.setBackground(Color.white);
              label.setBorder(BorderFactory.createRaisedBevelBorder());
              label.setIcon(new TexturedImageIcon(label, "world2.gif"));
              f.getContentPane().setLayout(new BorderLayout());
              f.getContentPane().add(label, BorderLayout.CENTER);
              f.show();
    /*********************************[JFCUtils.java]************************/
    /*The main logic to enable background picture lies in this class*/
    public class JFCUtils{
         public static ContainerListener cl = new ContainerAdapter(){
              public void componentAdded(ContainerEvent ce){
                   JComponent child = (JComponent)ce.getChild();
                   child.setOpaque(false);
                   child.addContainerListener(this);
                   addlisteners(child);
         public static TexturedImageIcon enableBackGround(JFrame f, String filename){
              ((JPanel)f.getContentPane()).setOpaque(false);
              JLayeredPane lp = f.getLayeredPane();
              JLabel label = new JLabel();
              TexturedImageIcon icon = new TexturedImageIcon(label, filename);
              label.setIcon(icon);
              JPanel panel = new JPanel(new BorderLayout());
              panel.add(label, BorderLayout.CENTER);
              lp.add(panel, new Integer(Integer.MIN_VALUE));
              Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
              panel.setBounds(0, 0, screen.width,screen.height);
              addlisteners((JComponent)f.getContentPane());
              return icon;
         private static void addlisteners(Component c){
              c.toString();
              if(c instanceof JComponent) ((JComponent)c).setOpaque(false);
              if(c instanceof Container){
                   Container ct = (Container)c;
                   ct.addContainerListener(cl);          
              for(int i=0; i<ct.getComponentCount(); i++){ //recursivly make all subcomponents transparent
                   Component child = (Component)ct.getComponent(i);
                   addlisteners(child);
         public static void main(String[] args){
              JFrame f = new JFrame();
              enableBackGround(f, "bg.jpg");
              JButton b = new JButton("fdfdfdfd");
              f.getContentPane().add(b, BorderLayout.NORTH);
              f.setSize(300,300);
              f.show();
    /*************************************[UserDialog.java]**************************/
    //to check how a swing application with background looks like
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class UserDialog extends JDialog
         JPanel contents = (JPanel)getContentPane();
         JTextField shortField = new JTextField(20);
         JTextField nameField = new JTextField(20);
         JTextField emailField = new JTextField(20);
         JTextField smtpServerField = new JTextField(20);
         JTextField pwdField = new JPasswordField(20);
         JTextField pwdField1 = new JPasswordField(20);
         boolean okay = false;
         public UserDialog(JFrame owner){
              super(owner, "New User Details", true);
              initComponents();
              pack();
              setResizable(false);
         public UserDialog(JDialog owner){
              super(owner, "New User Details", true);
              initComponents();
              pack();
              setResizable(false);
         private void initComponents(){
              JPanel west = new JPanel(new GridLayout(0, 1));
              west.add(new JLabel("Short Name"));
              west.add(new JLabel("Full Name"));
              west.add(new JLabel("Email"));
              west.add(new JLabel("SMTP Server"));
              west.add(new JLabel("Password"));
              west.add(new JLabel("Confirm Password"));
              JPanel east = new JPanel(new GridLayout(0, 1));
              east.add(shortField);
              east.add(nameField);
              east.add(emailField);
              east.add(smtpServerField);
              east.add(pwdField);
              east.add(pwdField1);
              JPanel south = new JPanel();
              JButton ok = new JButton("Ok");
              JButton cancel = new JButton("Cancel");
              south.add(ok);
              south.add(cancel);
              contents.setBorder(JFCUtils.border);
              contents.setLayout(new BorderLayout(10, 10));
              contents.add(west, BorderLayout.WEST);
              contents.add(east, BorderLayout.EAST);
              contents.add(south, BorderLayout.SOUTH);
              ActionListener al = new ActionListener(){
                   public void actionPerformed(ActionEvent ae){
                        okay = ae.getActionCommand().equals("Ok");
                        setVisible(false);
              ok.addActionListener(al);
              cancel.addActionListener(al);
         private void clearFields(){
              shortField.setText("");
              nameField.setText("");
              emailField.setText("");
              smtpServerField.setText("");
              pwdField.setText("");
              pwdField1.setText("");
         public User getUser(){
              clearFields();
              okay = false;
              show();
              if(okay) return new User(shortField.getText(), nameField.getText(), emailField.getText(), smtpServerField.getText(), pwdField.getText());
              else return null;
         public static void main(String[] args){
              Dialog dlg = new UserDialog();
              TexturedImageIcon ticon = JFCUtils.enableBackGround(f, "bg.jpg");.show();
              //we can change the background picture by calling ticon.setImage(...) at runtime.

  • Where is the background picture for a window stored?

    Greetings,
    Where is the background picture for a window stored? What is the file called? I am trying to find the image used on a DVD.
    Thanks

    when you set a picture to be a background of some folder that picture is not moved from its original location. instead a record is made in the .DS_Store file of that folder indicating that this picture is the one to be used for the background. in case of the DVD it is likely sitting in some hidden folder right on the DVD.
    run the following terminal command to enable showing hidden files in finder
    defaults write com.apple.finder AppleShowAllFiles 1; killall Finder
    then look on the dvd and the picture should be there somewhere. if you still can't find it open the .DS_store file of the folder in question using Text Editor. a lot of this file will be unreadable but the picture path will be present in plain text.
    when done rerun the above command after changing 1 to 0.

  • HT1338 whenever I access my screen saver my computer freezes. Trying to change my background picture.

    Hey, I am trying to change my background picture but everytime I try my computer freezes.What do I need to do, help.
    Thanks in advance!

    I just did a little test and changed something in my Screen Saver settings and looked to see what changed (just had a Finder window open in my ~/Library/Preferences and had the "Date Modified" column selected so that the most recent change would appear at the top) and noticed that the file called com.apple.screensaver.xxxx.plist file changed (the xxxx is a hex number that is part of your UUID, or perhaps the whole UUID, as have seen it both ways). This screensaver preferences file is located in ~/Library/Preferences/ByHost which makes sense, as every user would need their own set of screen saver preferences on each host.
    Looking at this file in TextWrangler it looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>askForPassword</key>
    <integer>0</integer>
    <key>idleTime</key>
    <integer>300</integer>
    <key>lastNonRandomModuleName</key>
    <string>Flurry</string>
    <key>moduleName</key>
    <string>Flurry</string>
    <key>modulePath</key>
    <string>/System/Library/Screen Savers/Flurry.saver</string>
    <key>tokenRemovalAction</key>
    <integer>0</integer>
    </dict>
    </plist>
    Hope that helps.
    One thing I did have a question about is how to find the UUID. On a Mac Pro system the command:
    system_profiler | grep -i uuid
    returned the expected number that was part of the com.apple.screensaver.xxxx.plist file, but this did not work on a MacBook Pro. No luck trying to find out why so far. Anyone have any ideas? There is also a UUID associated with a disk volume, that appears to have nothing to do with the UUID associated with the system. So the UUID I'm talking about here is for the system, not a disk.
    -Bob

  • Can't change my background picture

    I'd just like to say thank you for your help if you ever do check this out.
    My friends, as a prank, changed my background picture to some random photos I had on my Macbook. However, I've been unable as of yet to actually revert it back. Though they only changed one background, none of my desktops can have their background changed. Also, none of the methods I know actually work - going to System Preferences and manually changing it from there doesn't work, nor does simply clicking a photo and choosing the option to 'set as background picture'.
    Many thanks.

    You can't go to System Preferences>Desktop&Screen Savers and change the display? Try it and see. I've never seen that problem.
    Clinton

  • How do I change the background picture that is shown when i start my Mac?

    On the iMacs in my school they have a different name for everyone of the after for example the band Queen and then there is a picture on the inlogg screen with queen on it. So then you log in and there is another background picture after that. I Have a macbook pro and I would like to change that "start-picture".
    Right now it´s kind of boring and grey. Can you change it somehow?

    It sounds like you're using Adobe Send for Outlook.  Correct?
    Unfortunately, there is no way to change the default text that is inserted into your message. You'll have to change it each time.
    I will pass along your request to the Adobe Send team.

  • I have trouble reading in Black and White. changing the background color for all

    I have trouble reading in Black and White. On my PC I can change the background  color (and I am not just talking about for a word or pages document) but for eveything so anything that was a white background I can put in what ever color I like but it still prints in Black and white.. I can't see how to do this on the Macbook air. on my PC I do this in display. Sort of putting colored film over the screen I dont know what to do. Can anyone help?

    Hello Floridamacbookpro,
    You may be interested in the 'invert colors' Accessibility feature. This can be invoked by pressing the Control, Option, Command, and 8 keys on your keyboard. This only affects your display, and does not have any affect on printed items.
    Mac OS X displays inverted image colors (white on black, reverse type)
    http://support.apple.com/kb/HT3488
    Cheers,
    Allen

  • An applescript to change the background color for all finder windows

    I'll start off by telling you what I am trying to achieve, then show you what I've tried.
    I have a macbook with several HDD's attached. what I want is for each of those hdd to have a specific finder window background color. so no matter where I am in that hdd the background color will always be the same. so for instance if I set the background color of hdd 2 to blue then as long as I see a blue background I know that I'm within hdd 2.
    I've tried setting up an applescript to do this but can only get it to change the open finder window, and none of the subfolders have their backgrounds changed.
    here is what I have so far:
    tell application "Finder"
    tell the icon view options of the front Finder window
    set the background color to {52942, 54484, 31097}
    end tell
    end tell
    so how do I get this to apply to all subfolders without opening each one and running the script.
    thanks in advance for any and all help with this

    According to this article:
    http://docs.info.apple.com/article.html?path=AppleScript/2.1/en/as2039.html
    it seems that the various options can only be set while the window is open and in icon view.
    Rather than manually opening the window of every single folder on the hard drive, it should be possible to write a script to open every folder in sequence, make sure it is in icon view, change its background, then close its window. I have never been any good at the "actions within actions" procedure needed for folders within folders, so maybe someone else with the necessary knowledge and experience might be able to assist in this regard. Such a script would probably take a few minutes to complete while it ran through "every folder of every folder", but it sure would be quicker to have the process automated than to do it by hand - computers are really good at repetitive tasks (as long as the instructions are accurate, of course!).
    On the other hand, you might like to try the following:
    open a few windows in icon view, choose Show View Options in the View menu (I'm in System 10.4), click the radio button All Windows, click the Color radio button under Background, then choose your color. It might achieve what you are trying to do.

  • Change the background color for HToggleButton as State changed

    Hi , I want to change the background color of HToggleButton or HGraphicButton as its state changed as normal to focus and then focus to normal and same with actioned state .It is possible to change the image with different states but how can I do the same thing to change background color .I'll appreciate any help regarding this with thanks in adv.

    Satya,
    i_x denotes first column and not characctersitic 1.
    Also I am not sure if the check is to be for IS_SUM.
    Use Get_Cell_info class instance and then use the data returned by the same for checking IS_SUM and then change the cellstyle.
    Another thing to look out for is , the required change might be needed on DATA_CELL and notcharacteristic_cell.
    Arun
    Assigning points is a way of saying thank you on SDN

  • Trouble changing my profile picture for my nokia a...

    How do I change my profile picture on twitter for my nokia asha 303? The option is not availible.

    Hi Angel101,
    Welcome to Nokia Support Discussions!
    Regarding your concern, changing profile picture using your phone is not possible. However, you can always do this with the use of your computer.

  • How do I set a background picture for my homepage, not just the edges but the entire screen?

    When I use other web browsers I have the ability to set a background picture on my homepage. How do I do that on Firefox?

    Is this picture to be used in a drop zone or used as the total background of a theme?  If the former it's not possible to do that as that's the nature of the drop zone .
    For a general background for the menu the image should have a 4:3 size ratio in the landscape orientatikon.  For a portrait oriented photo that would mean either cropping to a 4:3 landscape ratio or creating  a 4:3 landscape canvas and putting the portrait image in the center, edgo or wherever and using the composite image.  There will be some white space but that can be filled with a color that goes with the image.
    Of course you will need to use 3rd party image editor that an handle layers or Pages.
    Some Image Editors That Support layers:
    Photoshop Elements 11 for Mac - $79
    Rainbow Painter - $30
    Imagerie - $38
    Acorn - $50
    Pixelmator - $60 
    Seashore - Free
    GIMP for Mac - Free
    Xee 2.1 - free
    You will get something like this:
    One could move the image to the right or left edge for better esthetics and have the buttons in the "white" area.
    OT

  • System Preference freezes when I want to change desktop background picture

    My system preference freezes when I try to change my desktop background picture, any help, I tried disk utility repair, couldn't find the files to trash.

    Login to the problematic account ensure that System Preferences is closed down.  Move the following file to trash:
    <home>/Library/Caches/com.apple.preferencepanes.cache
    but don't delete it from the trash yet, just in case you need to restore it.  Re-open System Preferences, it will re-create the file.  If all's well then, then you can empty the trash.

  • How do I change the background image for a single tab on the navigation bar

    I'm creating a movie website for TDKR and for the navigation bar, I intend to have a different character for each tab. However, I'm having trouble putting a single image each separate tab. Instead one image appears on each of the tabs. Here's an example of the source and CSS.
    <td width="200"><ul id="navigation"><br />
          <li><a href="../pages/index.html">Home</a></li><br />
          <li><a href="../pages/cast.html">Cast</a></li><br />
          <li><a href="../pages/pictures.html">Pictures</a></li><br />
          <li><a href="../pages/soundtrack.html">Music</a></li><br />
          <li><a href="../pages/interview.html">Interviews</a></li><br />
          <li><a href="../pages/links.html">Links</a></li><br />
        </ul>
        </td>
    #navigation {
              list-style-type: none;
              padding: 0px;
              margin: 0px;
    #navigation li {
              margin: 0px;
              padding: 0px;
              list-style-type: none
    #navigation li a:link, #navigation li a:visited {
              display: block;
              width: 200px;
              height: 100px;
              text-decoration: none;
              text-align: center;
              line-height: 100px;
              font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
              font-weight: bold;
              -webkit-transition: 1000ms ease;
              -moz-transition: 1000ms ease;
              -ms-transition: 1000ms ease;
              -o-transition: 1000ms ease;
              transition: 1000ms ease;
              color: #648AAE;
              background-repeat: no-repeat;
              background-image: url(../Images/gifs/Batman-still-2.gif);
              background-position: center bottom;
              text-transform: uppercase;
              letter-spacing: 0.79em;
              border-radius: 5px;
    #navigation li a:focus, #navigation li a:hover, #navigation li a:active {
              color: #000000;
              background-image: url(../Images/gifs/Batman-animation-2.gif);
              background-repeat: no-repeat;
              background-position: center bottom;
              background-color: #454545;
              border-radius: 25px;
    So, how do I put a single image on each tab (home, cast, pictures, etc). Thank you for your help in advance.

    Assign a class to the item and use CSS to apply an image as in
    <li><a href="../pages/index.html" class="home;">Home</a></li><br />
    <li><a href="../pages/cast.html">Cast</a></li><br />
    <li><a href="../pages/pictures.html">Pictures</a></li><br />
    <li><a href="../pages/soundtrack.html">Music</a></li><br />
    <li><a href="../pages/interview.html">Interviews</a></li><br />
    <li><a href="../pages/links.html">Links</a></li><br />
    and the CSS
    #navigation li a:link.home, #navigation li a:visited.home {
         background-image: url(../Images/gifs/Batman-still-2.gif);

  • How do I change the background color for the knockout effect in Final Cut Pro?

    One person suggested to me before to change the video player background in the preference section. It did change the color in the preview, but once I export it. It reverts back to its original color.
    I want to change the black background you see in the photo below to a white background. PERMANENTLY (meaning even after I export the video, it remains white)
    It is the knockout effect: the video is playing within the text.
    PLEASE HELP!!! It's has been frustrating me for a long time.

    FRom the Generators browser you put one of the generators underneath the video. You can use the Custom Generator and set the color to white.

  • Changing an output type for SmartForms

    Hi all,
    I have a picklist that I changed from SAPScript to SmartForm.  I am trying to edit the output type EK00 to use the SmartForm.  I am using V/38 to edit EK00 but I can't figure out the right properties.  Right now I have the FM name (/1BCDWB/SF00000017) as the Layout Module, the SmartForm name (ZPCC_PICKLST_STD) as the SmartForm.  Also, under Pricessing 1, I have the print program (ZRVADEK01), FORM routine as (SMARTFORM_PRINT) and Form as (ZPCC_PICKLST_STD).  Is there anything else that I need to change?  When I try to use EK00 it is still looking for a SAPScript instead of a SmartForm.
    Regards,
    Davis

    Matt, thanks for the reply.  I just tried what you posted and it still gives me an error.  I get a popup that says "WRITE_FORM is invalid, OPEN_FORM is missing.
    Could my problem be that the old SAPScript and the new SmartForm have the same name?  Below is the configuration:
    Layout Module:  <b>nothing there</b>
    SmartForm:  <b>ZPCC_PICKLST_STD</b> (name of the smartform)
    Processing 1:
    Program: <b>ZRVADEK01</b>
    FORM routine: <b>SMARTFORM_PRINT</b>
    Regards,
    Davis
    EDIT:  I do not have any SAPScript functions (open_form, close_form, etc...) in the print program.  I took the preconfigured print program for SDPIK_L (preconfigured picklist) and added our custom logic.
    Message was edited by:
            Davis

Maybe you are looking for

  • Installing RAM to imac G4 flat panel

    How difficult/dangerous to the computer's wellbeing is it to replace the factory-installed RAM oneself? Apple recommends bringing it to an authorized service (I assume because this model is tricky to open), but the Apple store will only do the instal

  • Developer 6.0 report

    Hi, all my reports generated with report 3.0(dev/2000 2.1) as landscape mode work correctly,but when i move to dev. 6.0 report it doesn't print in landscape mode as before. Pls,can you help me to soleve this problem..

  • Sent Mail Doesn't Show

    I have a gmail account setup for Apple Mail and I sent messages forward to my sent folder on gmail's site but not for Apple Mail. They don't show up immediately or after a few hours of lag. I have my account setup to save sent mails for a month. How

  • How to create Photo Album - Smugmug?

    Hi, I've been playing around with Photo Albums lately using PS CS, & DW's Fireworks version. They all work fine but I really like the way Smugmug is designed. The layout works well, and I'd like to create something similiar for my images. Any thought

  • Calling a web service with two tables

    Hello all,      I am having a problem calling a web service in VC which has data of the format order and orderitems. that is I have a record of information a recordset is part of that information. Please point to any blogs or any info available on SD