Registering a object at runtime

Hi Experts,
In one of the standard code the I am trying to add an enhancement to add a note during the runtime. My enhancement is after the below standard code.
I can observe that the object is being deregistered during runtime which causes the code I am trying to implement not to work.
* set Data to pdo-object
    "prepare call
    lo_pdo_sc ?= mo_pdo.
    "call
    TRY.
        lo_pdo_sc->add_item( EXPORTING is_item   = ls_pdo_item
                                       iv_uname  = sy-uname
                                       iv_account_for_ess = iv_ess
                             IMPORTING es_return = ls_pdo_item_control
                             CHANGING  co_message_handler = mo_pdo_message_consumer ).
* Add internal note as longtext
        wd_main_node = mon_cll_set_facade->get_main_node( ).
        wd_child_node = wd_main_node->get_child_node( name = 'INTERNAL_NOTE' ).
        wd_child_node->get_attribute( EXPORTING name = 'INTERNAL_NOTE' IMPORTING value = lv_internal_note ).
        TRY.
            CALL METHOD lo_pdo_sc->/sapsrm/if_pdo_do_longtext~update_longtext
              EXPORTING
                iv_p_guid          = ls_pdo_item_control-guid
                iv_tdid            = 'NOTE'
                iv_tdspras         = sy-langu
                iv_tdformat        = 'X'
                iv_text_preview    = lv_internal_note
*              CHANGING
*                EV_CHANGED         = LV_CHANGED
*    CO_MESSAGE_HANDLER =
          CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
            mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
        ENDTRY.
* update
        mo_pdo->submit_update( CHANGING co_message_handler = mo_pdo_message_consumer ).
* because view will be invalidated: clear the mapper reference from the bo_mapper
>>>>>>        mo_parent_bo_mapper->deregister_mapper( io_mapper = me ).
* refresh whole application because e.g. Total value of sc has maybe changed.
* updates were performed a step before
        mo_parent_bo_mapper->fire_event_refresh( iv_perform_updates = abap_false ).
* close window
        lo_window_controller = mo_wd_view_controller->get_embedding_window_ctlr( ).
        lo_window = lo_window_controller->get_window( ).
        lo_window->close( ).
        ev_close_window = abap_true.
The code I have implemented in the enhancement is given below, the buffer is updated but I guess due to the object not registered to BO mapper the updates are not visible in the webdynpro screen.
* get context-data
  io_mon_cll_set_facade->get_static_attributes( IMPORTING es_static_attributes = ls_cll_item ).
* Get longtext note
  wd_main_node = io_mon_cll_set_facade->get_main_node( ).
  wd_child_node = wd_main_node->get_child_node( name = 'NOTE' ).
  wd_child_node->get_attribute( EXPORTING name = 'NOTE' IMPORTING value = lv_note ).
  TRY.
      CALL METHOD io_pdo_sc->/sapsrm/if_pdo_do_longtext~update_longtext
        EXPORTING
          iv_p_guid          = is_pdo_item_control-guid
          iv_tdid            = 'HTXT'
          iv_tdspras         = sy-langu
          iv_tdformat        = 'X'
          iv_text_preview    = lv_note
*              CHANGING
*                EV_CHANGED         = LV_CHANGED
*    CO_MESSAGE_HANDLER =
    CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
      co_mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
  ENDTRY.
* update
  io_pdo->submit_update( CHANGING co_message_handler = co_mo_pdo_message_consumer ).
ENDMETHOD.
Can someone tell me what is the correct way to get the updated data captured during runtime?

During debug I found in the object io_pdo as mentioned inenhancement code and the standard object MO_PARENT_BO_MAPPER for the attribute MT_REGISTERED_MAPPER both are same except for an extra entry in the standard object MO_PARENT_BO_MAPPER. The entry is given below.
-> Hashed Table2x1(8) /SAPSRM/IF_CLL_DODM_SC_I_DESCR
Any idea as what needs to be done to add this entry in the enhancement? the standard code is in the class /SAPSRM/CL_CH_WD_DODM_SC_I_DSC

