Changing NAME property of Action object

Hi everyone,
I have a JButton and JMenuItem both associated with the same Action object so that they both have the same text and perform the same action. The action alternates between starting and stopping a background process, and I want my button and menu item to update their text accordingly.
The only way I can see to do this is to use putValue("NAME", "Start"). I can get the source of the event, which appears to return the button I press, but (AbstractButton)(e.getSource()).setText() returns a syntax error, and I'm unsure that would change the text of both components anyways. Also, calling validate on the JFrame that contains the button, as I do in the code below, has no effect.
Any help anyone can give will be greatly appreciated. Here is my code:
import javax.swing.*;
import java.awt.event.ActionEvent;
public class StopAction extends AbstractAction {
        private FrmMain main;
        public StopAction(FrmMain main, String text){
                super(text);
                this.main = main;
        public void actionPerformed(ActionEvent e) {
                if (main.isBackgroundThreadsRunning()) {
                        main.stopThreads();
                        this.putValue("NAME", "Start");
                        main.validate();
                } else {
                        main.startThreads();
                        this.putValue("NAME", "Stop");
                        main.validate();
}

Quit multi-posting: http://forum.java.sun.com/thread.jspa?messageID=10095997
If you make a mistake when posting then respond to the second posting so we don't get discussions in multiple postings.

Similar Messages

  • Error when I put a component in the stage and I change any property

    Hello
    I'm using Flash CS4, as3 and adobe air file. I have an application with 3 scenes, first scene to login, second to set up, and third to see an video.
    The problem is that, when I put a component in the second or third scene, if a change any property in the component inspector, any property it gives me error. So put the component and I change property by code in as3.
    But I'm doing things with FLVPlayback component, and now before enter the scene gives me error, the solution will be to get the original properties, but I don't remember, I could install other time Flash CS4, but I can do that for any componet, better know the solution.
    For example, I have an as file who is the class named p.e. MyMainclass, and in the scene3, I put FLVPlayback, who default values it's the last I used (I don't remember default after instalation), if any code in as3, it gives me this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at com.program::MyMainClass/__setProp___id2__scene3_myvideo1_1()[com.program.MyMainClass::__ setProp___id2__scene3_myvideo1_1:7]
    I remove this component, I put another one I never used, it doesn't give me error, I change any property in the object inspector, p.e. color, it gives me error, I change to original property again, and then NO ERROR.
    Thanks in advance

    I would reccomend that you not use scenes for that purpose, not exactly sure why  but scenes are unreliable. Try putting all of your content in one scene, one timeline and just add a few stop() 's at the end of each "scene", then in your code remove scene2 and scene3 three references, and you'll possibly need to change frame anchors/targets also if you have them.
    The error indctates that you have called an object that does not exist at the time the code is run, check where you placed your code, should be frame one, scene1, and also check if you have objects entering the stage down the timeline, that do not enter in frame 1, possibly the movieClip? if so add another keyframe on your actions layer on the same frame as the object and enter the call function for it there.

  • Changing the default .name property value for data object

    Hi.. I'm rendering a pdf form with attachments through Java APIs. When I attach a file, the .name property (cName parameter) is assigned automatically. I want to attach a file by specified name because I'm tracking these attachments later on the form, is there any way I can do it?
    Thanks in advance.
    Sunaif

    What api are you using?
    Can you post a few lines of code?
    Jasmin

  • How do I change the name property of a file in a document library?

    I am trying to come up with an Event Receiver that will change the name property of an file when it is uploaded. For instance when a file is uploaded into a document Library, currently the Title is being generated (which is fine)...I want to be able to
    change the "Name" property from whatever it is, to match exactly what is in the "Title" property. Are there any sample codes/blogs out there that I can take a look at? Has anyone  had any experience doing this? It seems like something
    that should be straight forward, to change the "Name" property to match what is in the "Tilte" property.

    Hi,     
    You can try the code below which use the SPFile.MoveTo() function to change the name of the file.
    EventFiringEnabled = false;
    SPFile f = properties.ListItem.File;
    string spfileExt = new FileInfo(f.Name).Extension;
    f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
    "/" + properties.ListItem["Title"]+ "_new" + spfileExt);
    f.Update();
    EventFiringEnabled = true;
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5cafb8e4-bb85-4147-9bda-4ab42a4d4817/sharepoint-2013-event-receiver-to-rename-files-not-working?forum=sharepointdevelopment
    A link about rename uploaded file using Event Receiver for your reference:
    http://paulgalvinsoldblog.wordpress.com/2008/01/25/quick-easy-rename-uploaded-file-using-sharepoint-object-model-via-an-event-receiver/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Cognos iView Name Property not changing

