Call Inbound Plug or other method of usage component

Hi guys,
in crm web ui  i created one component named "A" which has several component usages. One of the usage component is named "B".
Now the usage component "B" has an inbound plug called "ClearAll", which i want to trigger from component A.
How do i do that? Or more specific, how do i get the interface controller of component B, so that i can call a the inbound plug method "clearall",
My Problem is not about Popups.
in WD_USAGE_INITIALIZE i'm already able to populate the context, but what i need is a method call before or after sharing the context node:
call method super->wd_usage_initialize
     exporting
       iv_usage = iv_usage.
   case iv_usage->usage_name.
     when 'CUBP_HEAD_SEARCH'.
       try.
         iv_usage->bind_context_node( iv_controller_type  = cl_bsp_wd_controller=>co_type_component
                                      iv_target_node_name = 'PARTNER2'
                                      iv_node_2_bind      = 'PARTNER' ).
Thanks!

Very Good ! thanks for this, i also analysed a little bit yesterday and achieved to really call the window controller:
What i wanted to do is to call the clear_all of BP_HEAD_SEARCH - component, which i always specified as component B.
In Component A using BP_HEAD_SEARCH, i hooked some coding into method DO_PREPARE_OUTPUT of the only View, which is an overview Page
Hooking up this method, i'm sure that the initialitation of all context nodes etc. of component B took place and i'll be able to successfully call the inbound plug:
if me->prepared_output <> 'X'.
  data lr_usage type ref to cl_bsp_wd_component_usage.
  data lr_if_window type ref to cl_bp_head__searchhelpwin_impl.
  data lr_if_window_abstr type ref to  cl_bsp_wd_window.
  lr_usage      ?= me->comp_controller->get_component_usage( 'CUBP_HEAD_SEARCH' ).
  lr_if_window ?= lr_usage->get_interface_view_contr( 'SearchHelpWindow' ).
  lr_if_window->ip_clear_all(  ).
endif
the clue was not to use the interface if_bsp_wd_component_usage, but to use the class cl_bsp_wd_component_usage as type of the usage object.
Doing so, i'll be able to call method get_interface_view_contr which will give me the window controller finally.
But your solution is good as well !
Thanks!