Similar Messages

  • "Error while registering the Java 2 Runtime Environment registry keys"

    "Error while registering the Java 2 Runtime Environment registry keys"
    I am getting the above error when trying to install the 1.3 JRE (installed with the 1.3 plug in which I need). As part of my development I have been installing and uninstalling the JRE multiple times. Then, I got the above error when trying to install it, and now it appears to be installed but I cannot uninstall it. When I try to uninstall it, it just remains, and when I try to install it again I get the above error. I have tried cleaning up all javasoft registry entries, but it doesnt seem to have helped. Can anyone help me either completely uninstall the JRE so I can do a clean install or help me get rid of the error above when I install. Is there some registry entries I should be looking at? Anything else? this is quite urgent as I need to test my applet with the plugin installed and not installed - and I currently cant uninstall it. Any ideas?
    Thanks for your help
    Aaron

    I am getting this same error message when trying to upgrade from 1.3.1_03 to 1.3.1_19.
    I have multiple versions of jre's and jdks on my machine.
    Anyone else seen this problem or know how to resolve it.

  • How do I create multiple objects during runtime?

    I don't know how to create multiple objects during runtime, here's my problem:
    I get a String as input. Then I create an object called newobject. I put the object in a hashtable with the above string as key.
    Then comes the problem, in order to create a new object, I have to rerun the same class, which uses the same name (newobject) to create a 2nd object. Now my hashtable doesn't reference to my 1st object anymore...
    Is there anyway I can fill up the hashtable with different objects, and make each key point to each object it was supposed to?
    For those who want to see a bit of the program:
    public class PlayBalloon{
    public Hashtable ht = new Hashtable();
    for(){
    Balloon pB = newBalloon;
    newBalloon=new Balloon(pB);
    ht.put("Some input from user", newBalloon);
    for(){
    ht.get(s).draw;<= s=string, draw=own meth. in Balloon
    }

    I think i can see the problem that you are having. You have, in effect, duplicate keys in your hashtable - ie, two strings used as keys with the same name.
    The way that a hashtable works is as follows...
    When you ask for a value that is mapped to a key it will go through the table and return the first occurence it finds of the key you asked for. It does this by using the equals() method of whatever object the key is (in your case it is a String).
    If you cant use different Strings for your keys in your hashtable then i would consider writing an ObjectNameKey class which contains the String value that you are trying to put in the hashtable and an occurrence number/index or something to make it unique. Remember to override the equals method in your ObjectNameKey object or else the hash lookup will not work. For example
    class ObjectNameKey {
        private String name;
        private int occurence;
        public ObjectNameKey(String name, int occ) {
            this.name = name;
            this.occurence = occ;
        public String getName() {
            return name;
        public String getOccur() {
            return occurence;
        public boolean equals(Object o) {
            if (!(o instanceof ObjectNameKey)) {
                return false;
            ObjectNameKey onk = (ObjectNameKey)o;
            if (onk.getName().equals(name) && onk.getOccur() == occurence) return true;
            return false;

  • How to create a text object at runtime?

    Hi,
    I am using crystal reports for visual studio 2010 and using c# to programming.
    I need to create  a text object in a specific section like section 2. and also I need to control the text object's position and text.
    I tried to move a object like:
    reportDocument1.ReportDefinition.Sections[j].ReportObjects<i>.Left = 0x8760;
    but object's position doesn't change at all.
    How can I do these (create a text object and change a object postion)?
    Thanks

    Hi Don,
    Thank you.
    I have downloaded a RAS ( report application Server ) sample.
    The sample uses the Business Objects Enterprise XI release 2. I am using win 7 and crystal reports for vs2010. Can I use this version of crystal reports to create  a text object at runtime? If not, what is the lowest version I have to purchase to achieve what I want?
    Basicly I need following capabilities at runtime:
    1) craete text objects, line objects, image objects.
    2) change text object, line object and image object positions, sizes, values of text object. If can I like to be able to change font as well.
    3) supress objects, sections. 
    4) change section's height

  • Custom Annotation :: inject object at runtime

    I would like develop a custom annotation to inject object at runtime. The annotation will work as follows
    1. develop ValidatorClass annotation on type.
    2. If annotated on a type object will be created at runtime and injected to the object. e.g. in class A it will inject validatorimpl object to vald object/
    Please let me know how to implement that.
    package com.debopam.validate
    public interface validator{
    public String validate();
    package com.debopam.validate
    public class validatorimpl implements validator{
    public String validate(){
       return "true";
    pckage com.debopam
    public class A{
    @ValidatorClass(name="com.debopam.validate.validatorimpl")
    validator vald;
    }

    yogeshd,
    It might be that the .class file for the annotation that you are compiling against is the one you have given us the source code for above, but when you run the program, the class file for the annotation is not the same, and is one that was compiled before you added the static field.
    This can happen if your classpath is wrong. (and would explain why the problem only occurs sometimes - because it is only failing when the classpath is wrong).
    If you run the following program with the Fully qualified name of your annotation as the argument, and with the same classpath as you run your program, it can tell you where it is finding the annotation class file. Check that this is the same one that you are compiling to.
    class WhereLoaded {
        public static void main(String[] args) {
            Class theClass=null;
            if(args.length > 0) {
                try {
                    theClass=Class.forName(args[0]);
                } catch (Exception e) {
                    e.printStackTrace();
                    theClass=Object.class;
            } else {
                System.out.println(
                    "The first argument should be a fully qualified class name," +
                    " using java.lang.Object instead"
                theClass=Object.class;
            String name=theClass.getName();
            name=name.substring(name.lastIndexOf(".")+1) + ".class";
            System.out.println(name + " loaded from " + theClass.getResource(name));
    }regards
    Bruce

  • Populating a authorisation object at runtime...

    Hi,
    how to populate a authorisation object at runtime? is it possible to have a variable etc that can be populated a runtime?
    I have a object zsales_off which has different values for different users. i need to create separate roles just to have different values for sales office for different users. i would like to avoid this by having a single role with the zsales_off getting populated at runtime.
    Details steps with code will be appreciated.
    thank you.

    Hello AHP,
    i am not still very clear about the detailed steps to be carried out as i am a novice in abap.
    i have created the authorisation variable and am using it in the query. if i manually assign values for sales office in the role, it is working fine.
    i want to assign values at run time. i am confused with the process as such.
    few doubts like:
    1> the variable should be of "authorisation" processing type or "customer exit" processing type.
    2>what to use I_step=0 or I_step =1? how to use? where to use?
    3>to write a abap code or use a func module, which one? how to use.
    any example(like in my case different sales office values for diffrent users) with DETAILED STEPS & CODE would be appreciated.
    also i need to have multiple single values for each user(but not interval).
    Please help.

  • Object with runtime number '0' not defined

    Hello,
    We have a problem in one step of the workflow we created for sales orders.
    The following are the errors:
    EXECUTE_METHOD_OBJECT_SYNC -> Object with runtime number '0' not defined
    EXECUTE_METHOD_BOR -> Object with runtime number '0' not defined
    EXECUTE_METHOD_BOR -> Object with runtime number '0' not defined
    Object with runtime number '0' not defined
    Message no. OL808
    We have already seen all the binds and correct.
    Thanks!
    Ariel Prebianca

    Associated message no with message 'Object with runtime number '0' not defined' is OL 808.
    Check Note 1322173 - Wrong error msg raised in BP_JOB_READ of interrupt process. It may not directly solve the issue but it will help you show correct message.

  • How to register Business Object Portlet in Oacle Portal

    Hi Gurus,
    Could anybody give me an idea How to register Business Object Portlet in Oacle Portal.
    Thanks & Regards
    Vikram

    Hi
    I am also looking into BO portlets but maybe I am one step behind you as I am still trying to find where to download the provider from.
    Could you tell me where to got the portlet from.
    I recently went to the Business objects web site and could only find a java portal integration kit for JSR 168 platforms (10g included in the list)
    at http://www.businessobjects.com/products/downloadcenter/boepik.asp

  • How to register new objects in b2b isa crm 2007

    Hi,
    This is a crm 2007 isa b2b development.
    I have written a new bom and backend object.I registered the new objects as per the dev and ext guide for isa5.0.The customer version of backendobject-config.xml and bom-config.xml look like this after my changes.But still I am not able to call the backend object.
    *backendobject-config.xml*
    <backendobject xmlns:isa="com.sap.isa.core.config" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xml="http://www.w3.org/XML/1998/namespace">
    <configs>
    <!-- customer changes in backendobject-config should be done here by extending/overwriting the base configuration-->
    <xi:include href="$/modification/backendobject-config.xml#xpointer(backendobject/configs/*)"/>
    <config isa:extends="../configs@id='crmdefault'">
    <businessObject
    type="Z_PromiseShipToDate"
    name="Z_PromiseShipToDate"
    className="com.mycomp.isa.promiseShipToDateView.backend.crm.Z_PromiseShipToDateCRM" connectionFactoryName="JCO" defaultConnectionName="ISAStateless"
    />
    </config>
    </configs>
    </backendobject>
    *bom-config.xml*
    <BusinessObjectManagers xmlns:isa="com.sap.isa.core.config" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xml="http://www.w3.org/XML/1998/namespace">
    <!-- customer changes in bom-config should be done here by extending/overwriting the base configuration-->
    <xi:include href="$/modification/bom-config.xml#xpointer(BusinessObjectManagers/*)"/>
    <BusinessObjectManager name="Z_CUSTOM-BOM" className="com.mycomp.isa.customBusinessmanager.Z_CustomBusinessObjectManager"/>
    </BusinessObjectManagers>
    Can anyone please let me know  what I am doing to register new objects is correct or there is something m ore to it.Please respond at the earliest.Please provide me with dev and ext guide for this if anyone has.

    Hi,
    I wasalso in the same boat. We are on SP15 but I was not able to see CRM2007 in the product list. I implemented following note 1159756 and now I can see the CRM2007. Now I want to upload SAP Best practices document. Right now I don't see it, do I have to upload them manually ?
    Thanks
    Sumit Mathur

  • Creating and compiling JavaFX objects at runtime

    I am interested in the possibility of creating JavaFX objects at runtime where their definition is not know until runtime and am unsure about how to do this. Clearly I will need the JavaFX Script compiler at runtime which I guess is not that much of a problem but I am looking to accomplish this within the browser context so it would mean that I need the compiler to be available as part of the standard JRE much in the same way as the JavaFX Script interpreter is to obviate the need for it to be downloaded.
    Does anyone know if the JavaFX Script compiler is available as a built-in component within the latest versions of the JRE? If not, is it planned to include it in the future (JSE 7 perhaps)?
    Thanks,
    The Gibbon

    Perhaps the thread [Dynamic Scripting, how?|http://forums.sun.com/thread.jspa?threadID=5379268] can help.

  • Creating View Objects at Runtime for Validation

    In Oracle® Application Development Framework
    Developer’s Guide For Forms/4GL Developers tutorial there is a topic about Creating View Objects at Runtime for Validation.
    Is there any sample code available for this topic?
    Please help
    Regards
    S Karar

    I have created a helper method . The code is given below
    protected ViewObject getValidationVO(String viewObjectDefName) {
    // Create a new name for the VO instance being used for validation
    String name = "Validation_" + viewObjectDefName.replace('.', '_');
    // Try to see if an instance of this name already exists
    ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject(name);
    // If it doesn't already exist, create it using the definition name
    if (vo == null) {
    vo = getDBTransaction().getRootApplicationModule().createViewObject(name,viewObjectDefName);
    return vo;
    // Validation_bc4j_project of type ApplicationModule not found
    and created a validation method.
    The code inside validation method is given below.
    public boolean validateAvgMr(Number data) {
    String batch_catg = getQuality();
    // Get the view object instance for validation
    ViewObject vo = getValidationVO("bc4j_project.v_sqc0150");
    if (getTestStage()=="DOLLOP" && getQuality()=="DECO")
    // Set it's bind variables (which it will typically have!)
    vo.setNamedWhereClauseParam("batch_catg","DECO");
    vo.executeQuery();
    Number dol_mr_lcl=(Number)vo.first().getAttribute("DolMrLclStd");
    setStdMrLcl(dol_mr_lcl);
    return true;
    return true;
    I have checked the validation view and it is returing value with the same bind variable value but is not returning any value when using inside this method validation.
    I have checked several times but can't find the fault in the code.
    Please help

  • Modify object in runtime.

    Ok, I wonder, since there is no simulation loop or anything, how do I modify an object in runtime. For instance, I want an object to check a variable for the color of the object. I also made a grid/surface with different y-values in the coordinates with lineArray, and would like to update the surface in runtime. How is this done, with behavious or something else?
    Thanks in advance.

    Yes, you use the Behavior framework for that. You can select different stimuli to activate a Behavior (elapsed time, number of rendered frames, user input, ...).
    PS: There is a simulation loop, but it's not under user control. But the Behavior framework interacts with it.

  • Naming Objects at runtime

    Hi all!
    I want to make instances of a class in a for loop then naming them for example something+i. so you would get somethig1, something2 and so on..
    or even maybe naming them after a string provided by the user.
    googlet it and found a previous posted thread where the replyes was that you couldnt do thi. I think it was missinterpiated a little. I know this is possible have seen it done at one time..
    Any tips would be greatly apriciated :)
    regeards
    Pelle

    Well, I am making the new object at runtime. So why
    shouldn it be possible to name it to?1) Objects do not have names.
    2) Variable names are determined at compile time.
    This is so because this is how the Java Language spec defines the language to work.
    http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html

  • Identify objects at runtime

    Is there a way to identify objects on a form at runtime other than items in blocks?
    For instance, I want to identify frames on a canvas, boilerplate (text labels), tabbed canvases, etc. at runtime without actually naming them - as in getting the names/ids programatically through maybe get_canvas_property() or get_form_property.

    You can use FIND_* built-ins for canvases and Windows - you can't address boilerplat objects at runtime.

  • Activating a webservice provider asks to register an object

    Hello all,
    I'm developing a webservice provider (based on a RFC) within SAP ERP6.0 (ehp6) using the wizard. In the end when I try to activate the service provider it asks me to register the object in SAP marketplace. The object refers to a class... something like this: R3TR CLAS /1BCDWB/WSCA2CB7301971133181FF.
    This is a strange issue because I'm creating the service using Z prefix. I already created another webservice providers in SAP ERP previous versions and this issue never happened.
    My question is: in SAP ERP latest versions, when providing web services, the system will always ask to register this kind of object even if we are using Z objects? Is there anyone creating webservices in the latest versions and had the same issue?
    Note: I have registered this object and the system created this class with superclass CL_SRG_RFC_PROXY, the methods: CONSTRUCTOR, GET_PROXY and the attributes VERSION and CTX
    Thank you.
    Regards,
    Paulo Dinis

    This is an error.
    I implemented the following SAP note to solve this issue:
    Note 1649307 - System status "cannot be changed": Change of generated class
    Thank you for your replies.

Maybe you are looking for