    Hello,
    I have some Cognos iViews that was imported into the portal.  These iViews are pretty much similar to other SAP iViews with the addition of some CPS properties which is Cognos specific.  I'm able to change the name of the iView but the change did not apply to the PCD object or at run time.  The Name property shows the changed name but just didn't apply.
    Upon looking into this further and wondering where the default name is coming from, it seem to be set at the ID level.  I went to change the ID and seen the property where you change the object name but it's greyed out.  I believe that's because the SAP Portal version that we're on.  So, I'm unable to change this property.
    First off, is there a way to override the defualt property object name setting?
    Secondly, if no to the first question, is there a way to activate the object name setting so it can be changed?

    Thank you very much for that suggestion.  That process worked!
    I did have to export the role in the PCD to XML and then edit the instance of the iView's name to be a space.  I was then able to re-import the role with out any problem. 
    If anyone else runs in to this, make sure that you set all properties on the object you need to re-name <u>before</u> you export it.  Otherwise as soon as you open the object you'll get the same error.
    Next I am going to create a ticket with SAP about this problem.  I can see why they would not want to allow a null value in a property but they should allow a space.
    Thanks again,
    Steve

  • How to change the name of a Box Object in Crystal Reports 2008

    I am trying to change the name of a box object in a crystal report - 2008. This report was originally developed by consultants and requires that certain boxes be named according to a specific naming convention. I am making a change to the report and need to add a box with a name that matches the naming convention.  This is so some program functionality will work for the new box.  I can't contact the consultants because they don't work with our company anymore.
    Does anybody have any ideas? I've tried 'Format Box', but it won't let me change the name from there. I also tried it in the Report Explorer but to no avail.
    Thanks,
    Joanne

    Hi Joanne,
    Boxes do not actually have a 'name'. When you add a Box in a report, it will be called 'Box 1' by default. And the only place this name is visible is under the Report Explorer.
    Or do you mean to say 'Text Object'?
    -Abhilash

