Change Canvas Name of a field dynamically

Hi i want to know can we change a Canvas Name of a field dynamically ?
My requirement is that  i have "Street Name"  fields in many forms. Now i need to introduce a button next to "Street Name" field so that if "Street Name" values are available in LOV, then user can click on the Button and it will go the Street Master. Now problem is that "Street Name" Field is available in many forms. It would be too difficult to create a each field in each form. So instead of it i want to do it dynamically. If we can change a Field's (Item) canvas name dynamically then i think we achieve it.
Thanks

From my knowledge, we cant change a canvas name dynamically.. Below are the possible properties we can change. You can get these from forms online help
property
    The property you want to set for the given item. Possible properties are:
ALIGNMENT The text alignment (text and display items only). Valid values are ALIGNMENT_START, ALIGNMENT_END, ALIGNMENT_LEFT, ALIGNMENT_ CENTER, ALIGNMENT_RIGHT. See the Justification Property for more information.
AUTO_HINT Determines if Oracle Forms will display help hints on the status line automatically when input focus is in the specified item. Valid values are PROPERTY_TRUE and PROPERTY_FALSE. See Display Hint Automatically Property.
AUTO_SKIP Specifies whether the cursor should skip to the next item automatically when the end user enters the last character in a text item. Valid only for a text item. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
BACKGROUND_COLOR The color of the object's background region. The property value is a reference to an RGB value such as r191g223b191.
BORDER_BEVEL Specifies the item border bevel for the specified item instance. Valid values are RAISED, LOWERED, or PLAIN (unbeveled).
Note: You cannot set BORDER_BEVEL if the item's Bevel property is set to None in Oracle Forms.
CASE_INSENSITIVE_QUERY Specifies whether query conditions entered in the item should be case-sensitive. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
CASE_RESTRICTION Specifies the case restriction applied to any text entered in the indicated text item. Valid values are UPPERCASE, LOWERCASE, or NONE.
CONCEAL_DATA Specify the constant PROPERTY_TRUE if you want the item to remain blank or otherwise obscured when the end user enters a value. Specify the constant PROPERTY_FALSE if you want any value that is typed into the text item to be visible.
CURRENT_RECORD_ATTRIBUTE Specifies VARCHAR2 name of the named visual attribute used when an item is part of the current record. If the named visual attribute does not exist, you will get an error message.
CURRENT_ROW_BACKGROUND_COLOR The color of the current record's background region.
CURRENT_ROW_FILL_PATTERN The pattern to be used for the current record's fill region. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
CURRENT_ROW_FONT_NAME The font family, or typeface, that should be used for text in the current record. The list of fonts available is system-dependent.
CURRENT_ROW_FONT_SIZE The size of the font, specified in points.
CURRENT_ROW_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning).
CURRENT_ROW_FONT_STYLE The style of the font.
CURRENT_ROW_FONT_WEIGHT The weight of the font.
CURRENT_ROW_FOREGROUND_COLOR The color of the current record's foreground region. For items, the Foreground Color attribute defines the color of text displayed in the item.
DIRECTION Specifies the layout direction for bidirectional objects. Valid values are DIRECTION_DEFAULT, RIGHT_TO_LEFT, LEFT_TO_RIGHT.
DISPLAYED Specifies whether the item will be displayed/enabled or hidden/disabled.
ECHO Specifies whether characters an end user types into a text item should be visible. When Echo is false, the characters typed are hidden. Used for password protection. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
ENABLED Specifies whether end users should be able to manipulate an item. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
Note: Setting Enabled to false will cause other item property settings to change.
FILL_PATTERN The pattern to be used for the object's fill region. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
FONT_NAME The font family, or typeface, that should be used for text in the object. The list of fonts available is system-dependent.
FONT_SIZE The size of the font, specified in hundredths of a point (i.e., for a font size of 8 points, the value should be set to 800).
FONT_SPACING The width of the font, that is, the amount of space between characters (kerning).
FONT_STYLE The style of the font.
FONT_WEIGHT The weight of the font.
FOREGROUND_COLOR The color of the object's foreground region. For items, the Foreground Color attribute defines the color of text displayed in the item. The property value is a reference to an RGB value such as r191g223b191. Foreground color is always ignored for scrollbars.
FORMAT_MASK Specifies the display format and input accepted for data in text items.
HEIGHT Specifies the height of the item.
HINT_TEXT Specifies the item-specific help text displayed on the message line at runtime. If the text specified is NULL, the original hint text, specified in Oracle Forms, will be restored.
ICON_NAME Specifies the file name of the icon resource associated with a button item having the Iconic property set to YES.
IMAGE_DEPTH Specifies the depth of color to be applied to an image item.
INSERT_ALLOWED In a new record, allows end user to insert items normally when set to PROPERTY_TRUE. Specify PROPERTY_FALSE to specify that the item does not accept modification, but is displayed normally (not grayed out). (Insert_Allowed does not propagate changes to the Enabled property.)
ITEM_IS_VALID Specifies whether the current item should be considered valid. Set to PROPERTY_TRUE or PROPERTY_FALSE.
ITEM_SIZE Specifies a width and height for the item as two numbers separated by a comma. Use the syntax that includes x, y.
KEEP_POSITION Specifies whether the Keep Cursor Position property should be true or false. When Keep Cursor Position is true, the cursor returns to the same position it was in when it left the text item. When Keep Cursor Position is false, the cursor returns to the default position in the text item. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
LABEL Specifies the VARCHAR2 string that you want displayed as the label of the item. This property is only valid for items that have labels, such as buttons.
LOCK_RECORD_ON_CHANGE Specify the constant PROPERTY_TRUE if you want the record to be locked when this item is changed. Specify the constant PROPERTY_FALSE if you do not want the record locked when this item is changed. Use primarily when connecting to a non-ORACLE data source that does not have row-level locking.
LOV_NAME Specify the VARCHAR2 name of an LOV to be associated with the given item. If the LOV name does not exist, you will get an error message.
MERGE_CURRENT_RECORD_ATTRIBUTE Merges the contents of the specified visual attribute with the current row's visual attribute (rather than replacing it).
MERGE_TOOLTIP_ATTRIBUTE Merges the contents of the specified visual attribute with the tooltip's current visual attribute (rather than replacing it).
MERGE_PROMPT_VISUAL_ATTRIBUTE Specifies the named visual attribute that should be applied to the prompt at runtime.
MERGE_VISUAL_ATTRIBUTE Merges the contents of the specified visual attribute with the object's current visual attribute (rather than replacing it).
MOUSE_NAVIGATE Specifies whether Oracle Forms should navigate and set focus to the item when the end user activates the item with the mouse. Specify the constant PROPERTY_TRUE if you want the end user to be able to navigate to the item using the mouse. Specify the constant PROPERTY_FALSE if you want a mouse click to keep the input focus in the current item.
NAVIGABLE Specify the constant PROPERTY_TRUE if you want the end user to be able to navigate to the item using default keyboard navigation. Specify the constant PROPERTY_FALSE if you want to disable default keyboard navigation to the item. (Keyboard Navigable does not propagate changes to the Enabled property.)
NEXT_NAVIGATION_ITEM Specifies the name of the item that is defined as the "next navigation item" with respect to this current item.
POSITION Specify the x, y coordinates for the item as NUMBERs separated by a comma. Use the syntax that includes x, y.
PREVIOUS_NAVIGATION_ITEM Specifies the name of the item that is defined as the "previous navigation item" with respect to this current item.
PRIMARY_KEY Specify the constant PROPERTY_TRUE to indicate that any record inserted or updated in the block must have a unique characteristic in order to be committed to the database. Otherwise, specify the constant PROPERTY_FALSE.
PROMPT_ALIGNMENT_OFFSET Determines the distance between the item and its prompt in the current record.
PROMPT_DISPLAY_STYLE Determines the prompt's display style in the current record, either PROMPT_FIRST_RECORD, PROMPT_HIDDEN, or PROMPT_ALL_RECORDS.
PROMPT_EDGE Determines which edge the item's prompt is attached to in the current record, either START_EDGE, END_EDGE, TOP_EDGE, or BOTTOM_EDGE.
PROMPT_EDGE_ALIGNMENT Determines which edge the item's prompt is aligned to in the current record, either ALIGNMENT_START, ALIGNMENT_END, or ALIGNMENT_CENTER.
PROMPT_EDGE_OFFSET Determines the distance between the item and its prompt in the current record as a VARCHAR2 value.
PROMPT_FILL_PATTERN The pattern to be used for the prompt's fill region in the current record. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
PROMPT_FONT_NAME The font family, or typeface, that should be used for text in the prompt in the current record. The list of fonts available is system-dependent.
PROMPT_FONT_SIZE The size of the font, specified in points in the current record.
PROMPT_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning) in the current record.
PROMPT_FONT_STYLE The style of the font in the current record.
PROMPT_FONT_WEIGHT The weight of the font in the current record.
PROMPT_FOREGROUND_COLOR The color of the prompt's foreground region in the current record. For items, the Foreground Color attribute defines the color of text displayed in the item.
PROMPT_TEXT Determines the text label that displays for an item in the current record.
PROMPT_TEXT_ALIGNMENT Determines how the prompt is justified in the current record, either ALIGNMENT_START, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ALIGNMENT_CENTER, or ALIGNMENT_END.
PROMPT_VISUAL_ATTRIBUTE Specifies the named visual attribute that should be applied to the prompt at runtime in the current record.
QUERYABLE Specify the constant PROPERTY_TRUE if you want the end user to be able to initiate a query against the item. Specify the constant PROPERTY_FALSE if you want to disallow the use of the item in a query.
QUERY_ONLY Specify an item to be queried, preventing that item from becoming part of insert or update statements. QUERY_ONLY is applicable to text items, radio groups, and check boxes. Enclose the fully-qualified item name in single quotes.
REQUIRED Specify the constant PROPERTY_TRUE if you want to force the end user to enter a value for the item. Specify the constant PROPERTY_FALSE if the item is not to be required.
TOOLTIP_BACKGROUND_COLOR The color of the tooltip's background region in the current record.
TOOLTIP_FILL_PATTERN The pattern to be used for the tooltip's fill region in the current record. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
TOOLTIP_FONT_NAME The font family, or typeface, that should be used for text in the tooltip in the current record. The list of fonts available is system-dependent.
TOOLTIP_FONT_SIZE The size of the font, specified in points of the tooltip in the current record.
TOOLTIP_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning) of the tooltip in the current record.
TOOLTIP_FONT_STYLE The style of the font of the tooltip in the current record.
TOOLTIP_FONT_WEIGHT The weight of the font of the tooltip in the current record.
TOOLTIP_FOREGROUND_COLOR The color of the tooltip's foreground region in the current record. For items, the Foreground Color attribute defines the color of text displayed in the item.
TOOLTIP_TEXT Determines the item's tooltip text in all records.
UPDATE_ALLOWED Specify the constant PROPERTY_TRUE if you want the end user to be able to update the item. Specify the constant PROPERTY_FALSE if you want the item protected from update.
UPDATE_COLUMN Specify the constant PROPERTY_TRUE if this column should be treated as updated, and included in the columns to be written to the database. Specify the constant PROPERTY_FALSE if this column should be treated as not updated, and not be included in the columns to be written to the database.
UPDATE_NULL Specify the constant PROPERTY_TRUE if you want the end user to be able to update the item only if its value is NULL. Specify the constant PROPERTY_FALSE if you want the end user to be able to update the value of the item regardless of whether the value is NULL.
UPDATE_PERMISSION Use UPDATE_ ALLOWED when you run against non-ORACLE data sources. Specify the constant PROPERTY_TRUE to turn on the item's UPDATEABLE and UPDATE_NULL properties. Specify the constant PROPERTY_FALSE to turn off the item's UPDATEABLE and UPDATE_NULL properties.
VALIDATE_FROM_LIST Specifies that Oracle Forms should validate the value of the text item against the values in the attached LOV when set to PROPERTY_TRUE. Specify PROPERTY_FALSE to specify that Oracle Forms should not use the LOV for validation.
VISIBLE Specifies whether the indicated item should be visible or hidden. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
Note: Setting Visible to false will cause other item property settings to change.
VISUAL_ATTRIBUTE Specify a valid named visual attribute that exists in the current form.
Note: You cannot set the visual attribute for an image item, nor use a logical attribute from a resource
file as a Visual Attribute.
WIDTH Specify the width of the item as a NUMBER. The size of the units depends on how you set the Coordinate System property and default font scaling for the form.
X_POS
Specify the x coordinate as a NUMBER.
Y_POS
    Specify the y coordinate as a NUMBER.