Similar Messages

  • Calling Inbound Plug of one Window of one Component in another WD Component

    Hi All,
        Can anyone please tell me how to call a Window's Inbound Plug of one WD Component in another WD Component.
    Thanks in advance!
    Best Regards,
    Devyani

    Hi Devyani,
        are you calling the view (embeded in a window ) of a component 1 in component 2. If so,
    1. Define the used component(Component 1) in the using component (Component 2)
    Component Use : Comp1
    Component        : Component 1(Name of the component)
    2. On action: using component usage window, window of component can be called as a pop up window in component 2
    If this is not your requirement, let me know. i will try to help
    Regards,
    Sankar

  • Can't call Inbound Plug before DO_VIEW_INIT_ON_ACTIVATION

    Hi everyone,
    I have a custom quotation search page containing an extra column (quotation-ID) that:
    shows the quotation id
    acts as a link
    points the user to a completely custom screen
    In this custom screen I need to access the GUID of the selected quotation. Here's how I solve this:
    Event handler -- called when user clicks Quotation ID
    Using dynamic navigation, I redirect the user to the page containig my custom UI object type 'ZREA_FOLLOW_BCG', and I pass along the quotation that was selected, the entire entity. (see partly code below)
    CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_entity_based
        EXPORTING
          ir_entity           = lr_entity
          iv_ui_object_type   = 'ZREA_FOLLOW_BCG'
          iv_ui_object_action = 'B'            "display
        RECEIVING
          rr_result           = lr_desc_object.
    Inbound Plug -- fired when navigating
    I created an inbound plug 'IP_FROM_SEARCH' in my custom window. In SPRO I made sure this IP is called when navigating dynamically using my UI object type. (see image)
    In the body of this inbound plug I can access the quotation in the local variable 'iv_collection'. I pass the GUID of this entity on to a public attribute of the component controller. This way I will be able to access it from everywhere in the component. (see code partly below)
    lv_guid = lr_entity->get_property_as_string( 'GUID' ).
    lr_coco->current_rea_guid = lv_guid.
    DO_VIEW_INIT_ON_ACTIVATION
    In DO_VIEW_INIT_ON_ACTIVATION the following code lets me access the GUID from the attribute in the component controller:
    lr_coco ?= me
    ->comp_controller.
    CHECK lr_coco IS BOUND.
    lv_value = lr_coco->current_rea_guid.
    As a result, I now possess the GUID I wanted, and I can load my custom screen using this GUID.
    However.....
    All of this works fine. The inbound plug is fired, and then comes the DO_VIEW_INIT_ON_ACTIVATION, as it should.
    But when I test this in the webui, and I then click the 'Back' button, I'm being redirected to my custom search page. If i then select another quotation, the custom page loads again, but using the quotation that I selected the first time!
    I debugged this and I noticed the following: The second time (after I pressed 'back'), the DO_VIEW_INIT_ON_ACTIVATION is loaded BEFORE my inbound plug is. This is why the GUID is not updated yet...
    Can anyone tell me how I can make SAP fire the inboud plug first? Maybe I need to clean something up?
    Thanks in advance!
    Jonathan

    Hi Jonathan,
    have you tried to put the code you have in the DO_VIEW_INIT_ON_ACTIVATION method in a different method? I'd suggest putting this code in the DO_PREPARE_OUTPUT method.
    The following post contains th eorder in which the different methods of a component are called: Order of methods in WEB UI. Maybe this is also useful for you.
    Best,
    Christian

  • GetDSN from other method

    Hi,
    can some one tell me how to call the dsn from other method within the same cfc.
    this getDSN method return me the correct dsn that i declared from application.cfm.
    <cffunction name="GetDSN" access="public"  output="false"    hint="Gets the DSN">
    <cfargument name="dsn" required="yes">
        <cfreturn this />
    </cffunction>
    how can i get the dsn from above method.  What i have is not working..........
    <cffunction name="findDupicate" output="no" access="public" returntype="query">
            <cfargument name="form" required="yes" type="struct">   
            <cfquery name="check_duplicate" datasource="#GetDSN#">
            SELECT voucherNo
            FROM voucher
            WHERE voucherNo= <cfqueryparam value="#arguments.form.voucher#" cfsqltype="cf_sql_varchar" />
        </cfquery>
        <cfreturn check_duplicate>
        </cffunction>
    Thanks

    Two things that immediately spring to mind.
    getDsn() is misnamed, or does the wrong thing.  It doesn't return a DSN, it returns the entire object (return this).
    I your CFQUERY tag you're not calling getDsn(), you're just using it as a value, eg: "getDsn" is a reference to the method itself, but "getDsn()" is actually CALLING the method.
    Oh a third thing: something called getDsn() would not normally take an argument that is the very thing it is supposedly getting.  IE: why is getDsn() taking an argument of dsn?  It should be RETURNING the DSN name, not having it passed into it.
    Adam

  • Event handler of inbound plug not called when plug fired by event handler

    Hello All,
    I have a rather bizzare problem, hopefully someone out there can figure out what is going on, as I'm rather stumped.
    I have 2 views, A and B. They are linked by plugs, InA, InB, OutToA, OutToB. OutToB is linked to InB from A to B, OutToA is linked to InA from B to A.
    There is an onActionLink in view A. Clicking on this triggers an action which calls the wdFirePlugOutToB method.
    In view B some handling is done in the method onPlugInB, then wdFirePlugOutToA is called to change the displayed view back to A.
    As far as the user is concerned they don't ever see view B. (this bit works perfectly!)
    Now also in view A I have an event handler which handles a event from the component controller. It also calls wdFirePlugOutToB.
    If I trigger an event in the component controller this event handler is called and the method called. However, when I put a breakpoint in the onPlugInB, flow never reaches here. Flow does get to the wdDoModifyView of view B but never to the inbound plug event handler.
    Any suggestions as to what I might need to do? I would have thought calling the wdFirePlugOutToB method would ALWAYS trigger the linked event handler onPlugInB.
    I am running NW04 SP18.
    Thanks!

    Hi Bharathwaj,
    The project I'm working on has a requirement to allow for a road-mapped process (FPM) which has one step in which multiple screens can be accessed. I'll give an example: A user in step A selects the cost centre that they want to work with, in step B they need to maintain several pages of information about this cost centre. The do not want to break this information into steps, as there is no logical progression from one step to the next, and it may well be that the user wishes to go from maintaining screen 1 to screen 3, and then screen 2, and then screen 4. Stepping between all screens (1->2->3->2->3->4) wastes time and is not very user friendly. Step C of the process confirms the data that the user entered in step B, and Step D is the validation that the changes have been committed to the database. (a very familar 4 step process for those using ESS).
    To allow for this requirement, I have designed a left navigation pane type screen. links appear on the left of the screen and the user can use these to navigate between different screens (implemented as FPM IVAC VCs) on the right of the screen.
    It is quite an elegant solution (even if I do say so myself although quite complex to implement. I have relied very heavily on reading the code SAP put together for the FPM. The most complex part is that in order to update the the content of view containers in an application you must trigger a web dynpro view navigation by firing a plug to a different view.
    Unfortunately I don't have any sample application code, only the finished product, which I can't really share. But I can say that if you look at the FPM code carefully, working from where the wdInit of the FPM is called, it will eventually make sense.
    One thing I found slightly frustrating, you can't use the FPM's component usage register (FPM method attachComponentUsage(IWDComponent, IWDComponentUsage)) to add a VC... darned inconvienient really (you'd think that the web dynpro framework could have implemented the concept of extending an interface, but the IBLC and IVAC interfaces are different! - even though the IVAC is just IBLC + a few methods), but then again you can manage the instantiation of the used VC yourself and call the onInit method of the VC passing the current fpm reference, to attach it to a common FC, and given that you should be sharing context through the FC and never the VC, then really this isn't too much of an issue. (I spent ages worrying that I couldn't add the instances of the VC that I was using within my navigation pane VC to the fpm instance list, until I realised that it really didn't matter!)
    One day - when I have time (yeah right!) I might put together a blog about this sort of stuff, in the meantime, it keeps me plenty busy enough not to have the time!
    Hope this helped in some small way,
    Cheers,
    Chris

  • Calling parent's view inbound plug from modal window?

    Hi,
    I have a window A with a view ("the parent") that calls another window B as a modal one. This window B uses own buttons for actions, no standard ones (OK, Yes, No ...). The problem is that the actions in window B are changing the content in window A. I want  that after closing the modal window B a specific inbound plug of the view of the other window A is called (where a refreshing mechanism is available). How to do that? I tried with the - at other posts - suggested method of exit-plugs, but that didn't work (because outbound and requested inbound plug belong to different windows ???).
    Thanks for your help,
    Alexander

    Hi,
    thanks for your reply. My problem was that in my popup window no standard buttons are available, so that the SET_ON_CLOSE_ACTION can't be used (cf. documentation it only works with the CANCEL-Button). But with this hint I was able to find another solution (which was by the way explained in another thread answered by you 8-) ): I have to create an event in the component controller and fire this event from my window B. Then I have to subscribe a method of window/view A to that event which does the required refreshing. [trigger event from "child" webdynpro;.
    Best regards,
    Alexander

  • EJB 3.1 @Asynchronous and calling other methods from within

    Hey all,
    I am helping a friend set up a test framework, and I've turned him on to using JEE6 for the task. I am decently familiar with entity beans, session beans, and such. One of the new features is @Asynchronous, allowing a method to be ran on a separate thread. The test framework generally needs to spawn potentially 1000's of threads to simulate multiple users at once. Originally I was doing this using the Executor classes, but I've since learned that for some reason, spawning your own threads within a JEE container is "not allowed" or bad to do. I honestly don't quite know why this is.. from what I've read the main concern is that the container maintains threads and your own threads could mess up the container somehow. I can only guess that this might be possible if your threads use the container services in some way.. but if anyone could enlighten me on the details as to why this is bad, that would be great.
    None the less, EJB 3.1 adds the async capability and I am now looking to use this. From my servlet I use @EJB to access the session bean, and call an async method. My servlet returns right away as it should. From the async method I do some work and using an entity bean store results, so I don't need to return a Future object. In fact, my ejb then makes an HttpClient call to another servlet to notify it that the result is ready.
    My main question though, is if it's ok to call other methods from the async method that are not declared @Asynchronous. I presume it is ok, as the @Asynchronous just enables the container to spawn a thread to execute that method in. But I can't dig up any limitations on the code within an async method.. whether or not it has restrictions on the container services, is there anything wrong with using HttpClient to make a request from the method.. and making calls to helper methods within the bean that are not async.
    Thanks.

    851827 wrote:
    Hey all,.. from what I've read the main concern is that the container maintains threads and your own threads could mess up the container somehow. I can only guess that this might be possible if your threads use the container services in some way.. but if anyone could enlighten me on the details as to why this is bad, that would be great.
    Yes since the EE spec delegated thread management to conatiners, the container might assume that some info is available in the thread context that you may not have made available to your threads.
    Also threading is a technical implementation detail and the drive with the EE spec is that you should concentrate on business requirements and let the container do the plumbing part.
    If you were managing your own threads spawned from EJBs, you'd have to be managing your EJBs' lifecycle as well. This would just add to more plumbing code by the developer and typically requires writting platform specific routines which the containers already do anyway.
    >
    None the less, EJB 3.1 adds the async capability and I am now looking to use this. From my servlet I use @EJB to access the session bean, and call an async method. My servlet returns right away as it should. From the async method I do some work and using an entity bean store results, so I don't need to return a Future object. In fact, my ejb then makes an HttpClient call to another servlet to notify it that the result is ready.
    My main question though, is if it's ok to call other methods from the async method that are not declared @Asynchronous. I presume it is ok, as the @Asynchronous just enables the container to spawn a thread to execute that method in. But I can't dig up any limitations on the code within an async method.. whether or not it has restrictions on the container services, is there anything wrong with using HttpClient to make a request from the method.. and making calls to helper methods within the bean that are not async.
    Thanks.If you want to be asynchronous without caring about a return value then just use MDBs.
    The async methods have no restrictions on container services and there is nothing wrong with calling other non async methods. Once the async method is reached those annotations don't matter anyway (unless if you call thhose methods from a new reference of the EJB that you look up) as they only make sense in a client context.
    Why do you need to make the call to the servlet from the EJB? Makes it difficult to know who is the client here. Better use the Future objects and let the initial caller delegate to the other client components as needed.

  • Automatically call specific method at other method invocation~ish?

    I have a class which basically acts as a wrapper around a List. It contains a List object and some methods that do something with that list.
    Now, in order to prevent exceptions, I've made a basic method that just checks if the List field is null and, if so, it will create a new ArrayList and chuck it in that field.
    Right now, I just have a call to that particular method in each other method that performs an operation on the list, like so:
    public class SomeClass<T> {
       private List<T> list;
       private void checkList() {
         if ( list == null) {
           list = new ArrayList<T>();
      public int method() {
        checkList();
        return list.doSomething();
      }Is there a way, prefferably a native Java way, to automatically have the checkList() method called before each and any method invocation? As in, whenever a method is called in the SomeClass, Java / the JVM automatically calls the checkList method?
    }

    Yop wrote:
    I have a class which basically acts as a wrapper around a List. It contains a List object and some methods that do something with that list.
    Now, in order to prevent exceptions, I've made a basic method that just checks if the List field is null and, if so, it will create a new ArrayList and chuck it in that field.
    Right now, I just have a call to that particular method in each other method that performs an operation on the list, like so:
    public class SomeClass<T> {
    private List<T> list;
    private void checkList() {
    if ( list == null) {
    list = new ArrayList<T>();
    public int method() {
    checkList();
    return list.doSomething();
    }Is there a way, prefferably a native Java way, to automatically have the checkList() method called before each and any method invocation? As in, whenever a method is called in the SomeClass, Java / the JVM automatically calls the checkList method?
    }Why not return the List<T> in the check() method? Like this:
    List<T> check() {
       if (list == null) list= new ArrayList<T>();
       return list;
    void otherMethod(T t) {
       check().add(t);
    }Instead of using variable 'list' directly, use the 'check()' method.
    kind regards,
    Jos

  • Other method than CALL METHOD prxy- execute_synchronous

    Hello Gurus,
    I am passing the data from SAP to XI throught proxy and pusing the proxy thorugh CALL METHOD prxy->execute_synchronous..
    Is there any other method other then CALL METHOD prxy->execute_synchronous for pushing the proxies which would be good with respecive to performance..
    let me know so that I would really appreciate for it.
    Thanks in advance,
    M-

    We've been using this technique with no performance issues - have you traced the code before the proxy is being called because it seems quite likely that is where the issue lies... and will your model support asynch processing or must the messages flow in sequence?
    Jonathan

  • ICCMP_BT_FOUP - How to call meth. 'DO_HANDLE_EVENT other Component/View?

    Dear Experts,
    when changing the field CONC_KEY-BTN in view BTSHeader in component ICCMP_BTSHEAD (Interaction Record Component)
    the method DO_HANDLE_EVENT of the view controller is called.
    The standard coding of the method is:
    method DO_HANDLE_EVENT.
    * Eventhandler dispatching
        CASE htmlb_event_ex->event_server_name.
          WHEN others.
            global_event = super->do_handle_event( event           = event
                                                   htmlb_event     = htmlb_event
                                                   htmlb_event_ex  = htmlb_event_ex
                                                   global_messages = global_messages ).
        ENDCASE.
    endmethod.
    The component ICCMP_BTSHEAD is used in component ICCMP_BT_INR. Also visible in component ICCMP_BT_INR is the component ICCMP_BT_FOUP (View:CREATEFOLLOWUP) used to create Follow-Up Documents like Service Tickets.
    What I want to is that, if the value of the field CONC_KEY-BTN is '1', the fields of the view CREATEFOLLOWUP follow-up-document have to be not modifiable. If the value of field CONC_KEY-BTN is '2' the fields are modifiable and it is possible to create a Follow-Up Document. That is my basic requierement. Better would be if the view CREATEFOLLOWUP would not visible if the value of the field CONC_KEY-BTN is '1'. But that would be more difficult I think?
    To make the fields not modifiable, I think I have to modify the Get and Set Methods of the specific Atributes. But my problem is how can I modify the above mentioned method 'DO_HANDLE_EVENT' (View: BTSHeader) so that the event 'DO_HANDLE_EVENT' of the view controller of view CREATEFOLLOWUP is called at the same time (The problem is that the 'DO_HANDLE_METHOD of view CREATEFOLLOWUP is not called when changing the field CONC_KEY-BTN of the view BTSHeader ).
    Best Regards
    Oliver

    Hi Oliver,
    In my opinion, the logic is not to be controlled at the do_handle_event level. ICCMP_BT_FOUP is created as a component usage right? So  in the component ICCMP_BT_INR, there will be a navigation link defined with source as outbound plug of  ICCMP_BT_INR and  target as inbound plug of  ICCMP_BT_FOUP. In this outbound plug, you can fill the param IV_DATA_COLLECTION as follows:
    data: lr_current type ref to if_bol_bo_property_access,
                        lr_col      type ref to if_bol_bo_col.
      lr_current = me->typed_context->YOUR CONTEXT NODE->collection_wrapper->get_current( ).
      check lr_current is bound.
      create object lr_col
        type
          cl_crm_bol_bo_col.
      check lr_col is bound.
      lr_col->add( lr_current ).
    Now pass this collection to the target inbound plug.
    In the inbound plug of the target, you can control the logic based on the value of the attribute field in the collection.
    I think this should work.
    Regards,
    Nisha

  • Call to a possibly undefined method displays when using static function in Unit Test

    Hello!
    This has been driving me nuts. I am setting up unit tests for a static class which manages a collection of songs. This is how my unit test class looks:
    //START CODE
    package flexUnitTests {
              import com.myapp.managers.MusicManager;
              import flash.utils.Dictionary;
              import flexunit.framework.Assert;
              public class MyAppManagerTest {
                        [Before]
                        public function setUp():void {
                                  var songData:Dictionary = new Dictionary();
                                  songData["mn0012345"] = new Dictionary();
                                  songData["mn0012345"]["title"] = "All the Pretty Little Horses";
                                  songData["mn0012345"]["description"] = "by: American Traditional | Voice, Piano | 3 pages";
                                  MusicManager.setSongData(songData);
                        [Test]
                        public function test_getAuthorsBySKU():void {
                                  var expected:String = "American Traditional";
                                  var given:String = MusicManager.getAuthorsBySKU("mn0012345");
                                  Assert.assertEquals(expected, given);
    //END OF CODE
    You will notice two calls in red above. When I leave them in the code I see a variety of errors which look like this:
    "Call to a possibly undefined method '' through a reference with a static type com.myapp..."
    And
    "Access of possible undefined property '' through a reference with static type com.myapp..."
    Then, when I comment out the two lines in red above, these errors go away. Flash Builder seems really flakey to me. Often I notice that the error list varies, how can it just no longer be an error? Where did this new access error come from, in a no related part of the code, by adding or removing a function call to a static class which remains in the import statement.
    Note that the MusicManager contains no references to any of the UI mxml that is throwing these errors. It just simply loads data into a few globals and allows you to grab info.
    How is my usage of this function making foreign objects inaccessible?
    Please help!!! I am really hoping there is an answer but I have a bad feeling the answer is just that Flash Builder is flakey.

    I did some more work on the issue above. There are functions with in the MusicManager that call the UserManager to get a user's ID. When I comment out these calls then the access errors go away. Well the user manager has some calls back to mxml that tell the class that changes where made. My best guess is this is where it stems into the code that is randomly throwing errors. But, it compiles fine and runs fine on a device. Is there something with test cases which doesn't invoke the UI?

  • CRM IC Web - Inbound Plugs

    Hi,
    I have created a Custom view and attached the same within the Viewset 'BuPaIdentifyCustomer'. The Custom view is displayed as needed.
    I am trying to link 'BuPaSelectCustomer' and my Custom view. BuPaSelectCustomer displays all the customers in tabular format, and the first column is a button, on click of which method EH_ONSELECT is triggered.
    I have created a navigational link in BuPaNavigationalLinkGlobal.xml as follows:
                       <NavigationalLink name="intrec">
                        <Source viewRef="BuPaSelectCustomer" outboundPlugRef="default"/>
                        <Targets>
                             <Target viewRef="Z_CRM_IC/IntRecords" inboundPlugRef="INBOUNDPLUG"/>
                        </Targets>
                   </NavigationalLink>
    The Outbound plug method in the source view is triggered.
    I have created manually an inbound plug method 'IP_INBOUNDPLUG' in the target view controller class.  This method is not getting triggered.
    Can anyone please help me out in the same?
    Thanks,
    Shankar

    Hi All,
    The problem is solved. The inbound plug method's visibility was protected, it has now been set to Public and its working fine.
    Thanks,
    Shankar

  • Error while calling a super class public method in the subclass constructor

    Hi ,
    I have code like this:
    CLASS gacl_applog DEFINITION ABSTRACT.
      PUBLIC SECTION.
        METHODS:
                create_new_a
                   IMPORTING  pf_obj       TYPE balobj_d
                              pf_subobj    TYPE balsubobj
                              pf_extnumber TYPE string
                   EXPORTING  pfx_log_hndl TYPE balloghndl
                   EXCEPTIONS error
    ENDCLASS.
    CLASS gacl_applog IMPLEMENTATION.
      METHOD create_new_a.
        DATA: ls_log TYPE bal_s_log.
      Header aufsetzen
        MOVE pf_extnumber TO ls_log-extnumber.
        ls_log-object     = pf_obj.
        ls_log-subobject  = pf_subobj.
        ls_log-aluser     = sy-uname.
        ls_log-alprog     = sy-repid.
        ls_log-aldate     = sy-datum.
        ls_log-altime     = sy-uzeit.
        ls_log-aldate_del = ls_log-aldate + 1.
        CALL FUNCTION 'BAL_LOG_CREATE'
             EXPORTING
                  i_s_log      = ls_log
             IMPORTING
                  e_log_handle = pfx_log_hndl
             EXCEPTIONS
                  OTHERS       = 1.
        IF ( sy-subrc NE 0 ).
          MESSAGE ID      sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING error.
        ENDIF.
      ENDMETHOD.
    CLASS gcl_applog_temp DEFINITION INHERITING FROM gacl_applog.
      PUBLIC SECTION.
        DATA: log_hndl   TYPE balloghndl READ-ONLY
            , t_log_hndl TYPE bal_t_logh READ-ONLY
        METHODS: constructor
                   IMPORTING  pf_obj       TYPE balobj_d
                              pf_subobj    TYPE balsubobj
                              pf_extnumber TYPE string
                   EXCEPTIONS error
               , msg_add      REDEFINITION
               , display      REDEFINITION
    ENDCLASS.
    CLASS gcl_applog_temp IMPLEMENTATION.
      METHOD constructor.
        CALL METHOD create_new_a
               EXPORTING  pf_obj       = pf_obj
                          pf_subobj    = pf_subobj
                          pf_extnumber = pf_extnumber
               IMPORTING  pfx_log_hndl = log_hndl.
        IF ( sy-subrc NE 0 ).
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING error.
        ENDIF.
      ENDMETHOD.
    A public method of Super class has been called from the constructor of the sub class. we are getting the syntax error :
    ' In the constructor method, you can only access instance attributes, instance methods, or "ME" after calling the constructor of the superclass…'
    Can you please suggest how to change the code with out affecting the functioanlity.
    Thank you ,
    Lakshmi.

    Hi,
    Call that method by instance of Subclass.   OR
    SUPER-->method.
    Read very useful document
    Constructors
    Constructors are special methods that cannot be called using CALL METHOD. Instead, they are called automatically by the system to set the starting state of a new object or class. There are two types of constructors - instance constructors and static constructors. Constructors are methods with a predefined name. To use them, you must declare them explicitly in the class.
    The instance constructor of a class is the predefined instance method CONSTRUCTOR. You declare it in the public section as follows:
    METHODS CONSTRUCTOR
            IMPORTING.. [VALUE(]<ii>[)] TYPE type [OPTIONAL]..
            EXCEPTIONS.. <ei>.
    and implement it in the implementation section like any other method. The system calls the instance constructor once for each instance of the class, directly after the object has been created in the CREATE OBJECT statement. You can pass the input parameters of the instance constructor and handle its exceptions using the EXPORTING and EXCEPTIONS additions in the CREATE OBJECT statement.
    The static constructor of a class is the predefined static method CLASS_CONSTRUCTOR. You declare it in the public section as follows:
    CLASS-METHODS CLASS_CONSTRUCTOR.
    and implement it in the implementation section like any other method. The static constructor has no parameters. The system calls the static constructor once for each class, before the class is accessed for the first time. The static constructor cannot therefore access the components of its own class.
    Pls. reward if useful....

  • Error when calling a Webservice's public method in Forms10g

    Hi,
    I'm getting the following error when calling a webservice's public method, i'm using Forms10g 10.1.2.3
    java.rmi.RemoteException; nested exception is: HTTP transport error javax.xml.soap.SOAPException
    java.security.PrivilegedActionException javax.xml.soap.SOAPException
    Message send failed javax.net.ssl.SSLException SSL handshake failed X509CertChI have added the Jar containing the client proxy in both Classpaths(system variable and default.env), the jar has been made with jdk 1.4
    I also have tested the client proxy from jDeveloper and it's working there, but in Forms i'm getting this error.
    I guess my problem might be that i'm calling a webservice that is secured since the url starts with https
    what should i do to fix this ??
    Regards
    Carlos

    I understand, so i have a doubt, why the webservice works on jDeveloper ??Not just JDeveloper even soapUI and Neatbeans have a way of working without a client certificate installed.
    I do not know how they achieve it. I know that they work without a client DC.
    Cheers,
    PS: See this http://stackoverflow.com/questions/8887434/webservices-ssl-https, it offers a clue.
    The java programs run unhindered when one-way authentication is being used. These products ship with a digital certificate that is in the path of most popular CAs.
    Corollary, if the Web Server is configured for mutual authentication then you need to install and configure the client certificate in the tools.
    Edited by: Prabodh on Dec 5, 2012 8:36 PM

  • Calling session bean's business method through web dynpro component

    Hi All,
    Can anybody tell me how to call a session bean's methods through a web dynpro WITHOUT java-model or web service model ??
    I have following scenario:-
    1. Stateless Session bean having two business methods
    2. Web Dynpro component
    3.Now i want to call business methods without using any model. I have got following piece of code but I dont know how to go about it.
    4.Where do i have to set JNDI name for session bean? which interface will be looked for?
    5. Do I have to declare public part for EJB DC? If yes, how?
    //This is inside web dynpro component
    InitialContext   context = new InitialContext();
    o = context.lookup(JNDIName);
    TestSessionbeanHome homeRef = (TestSessionbeanHome) PortableRemoteObject.narrow( o,                                                                               
    TestSessionbeanHome.class);
    TestSessionbean beanRef = homeRef.create();
    <returnValue> = beanRef.<ejb method name>
    Please help to get a step-by-step approach to this case.
    Thanks and regards,
    Amey Mogare

    Hi,
    If  I comment out the part that is using session bean's business method, DC is building fine.
    And if I uncomment, then compiler is unabl eto resolve business method(s).
    And i would like to mention that my EJB + J2EE App DC is building properly, but it havent yet deployed properly as I am waiting for data-source-alias name prefix to be configured by ERP team. So will this be a reason why Web Dynpro DC is not able to resolve business methods ??
    Because Web Dynpro DC is able to resolved all interfaces of Session bean and entity bean. But when it comes to business method, its not able to resolve.
    Any more ideas why it is not happening?
    Pls help.
    Now i went through some forum posts regarding this and found that we also need to add EJB DC to Java Build Path for WebDynproDC>Properties>Java Build Path.
    I did this and now it is able to resolve business methods and DTOs as well. So to summarize I did following:-
    1. Added EJB DC (complete DC) as a Used DC to Web Dynpro DC with Buid-n-Deploy-n-Run time dependency
    2. Added Sharing reference of J2EE application DC to Web Dynpro DC -->Properties
    This reference I constructed as follows:-
    <vendorname>/<name of j2ee application as appearing under display name tag in application.xml (replacing '/' with '~')>
    So my Sharing Reference becomes:- <vendorname>/reqpstapscreqpstapja_reqid
    3. Added EJB DC to Java Build Path in Web Dynpro DC's properties
    4. Then I added following piece of code to get object of SessionBean class
    InitialContext context = new InitialContext();
    Object o = context.lookup("java:comp/env/ejb/SessionRequestIDBean");
    SessionRequestIDHome homeRef = (SessionRequestIDHome) PortableRemoteObject.narrow(o, SessionRequestIDHome.class);
    SessionRequestID beanRef = homeRef.create();
    beanRef.<business method>
    But After doing this I am facing another problem :-
    The build fails saying it is not able find the package for DTOs. But when I see the Component Controller's code it is not showing any red or yellow marks.
    Can anybody pls help me out here?
    Thanks and regards,
    Amey Mogare

Maybe you are looking for

  • /How to call a function in another PowerShell script

    Hi All, I want to use dot-sourced method to call the function from other script,While calling Function.ps1 from the second script there is a Null value in the beginning, How can we ignore this null value or there is a better approach of doing it with

  • I get an error trying to open an ebook with adobe

    I get an error with the program adobe when trying to open an e book

  • Oracle Text Example

    Can someone post a quick example of an Oracle Text query?

  • Solaris 8 (Intel) Crash & Burn

    Having troubles installing Solaris 8 (Intel Platform) on a Gateway PC (PIII 733 MHz, 128 MB RAM, 20 GB HD). Seems no matter what I do, using web start or using interactive install, the screen goes all white and the system hangs just after the followi

  • Paramter info req?

    hi i had an query,i when ever use paramter in a select query,if its left blank,it never fetech records,if i put the paramter value,it fetch the data of thata value only,but if its blank,it has to select all the recoruds for that paramater. i always u