Clone a method for my custom object.

Hi!
We have a method:
comp.saveFrameToPng(compTime, fileObj);
I have my custom object block.
Is it possible to clone "saveFrameToPng" method for my custom object?
I've tried:
Function.prototype.clone = function() {
    var that = this;
    var temp = function temporary() { return that.apply(this, arguments); };
    for(var key in this) {
        if (this.hasOwnProperty(key)) {
            temp[key] = this[key];
    return temp;
And then in my custom object:
function block (comp)
this.saveFrame = comp.saveFrameToPng.clone();
But thin won't work properly
Help me please if this possible.
Thank you in advance!

Hi
static public long powerTwo(long number)
     long ret = 2;
     if(number == 0)
          return 1;//2 to the power of 0 is 1
     else
                //use a for loop to loop as many times as specified by number,
                //times 2 to ret every time it loops
     return ret;//return the answer
}Hope this helps

Similar Messages

  • Methods to transfer Customer objects while Upgrading.

    Hi,
    What are the possible methods of transferring Customer objects/programs etc while upgrading from 4.6 to 4.7 or ECC ?
    Any information will be helpful.
    Thanks,
    s<i><b>A</b></i>mik.

    Hi Rekha,
    After the Basis team have done with the Prepare activities , we need to RUN the SPDD transcations which provides the details of SAP Std DDIC objects that have been modified by the CLient It team. You will requuire take a deceiosn to keep the changed format or revert back to the SAP std structure. More often the decison would be to keep the changes format in the new version also. It is mandatory to complete this cativity so that you do not run the risk of any data loss in the new version of SAP.
    After completeing the SPDD activity , we need have choice of taking the SPAU transcation to get the list of the STD SAP programs that have been modified. This activities can be done in phases even after the upgrade o fthe box. generally it is done in the same go so that your testing results are consistent and have more confidence in upgrade.
    Then we need o move with the corrections of the Z/Y objects for sytax . Once we have complted these three ABAP workbench corrections cativities we need to get into a testing activity.
    Hope this helps.
    Anand

  • Generic approach to call a method for any business object

    My requirement is to call the DISPLAY method of a business object when I have the objectType and objectId.
    Say I have BUS2012 and Id 4500001111, now I want to call a method which invoke the DISPLAY method for this object with objectId (say ME_DISPLAY_PURCHASE_DOCUMENT for purchase order). I even have the key fields for the business object.
    Is it possible ?
    Thanks in advance !
    Ruhi Hira

    Hi Ruhi,
               Yes you can call the method for display.Before we can do that we need to fix the procedure for the calling of the method.If you want to call it programitically or you want to call it in task builder or you want to use it as a activity in the work item.we can check for the BUSXXXXXX what ever number is there and we can also check for the activity type pre defined by SAP for it.If suppose you dont have the activity we can create the method for the BOR object type using SWO1.May be it helps your query.
    Have a best day ahead.

  • Set Default Value based on Field from another table for a custom object

    I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
    The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
    I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
    If anyone knows how to enter this I'd really appreciate the help.

    Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
    Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
    The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
    In your case, ref_record_type is '<Account>', foreign_key is &#91;<AccountId>&#93;, and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
    Give this a shot and let me know how you do.
    Thom

  • LSMW Method for VD51 Customer-Material Info master data conversion

    Hi,
    I am using LSMW for VD51 Customer-Material Info master data creation but can't able to find any standard BAPI, IDOC or Direct input program.
    Can anybody tell me any standard way to do it or only the recording method possible for this.
    Thanks
    Dhirendra

    Hi,
    I have done this once and used recording method in LSMW. Do the recording from LSMW itself.
    Thanks,
    Jyothi

  • REQUEST:  A filter method for the Recordset object

    How about it ?   Having a recordset object without a .Filter method could reduce significantly the dependency on the Database server.  Imagine having to make a query for each entry on a list in order to obtain related information!

    No has comment on this  ... for what I think it would be a useful tool for developers.
    Is there a reason why isn't part of the SAP's recordset object.

  • Java.util.Hashmap doesn't work for a custom object

    Hi,
    i have created a class named ID. I am trying to test it on a Hashmap, but the the "containsKey" and "get" operations do not work. Every operation of the main method returns as if the ID objects have not been inserted. Ideas?
    package swarm.sys.id;
    import java.util.*;
    import java.io.*;
    import swarm.sys.common.*;
    import swarm.sys.interfaces.*;
    public class ID implements IDInterface, Cloneable, Serializable
        String type;
        int body;
        String id;
        private static int idCounter=0;
        public ID(String type, int body)
          this.type=type;
          this.body=body;
          id=type+Ids.padWithZeroes(body);
        public String getType()
          return type;
        }//getType
        public String getBody()
          return Ids.padWithZeroes(body);
        }//getBody
        public int getIntBody()
          return body;
        }//getIntBody
        public boolean equals(Object o)
          if (!(o instanceof ID))
            return false;
          else
              ID id=(ID)o;   
              return (this.getType().equals(id.getType()) && 
                      this.getIntBody()==id.getIntBody());        
        }//equals
        /* factory method, which produces new IDs and afterwards
         * increments the body part
        public static ID newID(String type)
            return new ID(type,idCounter++);
        }//newID
        //implements deep cloning
        public Object clone()
            return new ID(new String(this.type),this.body);
        }//clone
        public String toString()
          return id.trim();
        }//toString
        public static void main(String[] args)
            Hashtable<IDInterface,String> table=new Hashtable<IDInterface,String>();
            table.put(new ID("PEER_",1),"x1");
            table.put(new ID("PEER_",2),"x1");
            table.put(new ID("PEER_",3),"x2");
            table.put(new ID("PEER_",4),"x3");
            table.put(new ID("PEER_",5),"x3");
            ID id1=new ID("PEER_",1);
            ID id14=new ID("PEER_",14);       
            System.out.println("table.containsKey(new ID(PEER_,1)): "+table.containsKey(id1)); //should be true
            System.out.println("table.containsKey(new ID(PEER_,14)): "+table.containsKey(id14)); //should be false
            System.out.println("table.get(new ID(PEER_,1))"+table.get(id1)); //should be x1
    }

    You need to override the hashCode() method.
    http://www.javapractices.com/Topic28.cjp

  • Method for uploading Customer Hierarchy Data

    hi experts,
    i have a requirement in which i need to upload Customer Hierarchy data into ECC system from CRM system.
    I need to know is there any method in LSMW by which i can do it?
    thanks,
    Ags.

    resolved..

  • MDG-Hub: Tried and tested methods for ECC customizing synchronization

    MDG Experts, I am looking for guidance on synchronizing configuration and customizing data between ECC and an MDG-Hub. I reviewed documentation on (a) synchronizing via BC set import and (b) via TMS although I was looking for a little bit more detail and steps involved in setting up ongoing synchronization between ECC and an MDG-Hub.
    I am looking for experiences and suggestions on this topic. Thanks in advance.

    Hello Karthik
    I have used - BC sets to transport the ECC configuration to MDG. Another way is to transport the tables directly from ECC environment to MDG.
    Check this -
    http://wiki.scn.sap.com/wiki/display/Basis/Business+Configuration+Sets+(BC+Sets)+and+their+use?original_fqdn=wiki.sdn.sap.com
    Kiran

  • Required Characteristics from 0BI_ALL for new custom object

    Hello,
    I created a small query with the following characteristics on 0BPARTNER info.provider
    with the following characteristics
    Rows:
    Business Partner (0BPARTNER)
    Country(0COUNTRY)
    Region(0REGION) With Variable Mandatory
    Now I need to secure this query by region.Hence started creating new authorization object ZREGUSCA using RSECADMIN and with the following charactertics / Dimensions limiting to only these characteristics out of 40 characteristics from 0BI_ALL.(I donot want to assign 0BI_ALL to S_RS_AUTH, if i do,i cannot secure this query)
    0REGION
    0TCAACTVT
    0TCAIPROV
    0TCAVALID
    0APO_LOCNO
    0CUSTOMER
    0TCAKYFNM
    My question is why do i need to have the last three characteristics (0APO_LOCNO,0CUSTOMER,0TCAKYFNM)
    included in the object apart from the region and the special Characteristics? I found these three non related objects as required, after a lot of trouble shooting?
    How do i know, what are the required characteristics if i want to secure by plant in another query?
    I will really appreciate your responses and thoughts
    Regards
    Sreeni

    Hi Sreeni
    Because the chars are auth relevant and are in the cube.
    0TCAKYFNM is also auth relevant and therefore you need to authorize key figures.
    Chars that are not explicitly in the drilldown must be authorized with aggregation auth, that is with the colon-sign :
    You can find the information in the authorization protocol. There is a block auth relevant chars.
    Record your query via RSUDO for the restricted user and flag the "with protocol" box or go to RSECADMIN->Error logs where you can enter your name to be logged always.
    There, you will also find the protocol.
    Best Peter

  • Generic Object Services for Custom Object Type

    I would like some advice please. I am not an ABAP Developer but I would like to enable the generic object services for transaction PP01 for a custom object type.
    I have searched for information, which suggests that the object needs to be published using the function module SWU_OBJECT_PUBLISH so that it is available in the Business Object Repository. If this is correct, please could someone tell me (in simple terms) how I can do this (with the assistance of an ABAP developer)?
    My colleague did some debugging which seemed to suggest that in order for the generic object services to be available, the field OBJTYP needs to be populated in table T778O. Is this correct? If so, how should this be done?
    Your advice would be greatly appreciated.
    Regards
    Corinne

    Hi,
    i'm also looking for the solution you have asked for.
    if you know how to do it please reply me with the solution.
    Thanks,
    suresh

  • Upgrade for Custom objects

    We are planning to upgrade our system to BI 7.0 next week. We will do technical upgrade only.
    Appreciate if you can clarify few doubts
    1. We have lots of custom Infocubes, ODS and update rules that are created as copy of standard objects. What impact should we expect for these objects.
    I guess minimal but if SAP has made changes to their standard data flows
    ( like certain calculations in update rules or new infoobjects in ODS etc )
    would they be needed in my custom versions and if yes how would I know what is changed?
    2. When we do the functional upgrade will it be easier or harder for these custom objects as compared to the standard ones. ( Wondering if we should have stayed with the standard ones )
    Thanks

    1. We have lots of custom Infocubes, ODS and update rules that are created as copy of standard objects. What impact should we expect for these objects.
    I guess minimal but if SAP has made changes to their standard data flows
    ( like certain calculations in update rules or new infoobjects in ODS etc )
    would they be needed in my custom versions and if yes how would I know what is changed?
    Good news, SAP doesnt have any content with the new data flow. I see no reason why SAP woudl change thier std objects, if thats the case SAP will come with a new object and ask the customers to slowly move to the new one as the old one would be obsolete soon. Your existing dataflow wouldnt be disturbed, even though you have ur custom objects (who doesnt have custom objects)
    2. When we do the functional upgrade will it be easier or harder for these custom objects as compared to the standard ones. ( Wondering if we should have stayed with the standard ones )
    either way you have to manually migrate the dataflow, so it shouldnt matter if its std or custom

  • WSDL for Custom Object 3

    I understand from CRMOD Customer Service that we do not have a WSDL for the Custom Object 3. Is this a true statement. I do not have it exposed.
    If this is true can you let me know if it will be available in R15

    Custom Object 3 is not accessible via the web services. I'm not aware of a plan to make it available in R15. I'm not 100% sure, but I wouldn't count on it.

  • Edit entity object and use the Create() method for generating ID's

    Hello,
    I have and InserPage.jsp and defined the datasoucre correctly.
    <jbo:InputText datasource="ds" dataitem="Clientid" /> gives me
    the unique ClientID from the FIRST client-record in my table ,
    although this page is for inserting a NEW Client, with a new
    ClientID.
    So, on the Clients Entity i made a create() method and put the
    following code in it:
    public Number getClientid() {
    return (Number)getAttributeInternal(CLIENTID);
    public void create(AttributeList attributeList) {
    SequenceImpl seq = new SequenceImpl
    ("Clientid",getDBTransaction());
    Integer i=(Integer)seq.getData();
    setClientid(new Number(i.intValue()));
    super.create(attributeList);
    the getData() Returns a sequence value, but what sequence value?
    Do i have to create a sequence on the ClientID column in my
    Oracle Table in the DB too?
    The problem is, the first ClientID # is 819 and the current last
    one seems to be 2899, so how do i achieve that when opening the
    insert.jsp the new ClientID shows up (ie. 2900)?
    How can i achieve this?
    thx

    OK, managed to track down the HowTo on triggers? I created the
    trigger.
    create sequence client_seq
    start with 8900
    increment by 1
    nomaxvalue
    nocycle;
    I changed the create() method for the entity object to:
    public void create(AttributeList attributeList) {
    SequenceImpl seq = new SequenceImpl
    ("Clientid",getDBTransaction());
    SequenceImpl s = new SequenceImpl("client_seq",
    getDBTransaction());
    Integer next = (Integer)s.getData();
    setClientid(new Number(next.intValue()));
    and running the tester for the module works fine. ;-)
    But...
    The Insert.jsp page has to insert/show this sequenced value!
    After i defined the datasource and let us say:
    <jbo:InputText datasource="ds" dataitem="Clientid" />
    ...the number 819 shows up, which is the FIRST record, so i do
    not get the new ClientID with the correct number.
    Any help is always nice. ;-)

  • Access control for Custom Objects

    Hi,
    I am working with two custom objects: Custom Object 1 and Custom Object 5. There is a team on Custom Object 1.
    The user has access to both and has create access for Custom Object 5.
    The user is not the owner of a record in Custom Object 1, but is on the team for the record with full access.
    When in the related section for the custom object 5 you click on edit I get the following error: "You have read-only access to this record. Click Cancel button or Back link to continue. Access Denied.(SBL-DAT-00284)"
    When you click on the link to the related record and then on edit it works fine, the user can edit and save the changed record.
    I do not understand why this does not work in the related section.
    Thanks for your reply!
    Arnold

    Hi Errol,
    to build your own application authorization scheme around the security model supplied by Apex for administration of the Apex environment would be a bad idea.
    This was never intended for authorization scheme management in custom built Apex applications, it was solely intended to control access in the Apex environment overall. The API for it is not published, and making changes to it, such as adding more roles, would run the risk of breaking the overall Apex security model. It would not be supported by Oracle and Oracle would not guarantee the upwards compatibility of any changes you make in future versions of Apex.
    In short, you should follow Tyson's advice and build your own structure. As he indicated, there are plenty of examples around and provided your requirements are not too complicated, it will be relatively simple.
    Regards
    Andre

Maybe you are looking for

  • Language in scheduling agreement

    Is it possible to change the language in scheduling agreement?

  • Asset Transfer with two company codes

    Hi We have a requirement in which we need to transfer the asset from one company to another. However, there is VAT calulated on the transfer of asset from one company code to another. We need to create an invoice, calculate taxes and then transfer th

  • Fetch data from flat file

    Hi Gurus, This seems to be a regular task, and I have recieved suggestions from my coleagues too. I am not an ABAP consultant, so unable to decide all alone. This is the sceanario, I have a text  file, which contains trace of application server. Data

  • 0VENDOR: Activation Error

    Hello Team! I have changed display attr(0SORTL) to nav attribute. i did not face this error when doing similar changes for other attr. Error: Characteristic 0VENDOR: Error when generating master data routines. Awaiting your replies. regards vijay

  • The Mute switch isn't working no bell or no bell with slash

    Help me! I don't know if it's because of the new iOS 6.1.3 or just my iPhone 4 I can't go to an apple store because there's no warranty help me please thank you:) -Ange