Dynamic User Decision Texts

1. Is there a way to configure WF for Dynamic user decision texts? Depending on a flag I might want the user to have two decisons like "Accept" or "Reject" or in some cases three decisions like ""Accept" or  "Reject" or "Cancel" or etc etc.
2. If the above is not possible, can I have maybe 4 fixed User decision texts and dynamically enable or visible them as I need. For example I can have "Accept" or  "Reject" or "Cancel", but I may need on ""Accept" or  "Reject", so make Cancel invisible..Is this possible..
Thanks a lot in advance..I will award points..
Amlan

You need to program the outcomes in the method and handle these in the workflow. The standard user decision step allows you multiple and good thing is you don't need to program anything but just handle it in the workflow.
Why don't you give it a try and see for yourself?
Regards
Ravi

Similar Messages

  • Dynamic user decision outcomes

    Dear Experts,
    We need to offer a different choice of user decisions according to the actual agent who is processing the decision step. (SAP release ECC 6.0)
    i.e., if the agent is a manager, they get  4 options - "approve/reject/view/leave in inbox" - if the agent is an administrator they get 3 options - "forward to manager/view/leave in inbox".
    The workflow would be much simpler if this can be achieved using a single user decision.
    Is it possible to activate/deactivate the user decision outcomes dynamically like this? (perhaps by defining a method to run before work item execution in the Methods tab of the user decision?)
    Many thanks,     Ben

    Hi,,
    >The workflow would be much simpler if this can be achieved using a single user decision
    anything can possible in workflow , if u want single creation UD then
    create like this
    If you are Manager
    Approve
    Reject
    ---View
    ---Leave in inbox
    If you are Administator
    ---Forward to manager
    ---View
    ---Leave to Inbox
    ok now you got it, or else
    create two UDs if you feel free to create it like this,
    check the user manager/admin
    and then put the condition if manager then send seperate UD
    if Admin then send seperate UD.
    Thanks and Regards,
    Prabhakar Dharmala

  • Urgetn - User Decision Text in logon language

    Hi,
      I am using a user decision step in my workflow with the workitem text 'Select one of the following'. I want to <b>display the text in logon language .</b>
    Can anyone tell me how to do this???
    Thanks,
    Sivagami

    Hi,
    As I thought if I metion as 'Urgent' it will be answered quickly. Hereafter I wont do this...
    Do we need to do the specified setting for each user separately? Is there any other way of doing it all together?
    Also will this setting also applicable for workflow in the logon language??
    Also the setting is changing only the translated texts & not the standard text like 'Cancel and keep workitem in inbox'.
    Thanks,
    Sivagami
    Message was edited by:
            sivagami rathinam

  • User Decision step- Upon reject, auto-popup text for reason

    In a user decision step, when the user clicks the reject button, open text for rejection reason within the workitem.
    i have done the following
    1) Create a new step
    2) Create a task based on SOFM.CREATE
    3) Binded  WIOBJECT_ID => (append table) ADHOCOBJECTS
    It works fine, when the user clicks the reject button a new work item with the reason for rejection lands in the user inbox, which when clicked brings up the doc.
    I want to make it seamless for the user where as soon as the reject button is clicked, the document <b>should open right away</b> without a new work item in the inbox
    Any help will be greatly appreciated

    Hi
    If you are using the portal/UWL then search the blogs for a solution otherwise give this a try, in your step definition for the 2 steps, go to the Details tab and tick 'Advance with dialog', this will work if you execute from the business workplace.
    Good Luck!
    Ravi

  • Solutions for User Decision step- Upon reject, auto-popup text for reason

    Execute user Decision workitem, when user click reject button, open text for rejection reason within the workitem.
    Ideally, for the auto-pop text , we need a descriptive header and user can enter reject reason. Text must be added before the workitem can be saved.
    Any thoughts.
    Thanks a lot.

    yes, on the SOFM.Create-Task use a dataflow from the WIOBJECT_ID => (append table) ADHOCOBJECTS
    This will popuplate this rejection to the hyperlink-section of the workflow.
    You may also activate the outcome-even "user-cancelled" in the workflow definition (or by copying the coding to your own method that could do it) and loop around back to the user decision if he cancels the document create (which I found out is sometimes a problem for the users).
    I also have made the experience that it is quite the same effort and more convenient if you design a complete user-driven screen. Then you have full control of that issue. I always use a small dialog box with a textEdit-Control where the users have to enter their rejection reason.
    I then create my own ZWFNOTE-Object and append this to the ADHOCOBJECT. This usually works very fine.
    with kind regards,
       Florin

  • How to Including custom text in the step "User Decision"

    Hi All
    Please help me in this regards I got problem
    How to Including custom text in the step "User Decision"
    Regards
    Poonam
    Edited by: Julius Bussche on Feb 2, 2009 1:59 PM
    Please use the corect forum, meaningfull subject titles and use the search before asking questions

    Hi Poonam,
    If I understood your problem correctly...
    When you create a user decision a screen will appear.
    In the decision tab under Title you can give your custom text.
    Even if you want to give some variable (value of which will be determined at runtime) you can give that as well.
    Like you have created a container for BOR objects MAT_DETAIL, in that object there is a field MATERIAL.
    You can define your custom text as below:
    Title: Would you like to create new material or display material &
    Parameter 1:  &MAT_DETAIL.MATERIAL&;
    In Title you can give as max. as 4 &(ampersand). And each & will be replaced by each Parameter at runtime in same sequence.
    In parameters you use to select the container defined by you earlier.
    Hope this will help.

  • Dynamic name for attachment in User Decision

    Hi...
    I have a requirement wherein the name of the attachment in the user decision has to be populated dynamically. I am using the same BO method for user decision but is triggering 2 different objects. Please advice on how to achieve this.
    Scenario - I am using BUS2081 for Invoice and for Credit Memo. If the credit memo is created, the approver has to see the name of the attachment as Credit Memo xxxx and if an invoice is created, he has to see the attachment as Invoice xxxx. As standard, whatever object is created, the attachment name is Incoming Invoice xxxx (name of the BO Object Bus2081).
    Warm Regards,
    Jubish Jacob

    The object name is static but the default attribute can be changed (use a z-subobject and delegate back) so you can do something like this: instead of: incoming invoice(object name) 12345(invoice number - default attribute) you will have document(new object name) incoming invoice/credit memo 12345(document type & number concatenated - a new default attribute)
    Another option - I think credit memos have an object (BUS2094) or you can create one - in the task have both object types in the container, when its a credit memo transfer only the credit object when it's an invoice transfer only the invoice object.

  • Body of text for User Decision

    Hi Experts,
    In my scenario while sending user decision mail for approve or cancel, here I need to send mail with body of text
    Like :
    Scheduling agreement number: &PURCHSCHEDAGREEMENT.PURCHASINGDOCUMENT&
    Scheduling agreement date:
    Material Description:
    Rejected by:
    Rejection reason:
    Now I can include subject of mail using parameters (decision tab).
    But here I am not able to include body of text.
    Please any one can suggest solution for this.
    Advance Thanks,
    Regards,
    BBC

    Hi Suresh,
    Thanks for your quick replay.
    As suggested, yes I can see the container, here only it is showing few things like adhoc_objects, attach_objects, Wi_group_id, work_item, and note reference.
    I need to get values from scheduling agreement relevant methods and all...
    In work flow I can call the scheduling agreement methods relevant container parameters in other steps.
    Please can you suggest how to see what ever available methods and all in workflow?
    Regards,
    BBC

  • How to dynamically change the text of a TextObject with embedded DataField?

    Hi
    I'm trying to dynamically change the text of a TextObject at runtime, by using the .NET library. My problem is that if one or more DatabaseFieldDefinition is embedded inside my text, I'm unable to change the "static text" only, by keeping the field, e.g. I have :
    Text1 => "Contact Name: {Contact.Name}"
    and I'd like to change it to anything else like:
    Text1 => "Nom du Contact: {Contact.Name}"
    Half of my TextObject is static text while second part comes from the dataset.
    (of course the translation is dynamic - it is called at run-time and the new value to be set depends on the calling application language)
    If I simply modify the Text property of my TextObject, the {Contact.Name} embedded field is not evaluated anymore by the Crystal Engine, but considered as a single text.
    Using formulas or parameters looks quite difficult, because it means having many ones just for translation needs - I cannot control the way my users will create their reports and "force them" to use complex methods just in order to put a text and a value together...
    Anyone knows how to deal with that ?

    Only way I can think of doing this:
    1) Create a formula (call it lang) and enter the string "Contact Name" in it
    2) Place the  {Contact.Name} field next to the string
    3) So now you have:
    ContactName:  {Contact.Name}
    4) Check what localization you are after. If you need "Nom du Contact", change the lang formula so it shows "Nom du Contact" using the code below:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    I realize this may not give you consistent spacing as the translations may have strings of differnt length. Perhaps someone has other idea(s)...

  • JTable - Dynamic wrapping of text in a cell.

    Hello,
    Can anyone tell me how to dynamically wrap the text in a particular cell of a JTable if it is to long to be displayed on one line? I don't care if it affects the row height. Basically, I have a table with 3 columns, the thrird of which is a "notes" column and allows up to 500 characters to be displayed. When the text is too long the table truncates it with an elipsis (...) and the user can't see the rest. I would like the text to wrap within the cell (even if the height has to change) so that the user can read the entire note more easily.
    Thank you,
    G Poole

    You should probably repost this in the swing forum

  • Help needed, Createing Dynamic User input

    Hello,
    I am attempting to create some dynamic user input by "predicting" what the user requires in a text box.
    For example if the user enters "Smi" I have a select list pop up which gives the user all options that begin with "Smi".
    I am able to achieve the popups but the interface is quite jerky and not terribly responsive I am trying to solve this by using a thread which starts and stops when new input is received but it is still not quite right.
    The program uses a Sorted TreeSet to hold the data (I thought this would give me a quick search time) and a simple interface at this stage.
    Any help would be fantastic
    Thanks in advance :P
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
       /** This program represents part of a larger user interface for allowing the
       user to select data from a file or database.
       <p>
       When the program starts up, it will read in data from a given file, and hold
       it in some type of container allowing rapid access.
       <p>
       The user may then type in the first few letters of the surname of a person,
       and this program should immediately present in a popup dialog the names which
       match.  The user will be able to click on one of the names in the popup and
       that will cause all data about that person to be displayed in the JTextArea
       at the bottom of the window.
       <p>
       This program requires the FormLayout.class, FormLayout$Placement.class, and
       FormLayout$Constraint.class files in the same directory
       (folder) or in its classpath.  These is provided separately.
    class PartMatch extends JFrame implements Runnable
                        /** Close down the program. */
       JButton quitbtn;
                        /** Field for the surname. */
       JTextField namefld;
                        /** Full details of the person(s). */
       JTextArea  results;
                        /** Popup dialog to display the names and addresses which
                        match the leading characters given in namefld. */
       Chooser matches;
                      /** Default background color for a window. */
       final static  Color            defBackground = new Color(0xD0C0C0);
                      /** Default foreground color for a window. */
       final static  Color            defForeground = new Color(0x000000);
                      /** Default background color for a field */
       final static  Color            fldBackground = new Color(0xFFFFFF);
                      /** Default background color for a button */
       final static  Color            btnBackground = new Color(0xF0E0E0);
       final static  Color            dkBackground = new Color(0xB0A0A0);
                      /** Larger font */
       final static  Font bold = new Font("Helvetica", Font.BOLD, 30);
       TreeSet members;
       String input;
       String[] found;
       public static void main(String arg[])
          UIManager.put("TextField.background",fldBackground);
          UIManager.put("TextField.foreground",defForeground);
          UIManager.put("TextField.selectionBackground",btnBackground);
          UIManager.put("TextArea.background",fldBackground);
          UIManager.put("TextArea.foreground",defForeground);
          UIManager.put("TextArea.selectionBackground",btnBackground);
          UIManager.put("Panel.background",defBackground);
          UIManager.put("Label.background",defBackground);
          UIManager.put("Label.foreground",defForeground);
          UIManager.put("Button.background",btnBackground);
          UIManager.put("Button.foreground",defForeground);
          UIManager.put("CheckBox.background",defBackground);
          UIManager.put("ScrollBar.background",defBackground);
          UIManager.put("ScrollBar.thumb",btnBackground);
          UIManager.put("ComboBox.background",btnBackground);
          UIManager.put("ComboBox.selectionBackground",dkBackground);
          PartMatch trial = new PartMatch(arg);
       public PartMatch( String [] arg )
          super("Part Match");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          Container cpane = getContentPane();
          FormLayout form = new FormLayout(cpane);
          JLabel lab1 = new JLabel("Fetch details") ;
          lab1.setFont( bold );
          form.setTopAnchor( lab1, 4 );
          form.setLeftAnchor( lab1, 4 );
          JLabel lab2 = new JLabel("Surname: ") ;
          form.setTopRelative( lab2, lab1, 4 );
          form.setLeftAlign( lab2, lab1 );
          namefld = new JTextField( 30 );
          form.setBottomAlign( namefld, lab2 );
          form.setLeftRelative( namefld, lab2, 4 );
          namefld.addCaretListener( new CaretListener()
             public void caretUpdate(CaretEvent e)
                 showMatches();
          quitbtn = new JButton( "Quit" );
          quitbtn.addActionListener( new ActionListener()
             public void actionPerformed(ActionEvent e)
                quitProcessing();
          form.setBottomAlign( quitbtn, namefld );
          form.setLeftRelative( quitbtn, namefld, 15 );
          results = new JTextArea( 10,50 );
          results.setEditable(false);
          JScrollPane jsp = new JScrollPane( results,
                                     JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                                     JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
          form.setTopRelative( jsp, lab2, 6 );
          form.setLeftAlign( jsp, lab2 );
          form.setBottomAnchor( jsp, 5 );
          form.setRightAnchor( jsp, 5 );
          form.setRightAnchor( quitbtn, 5 );
          matches = new Chooser( this );
          //matches.setUndecorated(true);
          pack();
          setVisible(true);
          namefld.requestFocus();
          if (arg.length > 0) init(arg[0]);
          else init("triathlon.txt"); //<<<<<<<<<<<<<<<< Place the default filename here
          /** Called once only, at the end of the constructor, to read the data
            * from the membership file.
       public void init( String fname )
          members = new TreeSet();
           try {
               FileReader fr = new FileReader(new File (fname));
               Scanner scan = new Scanner(fr);
               trimember cmem;
               String cLine, eTag, memberNo, first, last, gender, yob, tel ,addr,
                       club;
               while(scan.hasNextLine())
                   cLine = scan.nextLine();
                   Scanner scan2 = new Scanner(cLine);
                   scan2.useDelimiter(";");
                   eTag = scan2.next().trim();
                   memberNo = scan2.next().trim();
                   first = scan2.next().trim();
                   last = scan2.next().trim();
                   gender = scan2.next().trim();
                   yob = scan2.next().trim();
                   tel = scan2.next().trim();
                   addr = scan2.next().trim();
                   club = scan2.next().trim();
                   cmem = new trimember(eTag, memberNo, first, last, gender, yob,
                           tel, addr, club);
                   members.add(cmem);
           catch (FileNotFoundException ex)
               results.append("Sorry can't find the input file\n");
               results.append("Please check file name and location and try again");
               ex.printStackTrace();
          /** Called every time there is a change in the contents of the text field
            * namefld.  It will first clear the text area.  It then needs to search
            * through the container of data to find all records where the surname
            * starts with the characters that have been typed.  The names and
            * addresses need to be set up as strings and placed in
            * an array of Strings.  This can be placed in the "matches" window and
            * displayed for the user, inviting one to be selected.
            * <p>
            * The performance of this is very important.  If necessary, it may be
            * necessary to run as a separate thread so that the user interface is
            * not delayed.  It is essential that the user be able to type letters at a
            * reasonable speed and not have the keystroke processing held up by
            * previous text.
       public void showMatches( )
           run();
                // First clear the text area
          //results.setText("");
                // Determine the leading characters of the surname that is wanted
                input = namefld.getText();
                // Locate the data for this name, and display each matching item
                //  in the JTextArea ...
                // Example of how to set the data in the popup dialog
          matches.list.setListData(found);
          matches.pack();   // resize the popup
                // set the location of the popup if it is not currently visible
          if ( ! matches.isVisible())
             Dimension sz = matches.getSize();
             Point mouse = getMousePosition();
             Point framepos = getLocation();
             int x=0, y=0;
             if (mouse == null)
                Point pt = results.getLocation();
                x = pt.x + 20 + framepos.x;
                y = pt.y + 20 + framepos.y;
             else
                x = mouse.x - 2 + framepos.x;
                y = mouse.y - 2 + framepos.y;
             matches.setLocation(x,y);
          matches.setVisible(true);
          namefld.requestFocus();
          /** Perform any final processing before closing down.
       public void quitProcessing( )
          // Any closing work.  Then
          System.exit(0);
        public void run()
            ArrayList<String> foundit = new ArrayList<String>();
            System.out.println(input);
            if(input != null)
            Iterator it = members.iterator();
            while(it.hasNext())
               trimember test = (trimember) it.next();
               if (test.last.startsWith(input))
                   foundit.add(test.last +", "+ test.first);
            found = new String[foundit.size()];
            for(int i=0; i<foundit.size();i++)
                found[i] = foundit.get(i);
         /** A window for displaying names and addresses from the data set which
          match the leading characters in namefld.
          <p>
          This will automatically pop down if the user moves the mouse out of the
          window.
          <p>
          It needs code added to it to respond to the user clicking on an item in
          the displayed list. */
       class Chooser extends JWindow
                /** To display a set of names and addresses that match the leading
                characters of the namefld text field. */
          public JList list = new JList();
          Chooser( JFrame parent )
             super( parent );
             Container cpane = getContentPane();
             cpane.addMouseListener( new MouseAdapter()
                public void mouseExited(MouseEvent e)
                   Chooser.this.setVisible(false);
             cpane.add("Center",list);
             list.addListSelectionListener( new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                   Chooser.this.setVisible(false);
                   System.out.println("ValueChanged");
                   // First clear the text area
                   results.setText("");
                   String in = (String) list.getSelectedValue();
                   System.out.println("Selected Value was : "+in);
                   String[] inlf = in.split(", ");
                   System.out.println("inlf[0]:"+inlf[0]+" inlf[1]:"+inlf[1]);
                   results.append("Surname \tFirst \teTag \tMemberNo \tSex \tYOB " +
                           "\tTel \tAddress \t\t\tClub\n");
                   Iterator it = members.iterator();
                   while(it.hasNext())
                       trimember test = (trimember) it.next();
                       if (test.last.equals(inlf[0])&&test.first.equals(inlf[1]))
                           results.append(test.toString()+"\n");
                   namefld.requestFocus();
          public class trimember implements Comparable
           String eTag;
           public String memberNo;
           public String first;
           public String last;
           String gender;
           String yob;
           String tel;
           String addr;
           String club;
           public trimember(String eT, String me, String fi, String la,
                   String ge, String yo, String te, String ad, String cl)
               eTag = eT;
               memberNo = me;
               first = fi;
               last = la;
               gender = ge;
               yob = yo;
               tel = te;
               addr = ad;
               club = cl;         
           //To String method to output string of details
           public String toString()
               return last + "\t" + first + "\t" + eTag + "\t" +
                       memberNo + "\t" + gender + "\t" + yob + "\t"+ tel + "\t" +
                       addr + "\t" + club;
           //Compare and sort on Last name
           public int compareTo(Object o)
               trimember com = (trimember) o;
               int lastCmp = last.compareTo(com.last);
               int firstCmp = first.compareTo(com.first);
               int memCmp = memberNo.compareTo(com.memberNo);
               if (lastCmp == 0 && firstCmp !=0)return firstCmp;
               else if (lastCmp==0&&firstCmp==0)return memCmp;
               else return lastCmp;
    }

    Please don't cross-post. It is considered very rude to do that here:
    http://forum.java.sun.com/thread.jspa?messageID=9953193

  • Help needed, Providing Dynamic User input

    Hello,
    I am attempting to create some dynamic user input by "predicting" what the user requires in a text box.
    For example if the user enters "Smi" I have a select list pop up which gives the user all options that begin with "Smi".
    I am able to achieve the popups but the interface is quite jerky and not terribly responsive I am trying to solve this by using a thread which starts and stops when new input is received but it is still not quite right.
    The program uses a Sorted TreeSet to hold the data (I thought this would give me a quick search time) and a simple interface at this stage.
    Any help would be fantastic
    Thanks in advance :P
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
       /** This program represents part of a larger user interface for allowing the
       user to select data from a file or database.
       <p>
       When the program starts up, it will read in data from a given file, and hold
       it in some type of container allowing rapid access.
       <p>
       The user may then type in the first few letters of the surname of a person,
       and this program should immediately present in a popup dialog the names which
       match.  The user will be able to click on one of the names in the popup and
       that will cause all data about that person to be displayed in the JTextArea
       at the bottom of the window.
       <p>
       This program requires the FormLayout.class, FormLayout$Placement.class, and
       FormLayout$Constraint.class files in the same directory
       (folder) or in its classpath.  These is provided separately.
    class PartMatch extends JFrame implements Runnable
                        /** Close down the program. */
       JButton quitbtn;
                        /** Field for the surname. */
       JTextField namefld;
                        /** Full details of the person(s). */
       JTextArea  results;
                        /** Popup dialog to display the names and addresses which
                        match the leading characters given in namefld. */
       Chooser matches;
                      /** Default background color for a window. */
       final static  Color            defBackground = new Color(0xD0C0C0);
                      /** Default foreground color for a window. */
       final static  Color            defForeground = new Color(0x000000);
                      /** Default background color for a field */
       final static  Color            fldBackground = new Color(0xFFFFFF);
                      /** Default background color for a button */
       final static  Color            btnBackground = new Color(0xF0E0E0);
       final static  Color            dkBackground = new Color(0xB0A0A0);
                      /** Larger font */
       final static  Font bold = new Font("Helvetica", Font.BOLD, 30);
       TreeSet members;
       String input;
       String[] found;
       public static void main(String arg[])
          UIManager.put("TextField.background",fldBackground);
          UIManager.put("TextField.foreground",defForeground);
          UIManager.put("TextField.selectionBackground",btnBackground);
          UIManager.put("TextArea.background",fldBackground);
          UIManager.put("TextArea.foreground",defForeground);
          UIManager.put("TextArea.selectionBackground",btnBackground);
          UIManager.put("Panel.background",defBackground);
          UIManager.put("Label.background",defBackground);
          UIManager.put("Label.foreground",defForeground);
          UIManager.put("Button.background",btnBackground);
          UIManager.put("Button.foreground",defForeground);
          UIManager.put("CheckBox.background",defBackground);
          UIManager.put("ScrollBar.background",defBackground);
          UIManager.put("ScrollBar.thumb",btnBackground);
          UIManager.put("ComboBox.background",btnBackground);
          UIManager.put("ComboBox.selectionBackground",dkBackground);
          PartMatch trial = new PartMatch(arg);
       public PartMatch( String [] arg )
          super("Part Match");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          Container cpane = getContentPane();
          FormLayout form = new FormLayout(cpane);
          JLabel lab1 = new JLabel("Fetch details") ;
          lab1.setFont( bold );
          form.setTopAnchor( lab1, 4 );
          form.setLeftAnchor( lab1, 4 );
          JLabel lab2 = new JLabel("Surname: ") ;
          form.setTopRelative( lab2, lab1, 4 );
          form.setLeftAlign( lab2, lab1 );
          namefld = new JTextField( 30 );
          form.setBottomAlign( namefld, lab2 );
          form.setLeftRelative( namefld, lab2, 4 );
          namefld.addCaretListener( new CaretListener()
             public void caretUpdate(CaretEvent e)
                 showMatches();
          quitbtn = new JButton( "Quit" );
          quitbtn.addActionListener( new ActionListener()
             public void actionPerformed(ActionEvent e)
                quitProcessing();
          form.setBottomAlign( quitbtn, namefld );
          form.setLeftRelative( quitbtn, namefld, 15 );
          results = new JTextArea( 10,50 );
          results.setEditable(false);
          JScrollPane jsp = new JScrollPane( results,
                                     JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                                     JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
          form.setTopRelative( jsp, lab2, 6 );
          form.setLeftAlign( jsp, lab2 );
          form.setBottomAnchor( jsp, 5 );
          form.setRightAnchor( jsp, 5 );
          form.setRightAnchor( quitbtn, 5 );
          matches = new Chooser( this );
          //matches.setUndecorated(true);
          pack();
          setVisible(true);
          namefld.requestFocus();
          if (arg.length > 0) init(arg[0]);
          else init("triathlon.txt"); //<<<<<<<<<<<<<<<< Place the default filename here
          /** Called once only, at the end of the constructor, to read the data
            * from the membership file.
       public void init( String fname )
          members = new TreeSet();
           try {
               FileReader fr = new FileReader(new File (fname));
               Scanner scan = new Scanner(fr);
               trimember cmem;
               String cLine, eTag, memberNo, first, last, gender, yob, tel ,addr,
                       club;
               while(scan.hasNextLine())
                   cLine = scan.nextLine();
                   Scanner scan2 = new Scanner(cLine);
                   scan2.useDelimiter(";");
                   eTag = scan2.next().trim();
                   memberNo = scan2.next().trim();
                   first = scan2.next().trim();
                   last = scan2.next().trim();
                   gender = scan2.next().trim();
                   yob = scan2.next().trim();
                   tel = scan2.next().trim();
                   addr = scan2.next().trim();
                   club = scan2.next().trim();
                   cmem = new trimember(eTag, memberNo, first, last, gender, yob,
                           tel, addr, club);
                   members.add(cmem);
           catch (FileNotFoundException ex)
               results.append("Sorry can't find the input file\n");
               results.append("Please check file name and location and try again");
               ex.printStackTrace();
          /** Called every time there is a change in the contents of the text field
            * namefld.  It will first clear the text area.  It then needs to search
            * through the container of data to find all records where the surname
            * starts with the characters that have been typed.  The names and
            * addresses need to be set up as strings and placed in
            * an array of Strings.  This can be placed in the "matches" window and
            * displayed for the user, inviting one to be selected.
            * <p>
            * The performance of this is very important.  If necessary, it may be
            * necessary to run as a separate thread so that the user interface is
            * not delayed.  It is essential that the user be able to type letters at a
            * reasonable speed and not have the keystroke processing held up by
            * previous text.
       public void showMatches( )
           run();
                // First clear the text area
          //results.setText("");
                // Determine the leading characters of the surname that is wanted
                input = namefld.getText();
                // Locate the data for this name, and display each matching item
                //  in the JTextArea ...
                // Example of how to set the data in the popup dialog
          matches.list.setListData(found);
          matches.pack();   // resize the popup
                // set the location of the popup if it is not currently visible
          if ( ! matches.isVisible())
             Dimension sz = matches.getSize();
             Point mouse = getMousePosition();
             Point framepos = getLocation();
             int x=0, y=0;
             if (mouse == null)
                Point pt = results.getLocation();
                x = pt.x + 20 + framepos.x;
                y = pt.y + 20 + framepos.y;
             else
                x = mouse.x - 2 + framepos.x;
                y = mouse.y - 2 + framepos.y;
             matches.setLocation(x,y);
          matches.setVisible(true);
          namefld.requestFocus();
          /** Perform any final processing before closing down.
       public void quitProcessing( )
          // Any closing work.  Then
          System.exit(0);
        public void run()
            ArrayList<String> foundit = new ArrayList<String>();
            System.out.println(input);
            if(input != null)
            Iterator it = members.iterator();
            while(it.hasNext())
               trimember test = (trimember) it.next();
               if (test.last.startsWith(input))
                   foundit.add(test.last +", "+ test.first);
            found = new String[foundit.size()];
            for(int i=0; i<foundit.size();i++)
                found[i] = foundit.get(i);
         /** A window for displaying names and addresses from the data set which
          match the leading characters in namefld.
          <p>
          This will automatically pop down if the user moves the mouse out of the
          window.
          <p>
          It needs code added to it to respond to the user clicking on an item in
          the displayed list. */
       class Chooser extends JWindow
                /** To display a set of names and addresses that match the leading
                characters of the namefld text field. */
          public JList list = new JList();
          Chooser( JFrame parent )
             super( parent );
             Container cpane = getContentPane();
             cpane.addMouseListener( new MouseAdapter()
                public void mouseExited(MouseEvent e)
                   Chooser.this.setVisible(false);
             cpane.add("Center",list);
             list.addListSelectionListener( new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                   Chooser.this.setVisible(false);
                   System.out.println("ValueChanged");
                   // First clear the text area
                   results.setText("");
                   String in = (String) list.getSelectedValue();
                   System.out.println("Selected Value was : "+in);
                   String[] inlf = in.split(", ");
                   System.out.println("inlf[0]:"+inlf[0]+" inlf[1]:"+inlf[1]);
                   results.append("Surname \tFirst \teTag \tMemberNo \tSex \tYOB " +
                           "\tTel \tAddress \t\t\tClub\n");
                   Iterator it = members.iterator();
                   while(it.hasNext())
                       trimember test = (trimember) it.next();
                       if (test.last.equals(inlf[0])&&test.first.equals(inlf[1]))
                           results.append(test.toString()+"\n");
                   namefld.requestFocus();
          public class trimember implements Comparable
           String eTag;
           public String memberNo;
           public String first;
           public String last;
           String gender;
           String yob;
           String tel;
           String addr;
           String club;
           public trimember(String eT, String me, String fi, String la,
                   String ge, String yo, String te, String ad, String cl)
               eTag = eT;
               memberNo = me;
               first = fi;
               last = la;
               gender = ge;
               yob = yo;
               tel = te;
               addr = ad;
               club = cl;         
           //To String method to output string of details
           public String toString()
               return last + "\t" + first + "\t" + eTag + "\t" +
                       memberNo + "\t" + gender + "\t" + yob + "\t"+ tel + "\t" +
                       addr + "\t" + club;
           //Compare and sort on Last name
           public int compareTo(Object o)
               trimember com = (trimember) o;
               int lastCmp = last.compareTo(com.last);
               int firstCmp = first.compareTo(com.first);
               int memCmp = memberNo.compareTo(com.memberNo);
               if (lastCmp == 0 && firstCmp !=0)return firstCmp;
               else if (lastCmp==0&&firstCmp==0)return memCmp;
               else return lastCmp;
    }Edited by: Roger on Nov 3, 2007 11:50 AM

    Please don't cross-post. It is considered very rude to do that here:
    http://forum.java.sun.com/thread.jspa?threadID=5233033&messageID=9953169#9953169

  • Container variables in User decision Step in BPM

    Hello,
    I am using User decision Step in BPM.
    When i use only text in "Title for Display" the BPM is activated successfully and Status in SXI_CACHE also shows 0.
    If I use container variables in "Title for Display" the BPM is activated successfully but status in SXI_CACHE shows 99.
    It shows the below error
    "Problem updating an integration process with object ID 073AF2C620F43E839B2903344DEE29BB. Symbol 'CE/KO' expected at position 1 in expression ''
    Please suggest.
    Thanks,
    Shabari

    Hi Shabari, did you follow the steps for declaration of variables as in [SAP help for user decisions|http://help.sap.com/saphelp_nwpi71/helpdata/en/42/c2a19fb4511d65e10000000a1553f6/content.htm]? How did you define your variable?
    Maybe discussion [in this thread|BPM activation Error in SXI_cache; can help, it is unanswered though.
    Regards, Martin

  • Dynamic user interfaces

    Hello,
    here's a little teaser for user interface experts out there:
    I wonder what kind of techniques ABAP offers for creating dynamic user interfaces.
    When talking of 'dynamic' I imagine something like an arbitrary number of 'containers' where other programs (classes f.ex.) can draw their own user interface into.
    In Java this could be realized with the container concept in swing.
    I have done some research on this topic and the results are so far:
    a plain dynpro: seems to have no dynamic at all -> not an option
    a plain dynpro with a tabstrip: in case the number of tabs CAN be set at runtime AND the subscreens CAN be drawn from inside separate classes -> a definite option otherwise not an option
    any kind of web-frontend (BSP, JSP etc.): web-frontends are not allowed by company restrictions -> not an option
    dynamic documents: I could not find many information on these yet (also not on sdn). In case that an arbitrary number of parts of the dynamic document can be created from inside separate classes -> an option otherwise not an option
    I will be happy about any further information on this topic.
    Best regards,
    Patrick Baer

    I spent some time today doing research on BSP's and built a "BSP-Viewer" embedded into the SAP-GUI. Though I like the concept of BSP's a lot (like I did already with JSP's) but company restricitions are too strict. So BSP's are out of the play.
    After the discussion I started to play around with the different containers and basically I'm quite pleased with them and the "cl_gui_container_bar" allows an arbirtary number of "subscreens" which matches my requirements.
    But as usual there's still a downside:
    I found no option to built text labels and text fields into a container. Unless this is possible I can't give this approach a chance. I already found some postings which seemed to confirm that this is in fact not possible but I can't really believe it. At least from what it looks like it seems to me that the object navigator utilizes both: splitters, containers and all the stuff AS WELL AS the "classical" elements like text boxes, labels and so on.
    Any ideas on how to combine the container concept with text fields, labels maybe whole dynpros or subscreens ?
    Best regards,
    Patrick Baer

  • Which table i will  get the  status of the User decision Result status

    Hi Experts
    Which table i will  get the  status of the User decision Result status
    (eg : Inspection completion forced )
    This i can see in QA33

    Hi jag
    Ok fine actually it is not storing in any table...these r all text symols...if u see this program MQEVAF22...U EILL GET SOME IDEA
    CALL FUNCTION 'QAST_STATUS_CHECK'
           EXPORTING
                I_OBJNR          = QALS-OBJNR
                I_STATUS         = C_STATUS_PAKO
           EXCEPTIONS
                STATUS_NOT_ACTIV = 01.
      IF SY-SUBRC NE C_RC01.
        MOVE C_KREUZ TO L_STAT_PAKO.
      ELSE.
        CLEAR L_STAT_PAKO.
      ENDIF.
    Prüfen, ob Los bestandsrelevant ist
      MOVE RQEVA-STAT_BERF TO L_STAT_BERF.
    Prüfen, ob Los auf SKIP sitzt
      CALL FUNCTION 'QAST_STATUS_CHECK'
           EXPORTING
                I_OBJNR          = QALS-OBJNR
                I_STATUS         = C_STATUS_SKIP
           EXCEPTIONS
                STATUS_NOT_ACTIV = 01.
      IF SY-SUBRC NE C_RC01.
        MOVE C_KREUZ TO L_STAT_SKIP.
      ELSE.
        CLEAR L_STAT_SKIP.
      ENDIF.
      IF QALS-STAT35 >< C_KREUZ.
    VE noch nicht getroffen !
        IF     ( QALS-OFFENNLZMK > CI_0 OR QALS-OFFEN_LZMK > CI_0 )
           AND QALS-STAT13     = C_PPKTTYP-PHPR
           AND G_ANZAHL_PPKT_LOEVM > CI_0.
    Es wurden physische Proben storniert !              PRIORITÄT 1A
            MOVE TEXT-I17 TO RQEVA-INFO_LINE.  L_TEXT_NR = 'I17'.
        ELSEIF ( QALS-STAT14 = C_KREUZ AND QALS-OFFENNLZMK > CI_0 )
          OR ( L_STAT_PAKO = C_KREUZ
               AND ( QALS-OFFENNLZMK > CI_0 OR QALS-OFFEN_LZMK > CI_0 ) ).
    Prüfung wurde abgebrochen !                         PRIORITÄT 1
          MOVE TEXT-I04 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I04'.
          MOVE C_KREUZ TO L_ICON.
        ELSEIF G_ANZ_RUECK_MK > 0.
    Es wurden Merkmale rückgewiesen  !                  PRIORITÄT 2
          MOVE TEXT-I01 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I01'.
          MOVE C_KREUZ TO L_ICON.
        ELSEIF QALS-OFFENNLZMK > CI_0 OR QALS-OFFEN_LZMK > CI_0 .
          IF QALS-OFFENNLZMK > CI_0.
    Es sind nicht alle Merkmale abgeschlossen !         PRIORITÄT 3
            MOVE TEXT-I02 TO RQEVA-INFO_LINE.  L_TEXT_NR = 'I02'.
          ELSEIF QALS-OFFEN_LZMK > CI_0.
            MOVE TEXT-I05 TO RQEVA-INFO_LINE.  L_TEXT_NR = 'I05'.
          ENDIF.
        ELSEIF QALS-WERK NE QALS-WERKVORG.
        Prüflosmenge wurde umgelagert auf anderes Werk   Priorität 4
          MOVE TEXT-I16 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I16'.
        ELSEIF QALS-LMENGEIST > QALS-LOSMENGE.
        Istmenge im Los größer als Losmenge!             Priorität 5
          MOVE TEXT-I15 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I15'.
        ELSEIF L_STAT_SKIP    = C_KREUZ.
    Prüfverzicht: Los ist geskippt !                    PRIORITÄT 6
          MOVE TEXT-I03 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I03'.
        ENDIF.
      ELSE.
    VE getroffen bzw. eingetragen
       IF     ( QALS-OFFENNLZMK > CI_0 OR QALS-OFFEN_LZMK > CI_0 )
           AND QALS-STAT13     = C_PPKTTYP-PHPR
           AND G_ANZAHL_PPKT_LOEVM > CI_0.
    Es wurden physische Proben storniert !              PRIORITÄT 1A
            MOVE TEXT-I17 TO RQEVA-INFO_LINE.  L_TEXT_NR = 'I17'.
        ELSEIF ( QALS-STAT14 = C_KREUZ AND QALS-OFFENNLZMK > CI_0 )
          OR ( L_STAT_PAKO = C_KREUZ
              AND ( QALS-OFFENNLZMK > CI_0  OR QALS-OFFEN_LZMK > CI_0 ) ).
    Prüfung wurde abgebrochen !                         PRIORITÄT 1
          MOVE TEXT-I04 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I04'.
          MOVE C_KREUZ TO L_ICON.
        ELSEIF L_STAT_PAKO EQ SPACE
           AND ( QALS-OFFENNLZMK > CI_0 OR QALS-OFFEN_LZMK > CI_0 ).
    Es sind noch Langzeitmerkmale zu bearbeiten !       PRIORITÄT 2
          MOVE TEXT-I05 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I05'.
        ELSEIF L_STAT_BERF = C_KREUZ AND QALS-STAT34 EQ SPACE.
    Los ist bestandsmäßig noch nicht entlastet !        PRIORITÄT 3
          MOVE TEXT-I06 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I06'.
        ELSEIF QALS-WERK NE QALS-WERKVORG.
        Prüflosmenge wurde umgelagert auf anderes Werk   Priorität 4
          MOVE TEXT-I16 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I16'.
        ELSEIF QALS-LMENGEIST > QALS-LOSMENGE.
        Istmenge im Los größer als Losmenge!             Priorität 5
          MOVE TEXT-I15 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I15'.
        ELSEIF L_STAT_SKIP = C_KREUZ.
    Prüfverzicht: Los ist geskippt !                    PRIORITÄT 6
          MOVE TEXT-I03 TO RQEVA-INFO_LINE.    L_TEXT_NR = 'I03'.
        ENDIF.
      ENDIF.

Maybe you are looking for