Similar Messages

  • How to change the attributes of screen fields dynamically

    <b></b>
    well i have created a table by name empmaster_data with following fields.
    *emp_id.
    *emp_fname.
    *emp_lname
    *dob.
    *doj.
    *dept.
    *desig.
    now using a single screen i want to create,change and display the information.even i am using save and exit button.
    now i want to change the attributes of screen fields dynamically like active,input,output,invisible.

    Hi,
    Have Different Radio Buttons for the purposes what you have and use AT Selection Screen Output, Under the event Use loop at screen and with continue with your requirement.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Dinamically change the name of a field.

    Dear all,
    Here is my problem.
    I have a 3 text fields wraped in a subform.
    I have also created a button so I can add new instance of this sub form at runtime.
    All that works nice.
    However, I also have a HTML subbmit button, and when I submit the form to my script, I only get the last instance of the fields in the subform mentioned above.
    I am not sure what is the best solution for that.
    I thought that on option is if while adding the new instances of the subform, I can also dinamically change the name of the fields, so for example
    in the first instance of the subform I will have fieldname2 then in the second I will have fieldname2 and then when I submit I will get both, not just the last one.
    But apperantly I do not know how to dinamically change the name of the field as well.
    Any help will be really realy helpful
    Thank you very much
    Tsvyatko
    Senior Datbase Manager
    Columbia University

    Hi Dhiyan,
    Thanks for raplying.
    Your suggestion does work in the way that id does change the caption of the fields dinamically.
    However, looks like when I use the HTML submit button the form still submits the data only in the last fields of the repeated subform and their names have not changed.
    Probably when you say that the name of the field is its caption you mean just a static text. But I am refearing to fields where you can enter data inside.
    Basically, what I am trying to do, is to be able to dinamically create a table in my acrobat form.
    This table has let say 2 fields: InstanceNumber and YearOccured.
    So when I lets say add 3 instances in my acrobat form, I want to user to click an HTML submit button, and then through a PHP script I can submit all the 3 instance to a database.
    However, when I check the REQUEST array, I only see these 2 fields once (instead of 3 times) and they contain the data of the last added row.
    I assume that the problem could be solved if I can somehow change their names while I add rows.
    So for example in the first row I will have:
    InstanceNumber_1 and YearOccured_1
    in the second:
    InstanceNumber_2 and YearOccured_2
    and in third
    InstanceNumber_3 and YearOccured_3
    And so when I submit the form it will submit the data of all the rows.
    I am not sure if that is possible though. But definatelly I do not know how to do it ))
    What I did to go around this is:
    I have created 2 other (hidden) fields.
    And when I click the submit button, before I do the actuall submit, I take the data from all 3 rows one by one and I put i in this hidded fields as (tab) delimited. And so now I have in my REQUEST array all the data from all 3 rows, in a single tab delimited field. And then I can work it out from there with PHP to submit it where ever.
    However, I was hoping for some little more elegant solution, that is if I can change the names and so have all the fields data submitted. Or any other good suggestion
    If anyone knows, will buy you a beer )
    Thanks again
    Tsvyatko

  • Change the name of a field in the forms

    Hello, experts:
    As I can change the name of a field in the forms?
    When you change the name of a field on the form, the field name in the database also changes?
    Joan

    Hello Joan:
    If you mean the label of the form you can do with CTR + Double Click.
    Remember not to change the integrity of the database. Is only allowed to user fields
    make changes at the level of views, stored procedures, among others, which do not compromise the integrity of
    data.
    Remember, even if they change the label, has changed the field name in the database, only the presentation
    the form.
    Edwin Mauricio Nieto Leó

  • Changing the name of standard Field

    we have ECC6.0 with three countries using. Now i want to change the Standard Field name on an infotype ,i know how to change the name of the field. but my question is if i change the name of standard field it gets reflected for all the 3 countries, but i wanted to change for only one country?
    how can i achieve this?

    infotypes are Country Specific so pls check V_T582L once
    and check the screen numbers of the infotypes for various infotypes useing PE03 P0002 feature
    and check those module in V_T588M  and after this
    go to Tcode CMOD and do the rest of the thing u want to do
    hmm...... All the best

  • Change the name of std field in the std screen....

    Hi All,
    I want to change the name of the std field.....
    I used CMOD option but it changed the name across the client ......
    so i dont want that...i want it to be region specific......like for india only this text should display and for rest it should show the std name....
    the txn is VL01n/VL02n/Vl03n  ......
    thnx
    RK

    Hi,
    Plz try this Link
    I Hope with conditions u cant change field label.
    Let know where exactly u want this in report/Module pool.
    If in Report
    we can get with AT SELECTION SCREEN OUTPUT.
    Change standard field label
    http://www.sapfans.com/forums/viewtopic.php?f=13&t=323538
    Regards
    Edited by: Rasheed salman on Dec 14, 2009 12:35 PM
    Edited by: Rasheed salman on Dec 14, 2009 12:36 PM

  • How to change the name of the field in a ztable

    hi all,
    i have created a ztable with few fields, now i want to modify the name of the
    primary key field,means i want to change the name which i have given under the
    FIELDS tag. can anyone tell me how to do this.
    Thanks,
    satish.

    Hi,
    Please try this ...
    1. Go to SE11.
    2. Enter database table name.
    3. Click on change button.
    4. Then overwrite with the old field with new field name including the data element.
    5. Save and activated.
    6. Go to SE14 and enter above table.
    7. Click on edit button.
    8. Click on activate and adjust database with save data option.
    Regards,
    Ferry Lianto

  • Change the name of a field

    I am new to Adobe so I cobbled the following javascript together based on what I saw elsewhere in the forum, to be run as a batch process. I need to update approximatly 35 forms and the intent is to remove the "2" from the middle of 4 field names:
    /* ChangeName */
    // List of fields to change
    var aFields = ["AppA2RestYes", "AppA2RestNo", "AppB2RestYes", "AppB2RestNo"];
    // Loop through the fields and remove the "2" from the name:
    for (var i = 0; i < 4; i += 1) {
       var f = getField(aFields[i]);
       if (f) {
         f.value = f.valueAsString.replace("2", "");
    This is not working.  Can someone point out the error of my ways?
    Thanks!

    Any scripts, calculations, actions associated with these fields anywhere in the PDFs?
    You script is changing the 'value' property of the  field and not the 'name' property of the field.
    The 'name' property field of a field can only be 'read' there is no "write" access for this property.
    You can copy all of the form field properties of a field and use them to 'addField' , You can not delete a field, but you could set the field's 'display' property to 'display.hidden' and make the field 'readonly'
    You might want to download or link to the free Acrobat Acrobat JS Reference API.

  • Change the properties of a field dynamically using Getter/Setter methods

    Thanks
    Raj
    Edited by: RajICWeb on Aug 12, 2009 4:31 AM

    Hi Harshit
    Thanks for the reply. Like you suggested, I redefined the get_i_zfield( ) method. But the program is not going through this method.
    FYI.....I created the getter/setter methods manually for my zfield. Plz let me know if I am missing anything. Your help will be greatly appreciated.
    Below is my requirement:
    I need to add an additional column (zfield) to a tree view. The name of the component is BTRESTREE. (there is only one view in this component- this view is having only one context node).
    I tried adding my zfield to the attributes (of the context node) through the wizard by right clicking on the 'Attributes'. But I am not getting the 'Create' Option.
    I posted a thread few days back regarding the same problem. One of the experts (Vikash Krishna) suggested me to add some my zfield by redefining the 'GET_TABLE_LINE_SAMPLE' method. As per his suggestion, I was finally able to see my zfield in
    the configuation tab.
    Now, I have to change the properties of my zfield (make this column editable) in the tree view. For that, the only option that I can see is to change the get_i_zfield( ) method (here we have 'rv_disabled') for my zfield. For this, first I need to add my zfield to the Attributes. To achieve this, I added getter/setter methods manually in the Proxy class.
    Thanks
    Raj

  • To change name of output field hearder in SAP Standered report.

    Dear All,
    Is there any options to change the  name of output field hearder in SAP Standered report.
    Regards,
    Pankaj Vashista

    answered

  • How to get the name of a field without specifying it as a string (somehow v

    Is it possible to get the name of a field (or method) somehow via the class in which it is declared?
    The reason why I ask is, that quite often the name of a field is important, because the name is the anchor for further processing, like for example when using reflection (e.g. Class.getfield(“NameOfTheField”)).
    Assume you have class FooSimple with the field “String firstName”.
    Now you would do something like this:
    Class<FooSimple> cls = FooSimple.class;
    Field f = cls.getField("firstName");
    The problem is, that the string “firstName” is kind of “hard coded”. When the name of the field in class FooSimple changes (e.g. to “theFirstName”), the invocation will not work anymore when you forget to change the string too.
    I think it would be very helpful to have access to the name of the field directly via the class by doing something like this.
    Class<FooSimple> cls = FooSimple.class;
    Field f = cls.getField(FooSimple.firstName.fieldName);
    The Java Compiler would then resolve “FooSimple.firstName.fieldName” to the string “firstName”. When later the name of the field is changed, the IDE would change the name everywhere where it is used. So if the name of the field would be changed to “theFirstName” the IDE would also change the statement to
    Class<FooSimple> cls = FooSimple.class;
    Field f = cls.getField(FooSimple.theFirstName.fieldName);
    A technique like this would be in my opinion much more safety and more generic.
    Any ideas?
    Best Regards.

    Well, I think the discussion is going in a wrong direction because the original issue was not to discuss if it is worth coding some helper classes or a framework or that like. Let me bring it back to my original point.
    Basically you can reduce my original question to this:
    Currently it is possible to use the reflection API on a class level without specifying the name of the class with a string constant.
    My issue is, that I think it would be a nice extension for Java, if the same would be possible for field variables of a Java class. Currently the only way you can do this is by specifying the field variable with a string constant.
    Let me bring some motivations which brought me to this issue.
    Assume you have an entity bean which represents a DB table and you use Java Persistence (either JPA or something like Hibernate). Then you would have a class looking like this (very simple sample to make this reply shorter).
    @Entity
    @Table(name = "PERSON")
    public class Person implements Serializable {
         @Column(name = "NAME")
         private String name;
    // … constructor, getter, setter, etc. not listed here
    }The whole issue of the design of JPA is, that such entity beans represent the mapping between the object model and the DB model, the mapping is expressed with annotations.
    Okay, now let’s assume you write a query in Query Language, e.g.
    String sql = “select p from Person p where name = :name”;“name” is the name of the field variable, “:name” is the parameter you later set with “Query.setParameter” method.
    What is not so nice is the fact, that you use the name of the class and the name of the field variables “hardcoded” to construct the query. Now you could think that basically this information is part of your entity class. First you start with the name of the class (i.e. the table name) to decouple this “hardcoding”.
    You could write instead:
    String sql = “select p from “ + Person.class.getSimpleName() + “ p where name = :name”;This is really nice, because whenever you change the name of your Person class, this change happens automatically for the sql statement as well.
    I think the next thoughts are obvious, now, since you have decoupled the “hardcoded” part of the name of the class, you would like to do the same for the names of the field variables. But now you are stuck, there is no way to do this using a similar technique like for the name of the class. Either you stay with the query as it is now, or, to make it a little bit better, you code string constants for the field variables and use them. This issue brought me to the point that I think it would be nice to have the possibility to get the name of a field variable in a similar way as you can get it for the name of the class.
    Conceptually it is just to go one level deeper, i.e.
    first level is to get the name of a class
    second level is to get the name of the field variable of a class.
    Another sample would be, if you want to code something by using reflection. You have perfectly access to the reflection API starting at the class level like Person.class.allTheNiceReflectionMethods. There is no need to specify the class first with a string constant first, you directly start with the class, you can even be generic and just work on the Class.class level and still have access to all these nice methods to get out the information you need.
    But if you need to start with a very specific field variable (like in the sample above), you must go by using a string constant like Person.class.getDeclaredField(“name”).
    So basically I think that there exist already millions of lines of Java code where a field variable is specified for further processing, especially in combination with the reflection functionality and everywhere the field variables are specified by these string constants in double quotes. I would assume, that everyone has the same problem, once changing the name of the field variable means to take care that also the content of the string which specifies the name of the field variable is changed.
    I am wondering why one of the replies commented, why the name of a field variable is changed, it sounds to me that this is something which basically never happens. I don’t know, I think that this happens actually quite often and thanks to all these nice IDEs and their “rename” feature this is usually no problem. From time to time names of classes change, name of field change, yes, they are often even completely rewritten, new field variables come in some are deleted, whatever it is. The way I currently can access the name of a class makes the code safer, because when I consequently go with Class.class.getSimpleName I always know, that when I rename the class all these statements are changed too If I delete such a class, I at least get a compile error.
    My very simple issues is, that I think it would be nice to have the same comfort not only on a class level but also on the level of field variables, nothing more, nothing less.
    To be honest, I have not browsed the forum yet if such an issue was already raised by other people (I will do this now), but somehow it is hard to imagine, that I am the first one.
    Best regards.

  • Changing error message for mandatory field in me21n

    Hi,
    We had made the field "Collective no." of the additional data tab of the me21n transaction mandatory.
    We also change the name of that field to a custom name.
    Now if the user doesn't enter text in that field we get the error "Please enter Collective no.".
    I want to change the message to match our new field name.
    I checked in T100 for that message, but it's not there.
    Can anyone tell me from were that message come from, and how to change it.
    Thanks

    Hello,
    Tell us class and msg no so that we can find out coz it is pecular requirement.
    I suggest do not make it mandotary and dont change to custom field - give information message, place the cursor in field so user get message when he dont enter any value.
    yesterday we have discussed same we do not have any userexit - SAP direct modification required.
    PAI of the SAPMEGUI 1229 and MEPO1229-SUBMI field it contains value of collection no so just write your code there.
    *****Poorna********

  • 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

  • How to change the name of a screen-field

    Hi gurus,
    I need to know if there is a possibility to change the name that appears in the infotype of any screen-field standard?
    If so, please, let me know
    Answer will be rewarder!!

    Hi,
    Transaction --- CMOD --- Goto -- Text Enhancement -- Keyword ---Change -- Enter the data element and change the field name.
    Hope it will help..
    Regards,
    Vikash

  • How to change the Display Pattern for Decimal Fields dynamically

    hi all,
    Can any one help me how to change the display pattern for decimal fields dynamically???
    Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
    Please help me how to solve this ASAP.
    Thanks,
    Prabhu

    Hi,
    Alternatively you can handle it in the context.
    In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
    <quan field> NE initial.
    So the field will not be printed if there is no value.
    Regards,
    Vidya Chowdhary A.

Maybe you are looking for