Dynamically change icon name of push button

Hi,
I would like to ask how to dynamically change the icon name attribute of a push button in dialog programming. What is the syntax for assigning an icon name during runtime?
I am currently doing a multiple selection function for KNA1-KUNNR.
Initially, the icon name is ICON_ENTER_MORE. When the user picks up more than one customer, it should automatically change to ICON_DISPLAY_MORE. How can I do this?
here's the code i currently have:
DESCRIBE TABLE kunnr_ran LINES l_kunnr.
IF l_kunnr > 1.
      g_add_multiple = 'X'.
  BT_MULT_CUST-icon_name = 'ICON_DISPLAY_MORE'.
ELSEIF l_kunnr = 1.
     CLEAR g_add_multiple.
  BT_MULT_CUST-icon_name = 'ICON_ENTER_MORE'.
ENDIF.
The name of my pushbutton is BT_MULT_CUST.
The code in ** is not correct. I don't know the syntax in SAP. But that is how it is done in VB for example.
Thank you.
che =)

If you have not found your answer already, please try the following:
1)  In screen layout painter: for the pushbutton in question (i.e. pb_multi_select), mark the "Output field" on the program attributes tab in the attributes window for the pushbutton.  Make sure that its visible length is at least 2 too.  This will "gray out" the "Text" and other fields.
2) In the TOP INCLUDE of the module program:  add a variable for the pushbutton that is of type "icons-text" and don't forget to include <icons>.  Below is an example
INCLUDE <icon>
DATA: pb_multi_select TYPE icons-text.
3) In a module called in the PBO modules for the screen that needs its button changed, call the function "ICON_CREATE" and pass at minimum the name of the icon and the field that you specified in step 2.  Below is an example using the icon "ICON_DISPLAY_MORE", "ICON_ENTER_MORE", and a flag variable "MULTI_SEL_INFO_EXISTS" that indicates if any multiple selection information has already been entered.  It would be set by the program (not automatically, but by coding) prior to the "IF" statement:
IF multi_sel_info_exists = 'X'.
  CALL FUNCTION 'ICON_CREATE'
      EXPORTING
         name = 'ICON_DISPLAY_MORE'
      IMPORTING
         result = pb_multi_select.
ELSE.
  CALL FUNCTION 'ICON_CREATE'
      EXPORTING
         name = 'ICON_ENTER_MORE'
      IMPORTING
         result = pb_multi_select.
ENDIF.
You can change the button as you see fit with multiple different calls inside of "IF" or "CASE" statements.  Please see documentation for "ICON_CREATE" for other parameters.
Hope this helps,
Brian