  • Error: Error #2078: The name property of a Timeline-placed object cannot be modified.

    Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
        at flash.display::DisplayObject/set name()
        at RonaldTest_fla::MainTimeline/frontWheelLoadComplete()
    The code that triggers that bogus error is the following:
    var frontWheelLoader:Loader = new Loader();
    frontWheelLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, frontWheelLoadComplete);
    frontWheelLoader.load(new URLRequest("FrontWheel.png"));
    function frontWheelLoadComplete(event:Event):void
        var loadedImg:Bitmap = new Bitmap();
        loadedImg = event.target.content;
        loadedImg.name = "My Loaded Image";          // bugging line
        var kontainer:MovieClip = new MovieClip();
        kontainer.addChild(loadedImg);
        addChild(kontainer);
    Any ideas?
    Regards,
    Ron

    I swear to God, I don't. I have tried many different names, but to no avail ...
    var loadMe:Loader = new Loader();
    loadMe.contentLoaderInfo.addEventListener(Event.COMPLETE, loadIsNowcomplete);
    loadMe.load(new URLRequest("Snowfighter.jpg"));
    function loadIsNowcomplete(event:Event):void
        var abcdefghijklmnopqrstuvwxyz:Bitmap = new Bitmap();
        abcdefghijklmnopqrstuvwxyz = event.target.content;
        abcdefghijklmnopqrstuvwxyz.name = "MyLoadedImage";            // bugging line
        var kontainer:MovieClip = new MovieClip();
        kontainer.addChild(abcdefghijklmnopqrstuvwxyz);
        addChild(kontainer);
        trace("content: " + kontainer.getChildAt(0).name);  // instance8
        theTween.addTarget(abcdefghijklmnopqrstuvwxyz, 1);

  • Changing of R/3 PS Object Names affects BW reporting

    Hi all
    Would like to ask for some help on PS Objects in R/3 and BW. Current we are running BW 3.0B in Production, and we hit this issue on PS objects. In R/3, names for PS objects such as Project Definition, WBS Element, Network Activity and Network Activity Element can be changed by the R/3 users. This posed a problem to BW, as it could not recognize the changes made to the PS Object name and unable to reflect it correctly in BW. It will subsequently bring in the PS transaction data as a separate line item for the same object multiple times, and this causes reporting problems in BW.
    From what I can search in the SDN and OSS, it looks like it is a design problem with the WBS and Project Definition (OSS Note 739182). I tried some solution recommended at this thread (WBS Updates in R/3 not Key in BW) and it helps 0PROJECT and 0WBS_ELEMT, by pulling the internal key into the 0PROJECT and 0WBS_ELEMT characteristics and placing the external key to the 0PROJECT_EX and 0WBS_EX characteristics. This solution works in testing, but when it comes to Network Activity and Network Activity Element, we were stumped again.
    We do allow R/3 users to change the Network Activity and Network Activity Element in R/3 system, as it is part of the business process. This posed a problem, because unlike Project Definition and WBS, Network Activity and Network Activity Element does not have internal or external ID. They also don't have characteristics similar to 0PROJECT_EX and 0WBS_EX. On the other hand, we cannot stop users from changing the Network Activity and Network Activity Element in R/3.
    Thus, does anyone have any good idea which can cater for Network Activity and Activity Element? Should we customize/enhance both the characteristics to include external IDs (like WBS and Project Definition) and use a conversion routine (such as WBSEL)?
    Thanks alot for your help!! Appreciate your time spent on this. Cheers...
    Chris

    Well you can either overwite a key figure in a cube or add to it
    ie
    for the same physical key to a ODS per datasouce in the update rules you can have this scenarion
    <key to ods>  value
    ..                   100
    now if for the same key we get 300 you can do this
    overwrite
    <key to ods>  value
    ..                   300
    or this
    addition
    <key to ods>  value
    ..                   400

  • On the login screen on my mac says a property name, the laptop changed hands and I'd like to change the property line name to my own, how do I do that?

    On the login screen on my mac says a property name, the laptop changed hands and I'd like to change the property line name to my own, how do I do that?

    Open Accounts preferences. Create a new user account with the name and username of your choosing as well as your own password. Be sure to give the new account Admin status. Log out of the old account and log into your new account. Now, delete the old account.

  • Programmatically Change a Property Node Link to Object

    Is there a way to programmatically change a "link" to an object in a property node?  I'm trying to create a user configurable front panel for a project that I'm working on, in which the user can change the caption for numerous controls and indicators.  I would like to set-up a for loop that will take information contained in a string array and change each caption accordingly, instead of having 100 different property nodes on the block diagram.  If you need anymore details, let me know and maybe I can attach a picture to the response.

    There's various ways you can do this as far as exact implementation. You will need to use something to identify which control you're dealing with. Attached is one way that uses the control's label as a lookup. You could, for example, use a default caption instead to make it more apparent to the user which control they're specifying to change.
    Attachments:
    change captions.vi ‏20 KB

  • Can I change the name of manual action

    Can I change the name of manual action to the user account's or some definitive name.
    <ManualAction id='1' name='displayCreateUserForm' timeout='30' syncExec='true'>
    I tried name='$(user.accounts[Lighthouse].lastname)', but of no use?
    Any help please?
    G

    This is for requestor's review pending actions list. In our create user workflow, all the pending forms(incomplete create tabbed user form) are referred as manual actions.
    If the requestor stops the create user form without completing it, it gets into his/her review pending action list as
    -displayCreateUserfrom
    -displayCreateUserform
    and does not specify who the user account form that was incomplete.
    <ManualAction name='displayCreateUserForm' timeout='30' syncExec='true'>
    <Owner>
    <ref>WF_CASE_OWNER</ref>
    </Owner>
    <FormRef>
    <ObjectRef type='UserForm' name='OND-UserForm-TabbedCreateUser'/>
    </FormRef>
    </ManualAction>
    HTH
    Gopi

  • How to change the name of an action

    I have defined a AbstractAction and I am wanting to change the name of the action. How can I do this. setName(String name) does not work either. This is what I am doing.
    private class BrowseButtonAction extends AbstractAction
          public BrowseButtonAction(  )
             super("Browse");
           * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
          public void actionPerformed( ActionEvent evt )
             JFileChooser fch = new JFileChooser();
             if ( evt.getSource(  ) == btnBrowseLogo ) {
                //don't change name b/c it's already correct
             } else if ( evt.getSource(  ) == btnBrowseDirectory ) {
                 //set name of action to "BrowseDirectory"
             }else if(evt.getSource() == btnLoadFile){
                //set name of action to "Load";
    }I am assigning this action as follows:
    JButton btnBrowseDirectory  = new JButton(new BrowseButtonAction());
    JButton btnLoad = new JButton(new BrowseButtonAction());
    JButton btnBrowseLogo = new JButton(new BrowseButtonAction());

    Make a BrowseButtonAction constructor that takes a String. Then, pass that String to super instead of always passing "Browse".

  • Getting the name of the Action that runs this script

    If I create a action in photoshop to run a script called "test script", How can I determine within the "test script" what action name started running this script?  I'm trying to write a script to scale my images.  The scaling will be determined by what Action ran this script.
    Example
    Action Names are 5x7, 4x6, 8x10
    Eash action above will run the same script called "scale me"
    Within "scale me", the java code will determine that 4x6 started running "scale me"
    "scale me" will go to the section within the java code to scale the image loaded in Photoshop to a 4x6 size.
    The reason for writing the "scale me" code this way is that I can maintain only one script to scale my images.
    Any suggestions or help would be appreciated.
    Raymond

    Thanks for all your comments.  Micheal, I took your code for the "ActionReference()" object and it works great!  I completed my code and it is working okay (some more testing needed).
    *  My Scaling Impage Script  */
    var docRef = app.activeDocument;  //Pointer to current opened document
    finish:
    if (documents.length == 0)      // Check to see if image opened if not, error message
                alert('There are no opened images\r\r' +"Exiting Script");
                break finish;
    var savedState = docRef.activeHistoryState      // Save the history state
    var originalUnit = preferences.rulerUnits   // Save the existing ruler perferences - units
    var ref = new ActionReference();  //Pointer to current selected Action
    ref.putEnumerated( charIDToTypeID("Actn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );  // Point to selected Action
    var desc = executeActionGet(ref);
    var actionName = desc.getString( charIDToTypeID("Nm  ") );  // Get Name of seclected Action
    var actionSetName = desc.getString( charIDToTypeID("PrNm") ); // Get Group the selected Action belongs to
    var actionnumber = 100;    //actionname =  100  (No Action Defined as default)
    var portraitorienation = 0;  // Orientation default to portrait
    var resolutions = 300;  // resolution default to 300
    var sizeh = 999999;  // default size
    var sizew = 999999;  // default size
    var resolution = 300;
    var scaleup1 = 0;  //enlargement
    var scaleup2 = 0;  //enlargement
    var scaleflag = 0;
    var scaleflagg = 0
    //  Assumption is the long side is always defined in sizeh
    if (actionName=="4 x 5") { actionnumber =0;  sizeh = 1535; sizew = 1228;}
    if (actionName=="4 x 6") { actionnumber =1;  sizeh = 1842; sizew = 1228;}
    if (actionName=="5 x 7") { actionnumber =2;  sizeh = 2149; sizew = 1535;}
    if (actionName=="6 x 9") { actionnumber =3;  sizeh = 2127; sizew = 1842;}
    if (actionName=="8 x 10") { actionnumber =4;  sizeh = 3020; sizew = 2416;}
    if (actionName=="8 x 12") { actionnumber =5;  sizeh = 3624; sizew = 2416;}
    if (actionName=="11 x 14") { actionnumber =6;  sizeh = 4228; sizew = 3322;}
    if (actionName=="12 x 18") { actionnumber =7;  sizeh = 5436; sizew = 3624;}
    if (actionName=="12 x 24") { actionnumber =8;  sizeh = 7248; sizew = 3624;}
    if (actionName=="12 x 36") { actionnumber =9;  sizeh = 10872; sizew = 3624;}
    preferences.rulerUnits = Units.PIXELS
    var doch = parseInt (docRef.height);
    var docw = parseInt (docRef.width);
    scaleflag = doch-docw;
    if ( doch > docw ) { scaleflagg =1}
    if  (scaleflagg == 0)
                    portraitorienation = 1;  // Landscape Orientation
                    //alert("Seclected Landscape")
                    //alert(doch+" Height" +docw +" Width")
    var scale1 = docw - sizeh
    var scale2 = doch - sizeh
    if (docw > sizeh) {scaleup1=1}
    if (doch > sizeh) {scaleup2=1}
    // We know know what action was started (What size to scale to and the orientation - Landscape or Portrait)
          //      alert ( "Current selected action is: "+actionName+"\r\rin the action set: "+actionSetName +"\r\rAction Number is " +actionnumber +"\r\rDeminsions are (HxW):  "  +sizeh +", "+sizew );
            if (portraitorienation == 1)   //landscape if true
                            if (scaleup1 == 1)
                                            alert ( "This Photo is landscape\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizew +", "+ sizeh + "\r\r"  + "Reduction");                               
                                            docRef.resizeImage (sizeh, undefined, resolution, ResampleMethod.BICUBICSHARPER)  // Reduction in size
                            else
                                            alert ( "This Photo is landscape\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizew +", "+ sizeh + "\r\r"   + "Enlargement");                                       
                                            docRef.resizeImage (sizeh, undefined, resolution, ResampleMethod.BICUBICSMOOTHER)  //Enlargement in size
            else  // portrait
                        if (scaleup2 ==1)
                                            alert ( "This Photo is Portrait\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizeh +", "+ sizew + "\r\r"  + "Reduction");                                                 
                                           docRef.resizeImage (undefined, sizeh, resolution, ResampleMethod.BICUBICSHARPER)
                            else
                                            alert ( "This Photo is Portrait\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizeh +", "+ sizew + "\r\r"   + "Enlargement");
                                            docRef.resizeImage (undefined, sizeh, resolution, ResampleMethod.BICUBICSMOOTHER)
    preferences.rulerUnits = originalUnit  // Restore ruler perferences - units
    My script is a single file that is run by the Actions, I've created for each size and each action runs the same script.  When the script runs, it determines via "ActionReference();" what the current selected Action name is and then applies the scaling.  This script has logic for landscape and portrait and will scale using the different algorithms (bicubic xxxx) depending if it is reducing the image or enlarging.   The parametersfor the scaling is long side and constraint proportions.
    So if I have to add another size to the code, all I need to do is to add one line of code to the script, copy any of the existing Actions and rename the copied Action to the size and I am done.
    I'm not a experience programmer so pls don't laugh at my coding but have done some C, C++, Fortran (Yes I'm an electrical engineer) in my days.  A number of things has stumped me abit and one of them was the use of arrays which didn't work for me too well.  I was to use the array for storing my parameters of each size.  Another one that really got me puzzled was the use of the docRef = activeDocument object.  The docRef.height and docRef.width will tell you the dimensions of the document based on the units set for rules.  I set mine for pixels.  The problem I had was the statement if(docRef.height > docRef.width) { do some stufff}.  If I change the  > to < for the same document it alway gives me a "true" logical.  After some thoughts today, I suspect that true is anything not 0 and false is only 0.  I will try this out tonight.  This theory does not fit well with my understanding on how the if statement works in other languages.  Any comments on this would be appreciated.
    Oh and I noticed some extra code var declarations that is not needed such as the activeHistoryState - was determining if I need to use this or the perferences.rulerunits to restore my ruler perferences and apparently the activeHistoryState does not and forgot to remove from the code.

  • Setting property for multiple objects?

    Adobe Pro X; ES2
    I need to set the access property for multiple objects based on the selection of a radio button group. I assume I have to use resolveNodes(), but cannot for the life of me get it to work. Here's what I've played with :
    if (this.rawValue == "1") { 
    xfa.resolveNodes("OtherCase_gp.[*]").access = "open";     
    } else {  
    xfa.resolveNodes("OtherCase_gp.[*]").access = "readOnly";
    If I use Action Builder, I get endless lines of "oTargetField = this.resolveNode("OtherCase_gp.OtherCaseOther_cb"); oTargetField.access = "readOnly";" There must be a better, more efficient way to do this!

    Hi,
    Here's another way to try;
    var fields = xfa.resolveNodes("OtherCase_gp.#field.(name.substring(0,9) == 'OtherCase')");
    for (var i = 0; i < fields.length; i++)
        fields.item(0).access = (this.rawValue == "1") ? "open" : "readOnly";
    This approach will only work if your fields are all under OtherCase_gp, Radzmar's solution is more general if your form has a more complicated hierarchy.
    Regards
    Bruce

  • What is SAP name space for different objects.

    Hi Guys,
    Kindly let me know the SAP name spaces for different objects.
    Thanks

    hi,
    Naming Conventions in ABAP Objects 
    Global classes and interfaces that you create in the Class Builder are stored in the class library and administered by the R/3 Repository: they therefore have the same namespace as all other Repository objects (database tables, structures, data elements, and so on).
    It is therefore necessary to have naming conventions for object types and their components and to use them uniformly within program development.
    The following naming convention has been conceived for use within the SAP namespace:
    If you do not observe the naming conventions for object types (classes and interfaces), conflicts will occur when the system creates persistent classes, since it will be unable to generate the necessary co-classes.
    Namespace for Components
    A single namespace within a class is shared by:
    All components of the class itself (attributes, methods, events, constructors, interfaces, internal data types in the class, and aliases)
    All public and protected components of the superclasses of the class.
    Method implementation has a local namespace. The names of the local variables can obscure those of class components.
    Naming Convention
    The naming convention has been kept as general as possible to avoid adversely influencing the naming of objects.
    General Remarks
    When you choose names for development objects, you should:
    Use English names
    Use glossary terms when possible
    For example, CL_COMPANY_CODE instead of BUKRS
    In compound names, use the underscore character (_) as a separator. Since names are not case-sensitive, this is the only character that you can use to separate names.
    Example: CL_COMPANY_CODE, CL_GENERAL_LEDGER_ACCOUNT
    Names should describe the action, not the implementation of the action.
    Example: PRINT_RECTANGLE, not RECTANGLE_TO_SPOOL
    Conventions for Object Types
    Class and interface names in the class library belong to the same namespace as data elements, tables, structures, and types. They are maintained centrally in table TADIR.
    Class in the class library
    CL_<class name>
    The class name should be made up of singular nouns.
    CL_COMPANY_CODE, CL_GENERAL_LEDGER_ACCOUNT
    Interfaces in the class library
    IF_<interface name>
    The same naming convention applies to interfaces as to classes.
    IF_STATUS_MANAGEMANT, IF_CHECKER
    Local classes in programs
    (recommendation)
    LCL_<class name>
    The class name should be made up of singular nouns.
    LCL_TREE_MANAGEMENT
    Local interfaces in programs
    (recommendation)
    LIF_<interface name>
    The sane naming convention applies to interfaces as to classes.
    LIF_PRINTER
    Recommended naming conventions are not compulsory. However, if you use prefixes for these class and interface names, you should use those listed above.
    Conventions for Components
    Method name
    <method name>
    Method names should begin with a verb:
    GET_STATUS, CREATE_ORDER, DETERMINE_PRICE
    Events
    <event name>
    Event names should have the form
    <noun>_<participle>:
    BUTTON_PUSHED, COMPANY_CODE_CHANGED, BUSINESS_PARTNER_PRINTED
    Local type definitions within a class
    (recommendation)
    TY_<type name>
    TY_INTERNAL_TYPE, TY_TREE_LIST
    Data definitions (variables)
    <variable name>
    When you name variables within a class (CLASS-DATA or DATA), avoid using verbs at the beginning of the name (to avoid conflicts with method names).
    LINE_COUNT, MARK_PRINTED, MARK_CHANGED, STATUS
    Data definitions (constants)
    (recommendation)
    CO_<constant name>
    CO_MAX_LINE, CO_DEFAULT_STATUS, CO_DEFAULT_WIDTH, CO_MAX_ROWS
    Recommended naming conventions are not compulsory. However, if you use prefixes for these class and interface names, you should use those listed above..
    Concrete Method Descriptions
    Attribute access
    SET_<attribute name>, GET_<attribute name>
    Methods that access attributes of any kind should be prefaced with GET_ or SET_.
    GET_STATUS, SET_USE_COUNT
    Event handler methods
    ON_<event name>
    Methods that handle events should begin with ON, followed by the name of the event that they handle.
    ON_BUTTON_PUSHED, ON_BUSINESS_PARTNER_PRINTED
    Methods that perform type conversions
    AS_<new type>
    AS_STRING, AS_ISOCODE
    Methods that return a Boolean value
    These methods may not return any exceptions.
    Recommendation: Use SPACE and 'X' to represent false and true respectively.
    IS_<adjective>
    IS_OPEN, IS_EMPTY, IS_ACTIVE
    Check methods
    CHECK_<objective>
    CHECK_AUTHORIZATION, CHECK_PROCESS_DATE
    Local Conventions Within Methods
    For parameters
    The parameters are regarded from the point of view of the method that implements them:
    IMPORTING parameters
    IM_<parameter name>
    EXPORTING parameters
    EX_<parameter name>
    CHANGING parameters
    CH_<parameter name>
    RESULT
    RE_<result>
    Using prefixes is NOT compulsory. However, if you do use them, use those listed above.
    For exceptions
    The following table contains a series of possible exception names, that can also be used generically (for example, NOT_FOUND could also be used as DATE_NOT_FOUND)
    EXCEPTION
    Meaning
    ACTION_NOT_SUPPORTED
    The requested action or function code is not supported.
    CANCELLED
    If a method uses a dialog to find out what has to be dome (for example, a list of choices), and the user chooses "Cancel", you can set this exception.
    EXISTING
    A new object that you want to create already exists in the database.
    FAILED
    The method could not be executed because of the current environment. This exception is intended for cases where the method cannot be executed because of variable system circumstances.
    ..._FAILED
    Part of the method could not be completed because of the current environment. (OPEN_FAILED, CLOSE_FAILED, SELECTION_FAILED, AUTHORIZATION_FAILED)
    FOREIGN_LOCK
    Data is locked by another user.
    INCONSISTENT
    Object data in the database is inconsistent.
    ..._INCONSISTENT
    The component data for … of an object in the database is inconsistent.
    INVALID
    The object data entered is incorrect (for example, company code does not exist). Compare NOT_QUALIFIED.
    ..._INVALID
    The component data entered for an object is incorrect. Compare NOT_QUALIFIED.
    INTERNAL_ERROR
    Last resort. Only use this exception if you cannot be more precise about the nature of the error.
    NOT_AUTHORIZED
    The user does not have the required authorization.
    NOT_CUSTOMIZED
    The object requested is not correctly customized.
    ..._NOT_CUSTOMIZED
    The component … of the requested object is not correctly customized.
    NOT_FOUND
    Unable to find the requested object.
    ..._NOT_FOUND
    Unable to find component … of the requested object.
    NOT_QUALIFIED
    The combination of input parameters is insufficient to run the method. Compare INVALID.
    ..._NOT_QUALIFIED
    One parameter of the method is not qualified.
    NUMBER_ERROR
    Error assigning a number.
    SYSTEM_ERROR
    This exception is set if the Basis system returns an unexpected error message.
    regards,
    sudheer.

Maybe you are looking for

  • More than one iPod with more than one user

    Sorry if this has been asked and answered before. I searched and can't find it. I have an iPod Nano and my daughter has an iPod 30GB. We both had our own laptops which each had iTunes downloaded onto. Well, my daughter's laptop is no longer working.

  • "This wav file could not be read"

    I have a DL project with 30 timelines. It has been playing and burning fine for the last 4 months--I've just been tweaking menus and replacing some of the assets with newer encodes. Yesterday when I attempted to preview I got the message "this wav fi

  • Spotlight SOMETIMES searches mail, but mail.app shows no results

    Hi folks,   I've been anxiously waiting for the Mavericks release, hoping it would, once-and-for-all, fix this aggravating issue I've had with spotlight mail searches. I recently carried out a full wipe-and-reinstall on my iMac, by creating a bootabl

  • Unwanted Auth. PopUps

    Hello Community, shortly after having implemented a pair of S650s we started to run into problems with unwanted auth. popup windows that would appear every now and then. Even though we have already opened a ticket and the Support Team is working hard

  • Strange behavior in Preps 5 after Security Update 2012-001

    After installing Security Update 2012-001 this morning, my Save dialog box no longer appears in Preps 5.0. Another iMac running 10.6.8 that was not updated has no problems. Any ideas how to fix this or a workaround?