USING CALL METHOD

Dear Experts,
  I am using below piece of code in my program to control color of excel sheet while downloading same way I need to select the rows of R and need to format the cells
with currency with 2 decimal places.
Can any one please give me code for this.
Thanks in advance
karthik
*Color of Records .
    DESCRIBE TABLE it_display LINES rec_lin .
    grid_end  =  rec_lin + 5 . "  .
    CLEAR : start , end .
    CONCATENATE  'A'  head_pos  INTO start .
    CONCATENATE  'T' grid_end  INTO end .
    CONDENSE start  NO-GAPS .
    CONDENSE end  NO-GAPS .
    CALL METHOD OF excel 'Range' = range
                       EXPORTING #1 = start   #2 = end.
    CALL METHOD OF range 'Select' = select.
    GET PROPERTY OF excel 'Selection' = selection .
    CALL METHOD OF selection 'Font' = font .
    SET PROPERTY OF font 'ColorIndex' =  '41'   .

Hi,
tried following code:
data: value type string.
DATA: event      TYPE REF TO if_htmlb_data,
          tv_event   type ref to cl_htmlb_event_tableview .
event = cl_htmlb_manager=>get_event( request ).
IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableView.
  tv_event ?= event.
CASE event->event_server_name.
when 'MyEventRowSelection'.
value = tv_event->GET_CELL_VALUE(
row_index = tv_event->selectedrowindex
column_index = 2
But VALUE is empty.
Plz let me know the mistake in the syntax or elsewhere.

Similar Messages

  • Issue with Capturing Long text using CALL METHOD EDITOR- GET_TEXT_AS_STREAM

    HI Experts,
    Standard Long text is capturing using CALL METHOD EDITOR->GET_TEXT_AS_STREAM
         but not working for Custom Long text – Only changes
    Here is the Issue:
    1)      Created Custom Long text in TAB. --> Good
    2)      Entered few lines in custom Long text  --> Good
             Click on Standard Tab , Leaving Custom tab and Custom Long text-->Good
    4)      In PAI of Custom Tab – Changes captured using CALL METHOD 1 ( See below Code 1)--> Good
    5)      Entered few lines in Standard Long text in Standard Tab -->Good
    6)      Click another Standard Tab
    7)      In PAI of Standard Tab – Changes captured using CALL MEHTOD 2 ( See Below Code 2)-->Good
    8)      Come back to Standard Tab / Standard Long Text , Enter few more lines.
    9)      Change the Tab , IN PAI of Standard Tab/Standard Text , Changes Captured using CALL METHOD2 ( See Below CODE 3) --> Good
    10)   Go to Custom Tab , Custom Long text , Entered few more lines--> Good
    11)   Click on any other tab, Triggered again PAI of Custom tab / Custom Long text using Call Method1 ( See Below Code 4) -->Good triggered PAI same CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM.
    12)   But additional lines are not captured , saying ZERO LINES in Internal Table and IF_MODIFIED = NO  -->Issues lies here.
    CODE1 ( Custom Long text entry capturing – First Few Lines )
    Custom Long text Entries are stored in LS_OUTTAB-TEXT first time when entered few lines and LV_MOD is 1.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT ( FIlled with Lines entered in custom long text )
              IS_MODIFIED            = LV_MOD ( Value 1 , Modified )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    CODE2 ( Standard Long Text Entry Capturing – First Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT first time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE ( Value 1 , Modified )
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED.
    CODE 3 ( Standard Long Text Entry Capturing – Second time Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT  second  time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED. ( Value 1 , Modified )
    CODE4 ( Custom Long text entry capturing – Second Time Few Lines )
    Custom Long text Entries are not stored in LS_OUTTAB-TEXT Second Time when entered few lines and LV_MOD is 0.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT  ( ZERO ENTRIES )
              IS_MODIFIED            = LV_MOD   ( NOT MODIFIED Flag )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    Can anyone help me out of this.
    With Regards,
    Bala M

    Excellent Eitan,
    Here is what I am trying to Achieve.
    In Create Notification IW21 , They need 5 Long Text in Custom Tab ( Say Tab Name is MBR ).
    TAB1 NOTIFICATION Standard Information , TAB2 REFERENCE OBJ , TAB 3 MalFunction , Breakdown Standard one...... TAB 7 ( Custom Tab ).
    In Custom Tab , I added 5 LONG TEXT ( its 5 WHY Concept ).
    When the User enters data in 5 Long text , it should store long text along with Notification number when save.
    But Notification number will be generated @ the time of SAVE , but before that its just shows as
    %0000000001 ( and Number will be generated 1000065479) at Save.
    How to achive this .
    I did this:
    Added 5 Custom Container. and In PBO / PAI
      PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    IN PBO
       CREATE OBJECT TEXT_EDITOR1 ,    CREATE OBJECT TEXT_EDITOR2,    CREATE OBJECT TEXT_EDITOR3 like wise 5
       CALL METHOD TEXT_EDITOR1->SET_TEXT_AS_R3TABLE ,    CALL METHOD TEXT_EDITOR2->SET_TEXT_AS_R3TABLE .. Like wise 5 , So when the user Click on Custom Tab ( MBR ).
    It give 5 Long text.
    When he click tab1 or tab2 or tab3 .. and again tab MBR , still data is available.
    How to store this data for future retrival ( IW22 or IW23 ) ?
    Its working fine when I enter first time and goes here and there and finall save .
    IN SAVE BADI , I imported the Long text and created Standard Text SO10 with Notification Number with LONG1 , LONG2 .. means 1000065479LONG1 as standard text.
    But not working when I entered first time and go to tab1 and tab2 and then to MBR tab and added few more lines , its not exporting full lines and in IMPORT ( SAVE BADI ) giving ZERO Lines.
    Please help and thanks for your quick response.

  • Error while using  CALL METHOD

    I am getting a error while using CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    The error is class "CL_SSF_XSF_UTILITIES is unknown. How to correct that?? please help I am new to object oriented programming??
    Edited by: priya singh on Nov 18, 2008 2:14 PM

    This is my code.
    REPORT ZSAVE_FUNCTION .
    D A T A D E C L A R A T I O N S *
    DATA: v_bitmap TYPE xstring, "graphic data
    v_file TYPE string, "file name
    v_length TYPE i. "length of binary file
    DATA: BEGIN OF it_bitmaps OCCURS 0,
    object TYPE tdobjectgr, "object
    name TYPE tdobname, "name
    id TYPE tdidgr, "id
    tdbtype TYPE tdbtype, "graphic type
    END OF it_bitmaps.
    DATA: itab TYPE TABLE OF x.
    *class cl_ssf_xsf_utilities definition.
        public section.
      methods : get_bds_graphic_as_bmp
    DATA: L_GRAPHIC_XSTR TYPE XSTRING.
    *method cl_ssf_xsf_utilities
    S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_object TYPE tdobjectgr, "object
    p_btype TYPE tdbtype, "graphic type
    p_name TYPE tdobname, "name
    p_id TYPE tdidgr. "id
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: p_file TYPE rlgrap-filename. "file name
    SELECTION-SCREEN END OF BLOCK b2.
    *A T S E L E C T I O N - S C R E E N O N V A L U E - R E Q U E S T *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_name.
    *-- Creating f4 help for the parameters
    PERFORM get_f4_object_name.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *-- Getting the current value entered
    PERFORM get_current_value.
    *-- Value Request Functionality For Input File Name
    PERFORM f4_value_request.
    S T A R T O F - S E L E C T I O N *
    START-OF-SELECTION.
    *--Getting the graphic as a BMP file
    PERFORM get_graphic_bmp.
    *--Convert the Xstring format to binary format
    PERFORM convert_to_binary.
    *--Download the graphic
    PERFORM download_graphic.
    *& Form get_current_value
    Get the current file path entered
    FORM get_current_value .
    DATA: BEGIN OF li_dynp_value_tab OCCURS 0.
    INCLUDE STRUCTURE dynpread.
    DATA: END OF li_dynp_value_tab.
    DATA: l_program_name LIKE d020s-prog,
    l_dynpro_number LIKE d020s-dnum.
    l_program_name = sy-cprog.
    l_dynpro_number = sy-dynnr.
    REFRESH li_dynp_value_tab.
    li_dynp_value_tab-fieldname = 'P_FILE'.
    APPEND li_dynp_value_tab.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = l_program_name
    dynumb = l_dynpro_number
    TABLES
    dynpfields = li_dynp_value_tab
    EXCEPTIONS
    invalid_abapworkarea = 04
    invalid_dynprofield = 08
    invalid_dynproname = 12
    invalid_dynpronummer = 16
    invalid_request = 20
    no_fielddescription = 24
    undefind_error = 28.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE li_dynp_value_tab INDEX 1.
    p_file = li_dynp_value_tab-fieldvalue.
    ENDFORM. " get_current_value
    *& Form f4_value_request
    Provinding the f4 for the given path
    FORM f4_value_request .
    *-- if the file is to be downloaded to presentation server
    CALL FUNCTION '/SAPDMC/LSM_F4_FRONTEND_FILE'
    EXPORTING
    pathname = p_file
    CHANGING
    pathfile = p_file
    EXCEPTIONS
    canceled_by_user = 1
    system_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " f4_value_request
    *& Form GET_GRAPHIC_BMP
    Get the graphic as a BMP file
    FORM get_graphic_bmp.
    CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    EXPORTING
    p_object = p_object
    p_name = p_name
    p_id = p_id
    p_btype = p_btype
    RECEIVING
    p_bmp = L_GRAPHIC_XSTR
    EXCEPTIONS
    not_found = 1
    internal_error = 2
    OTHERS = 3.
    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. " GET_GRAPHIC_BMP
    *& Form CONVERT_TO_BINARY
    Converting the xstring to binary format
    FORM convert_to_binary .
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = v_bitmap
    IMPORTING
    output_length = v_length
    TABLES
    binary_tab = itab.
    ENDFORM. " CONVERT_TO_BINARY
    *& Form DOWNLOAD_GRAPHIC
    Download the graphic
    FORM download_graphic .
    v_file = p_file.
    CONCATENATE p_file '.BMP' INTO v_file.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_length
    filename = v_file
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_write_error = 1
    no_batch = 2
    gui_refuse_filetransfer = 3
    invalid_type = 4
    no_authority = 5
    unknown_error = 6
    header_not_allowed = 7
    separator_not_allowed = 8
    filesize_not_allowed = 9
    header_too_long = 10
    dp_error_create = 11
    dp_error_send = 12
    dp_error_write = 13
    unknown_dp_error = 14
    access_denied = 15
    dp_out_of_memory = 16
    disk_full = 17
    dp_timeout = 18
    file_not_found = 19
    dataprovider_exception = 20
    control_flush_error = 21
    OTHERS = 22.
    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. " DOWNLOAD_GRAPHIC
    *& Form GET_F4_OBJECT_NAME
    Get F4 values for object names
    FORM get_f4_object_name .
    DATA: dynpfld_mapping TYPE STANDARD TABLE OF dselc WITH HEADER LINE,
    return_tab TYPE STANDARD TABLE OF ddshretval WITH HEADER LINE.
    *--Selecting the values to be provided as f4 help
    SELECT tdobject
    tdname
    tdid
    tdbtype
    FROM stxbitmaps
    INTO TABLE it_bitmaps.
    *--To update the values in the remaining fields
    dynpfld_mapping-fldname = 'F0001'.
    dynpfld_mapping-dyfldname = 'P_OBJECT'.
    APPEND dynpfld_mapping.
    dynpfld_mapping-fldname = 'F0002'.
    dynpfld_mapping-dyfldname = 'P_NAME'.
    APPEND dynpfld_mapping.
    dynpfld_mapping-fldname = 'F0003'.
    dynpfld_mapping-dyfldname = 'P_ID'.
    APPEND dynpfld_mapping.
    dynpfld_mapping-fldname = 'F0004'.
    dynpfld_mapping-dyfldname = 'P_BTYPE'.
    APPEND dynpfld_mapping.
    *--Providing f4 help with the selected values
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'TDOBNAME'
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    dynprofield = 'P_NAME'
    value_org = 'S'
    TABLES
    value_tab = it_bitmaps
    dynpfld_mapping = dynpfld_mapping
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.
    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. " GET_F4_OBJECT_NAME

  • How to close parent window when we use call method l_window_manager- create

    hi...
    how to close parent window when we use call method l_window_manager->create_external_window
    thank you.

    hi
    good
    go through this link,hope this ll help you to solve your problem
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/63a47dd9-0b01-0010-3d8e-de27242bf011
    thanks
    mrutyun^

  • How to use CALL METHOD

    Hi Xperts,
    how To CAll Methods In SE38.
    isit just like calling function module .
    Can any one guide me through the process with small example and TCODE.
    Thank You in Advance.

    Hi,
    to call a method u should use syntax from SAP help...
    Static Method Call
    1. [CALL METHOD] meth_identifier( parameter_list ).
       CALL METHOD  meth_identifier  parameter_list.
    Short Forms
    2. [CALL METHOD] { meth_identifier( )
                    | meth_identifier( a )
                    | meth_identifier( p1 = a1 p2 = a2 ... ) }.
    Dynamic Method Call
    3. CALL METHOD meth_identifier { parameter_list
                                  | parameter_tables }.
    Effect
    Call of a method in ABAP Objects. There is a difference between a static method call, in which the method ID must be fully known in the program, and a dynamic method call, in which the method ID is determined entirely or in parts at runtime. The static method call can be executed in different forms. In one form, the parameters are passed in a parenthetical expression, in the other without a parenthetical expression. For the parenthetical expression, short forms are allowed. With the dynamic method call, you are not allowed to specify the parameters in parentheses and you must use the statement CALL METHOD.
    When you call an instance method using a reference variable and the static type of the reference variable is a superclass of the dynamic type, then you can use the dynamic method call to call all visible methods of the dynamic type, whereas with the static method call, you can call only the visible methods of the static type.
    Note
    Functional methods cannot only be called with CALL METHOD, but also at operand positions.
    rewards points if answer was helpful,
    Regards,
    Tejas

  • Can we use call method or call action in dynpro.

    hi all,
    In the view of a web-dynpro, can we call one action inside another action..?
    or can we call a method inside an action..
    if so plz help...
    thanks in advance,
    jithin.

    Hi Jithin,
    Suggest you that, you keep your logic in a method which you are using for create(event).
    the same method you can call in modifyview so that after you create again the modifyview will get trigger and then it fills your dropdown.
    or
    after create functionality is done then call a method to fill the dropdown.
    try to modularize your code using methods then you can
    re-use it.
    still you need any clarificatinos let me know.
    Regards,
    Mahesh

  • How to make a column a key using CALL METHOD cl_salv_table= factory

    hy guys
    i have gotten everything right but cannot make a column of my internal table a key column
    done this so far for columns:
      DATA: alv_columns_list    TYPE REF TO       cl_salv_columns_list.
      DATA: alv_column     TYPE REF TO cl_salv_column.
      alv_columns_list = alv_table->get_columns( ).
      alv_columns_list->set_optimize( 'X' ).
      alv_columns_list->SET_KEY_FIXATION( 'X' ).
        try.
        alv_column = alv_columns_list->get_column( 'BNAME' ).
        catch cx_salv_NOT_FOUND.
          message e000(zz) with 'Element not found'.
      endtry.
      alv_column->SET_SHORT_TEXT( 'User' ).
      alv_column->SET_MEDIUM_TEXT( 'User' ).
      alv_column->SET_LONG_TEXT( 'User' )
    found class cl_salv_column_list with method set_key
    but how do i get to it. if it is even the right one
    please help
    jan

    Yes CL_SALV_COLUMN_LIST is the right one to use.
    After the following code:
    alv_column = alv_columns_list->get_column( 'BNAME' ).
    Add the following:
    alv_column_list ?= alv_column.
    alv_column_list->set_key( ).
    Don't forget to add the data definition for alv_column_list.
    Hope this helps.
    Cheers,
    JB
    Edited by: Jonathan Bourne on Apr 4, 2008 3:01 PM

  • No CALL METHOD syntax used in Dynpro programming

    Hi Gurus,
    I have just starded with Web Dynpro ABAP. I found that while writing code we don't use CALL METHOD .
    i.eTABLE_NODE = WD_CONTEXT->GET_CHILD_NODE('MY_TABLE_NODE').
    How can we directly call a method using interface variable e.g WD_CONTEXT without syntax CALL METHOD?
    Can anyone explain?
    I am not much familiar with OOPs.
    Thanks in advance.

    Hi Anzy,
    Can u correct this program to let me understand this concept. ( An example ABAP OOPs program)
    REPORT  zjt_test_interface.
    INCLUDE  zjt_test_interfac_class.
    DATA : dd TYPE REF TO demo ,
           inter TYPE REF TO sample,
           inter1 TYPE REF TO sample.
    START-OF-SELECTION.
      CREATE OBJECT dd .
      inter = dd.
      call method inter->test. ******No error with this statement
    inter1 = inter->test.  *********** This statement gives error "Field 'Test' unknown
    The below code is a separate include program.
    *&  Include           ZJT_TEST_INTERFAC_CLASS
    INTERFACE sample  .
      METHODS  test .
    ENDINTERFACE.                    "sample
          CLASS demo DEFINITION
    CLASS demo DEFINITION.
      PUBLIC SECTION.
        INTERFACES sample .
        METHODS : constructor.
    ENDCLASS.                    "demo DEFINITION
          CLASS demo IMPLEMENTATION
    CLASS demo IMPLEMENTATION.
      METHOD constructor.
      ENDMETHOD.                    "constructor
      METHOD  sample~test.
        WRITE : 'Method test of Interface sample executed'.
      ENDMETHOD.                    "sample~test

  • 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

  • CALL METHOD ob_grid1- set_table_for_first_display does not change display

    Dear experts,
    I'm using CALL METHOD ob_grid1->set_table_for_first_display, during the first run the display is ok.
    When I back to screen 0 and enter different values and re-run, the values of internal table has been changed.
    But the second run still display the values I have during the first run. What could be the reason for this and how to solve this? Thanks.
        IF ob_custom1 IS INITIAL.
           CREATE OBJECT ob_custom1
              EXPORTING
              container_name = 'ALV_CONTAINER'.
        ENDIF.
        IF ob_split1 IS INITIAL.
          CREATE OBJECT ob_split1
            EXPORTING
              parent      = ob_custom1
              orientation = cl_gui_easy_splitter_container=>orientation_vertical.
        ENDIF.
        IF ob_grid1 IS INITIAL.
           CREATE OBJECT ob_grid1
              EXPORTING
              i_parent = ob_split1->top_left_container.
           PERFORM build_fieldcatalog.
           gs_layout1-info_fname = 'ROWCOLOR'.
           gs_layout1-smalltitle = 'X'.
           CALL METHOD ob_grid1->set_table_for_first_display
              EXPORTING
                 i_structure_name = 'T_REPORT'
                 is_layout        = gs_layout1
              CHANGING
                 it_outtab        = T_REPORT
                 it_fieldcatalog  = alv_fcat_dock1.
         ENDIF.
    Kath

    Hi,
    Please add the code after else statement.
    IF ob_grid1 IS INITIAL.
          CREATE OBJECT ob_grid1
             EXPORTING
                 i_parent = ob_split1->top_left_container.
            PERFORM build_fieldcatalog.
    gs_layout1-info_fname = 'ROWCOLOR'.
    gs_layout1-smalltitle = 'X'.
    CALL METHOD ob_grid1->set_table_for_first_display
           EXPORTING
             i_structure_name = 'T_REPORT'
             is_layout = gs_layout1
          CHANGING
             it_outtab = T_REPORT
             it_fieldcatalog = alv_fcat_dock1.
    ELSE.                                                               " Add
         Call method refersh table for display.        " Add
    ENDIF.

  • ABAP OOP / Calling Method  ...Help

    Trying out few oop codes....
    While calling class instance methods and passing parameters, when to use the following syntax.
    data: cvar  type ref to class1.
             cvar->method( exporting variable1 = value )
           (or) some time i see sample codes with out key  word 'exporting'
                  cvar->method(  variable1 = value  ) .
           (or)
                  cvar->method(  value  ) .
           (or) some times with key word CALL  METHOD
       CREATE OBJECT cvar
       CALL METHOD cvar->method
       EXPORTING
       variable1 = value. 
    Tried out a uniform way of calling ,but getting errors.Any inputs please..
    Thanks,
    Bvan

    Bhavan,
      First  declare the class.
      Implement the class.
    Declare the Class reference variable
    Create the class object.
    call the method.
      data: cvar type ref to class1.
              CREATE OBJECT cvar
    Calling Methods
    To call a method, use the following statement:
    CALL METHOD <meth> EXPORTING... <ii> =.<f i>...
                       IMPORTING... <ei> =.<g i>...
                       CHANGING ... <ci> =.<f i>...
                       RECEIVING         r = h
                       EXCEPTIONS... <ei> = rc i...
    The way in which you address the method <method> depends on the method itself and from where you are calling it. Within the implementation part of a class, you can call the methods of the same class directly using their name <meth>.
    CALL METHOD <meth>...
    Outside the class, the visibility of the method depends on whether you can call it at all. Visible instance methods can be called from outside the class using
    CALL METHOD <ref>-><meth>...
    where <ref> is a reference variable whose value points to an instance of the class. Visible instance methods can be called from outside the class using
    CALL METHOD <class>=><meth>...
    where <class> is the name of the relevant class.
    When you call a method, you must pass all non-optional input parameters using the EXPORTING or CHANGING addition in the CALL METHOD statement. You can (but do not have to) import the output parameters into your program using the IMPORTING or RECEIVING addition. Equally, you can (but do not have to) handle any exceptions triggered by the exceptions using the EXCEPTIONS addition. However, this is recommended.
    You pass and receive values to and from methods in the same way as with function modules, that is, with the syntax:
    ... <Formal parameter> = <Actual parameter>
    after the corresponding addition. The interface parameters (formal parameters) are always on the left-hand side of the equals sign. The actual parameters are always on the right. The equals sign is not an assignment operator in this context; it merely serves to assign program variables to the interface parameters of the method.
    If the interface of a method consists only of a single IMPORTING parameter, you can use the following shortened form of the method call:
    CALL METHOD <method>( f).
    The actual parameter <f> is passed to the input parameters of the method.
    If the interface of a method consists only of IMPORTING parameters, you can use the following shortened form of the method call:
    CALL METHOD <method>(....<ii> =.<f i>...).
    Each actual parameter <f i > is passed to the corresponding formal parameter <i i >.
    Pls. mark if useful

  • Call methods from view controller to another (enhanced) view controller!

    Dear All,
    Is it possible to use/call methods from view controller to another (enhanced) view controller? Iu2019ve created a view using enhancement in standard WD component. I would like to call one method from standard view controller in the enhanced view controller.
    Is it possible to include text symbols as enhancement in standard class?
    u2026Naddy

    Hi,
    If you have just enhanced an existing view then you can call the standard methods in one of the new methods which you will create as part of enhancement.
    If you have created a totally new view using enhancement framework option ( Create as Enhancement ) then in this new view you won't be able to use existing methods in other view as a view controller is private in nature. So all the view attributes, context nodes and methods are Private to that view only.
    Regarding text elements, I guess adding a new text element is just a table entry in text table and is therefore not recorded as enhancement.( Not very sure about this, need to double check )
    Regards
    Manas Dua

  • In a call method, I can make an IMPORT?

    In a call method, I can make an IMPORT?
    thanks!!

    You can import, export parameters using call method.
    check out this example.
    DATA : w_num1 type i value 5,
           w_num3 type i value 7,
           w_num4 type i.
    CLASS c1 DEFINITION.
    PUBLIC SECTION.
      METHODS : m1
                   IMPORTING num1 TYPE i
                   EXPORTING num4 TYPE i
                   CHANGING  num3 type i.
    ENDCLASS.
    CLASS c1 IMPLEMENTATION.
    method m1.
      num3 = num3 * 2.
      num4 = ( num1 + num3 ) ** 2.
    endmethod.
    ENDCLASS.
    START-OF-SELECTION.
    DATA : oref1 TYPE REF TO c1 .
    CREATE OBJECT : oref1.
    CALL METHOD oref1->m1 EXPORTING num1 = w_num1
                          IMPORTING num4 = w_num4
                          CHANGING  num3 = w_num3.
    Write:/5 w_num1 , w_num3 , w_num4 .
    This might help you.
    Regards,
    Sailaja.

  • JSObject call() method problem

    Hi,
    I created an applet and I call a javascript function from the applet using call() method of jsobject.
    JSObject jsoWindow=Jmol.jsoWindow;
              String[] args = {"Fred"};
              jsoWindow.call("f", args);
    and i wrote an alert in the js function "f". It is working nicely in IE6, IE7 and Mozilla 2.x.x.x. But when I run it in Mozilla 1.5, it is nor working. I didn't get any alert.
    What is the problem? Anybody can tell me a soltn for this?
    Is any other method to call a js function from applet?
    Im waiting for ur reply.
    thanks
    ani

    Thanks for your reply.
    Then what can I do? Is I want to do any settings?
    Pls reply

  • Thread Callable call() method question

    i am using callable interface and i need to return from call() method before process gets over.
    basically i have infinite loop in call() method which gets data from streaming services,
    and once i format the data and send back to EDT to update UI constantly.
    i am using call() method because my call() (same as run() runnable) throws exception if there is any problem in receiving data.
    i don't care for return value from call(). i only care if there is any exception.
    if i don't do task.get().... then everything works fine, but then i dont get any executionException as well, (which i really care for)
    FutureTask<String> task = new FutureTask<String>(resParser);
    Thread thread= new Thread(task);
    thread.start();
    try{
        String result = task.get();
    }catch(ExecutionException e){
        e.printStackTrace();
    }catch(InterruptedException ex){
    }any solution ??
    Thanks

    You will need to re-consider your requirements. You either call get() and block the active thread, or you let the thread continue to run and don't call get().
    Your solution would be to catch the exception someplace else and feed the exception (or message) to wherever you need it. Why do you think you need to catch the exception right here (which is apparently in your EDT)? Why not catch it in the Thread's run method and deal with it there?

Maybe you are looking for