Similar Messages

  • Can we change the name of reassign button in sharepoint 2010 approval workflow?

    can we change the name of reassign button in sharepoint 2010 approval workflow?
    Shazil Ali

    Yes, we can change it. Steps are as follows: 1. Create the workflow in SharePoint Designer 2010 2. Use Start Approval Process action 3. Write your logic and all setting as per you requirement and then publish the workflow once. 4. After this, click on
    the workflow name and there you will see the sections as Workflow Information, Customization, Settings, Start Options, Forms. Here you will see a form under Forms section with a name of Approval_x00....... with a type "Task". Click on this form. This form
    is an Infopath form that opens up when a task is to be edited (Task Form). This form will open up in Infopath (provided you have Infopath installed on your system) It may ask you the crendentials for security. 5. The task form will open up in Infopath for
    editing. Click on the Reasign button and in the top left corner in the ribbon section is the field (Label) having text as "Reassign Task". Change this and then save and publish the form.Publish the workflow once again.

  • Dynamically change plot names

    Hello,
    How can I dynamically change the names of different plots on a single graph.  I would like to do it on the attached VI.
    Thanks,
    hiNi
    Solved!
    Go to Solution.
    Attachments:
    multiplot graph_for discussion[1].vi ‏25 KB

    Use active plot and plot name properties. For example if you had three plots and an array of three names, you could do the following:
    Message Edited by altenbach on 02-13-2009 10:41 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    plotNames.PNG ‏4 KB

  • Dynamically changing the name of the .dll file to load in call Library

    Our current model is to use dll files as "plug-in" modules for instruments and a top layer test step calls the appropriate driver dll.
    For instance
    the TestStep is called with the kenmore.dll passed as a parameter so the kenmore.dll file is loaded, the functions are registered and the functions are called.  Next the TestStep is called with whirlpool.dll as a parameter now the whirlpool.dll is loaded the functions are registered and the functions are called.  This works very well in our current CVI/LabWindows environment.  Now we plan to work with LabView, we wish to retain this model (as DLL files, there are advantages in our model for us).  We have not found a way to load these dll files from LabView without hard coding the path and filenames in.
    Any suggestions on how to dynamically change the path in the Call Library module, or another suggested method of loading the dll via LabView?
    Thanks,

    John Stuart wrote:
    Our current model is to
    use dll files as "plug-in" modules for instruments and a top layer test
    step calls the appropriate driver dll.
    For instance
    the TestStep is called with the kenmore.dll passed as
    a parameter so the kenmore.dll file is loaded, the functions are
    registered and the functions are called.  Next the TestStep is
    called with whirlpool.dll as a parameter now the whirlpool.dll is
    loaded the functions are registered and the functions are called. 
    This works very well in our current CVI/LabWindows environment. 
    Now we plan to work with LabView, we wish to retain this model (as DLL
    files, there are advantages in our model for us).  We have not
    found a way to load these dll files from LabView without hard coding
    the path and filenames in.
    Any suggestions on how to dynamically change the path in the Call
    Library module, or another suggested method of loading the dll via
    LabView?
    Thanks,
    As Ben has pointed out LabVIEW
    scripting may be a possibility but you are going with that in highly
    unsupported area. Also I happen to know that changing the library name
    of a Call Library Node through scripting has produced unsupported
    feature errors previous to LabVIEW 7.1 eventhough the method was there.
    And LabVIEW 8 hides the whole scripting business behind the license
    manager.
    Another approach at least if the different DLLs do not change to often
    thier functions and parameters would be to create a wrapper DLL. Have
    it a method that loads the desired DLL and links its functions to
    internal function pointers. Then when calling the actual function entry
    points just redirect directly to the correct fucntion through that
    function pointer. Since you are already working in CVI creating such a
    DLL should be only a matter of taking out a little bit of your already
    existing code and put it into a DLL project.
    Rolf Kalbermatter
    Message Edited by rolfk on 04-12-2006 07:40 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How do I change a name of a button in a Flash movie?

    Hello everybody,
    I'm newbie with Flash and I have a problem.
    I have a flash movie, which I want to use as a header for a website. When I play the movie, I have 5 different buttons on it. When I open through Flash the .fla file it shows me that there is one button copied 5 times.
    How do I change the name in one of the buttons in the movie, I want when I play the movie, to have a different name on the button, but I don't understand from where do I change the name, if all the buttons I have in the .fla file has the About me name, I suggest the name is the same because all the buttons does the same effect when you go over them.
    I would appreciate some help!

    I'm assuming you mean you want to change the label that displays on the button when you run the file.  Flash allows for a variety of ways to approach a design, so there is no ready-made answer.  If all of the buttons appear to be the same in the fla file, then chances are they are getting their labels from actionscript code.
    What you probably need to do is look thru the actionscript code that might be in the first frame or so of the timeline.  You can identify frames containing actionscript because they what appears to be a lower case "a" in them.  If you click on such a frame and open the Actions window, you will see the actionscript code.  Look for any code that has the button labels you see when you run the file.
    You might also have some other file(s) that came with the fla, such as an .as file or a .xml file.  If so, you may need to look in these files also.

  • Issue with Icons display in PUSH BUTTONS in forms 11g

    Hello,
    This is regarding an issue with the icons background for the push buttons in the forms 11g. When we enable the icons for the buttons (.gif) they are visible on the
    top left corner of the buttons and not in the centre. In one of the forums it was written like this is a common problem in Forms 11g. Is there any way by which we can
    centralize this icons on the Forms buttons. Also I have heard that image editing tools can be used to centralize the icons. I tried with one of the tools but it seems
    like it is not working.
    Can somebody suggest a workaround for this?
    Thanks in Advance
    Ram

    I will assume you are attempting to use the images included in the Forms applet jar. These images are purposely structured so that the subject is off-centered. You should not see that same behavior if you use your own images or edit the ones built-in to Forms. However, keep in mind that the images packaged in the Forms applet jar are intended to be used in a menu toolbar and not custom buttons.
    For more information, refer to MyOracleSupport note 1391073.1 where I explain this in detail.
    Michael Ferrante
    Senior Principal Support Engineer
    Forms Global Technical Lead
    Oracle Corporation
    .

  • Change Icon Name In App Library ?

    Is it possible to change the name of an Icon in a given Library ??
    If possible, how can I do that ?
    Thank You,
    G

    Thank You.
    That helps.   I was also thinking of one icon in the Library folder and then change the next one.  Each of the Icon on the Library are different, and I will continue to make them different.
    Could you also indicate the subject title in the user manual for me to confirm that I am looking correctly.  
    Thank You !!!!!!!!!
    G

  • Dynamically changing the name of a page item

    Hello,
    I'd like to dynammically change the name/label of a page item depending on the user who logged in to the system.
    On my home page, there's a navigation region with some list entries in it. Currently its title is "Configuration".
    If a specific user signs on, I'd like to change that title to "Reporting". How can I manage to implement such a behaviour.
    I tried to get some results by using dynamic actions, but I couldn't get it working.
    Thanks for your help in advance!

    >
    I'd like to dynammically change the name/label of a page item depending on the user who logged in to the system.Create a hidden item called PXX_LABEL (where XX is your page number).
    Set the value of the hidden item via a PL/SQL process (when page loads, or when user logs in, or whatever).
    In the "Label" field of the actual item, enter &PXX_LABEL. (notice the dot at the end).
    When running the page, the label will dynamically be set to the value of the hidden item.
    - Morten
    http://ora-00001.blogspot.com

  • [Awesome] dynamically change tag names?

    Is there a way to change the name of a tag displayed in the tag box widget during run time?, I dont really want dynamic tagging, but it is a solution if none other exist.

    There's two patches for awesome that provide dynamic tagging; Eminent and Shifty.
    See on the Archlinux wiki page for awesome: https://wiki.archlinux.org/index.php/Aw … ic_tagging
    EDIT: Ah, I see that you'd like to rename existing tags... don't know if there's a way to do that, but it could be a feature of either Eminent or Shifty.
    EDIT2:  Aaaaand, it looks like Shifty offers a tag creation/rename prompt in the task list, so that should do what you want
    Last edited by snk (2011-09-05 18:09:57)

  • PI/XI transport dynamic change of names - MESCLNT005 - MEQCLNT005 - MEP

    Hi,
    When transporting directory objects the auto generated channals GeneratedReceiverChannel_IDoc for sending idocs to from and to R/3 is normaly changed from MESCLNT005 -> MEQCLNT005 -> MEPCLNT005. But now when transporting a scenario this dynamic change is not done. What can be wrong?
    BR
    Claes

    Hi,
    The problem is that they are not renamed. They keep the MESCLNT005 eaven when it is transported to the quality system. But when transporting other scenarios it gets renamed from MESCLNT005 -> MEQCLNT005.
    Thank you for trying to help.
    BR
    /C

  • Dynamically Change icon (like iCal icon) (iPhone OS 3.1)

    I'd like to be able to change the icon in a tab bar to reflect the current date...rather, I'd like to have a background image, with the date as a number on top of that—basically what the iCal icon on OS X does. Is there a way to create the number on that icon, or is this not possible?

    musicwind95 wrote:
    when I create the new tab, how do I know which one it's replacing?
    I'm not sure you've seen the view hierarchy yet. Are you sure you set the "View Mode" switch to the Center position in the MainWindow.xib window (see the instructions for displaying the small-icon view hierarchy in my May 22 post).
    If you're looking at the hierarchy (with all the nodes of the tree expanded), note each view controller owns a UITabBarItem object. This point is often misunderstood, since we see the tab bar items on the tab bar. But each tab bar item is a child of its controller, and the address of the tab bar item is stored in the 'tabBarItem' property of that controller. So when we replace the tab bar item in this line of the example:
    - (void)awakeFromNib {
    self.tabBarItem = tabItem;
    We're setting the 'tabBarItem' property of 'self' to the address of a new tab bar item. Therefore we're changing the tab bar item for the controller which received the awakeFromNib message. If that controller is connected as the first child of the tab bar controller, we'll be changing tab bar item #1. If that controller is the second child, we'll be changing tab bar item #2, etc.
    Of course if more than one view controller is an instance of the same custom class, e.g. FirstViewController is the class for both the first and third controllers, the tab bar items for both #1 and #3 will be reset when the respective controllers receive the awakeFormNib message. In that case we'd need a way to know whether 'self' was the address of the first or third controller. That could be done in several ways. For example, we could tag each controller's original tab bar item in IB. Then we might do something like the following to ensure the item replacement code only runs for the controller object which owns tab bar item #1:
    - (void)awakeFromNib {
    if (self.tabBarItem.tag == 1) {
    // replace tab bar item
    Once again, the above if-condition would only be needed if the first controller and one or more other controllers were of the same class.
    Would this code be better off in the app delegate or the view controller?
    The code belongs in a method of the view controller which wants its tab bar item to be replaced.
    I've created the tab bar in IB (or rather, I started with a Tab Bar template), so I don't have a view controller for the tab bar itself.
    Referring again to the small-icon view hierarchy in the MainWindow.xib window, note the tab bar is connected directly to the tab bar controller. The tab bar controller is the controller for the tab bar.
    ... In at least two of the tabs that I'm working in, I'm displaying a table view that leads to a navigational hierarchy. How would I set that up?
    This time it's essential to be able to see the small-icon view hierarchy in the MainWindow.xib window. So please follow the instructions in my May 22 post in case you haven't done so already. Next, follow these steps (which assume tabs 3 and 4 will each bring up a table view under a nav bar which is controlled by a nav bar controller):
    Add a new UIViewController subclass in Xcode for the tab 3 controller. Check both Options so the new class will be a subclass of UITableViewController, and a matching XIB file will be created;
    Name the subclass ThirdViewController (name it whatever you want, but the class will be referred to as ThirdViewController here);
    Open MainWindow.xib, make sure the XIB window is visible (Window->Document) and its View Mode switch is in the Center position, then expand the small icon tree so you can see all the view controllers under the Tab Bar Controller;
    Drag a UINavigationController object into the XIB window, and drop it onto the Tab Bar Controller icon. If you only had two controllers to start with, the Nav Controller object should now be in the last (3rd) position. If you already had a third controller, drag the Nav Controller icon to place it under the second controller. The Nav Controller icon should now be in the third position;
    Expand the Nav Controller subtree, and select the Root View Controller icon;
    Open the Identity Inspector and set the Class of the Root View Controller to ThirdViewController;
    Open the Attributes Inspector and set the Nib Name to ThirdViewController;
    If you checked "With XIB for user interface" when making the ThirdViewController class in the first step, ThirdViewController.xib should already be setup correctly; i.e. File's Owner will be set the ThirdViewController class, the 'view' outlet of File's Owner will be connected to a Table View object, and the Table View's delegate and dataSource outlets will be connected to File's Owner;
    Open ThirdViewController.xib, select the Table View and locate the Simulated User Interface Elements group;
    Set Top Bar to Navigation Bar. This optional setting will paint a dummy nav bar in the Table View editor window and cause the size of the Table View to be adjusted to fit. The dummy nav bar is just a placeholder for the real one which will be created at runtime. You can't place controls on the dummy bar; it's just to help you see how the screen will look;
    Repeat the above steps to add a nav controller at position 4, making a FourthViewController class for the root controller;
    If you now have too many tab positions, you can delete each extra controller by selecting its icon and selecting Edit->Delete.
    That should complete the project skeleton, and you should now be able to Build and Go. You won't see the table views though, until you set up the data source methods in the respective controller implementations.
    - Ray

  • Change the name of decision button in SWBP

    Hi ,
    I copied the standard workflow. I Want to change the button name when it appears in SWBP.
    Currently is says, "Sent back for corrections" i need to change it to "Rejected".
    I went to the task -> outcome and change NAme field. I ran SWU_OBUF but the new desctiption is not getting effected any ideas on what am doing wrong or what i need to do?
    thanks you

    Hello,
    The change will only take effect for workitems created after the change.
    Also, you have to change the value in the Decision tab, not the Outcomes tab.
    regards
    Rick Bakker
    hanabi technology

  • JSF dynamically changing components name or id.

    I have a question that I am trying to find an answer.
    I have a dataTable setup and in each column, I have a select table.
    I would like to give these components specific names for each occurrence. For example:
    <h:dataTable id="serverTable" rowClasses="data" border="0" value="#{serverBean.serversData}" var="server">
    <h:selectOneListbox id="testCS" value="#{server.newImageName}" onchange="setDescr(this)" size="1">
    <f:selectItems value="#{server.imageList}" />
    </h:selectOneListbox>
    </h:dataTable>
    I want to do something list change the above line to
    <h:dataTable id="server.serverName" rowClasses="data" border="0" value="#{serverBean.serversData}" var="server">
    How would I do this..
    I would like the output to look like:
    <select id=�brasil�>

    </select>
    <select id=�oreo�>

    </select>
    Instead of
    <select id=�serverTable�>

    </select>
    <select id=�serverTable�>

    </select>
    Thanks
    Eric

    i think the easy way to do this would to use the forceID myfaces component
    http://myfaces.apache.org/tomahawk/forceId.html

  • Changing Workgroup name by pushing registry setting

    I'm looking for an registry key or adm file or windows 2000 group policy
    sothat i can change the PC's workgroup name (OS = Windows 2000) by means
    of Zfd 3.2.
    I tried finding the setting by using Snapshot, but no result

    > I tried finding the setting by using Snapshot, but no result
    A workgroup is not only a name, it is a peer-to-peer network
    and all members must hold information about one another.
    See this for instance:
    http://tinyurl.com/3zzm2
    Scroll down to:
    "Peer-to-peer Network Environments"
    All Workgoup information is stored in the local SAM-database.
    You can not snapshot that.
    AFAIK you can only change Workgroup manually.
    Regards
    Rolf Lidvall
    Swedish Radio (Ltd)
    NSC SysOp

  • How to dynamic change Step Name?

    I have a step inside For Loop. I would like that step have different name related to loop Number. how do I do it?
    For example
    In Test stand,
    for i=0; i++;i<10
    stepnamei
    end
    So in this way, If the step fail, I could know on which loop it fails.
    Please advise on it.

    Hi,
    try this example
    link
    Regards
    Ray FarmerMessage Edited by Ray Farmer on 04-04-2005 07:47 AM
    Regards
    Ray Farmer

Maybe you are looking for