CALL METHOD CL_GUI_CFW= DISPATCH.

what is the use of CALL METHOD CL_GUI_CFW=>DISPATCH. one?

Hi Vinay.
I would like to suggest,
[SDN - Reference for Usage of CALL METHOD cl_gui_cfw=>dispatch|cl_gui_cfw=>dispatch;
[SDN - Reference for Issue in cl_gui_cfw=>dispatch|About CL_GUI_ALV_GRID's event-handling & PAI/PBO;
Hope that's usefull.
Good Luck & Regards.
Harsh Dave

Similar Messages

  • What is the functionality CALL METHOD CL_GUI_CFW= FLUSH

    Hi,
    What is the functionality of method "FLUSH" in class CL_GUI_CFW
    Should it be used after every call method CL_GUI_FRONTEND_SERVICES=>......
    What is the purpose of using it? What happens if we don't use it?

    hi
    good
    The class CL_GUI_CFW contains static methods that apply to all instantiated custom controls when you call them.
    You can force a synchronization point in your program by calling a method that is not buffered, or by calling the static method FLUSH.
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_f1.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-003.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>set_new_ok_code 
             EXPORTING new_code = 'F1'.         
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
    thanks
    mrutyun^

  • Problem with CL_GUI_CFW= DISPATCH

    hi experts,
    when I double click on a node , the dispatch metod :
    CALL METHOD CL_GUI_CFW=>DISPATCH
      IMPORTING
    RETURN_CODE = RETURN_CODE.
    returns ' -1'. ( RETURN_CODE = -1 ).
    means no event triggered, but I have double click on the node.
    Please tell me what could be the reason.
    Thanks.

    Check with below links :
    About CL_GUI_ALV_GRID's event-handling & PAI/PBO
    ALV REPORTS
    Thanks
    Seshu

  • Cl_gui_cfw= dispatch

    Hi,
      CALL METHOD cl_gui_cfw=>dispatch.
    I would like to know the usage of this method. pls explain in detail.
    Thanks & Regards,
    Kalaivani P

    Main use of this method (CALL METHOD cl_gui_cfw=>dispatch ) is " to dispatch the application events to the event handler registered for events. "
    If you do not call the method in PAI event, after processing of PAI it is called the events automatically and return the return_code.
    This link is very use full for u...
    www.erpgenie.com/abap/controls/how.htm
    --Ranveer
      [email protected]

  • Error calling methods CL_GUI_FRONTEND_SERVICES

    Hi all,
    I have a requirement in BAPI (integrating solman to portal) to download file from app. server to local directory. I used the below FM to get temp directory of presntation server.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
       CHANGING
         TEMP_DIR             =  LV_TEMP_DIR
       EXCEPTIONS
         CNTL_ERROR           = 1
         ERROR_NO_GUI         = 2
         NOT_SUPPORTED_BY_GUI = 3
         others               = 4.
       CALL METHOD cl_gui_cfw=>flush.
    It works fine in R3, but when i called it from portal it shows Access not possible using 'NULL' object reference with a short dump .
    st22 shows
    Error in ABAP application program.
    The current ABAP program "CL_GUI_FRONTEND_SERVICES======CP" had to be
    terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    An exception occurred. This exception is dealt with in more detail belo
    . The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL',
    neither
    caught nor passed along using a RAISING clause, in the procedure
    "GET_TEMP_DIRECTORY" "(METHOD)"
    Since the caller of the procedure could not have expected this exceptio
    to occur, the running program was terminated.
    The reason for the exception is:
    Attempt to access a component using 'NULL' object reference (points
    to nothing).
    An object reference must point to an object (an instance of a class)
    before you can use it to access components (variable:
    "CL_GUI_FRONTEND_SERVICES=>HANDLE").
    Either the reference has not yet been set, or it has been reset to
    'NULL' by a CLEAR statement.
    When i put external break point and the dump comes during execution of CALL METHOD cl_gui_cfw=>flush.
    Is it not possible to use CL_GUI_FRONTEND_SERVICES in RFC ??.
    thanks and regards
    Jijo

    Hi,
    the dump is because you cannot use that function from a BSP application, which runs in internet or intranet. The procedure in this case is different:
    DATA: flights  TYPE flighttab,
            flight   LIKE LINE OF flights,
            appl     TYPE string,
            filetype TYPE string,
            output   TYPE string,
            output2  TYPE xstring,
            response     TYPE REF TO if_http_response,
            l_len        TYPE i,
            seatsmax     TYPE string,
            seatsocc     TYPE string.
      appl = 'application/msexcel'.
      filetype = 'attachment;filename=mi archivo.xls'.
      SELECT * FROM sflight
         INTO TABLE flights
         UP TO 20 ROWS.
      LOOP AT flights INTO flight.
        seatsmax = flight-seatsmax. CONDENSE seatsmax.
        seatsocc = flight-seatsocc. CONDENSE seatsocc.
        CONCATENATE output
        flight-carrid cl_abap_char_utilities=>horizontal_tab
        flight-connid cl_abap_char_utilities=>horizontal_tab
        flight-fldate cl_abap_char_utilities=>horizontal_tab
        flight-planetype cl_abap_char_utilities=>horizontal_tab
        seatsmax cl_abap_char_utilities=>horizontal_tab
        seatsocc cl_abap_char_utilities=>horizontal_tab
        cl_abap_char_utilities=>cr_lf
        INTO output.
      ENDLOOP.
      response = runtime->server->response.
      response->delete_header_field( name = if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires ).
      response->delete_header_field( name = if_http_header_fields=>pragma ).
      response->set_header_field( name = if_http_header_fields=>content_type
                                  value = appl ).
      response->set_header_field( name = 'content-disposition'
                                  value = filetype ).
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          text     = output
          mimetype = 'text/unicode; charset=utf-16le'
        IMPORTING
          buffer   = output2.
      CONCATENATE cl_abap_char_utilities=>byte_order_mark_little
                  output2 INTO output2 IN BYTE MODE.
      l_len = XSTRLEN( output2 ).
      response->set_data( data = output2
                          length = l_len ).
      navigation->response_complete( ).
    This is the code for downloading an Excel file.

  • CALL METHOD g_editor- get_text_as_r3table

    Hi everyone!!!,
    I have some problems with CALL METHOD g_editor->get_text_as_r3table, I can't retrieve the text from my custom editor. Can anyone please help me with this issue?.
    DATA: g_mytable(line_length) TYPE c OCCURS 0.
                CALL METHOD g_editor->get_text_as_r3table
                  IMPORTING
                    table              = g_mytable.
                CALL METHOD cl_gui_cfw=>flush
                  EXCEPTIONS
                    OTHERS = 1.
                IF sy-subrc NE 0.
    add your handling
                ENDIF.
    Regards...

    Check this code...
    data:
          dockingleft  type ref to cl_gui_docking_container,
          text_editor    type ref to cl_gui_textedit,
          repid type syrepid.
    data: itext type table of tline-tdline,
          xtext type tline-tdline.
    parameters: p_check.
    at selection-screen output.
      repid = sy-repid.
      create object dockingleft
                  exporting repid     = repid
                            dynnr     = sy-dynnr
                            side      = dockingleft->dock_at_left
                            extension = 1070.
      create object text_editor
                  exporting
                       parent     = dockingleft.
      xtext = 'http:\\www.sap.com'.
      append xtext to itext.
      call method text_editor->set_text_as_r3table
         exporting
               table              = itext
         exceptions
               others             = 1.
    start-of-selection.
      call method text_editor->get_text_as_r3table
         importing
               table              = itext
         exceptions
               others             = 1.
      loop at itext into xtext.
        write:/ xtext.
      endloop.
    Kindly stolen from Rich Heilman -;)
    Greetings,
    Blag.

  • CALL METHOD cl_gui_frontend_services= file_save_dialog

    Hi,
    I want to use 'CALL METHOD cl_gui_frontend_services=>file_save_dialog', to choose a path for saving my txt files.  I only want the user to be able to choose the path and not have to supply a filename aswell.  My filenames are standard in the program and I don't want them to be changed by the user.
    Is there another method which is designed for this or is there a simple parameter I have missed?
    Thanks and regards,
    Simon.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_f.
       PERFORM f_search_help_pa_f1.
    FORM f_search_help_pa_f1 .
       CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
         EXPORTING
           program_name  = sy-repid
           dynpro_number = sy-dynnr
         CHANGING
           file_name     = pa_f
         EXCEPTIONS
           mask_too_long = 1
           OTHERS        = 2.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    ENDFORM.                    " f_search_help_pa_f1
    Try this
    Regards

  • *ERROR IN OLE CALL - METHOD CALL ERROR...*

    HI ..
    When trying to Upload a file using BDC with Vista OS, we are getting the following error..
    ERROR IN OLE CALL - METHOD CALL ERROR...
    There is no problem with BDC as its working fine with XP & other OS.
    Pls help!!

    Seems that you are working with microsoft files.
    Maybe you are using deprecated functions like WS_EXCEL

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • Call method http_client- response- get_header_fields for PDF and for TIFF

    Hi,
    I am using a Function Module..
    APAR_EBPP_GET_INVOICE_DETAIL to display the TIFF images on the Biller Direct side.
    The above function module is used to retrieve the PDF documents from the document repository.
    In Similar way I am trying to do the TIFF Images too.
    But in this method
    call method http_client->response->get_header_fields
        changing fields.
    For PDF the table fields is as follows
                NAME                                       VALUE                                  
        1     ~response_line----
    |HTTP/1.1 200 (OK)                         |
        2     ~server_protocol----
    |HTTP/1.1                                  |
        3     ~status_code----
    |200                                       |
        4     ~status_reason----
    |(OK)                                      |
        5     content-length----
    |7136                                      |
        6     content-type----
    |application/pdf                           |
        7     server                                |Microsoft-IIS/6.0                         |
        8     x-powered-by                    |ASP.NET                                   |
        9     date                                 |Tue, 24 Feb 2009 18:09:35 GMT             |
       10     connection                       |close                                     |
    For TIFF the table fields are as follows:
        1     ~response_line----
                   |HTTP/1.1 500 (internal server error)        |
        2     ~server_protocol----
                 |HTTP/1.1                                    |
        3     ~status_code----
                     |500                                         |
        4     ~status_reason----
                   |(internal server error)                     |
        5     content-length----
                   |105                                         |
        6     content-type----
                     |text/plain                                  |
        7     server----
                              |Microsoft-IIS/6.0                           |
        8     x-powered-by                 |ASP.NET                                     |
        9     date                         |Tue, 24 Feb 2009 18:26:39 GMT               |
       10     connection                   |close                                       |
    The error message is Internal Server error..
    This is in HTTP2_Get Function Module.
    What would be the reason for HTTP/1.1 500 Internal Server error.
    Any suggestions are welcome..
    Thanks,
    Chaitanya

    Hi Niranjan,
    can you please check if you have imported the whole chain of certificates. Certificates usually diplayed in 3 levels in the Explorer. like
    Verisign - L1
    >>> Versign--  L2
    >>>>>>>>>>>>XYZ.com -- L3
    Extract all the 3 certificates and Put in Strust and do exit soft and hard in SMICM and restart the service.
    Its better to create a RFC destination of Type H and Do the Connection test for HTTPS configuration. If the connection test comes OK then u can be sure of the configuration.

  • How to Call Methods in Ecatt?

    Hello Gurus,
    I dont find CALLMETHOD or CALLSTATIC commands in Ecatt. I am using R/3 4.7 version of SAP.
    My question also is how to call methods. I have a scenario where my test script execution depends on the return type of method. Say if the return type of method is A only then I should run the script else the script should not be executed.
    Your help in this regard is highly appreciated.
    Regards,
    GS.

    >
    Get Started wrote:
    > Hello Gurus,
    >
    > I dont find CALLMETHOD or CALLSTATIC commands in Ecatt. I am using R/3 4.7 version of SAP.
    >
    > My question also is how to call methods. I have a scenario where my test script execution depends on the return type of method. Say if the return type of method is A only then I should run the script else the script should not be executed.
    >
    > Your help in this regard is highly appreciated.
    >
    > Regards,
    > GS.
    Hi GS,
    Please use the command "CallMethod" and it is available with latest SAP version.
    You have to provide the Object Instance Parameter and Instance Method.
    Regards,
    SSN.

  • Syntax for how to call method of one comp in other comp     wd java.

    Let us assume,
    there is method1 in view1 comp1.
    tell me syntax for calling method 1 in view2 comp2
    thanks in advance.
    Edited by: madhu1011 on Nov 9, 2011 11:31 AM

    Hi Madhu,
    This is the situation:
    comp1-> method 1 , view1
    comp2-> view2
    You need to access method1  in view2 of comp2.
    For that, do the following steps:
    1.) First create a method (for eg: method1) in comp1 (under implementation of view1).
            eg: public void method1(){
                    <......some logic...>
    2.)Save the meta data.
    3.) In comp2, you will find an option called used components. In that right click and add the component comp2. (Carefully select comp1 itslef).
    4.)Save the meta data.
    5.) Then go to view2 of comp2 and take implementaion part and right the following logic in wddoinit() (or any other standard or custom method).
    wdThis.wdGetComp2Interface().getMethod("method1"); 
    By this way, we can access the method1 of comp1 in comp2.
    Regards,
    Jithin

  • To call method in program

    Hi experts,
                 Method is already created, Now i have to call that method in one Dummy program. Please send me that program with logic. I am sending you class name and already created method.
    Class name:ZCl_configurable_item
    Method name:Is_sequence_Not_To_Print
    Please call this method in Dummy program, I needed this with the program logic.
    method IS_SEQUENCE_NOT_TO_PRINT .
    DATA : l_kunnr TYPE kunnr,
           l_kna1katr6 TYPE kna1-katr6,
           l_katr6 TYPE kna1-katr6,
           l_katr6_1 TYPE zkatr6_line.
    *DATA : l_katr6_1 TYPE STANDARD TABLE OF zkatr6_line. " OCCURS 0 WITH HEADER LINE.
    DATA : l_zliteral_tab TYPE ZLITERAL_TAB_TYPE,
           l_zliteral type zliteral.
    DATA : condtype_range_out TYPE Z_KATR6_TT.
    SELECT SINGLE kunnr FROM vbpa
                        INTO l_kunnr
                        WHERE vbeln = vbdkr_vbeln AND
                              ( parvw = 'RE' OR
                                parvw = 'BP' ).
    SELECT SINGLE katr6 FROM kna1
                        INTO l_kna1katr6
                        WHERE kunnr = l_kunnr.
      l_katr6 = l_kna1katr6+0(1).
    SELECT * FROM zliteral
             INTO table l_zliteral_tab
             WHERE zkey1 = c_zlit_genosys_key AND
                   zkey2 = c_katr6_1.
        loop at l_zliteral_tab into l_zliteral.
          clear l_katr6_1.
          l_katr6_1-sign = l_zliteral-zvalue1.
          l_katr6_1-option = l_zliteral-zvalue2.
          l_katr6_1-low = l_zliteral-zvalue3.
          append l_katr6_1 to condtype_range_out.
          Condense l_katr6_1-low.
          IF l_katr6 EQ l_katr6_1-low.
            IS_SEQUENCE_NOT_TO_PRINT = c_checked.
            EXIT.
          ELSE.
            IS_SEQUENCE_NOT_TO_PRINT = SPACE.
          ENDIF.
        endloop.
    Thanks & Regards

    Hi
    In the report program first u have to create an object with ref to class then call that method like
    report ztest.
    create object zt1 type ref to ZCl_configurable_item.
    CALL method zt1->Is_sequence_Not_To_Print importing....
        exporting....
    like this.
    See the help for create object in ABAPDOCU.
    mark points if helpful.
    Regs
    Manas Ranjan Panda

  • Java code to call methods in .ocx file

    dear friends,
    i have an .ocx file with me which is used to communicate with a specific device.it is an already existing one. i wish to know whether i can call method sin that .ocx file using java .using vb6 we can do this.
    if it is possible with java i wish to know how i can do this.please consider this query and please send me your responses. i know that using jni we can communicate with .dll files.but i am not sure about .ocx file. please help me.
    thank you
    arun

    i wish to know whether i can call method sin that .ocx file using java
    Probably
    db

  • CALL METHOD ABAP run SQL wrong

    Dear All
             I have a problem in ABAP connect SQL,Below is my code snippet sentence.
    CONCATENATE 'Insert Into [timportcortrol]'
                    '(zucode,zstate,zdate,zkind) Values('''
                      VG_PCID ''','''
                      '1'','''
                      SY-DATUM ''','''
                      '1' ''')'
                     INTO SQL.
        CALL METHOD OF REC 'Execute'
         EXPORTING #1 = SQL
         #2 = CON
         #3 = '1'.
    IF NOT SY-SUBRC = 0.
        MESSAGE I000 WITH 'Download  to [timportcortrol] failure,Please Check the SQL Connect!!! '.
        EXIT.
      ENDIF.
    Con:is the connect SQL String ,the connect SQL is Okay.
    I debug this code,when I used u2018Select u2026sentenceu2019,the program can work.if I  use u2018insert intou2019 then canu2019t work,but I copied the SQL of the u2018inset Into sentenceu2026u2019run it into SQL server then it can work also.
    And I found the SY-SUBRC eq u20182u2019.whatu2019s mean about of the sy-subrc eq u20182u2019.
    I think the insert into sentence in abap I have write the wrong ,but I canu2019t assurance.
    The Insert Into Sentence is:u2019 Insert Into [timportcortrol](zucode,zstate,zdate,zkind) Values('20080807094713','1','20080807','1')u2019
    Could you give me some advice for this issue?
    Thanks of all
    Sun.

    Have you checked whether it's a problem with mixed case?  Some SQL dialects are case sensitive.
    The not very helpful meanings of the sy-subrc value can be found in ABAP help.
    0 Successful processing of the method meth.
    1 Communication Error to SAP GUI.
    2 Error when calling method meth.
    3 Error when setting a property.
    4 Error when reading a property
    matt

Maybe you are looking for

  • How to get my macbook pro refurbished? How to repair the damaged scratches on the body?

    I have some visible scratches on my macbook pro's body.Is their a way so that I can have these scratches removed making it clean once more?

  • Getting data from Open Hub Destination Table

    Hi, I've created InfoSpoke and as a Target I've used Table. Now I want to get to data in this table from R/3 side. Any idea where this Table might be stored and how can I get to it? Thanks in advance! Regards Wojtek

  • Debug Background Job

    Hello Experts, I want to debug standard T- Code 'F110' (Automatic Payment Run). Basically wat it does is just submit one program SAPF110S but as a background job i.e SUBMIT SAPF110S AND RETURN                       USER SY-UNAME                      

  • Automatic font in footnote from iphoto calendar

    I made a calendar on iphoto and placed the order. But to bad, it is being cancelled 3 times. There is a ' inconsistente lettertypen'  (in duch) or a inconsistent font. There is a really small footnote with month and year in de right corner at the bot

  • How to Initiate Multiple SQL*Loader Sessions

    Oracle db utilities(Chapter-Conventional and Direct Path Loads) talks of parallel data loading models for direct load. We need to execute the following commands: sqlldr USERID=scott/tiger CONTROL=load1.ctl DIRECT=TRUE PARALLEL=true sqlldr USERID=scot