How to change protected attribute?

Hi all,
This is the situation:
In standard SAP there is an object OBJ_A with a protected attribute ATTR_P. The object has a getter method for the attribute, but no setter.
My requirement:
i need to manipulate/change the protected attribute ATTR_P.
what i've tried so far:
I created my own class CL_Z which inherits from the class of OBJ_A. Then i created a method CHANGE_ATTR_P.
In a BADI where the standard object OBJ_A is available i instantiated my z-object OBJ_Z.
With casting, referencing etc i tried to get to the protected attribute. but no luck.
has anyone any suggestions?
Thanks alot.
Joris Bots

> In a BADI where the standard object OBJ_A is
> available i instantiated my z-object OBJ_Z.
> With casting, referencing etc i tried to get to the
> protected attribute. but no luck.
If the BADI gives you an object which has the type of the parent class then you cannot cast it into the subclass type. I doubt that there is any chance to change the protected attribute because it might be protected for a reason.
It would work if the protected class implements an interface and the getter method is defined in the interface but that is not the case, correct?
cheers
Thomas

Similar Messages

  • How to change general attribute of text element

    hi
    who now how to change general attribute of text element on screen dinamically? I wish to change text value dinamically for example.

    Hi Denis,
    I am not too sure on what you want.
    If you require that the text value be different based on some conditions you can declare as many text elements as conditions and call the relevant text element.
    But I dont think that you can assign dynamic texts to a single text element.
    Regards,
    Saurabh

  • How to change the attribute name for a relation

    When the Data Modeler engineers a logical model into a relational model it create table columns for the relations. The names of the generated columns are listed in the attributes list in the properties dialog of the relation. The actual name of the attribute gets calculated by the attribute name of the entity which is part of the relation. This is okay, if there is only one relation between two entities. But when there are two relations between two entities the second attribute gets a stupid number suffix. This makes it impossible to give the attribute a useful semantic meaning.
    When I engineer the model into a relational model I can change the column name in the relational model. Changing the column name in the relational model is not perfect but it would be okay for me, if it would not be overwritten during the next engineering run.
    So I have two questions:
    How can I change the attribute name in the attributes section of the properties dialog of a relation? See here for screen shot:
    http://public.ceving.de/2012050300/relationattribute.png
    And if it is not possible:
    How can I preserve any changes on column names in the relational model during a re-engineering run?
    Edited by: 931739 on 03.05.2012 08:07

    Hi,
    I've logged an Enhancement request on this.
    I don't believe it's possible to change it from the Entity or Relationship dialog, as it's not updatable in these dialogs.
    What you can do is change it in the Relational Model, and then reverse engineer the change back to the Logical Model.
    David

  • Change Protected Attribute - E-recruiting default the sender E-mail Address

    Hi Experts,
    I am trying to modify the me->sender->emai_address with some default value at the staringof the method as an implicit enhancement in IF_HRRCF_CHANNEL_MAIL~SEND_DOCUMENT in CL_HRRCF_CS_DOC_CAT_SF_SUPER.
    As SENDER is an Protected attribute it's not allowing me to change that value. Can you help me

    This doesn't seem to be directly a Web Dynpro ABAP related question.  You are asking about using the enhancment framework against a normal ABAP class.  I understand that this class might be used within a surrounding WDA, but Web Dynpro doesn't appear to be a factor in anything about your question. I am moving it to ABAP General.

  • How to change the attribut of Form in Review Form in ISR

    Hi,
    We have to change the attributes of text fields of form ( e.g disabling the text field ) once user hits the Review Form button on MSS page
    Please let me know how to do it .
    Thanks
    Manish

    Hi Manish,
    You may write the Formcalc scripting for the respective field.
    //Check ISR control parameters for read/write access
    if($record.CONTROL_PARAM.ISR_MODE == "DISPLAY" |
       $record.CONTROL_PARAM.ISR_FORM_VIEW =="ISR_APPROVE" | <b>$record.CONTROL_PARAM.ISR_REVIEW == "true" )</b>
    then
         this.access = "readOnly"
    else
         this.access = ""
    endif
    Hope this helps.
    Thanks and Regards,
    Anto.

  • How to change the attributes of GUI CONTROLS in my own program.

    hi all,
    i just want to change the attributes of GUI CONTROLS in my own program.
    for example `
    How to set an ICON on my GUI BUTTON in the program?
    so what's the mapping between CONTROL in the SCREEN PAINTER and variable in the program?

    Hi Chao Liu,
    Ya , u first find out the PF-STATUS of the screen and goto that status and now u can modify the ICON u want .
    Finding the GUI status of the screen
    Goto that  TRANSACTION CODE or SCREEN
    On the Standard Menu bar Goto ( Menu path) System --> Status
    Now u get a pop-up System :status in that in SAP Data block u can find GUI Status. Now Double Click on that Status. It takes u to the Status of that screen.
    Now click on the Display --> Change Button on the application tool bar.
    If it is a standard GUI-status then it asks for the ACCESS KEY.
    if it is a custom defined GUI Status  then u can change the status .
    reward if helpful
    raam

  • How to change cn attribute

    How can I change 'cn' using Oracle Directory Manager?
    The 'cn' attribute is normally grayed out, so cannot be changed.
    Thanks,
    Chetan

    Hi Chetan:
    What you are trying to do is modify the RDN (Relative Distinguished Name). The following is an example of how to change the RDN from "cn=dcp1" to "cn=thanh mai". The example assumes the entry to be changed resides under "dc=Americas, dc=IMC, dc=com"
    ldapmoddn -p 389 -h host_name -D cn=orcladmin -w welcome -b "cn=dcp1, dc=Americas, dc=IMC, dc=com" -R "cn=thanh mai"
    This modifies the RDN component of the DN from "cn=dcp1" to "cn=thanh mai"
    Hope this helps.
    Thanks,
    Jay
    null

  • How to change report attributes like heading, sort etc programmatically

    Some of the columns from a classic reports using pl/sql as region source should be sortable. Is it possible to change this attribute (sort = yes) using JavaScript or APEX API?
    David
    Edited by: david on Sep 6, 2011 11:56 PM

    There is something I don't understand here. Why do you need to point at the sxd? What is changing? Like I mentioned before. If the contents of the xsd change, all the report will do is - at best - drop the changed fields so you will be missing data. Perhaps some of the following will help;
    [Crystal Reports Guide To ADO.NET|http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/401c4455-a31d-2b10-ae96-fa57af5aec20?quicklink=index&overridelayout=true]
    [Crystal Reports For Visual Studio .NET Reporting Off ADO.NET Datasets|http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/2091d0c3-da1d-2b10-22be-a3426b183f75?quicklink=index&overridelayout=true]
    [Crystal Reports For Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23?quicklink=index&overridelayout=true] (page 332 on).
    Ludek

  • How to change the  attribute of screen field to drop down list dynamically

    Hi All,
      Col X                   Col Y
      A                        input field
      B                       drop down list
    This is a tabular disply where the Screen field attribute for Col y  is NO DROP DOWN BOX.
    My requirement is to change the attribute of COl Y to DROP DOWN list depending on the value of
      COL X  dynamically.

    Dear Ajay,
    Actually this requirement is to enhance the standard screen for Tcode :EHSVU21.
    So depending on the 1st Column(Test no)  value ,i have to change the 3rd Column(Low.norm.result)
    property either to DROP Down or not.
    So in the PBO only the changes to be made and there is no field in SCREEN internal table for changing the attribute to DROP down. I checked SCREEN internal table where the field VALUE_HELP and REQUEST is useful but not  suitable for my case.
    Any solution available?

  • 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

  • Flex 3 - How to change an attribute name ?

    like this
    <item code="1" />
    to
    <item id="1" />
    thanks

    Hi Alex,
    You can use setName to change the attribute name:
    Here for example change all your id attributes with code:
    var xmlTest:XML=<r><item id="1"/></r>;
    for each (var node:XML in xmlTest.item.descendants("@id"))
    node.setName("code");
    trace(xmlTest);
    Thanks,
    Bhasker

  • How to change View Attribute Name?

    Is there a way to change the attribute name of a view object that was added from and entity Object?
    I dont want to change the Entity Attribute Name since i want to use it in diferent view objects with diferent names...

    Hi Frank
    It would be very convenient to have view object attribute name updateable because the attributes may result from different joins (to same table) and have different meaning depending more on the association than to the table attribute itself (in most case the relationship extend the meaning of the attribute).
    In my use case i have :
    A table FlexTypologyClassMatrix with two foreign key pointed to FlexTypologyClass primary table. That mean that my matrix have two axis defined by the primary key of FlexTypologyClass table.
    I created a view object that correspond to this scheme with eo's FlexTypologyClassMatrix, FlexTypologyClass as FlexTypologyClassAxisX, FlexTypologyClassAxisY).
    The view object attributes from eo's FlexTypologyClassMatrixAxisX or Y are generated from the table attribute name with a suffix like FlextypologyclassL (for FlexTypologyClassMatrixAxisX) and FlextypologyclassL1 (FlexTypologyClassMatrixAxisY).
    The attribute name are the most used item used later in the development cycle and this is not easy to distinguish the X from the Y without analyzing the view object definition. It's not a very productive way to develop application.
    It would be very convenient to permit the view object attribute name to be updateable or the alias name of the entity object in the view object has to be displayed with, every time.
    I didn't check if the info is displayed every tiem, may be it is a workaround !?
    Hope you understand what I mean. Thank you.

  • How to change the attributes of an XML file

    hi peeps 'ope you can help me here i need to change the attributes of an xml file, i parse it first using a DOM parser but i cant find a way to change the attributes in the XML file, setAttribute() works only at runtime and doesn't change the attribute in the file itself. I can't find a method that will answer my question. I've searched through the forum and found similar threads....they say in order to write and change the attribute i must use the write() method of the XmlDocument class defined in com.sun.xml.tree.XmlDocument. But, i found another thread, and it says that com.sun.xml.tree.XmlDocument is not safe to use and i should use org.apache.crimson.tree.XmlDocument.....i can't find the XmlDocument class and the API for this package so i really dont know where to start...hope you guys can help me! thnx

    thanks for responding roland....i already found the solution...i didn't use the XmlDocument class because i can't find any documents about it except for JAXP 1.0 here is my code snippet...i used the TransformerFactory and Transformer class to write
    import org.w3c.dom.*;
    import org.w3c.dom.traversal.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    Document doc = null;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    dbf.setValidating(false);
    doc = db.parse(fileGetFile); //this is the XML file
    n1 = (Node)doc.getDocumentElement();
    e1 = (Element) n1;
    NodeList nodeList = doc.getElementsByTagName ("File");
    //just insert whatever you want to do with the XML...parse it..set/change the attribute..etc....sample snippet below changes the attribute downloaded to "no"
    for(int iWriteFailed = 0; iWriteFailed <nodeList.getLength() ; iWriteFailed ++){     
    n2 = nodeList.item(iWriteFailed);
    e2 = (Element) n2;          
    e2.setAttribute("downloaded", "no");}
    try{
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.transform(new DOMSource(doc), new StreamResult ( new FileOutputStream ( fileGetFile) ) );}
    catch(Exception trans){}
    thanks for responding and keeping the information interchange alive here in the forum...
    Pau

  • How to change protected variants created by users that no longer exist

    There are several older variants for which background jobs are scheduled for daily prcessing.  These variants were created and protected by uses that no longer exist in SAP.
    How to  unprotect and change these variants to reflect new requirements.

    Hi Anam
    1. Execute tcode VARCH and enter the program and variant name and make the changes, if the system allows you to do so.
    2. Check with the basis/security team if they can extend the validity and reset the password for the old ids.
    3. If the above doesnt work, you will need to copy the variants manually
    Moving forward, when you create/change jobs, request the basis/security team to create common ids like OTCADM, P2PADM, etc. Ensure that all the variants and jobs are created/changed using this common id. Basis/Security team can controll by opening and closing the ADM account on request from project team and the usage can be recorded for tracking.
    To check the jobs that use a known variant, use tables TBTCP, TBTCO.
    Best Regards
    Sathees Gopalan

  • How to Change an Attribute of A SET TYPE in SAP CRM

    Hi ,
    I have created an ATTRIBUTE through comm_attrset, and assigned it to a SET TYPE. Now I wanted to change the data type of this attribute. Its not allowing me to delete it, as its already assigned to teh SET TYPE. Moreover the set type is also not getting deleted as its assigned to a category ID.
    Kindly let me know how can I change the attibute , if any one of you have come accross such situation.
    Thanks
    Asish
    Edited by: Asish Dash on Sep 8, 2009 10:57 AM
    Edited by: Asish Dash on Sep 8, 2009 10:58 AM

    Hi Manish,
    From my experience, you cannot change an existing attribute of a set type (esp. when it has a dependency).
    You need to delete the attribute, save the changes and then re-create the attribute with new value table.
    Also remove any dependencies before deleting the attribute.
    Regards,
    Vartika

Maybe you are looking for

  • Release Value Contract Report

    Hi, As we can get individual customer released value contract amount through T Code VA43 and report Via T code Z_XX_SD_059 for mass customers which is usually not giving the correct amount of released from value contract. The report which is extracte

  • Contract Gen Not working

    Hi We are facing problem with Contract Generation service . While checking the log file , we found the below- Method findUnique 2011-10-27 16:19:41.187     ERROR     local4     CompanyLogoProcessor     getAttachment     SAPEngine_Application_Thread[i

  • When Skype is open on my second monitor, my .swf runs slowly (30-45 fps).

    But when it is minimized or on my first monitor, my .swf runs fine. I'm using Flash Player 11.5.31.137. Upon further investigation in Stencyl it seems every 4 frames something called "Waiting For GPU" spikes up WAY past my limit of 16ms. I am not usi

  • Autmatic Outgoing Bank Interface

    HI All, I got new project and assigned a task to develop functional specs for Automatic Outgoing Bank Interface. Can any body tells me how to to mapping for fields and how to send the file to the bank and in which format? It would be great help from

  • Uninstall MobileMe control panel for windows

    Hi I saw a post from turingtest2 Re: MobileMe Services has stopped working in Windows.  Feb 8, 2014 5:58 PM (in response to AKAJEF) on:  MobileMe is a discontinued service and the control panel should be removed if still present. Not doing so could c