Reg. OOPS....friend class....have ur pont.s

Hi all,
we have diff. syntaxes to make friend class say..
CLASS A DEFINTION CREATE PRIVATE FRIEND CLASS B.
CLASS A DEFINTION FRIEND CLASS B.
Pleas reply..
<b>Have ur point.</b>
Regards,
pradeep phogat

The specified object types (classes or interfaces) obj_type_1 ... obj_type_n are declared as friends of the current class. In this way, these object types and all the object types derived from these through inheritance, inclusion, and implementation are allowed to access PROTECTED and PRIVATE components, in addition to PUBLIC components. They can also create instances from the class, irrespective of the specifications in the CREATE addition. All classes and interfaces from the same program as well as global classes and interfaces from the class library can be specified as object types.
Note
If you define global classes and class library interfaces as friends, you should note that the local classes of other ABAP programs will not be visible in them. A static access to the componenents of the class class is not possible in such friends.
Example
interface I1.
endinterface.
class C1 definition create private friends I1.
  private section.
    data A1(10) type C value 'Class 1'.
endclass.
class C2 definition.
  public section.
    interfaces I1.
    methods M2.
endclass.
class C2 implementation.
  method M2.
    data OREF type ref to C1.
    create object OREF.
    write  OREF->A1.
  endmethod.
endclass.
data OREF type ref to C2.
start-of-selection.
  create object OREF.
  OREF->M2( ).
In this excample, classs C2 is a friend of the interface
I1 and therefore of the implementing class C1. It can
instance these and also access their private components.
Addition 7
... GLOBAL FRIENDS publ_obj_type_1 ... publ_obj_type_n
Effect
This addition must be used only for the definition of global classes. It cannot, therefore be specified locally with the ABAP Editor in an ABAP program, but is automatically generated during the definition of a global class using the tool Class Builder of the ABAP workbench. The specified global object types (classes or interfaces) publ_obj_type_1 ... publ_obj_type_n are declared as friends of the current class. In this way, these objects and all the object types derived from these through inheritance, inclusion, and implementation are allowed to access PROTECTED and PRIVATE components, in addition to the PUBLIC components. They can also create instances from the class, irrespective of the specifications in the addition CREATE
Rewards if useful.......................
Minal

Similar Messages

  • Reg. OOPs....abstract class....have ur ponts.

    Hi all,
    I m made an abstract class in SE24. i took 2 methods, 1 with implemetation & other with just definition
    Now i m taking another class...making class1 as super class.
    but now how i give code to my method2....
    Pleas assist me..
    <b>Have ur ponts.</b>
    Regards,
    pradeep phogat

    Hello,
    USE Keyword <b>REDEFINITION</b>
    Eg.
          CLASS passenger_plane  DFINITION INHE
    CLASS passenger_plane DEFINITION INHERITING FROM lcl_airplane.
      PUBLIC SECTION.
        METHODS :  constructor IMPORTING in_name TYPE ch1 in_planetype TYPE
    saplane-planetype in_n_o_seats TYPE sflight-seatsmax.
        <b>METHODS : display_attributes REDEFINITION.</b>
      PRIVATE SECTION.
        DATA : n_o_seats TYPE sflight-seatsmax.
    ENDCLASS.
          CLASS passenger_plane IMPLEMENTATION
    CLASS passenger_plane IMPLEMENTATION.
      METHOD constructor.
        CALL METHOD super->constructor EXPORTING in_name = in_name
    in_planetype = in_planetype.
        n_o_seats = in_n_o_seats.
      ENDMETHOD.
      METHOD display_attributes.
        CALL METHOD super->display_attributes.
        WRITE : / 'No of Seats inside the Passenger Plane = ' , n_o_seats.
        uline.
      ENDMETHOD.
    endclass.
    Regards,
    LIJO

  • Reg. OOPs.------Have ur ponts..

    Hi all,
    What is the meaning of parameters in event. Can u plea let me know...here we have to include system defined events or we have to make our own events...
    if own events...then how.
    Pleas give me a simple example..
    <b>Have ur ponts.</b>
    Regards,
    pradeep phogat

    Hi
    se this program it will helpful for u
    *& Report  SALV_TEST_HIERSEQ_FORM_EVENTS
    report salv_test_hierseq_form_events no standard page heading.
    *... This report describes how the form renderer of the ALV can be used
       for layouting screen information.
       This demo report focusses on how the form renderer can be used in
       the new API's. The demonstration uses the new ALV API
         - cl_salv_hierseq_table (hierseq. lists)
       The ALV form description is a neutral description of the layouting
       of elements on the screen. With this description it is possible to
       render the information to different output mediums. At the moment
       ABAP Writes and HTML Documents are supported
       The ALV form also gaurantees the accessibility of such forms
       If the table ALV_T_T2 is empty, please create data for the demo
       by running report BCALV_GENERATE_ALV_T_T2
    §1   select data into global output table
    §2   create ALV hierseq Table
    §2.1 create the binding information between master and slave
    §2.2 create instance of cl_salv_hierseq_table for displaying a
         hierseq list of your output tables
    §3   TOP_OF_LIST
         set the TOP_OF_LIST content by calling the method set_top_of_list
         of cl_salv_table with the created content
    §4   END_OF_LIST
         set the END_OF_LIST content by calling the method set_end_of_list
         of cl_salv_table with the created content
    §5   Event Handler TOP_OF_PAGE / END_OF_PAGE
         define a handler for the events of cl_salv_table
    §5.1 define a local class for handling events of cl_salv_table
         define methods for the events which are to be handled
    §5.2 implement the defined methods for handling the events of
         cl_salv_table
    §6   Events TOP_OF_PAGE / END_OF_PAGE
         register to events of cl_salv_table
    §6.1 register to the event TOP_OF_PAGE for setting the content of
         the top of a page
    §6.2 register to the event END_OF_PAGE for setting the content of
         the end of a page
    §7   Display
         display the configurated ALV Table by calling the method
         display of cl_salv_table.
    types: begin of g_type_s_master.
    include type alv_chck.
    types:   expand   type char01,
           end of g_type_s_master,
           begin of g_type_s_slave.
    include type alv_t_t2.
    types: end   of g_type_s_slave.
    types: begin of g_type_s_test,
             amount      type i,
             repid       type syrepid,
             top_of_list type i,
             end_of_list type i,
           end of g_type_s_test.
    constants: begin of gc_s_alv_event,
                 print_eq_online type i value 1,
                 print_ne_online type i value 2,
                 print_no_online type i value 3,
                 online_no_print type i value 4,
               end of gc_s_alv_event,
               con_master type lvc_fname value 'ALV_CHCK',
               con_slave  type lvc_fname value 'ALV_T_T2'.
    *... §5 Definition is later
    class lcl_handle_events_hierseq definition deferred.
    data: gs_test type g_type_s_test.
    data: gt_master type standard table of g_type_s_master,
          gt_slave  type standard table of alv_t_t2.
    data: gr_hierseq type ref to cl_salv_hierseq_table.
    *... §5 object for handling the events of cl_salv_table
    data: gr_events_hierseq type ref to lcl_handle_events_hierseq.
          CLASS lcl_handle_events DEFINITION
    class lcl_handle_events_hierseq definition.
      public section.
        methods:
          on_top_of_page for event top_of_page of cl_salv_events_hierseq
            importing r_top_of_page page table_index,
          on_end_of_page for event end_of_page of cl_salv_events_hierseq
            importing r_end_of_page page.
    endclass.                    "lcl_handle_events DEFINITION
          CLASS lcl_handle_events IMPLEMENTATION
    class lcl_handle_events_hierseq implementation.
      method on_top_of_page.
        data: lr_content type ref to cl_salv_form_element.
    *... create the content
        perform create_alv_form_content_top
          using    page
                   table_index
          changing lr_content.
    *... set the content
        r_top_of_page->set_content( lr_content ).
      endmethod.                    "on_top_of_page
      method on_end_of_page.
        data: lr_content type ref to cl_salv_form_element.
    *... create the content
        perform create_alv_form_content_eop
          using    page
          changing lr_content.
    *... set the content
        r_end_of_page->set_content( lr_content ).
      endmethod.                    "on_end_of_page
    endclass.                    "lcl_handle_events IMPLEMENTATION
    SELECTION-SCREEN                                                     *
    selection-screen begin of block gen with frame.
    selection-screen begin of line.
    parameters:
    p_db    radiobutton group db.
    selection-screen comment (29) for field p_db.
    selection-screen comment (29) for field p_amount.
    parameters:
    p_amount type i default 30.
    selection-screen end of line.
    selection-screen begin of line.
    parameters:
    p_ext    radiobutton group db.
    selection-screen comment (29) for field p_ext.
    selection-screen comment (29) for field p_d_file.
    parameters:
    p_d_file   type char128.
    selection-screen end of line.
    selection-screen end of block gen.
    selection-screen begin of block evtt with frame title text-f01.
    parameters:
    p_t_peqo radiobutton group top,
    p_t_pneo radiobutton group top,
    p_t_pnoo radiobutton group top,
    p_t_onop radiobutton group top.
    selection-screen end of block evtt.
    selection-screen begin of block evte with frame title text-f02.
    parameters:
    p_e_peqo radiobutton group end,
    p_e_pneo radiobutton group end,
    p_e_pnoo radiobutton group end,
    p_e_onop radiobutton group end.
    selection-screen end of block evte.
    START-OF-SELECTION                                                   *
    start-of-selection.
      gs_test-amount = p_amount.
      gs_test-repid = sy-repid.
      case abap_true.
        when p_t_peqo.
          gs_test-top_of_list = gc_s_alv_event-print_eq_online.
        when p_t_pneo.
          gs_test-top_of_list = gc_s_alv_event-print_ne_online.
        when p_t_pnoo.
          gs_test-top_of_list = gc_s_alv_event-print_no_online.
        when p_t_onop.
          gs_test-top_of_list = gc_s_alv_event-online_no_print.
      endcase.
      case abap_true.
        when p_e_peqo.
          gs_test-end_of_list = gc_s_alv_event-print_eq_online.
        when p_e_pneo.
          gs_test-end_of_list = gc_s_alv_event-print_ne_online.
        when p_e_pnoo.
          gs_test-end_of_list = gc_s_alv_event-print_no_online.
        when p_e_onop.
          gs_test-end_of_list = gc_s_alv_event-online_no_print.
      endcase.
    *... §1 select data into global output table
      perform select_data.
    END-OF-SELECTION                                                     *
    end-of-selection.
      perform display_hierseq.
    *&      Form  select_data
    §1 select data into your global output table
    form select_data.
      field-symbols: gui_upload
            exporting
              filename            = l_filename
              has_field_separator = 'X'
              read_by_line        = 'X'
            changing
              data_tab            = gt_slave.
      endcase.
    endform.                    " select_data
    *&      Form  display_hierseq
          text
    form display_hierseq.
      data:
        lt_binding type salv_t_hierseq_binding,
        ls_binding type salv_s_hierseq_binding.
      data:
        lr_functions type ref to cl_salv_functions_list.
      data:
        lr_columns type ref to cl_salv_columns_hierseq,
        lr_column  type ref to cl_salv_column_hierseq.
      data:
        lr_level type ref to cl_salv_hierseq_level.
      data:
        lr_content type ref to cl_salv_form_element.
    *... create the binding information between master and slave
      ls_binding-master = 'MANDT'.
      ls_binding-slave  = 'MANDT'.
      append ls_binding to lt_binding.
      ls_binding-master = 'CARRID'.
      ls_binding-slave  = 'CARRID'.
      append ls_binding to lt_binding.
      ls_binding-master = 'CONNID'.
      ls_binding-slave  = 'CONNID'.
      append ls_binding to lt_binding.
    *... §2 create an ALV hierseq table
      try.
          cl_salv_hierseq_table=>factory(
            exporting
              t_binding_level1_level2 = lt_binding
            importing
              r_hierseq               = gr_hierseq
            changing
              t_table_level1           = gt_master
              t_table_level2           = gt_slave ).
        catch cx_salv_data_error cx_salv_not_found.
      endtry.
    *... Functions
    *... activate ALV generic Functions
      lr_functions = gr_hierseq->get_functions( ).
      lr_functions->set_all( abap_true ).
    *... §3 set the top of list content
      if gs_test-top_of_list ne gc_s_alv_event-print_no_online.
        perform create_alv_form_content_tol using space changing lr_content.
        gr_hierseq->set_top_of_list( lr_content ).
      endif.
      case gs_test-top_of_list.
        when gc_s_alv_event-print_eq_online.
    *... top_of_list_print is automatically set to top_of_list
        when gc_s_alv_event-print_ne_online or gc_s_alv_event-print_no_online.
          perform create_alv_form_content_tol using abap_true changing lr_content.
          gr_hierseq->set_top_of_list_print( lr_content ).
        when gc_s_alv_event-online_no_print.
    *... top_of_list_print is automatically set to top_of_list
       therefor this must be cleared
          clear lr_content.
          gr_hierseq->set_top_of_list_print( lr_content ).
      endcase.
    *... §4 set the end of list content
      if gs_test-end_of_list ne gc_s_alv_event-print_no_online.
        perform create_alv_form_content_eol using space changing lr_content.
        gr_hierseq->set_end_of_list( lr_content ).
      endif.
      case gs_test-end_of_list.
        when gc_s_alv_event-print_eq_online.
    *... end_of_list_print is automatically set to end_of_list
        when gc_s_alv_event-print_ne_online or gc_s_alv_event-print_no_online.
          perform create_alv_form_content_eol using abap_true changing lr_content.
          gr_hierseq->set_end_of_list_print( lr_content ).
        when gc_s_alv_event-online_no_print.
    *... end_of_list_print is automatically set to end_of_list
       therefor this must be cleared
          clear lr_content.
          gr_hierseq->set_end_of_list_print( lr_content ).
      endcase.
    *... *** MASTER Settings ***
      try.
          lr_columns = gr_hierseq->get_columns( 1 ).
        catch cx_salv_not_found.
      endtry.
    *... set the columns technical
      try.
          lr_column ?= lr_columns->get_column( 'MANDT' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    *... set expand column
      try.
          lr_columns->set_expand_column( 'EXPAND' ).
        catch cx_salv_data_error.                           "#EC NO_HANDLER
      endtry.
    *... set items expanded
      try.
          lr_level = gr_hierseq->get_level( 1 ).
        catch cx_salv_not_found.
      endtry.
      lr_level->set_items_expanded( ).
    *... subtotal over columns CARRID and CONNID of Master
      data: lr_sorts type ref to cl_salv_sorts.
      try.
          lr_sorts = gr_hierseq->get_sorts( 1 ).
        catch cx_salv_not_found.
      endtry.
      lr_sorts->set_group_active( ).
      try.
          lr_sorts->add_sort(
            columnname = 'CARRID'
            subtotal   = abap_true ).
        catch cx_salv_not_found cx_salv_existing cx_salv_data_error."#EC NO_HANDLER
      endtry.
      try.
          lr_sorts->add_sort(
            columnname = 'CONNID'
            subtotal   = abap_true
            group      = if_salv_c_sort=>group_with_newpage ).
        catch cx_salv_not_found cx_salv_existing cx_salv_data_error."#EC NO_HANDLER
      endtry.
    *... *** SLAVE Settings ***
      try.
          lr_columns = gr_hierseq->get_columns( 2 ).
        catch cx_salv_not_found.
      endtry.
    *... set the columns technical
      perform set_columns_technical using lr_columns.
    *... total over Column PRICE of Slave
      data: lr_aggregations type ref to cl_salv_aggregations.
      try.
          lr_aggregations = gr_hierseq->get_aggregations( 2 ).
        catch cx_salv_not_found.
      endtry.
      try.
          lr_aggregations->add_aggregation( 'PRICE' ).
        catch cx_salv_not_found cx_salv_data_error cx_salv_existing."#EC NO_HANDLER
      endtry.
    *... *** GENERAL Settings ***
    *... register to the events for top-of-page and end-of-page
      data: lr_events type ref to cl_salv_events_hierseq.
      lr_events = gr_hierseq->get_event( ).
      create object gr_events_hierseq.
      set handler gr_events_hierseq->on_top_of_page for lr_events.
      set handler gr_events_hierseq->on_end_of_page for lr_events.
    *... display the table
      gr_hierseq->display( ).
    endform.                    "display_hierseq
    *&      Form  create_alv_form_content_tol
          text
    form create_alv_form_content_tol
                       using i_print type sap_bool
                       changing cr_content type ref to cl_salv_form_element.
      data: lr_header type ref to cl_salv_form_header_info,
            l_text    type string.
    *... create header information
      case i_print.
        when space.
          concatenate 'TOP_OF_LIST' text-h01 into l_text separated by space.
        when abap_true.
          concatenate 'TOP_OF_LIST_PRINT' text-h01 into l_text separated by space.
      endcase.
      create object lr_header
        exporting
          text    = l_text
          tooltip = l_text.
      cr_content = lr_header.
    endform.                    " create_alv_form_content_tol
    *&      Form  create_alv_form_content_eol
          text
    form create_alv_form_content_eol
                       using i_print type sap_bool
                       changing cr_content type ref to cl_salv_form_element.
      data: lr_header type ref to cl_salv_form_header_info,
            l_text    type string.
    *... create header information
      case i_print.
        when space.
          concatenate 'END_OF_LIST' text-h01 into l_text separated by space.
        when abap_true.
          concatenate 'END_OF_LIST_PRINT' text-h01 into l_text separated by space.
      endcase.
      create object lr_header
        exporting
          text    = l_text
          tooltip = l_text.
      cr_content = lr_header.
    endform.                    " create_alv_form_content_eol
    *&      Form  create_alv_form_content_top
          text
    form create_alv_form_content_top
           using    i_page  type sypagno
                    i_index type syindex
           changing cr_content     type ref to cl_salv_form_element.
      field-symbols: get( ).
    *... check if a group change with new page exists and get the position of the
       last group change with new page
      loop at lt_sort into ls_sort.
        if ls_sort-r_sort->get_group( ) eq if_salv_c_sort=>group_with_newpage.
          l_end = sy-tabix.
        endif.
      endloop.
    *... read the current line in the output table which is to be displayed next
      l_index = i_index.
      if l_index is initial.
        add 1 to l_index.
      endif.
      read table  index l_index.
    *... create a grid
      create object lr_grid.
      if l_end is not initial.
    *... group change with new page exists
    *... in the cell create a left grid
        lr_grid_1 = lr_grid->create_grid(
          row    = 1
          column = 1 ).
    *... in the cell create a right grid
        lr_grid_2 = lr_grid->create_grid(
          row    = 1
          column = 2 ).
    *... go through the sort criteria
        loop at lt_sort into ls_sort.
          if sy-tabix gt l_end.
            exit.
          endif.
          l_rest = sy-tabix mod 2.
          if l_rest is not initial.
            add 1 to l_row.
          endif.
    *... get the column information for this sort criteria
          try.
              lr_column = lr_columns->get_column( ls_sort-columnname ).
            catch cx_salv_not_found.                        "#EC NO_HANDLER
          endtry.
    *... get the calue of this column
          assign component ls_sort-columnname of structure .
          endif.
          case ls_sort-columnname.
            when 'CARRID'.
    *... in the cell of the left grid create a label
              l_text = lr_column->get_medium_text( ).
              lr_label = lr_grid_1->create_label(
                row     = l_row
                column  = 1
                text    = l_text
                tooltip = l_text ).                             "#EC NOTEXT
    *... in the cell of the left grid create a text
              lr_text = lr_grid_1->create_text(
                row     = l_row
                column  = 2
                text    =  ).
    *... in the cell of the left grid create a text
              lr_grid_1->create_text(
                row     = l_row
                column  = 3
                text    = ls_tab-carrname
                tooltip = ls_tab-carrname ).
            when others.
              if l_rest is not initial.
    *... display data in the left grid
    *... in the cell of the left grid create a label
                l_text = lr_column->get_medium_text( ).
                lr_label = lr_grid_1->create_label(
                  row     = l_row
                  column  = 1
                  text    = l_text
                  tooltip = l_text ).                           "#EC NOTEXT
    *... in the cell of the left grid create a text
                lr_text = lr_grid_1->create_text(
                  row     = l_row
                  column  = 2
                  text    =  ).
              else.
    *... display data in the right grid
    *... in the cell of the right grid create a label
                l_text = lr_column->get_medium_text( ).
                lr_label = lr_grid_2->create_label(
                  row     = l_row
                  column  = 1
                  text    = l_text
                  tooltip = l_text ).                           "#EC NOTEXT
    *... in the cell of the right grid create a text
                lr_text = lr_grid_2->create_text(
                  row     = l_row
                  column  = 2
                  text    = set_label_for( lr_text ).
        endloop.
      else.
    *... in the cell create header information
        concatenate 'TOP_OF_PAGE' text-h01 into l_text separated by space.
        lr_grid->create_header_information(
          row    = 1
          column = 1
          text    = l_text
          tooltip = l_text ).
    *... add a row to the grid -> row 2
        lr_grid->add_row( ).
    *... in the cell create a grid
        lr_grid_1 = lr_grid->create_grid(
                      row    = 3
                      column = 1 ).
    *... in the cell of the second grid create a label
        lr_label = lr_grid_1->create_label(
          row     = 1
          column  = 1
          text    = text-t10
          tooltip = text-t10 ).
    *... in the cell of the second grid create a text
        lr_text = lr_grid_1->create_text(
          row     = 1
          column  = 2
          text    = gs_test-amount
          tooltip = gs_test-amount ).
        lr_label->set_label_for( lr_text ).
    *... in the cell of the second grid create a label
        lr_label = lr_grid_1->create_label(
          row    = 2
          column = 1
          text    = text-t11
          tooltip = text-t11 ).
    *... in the cell of the second grid create a text
        l_text = text-t15.
        lr_text = lr_grid_1->create_text(
          row    = 2
          column = 2
          text    = l_text
          tooltip = l_text ).
        lr_label->set_label_for( lr_text ).
        if i_page is not initial.
    *... in the cell of the second grid create a label
          lr_label = lr_grid_1->create_label(
            row    = 1
            column = 3
            text    = text-i01
            tooltip = text-i01 ).
    *... in the cell of the second grid create a text
          lr_text = lr_grid_1->create_text(
            row    = 1
            column = 4
            text    = i_page
            tooltip = i_page ).
        endif.
      endif.
    *... content is the top grid
      cr_content = lr_grid.
    endform.                    " create_alv_form_content_top
    *&      Form  create_alv_form_content_eop
          text
    form create_alv_form_content_eop
           using    i_page type sypagno
           changing cr_content    type ref to cl_salv_form_element."#EC *
      data: lr_header type ref to cl_salv_form_header_info,
            l_text    type string.
    *... create header information
      concatenate 'END_OF_PAGE' text-h01 into l_text separated by space.
      create object lr_header
        exporting
          text    = l_text
          tooltip = l_text.
      cr_content = lr_header.
    endform.                    " create_alv_form_content_eop
    *&      Form  set_columns_technical
          text
    form set_columns_technical using ir_columns type ref to cl_salv_columns_hierseq.
      data: lr_column type ref to cl_salv_column.
      try.
          lr_column = ir_columns->get_column( 'MANDT' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'FLOAT_FI' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'STRING_F' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'XSTRING' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'INT_FIEL' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'HEX_FIEL' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'DROPDOWN' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
      try.
          lr_column = ir_columns->get_column( 'TAB_INDEX' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    endform.                    " set_columns_technical(

  • Reg. decimal airthmetic......have ur ponts.

    Hi all,
    I have a decimal field with 2 places....say A = 1234.12
    My requirement to put the decimal value in another variable B. eg.   now B should be equal to B = 12.
    Help me out..
    & <b>Have ur pont.s</b>

    check this
    data : v1 type p decimals 2 value '123.45',
           v2 type i,
           v3 type p decimals 2.
    v3 = v1.
    v3 = v3 * 100.
    v2 = v3  mod 100.
    write : / v2.
    regards
    shiba dutta

  • Friend class

    Hi to all,
    I have created two classes 1) ztest and 2) ztest_cl.
    I have declared 3 private variables of data type i say n1, n2, n3 .i gave Visibility as private for all three variables. And also in the ztest class i have declared ztest_cl as a friend class in friend attribute.
    Now i want to use those data variables in one of the method in the ztest_cl.
    I am writing code some thing like this n3 = n1 + 2 without declaring these parameters in ztest_cl class.
    But its showing a error that data types (n1 and n2 and n3) unknown.
    As it is friend class it should accept those variables but its not taking those variables.
    Can any one suggest me please?
    Thanks & Regards
    Priya

    HI
    FRIEND CLASS is a concept useing which a child can access private components of the base class in it
    FRIENDSHIP is extended by parent to the child
    FRIENDSHIP is not transtive
    VISIBILITY is allways 1st preference in the object oriented programing
    the PRIVATE components are not inherited to the child class but thriugh that child class we can acess PRIVATE components of the BASE CLASS
    *For this we need to create an object of the BASE CLASS with in the child class to access PRIVATE components *
    FRIENDS key word along with the child class name is used in the parent clas definition section to consider a child as a friend

  • Friends,  i  have a problem with safari . Whenever i am typing in the safari main bar , so in the halfway through the typing my sentence/words are shifting to another main google search and in the end i have to type again in google

    Friends, 
    i  have a problem with safari . Whenever i am typing in the safari main bar , so in the halfway through the typing my sentence/words are shifting to another main google search and in the end i have to type again in google. I have attached a sample screenshot of the safari problem which i am facing. In this particular example i wanted to write Print Screen, however halfway,my typing automatically shifted to google bar?? can you guys help me.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this test is to determine whether the problem is localized to your user account. Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in OS X 10.7 or later, then you can’t enable the Guest account. The "Guest User" login created by "Find My Mac" is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.

  • Hi, dear friends,   I have a big problem:   Since I installed OS 10.9.3 MAV (Maverick), I am unable to use Adobe CS6. Each opening Photoshop attempt, the system tells me an error of type 6 or 16.   Thank you for your help, Guys,   Marius SANNA

    Hi, dear friends,
    I have a big problem:
    Since I installed OS 10.9.3 MAV (Maverick), I am unable to use Adobe CS6. Each opening Photoshop attempt, the system tells me an error of type 6 or 16.
    Thank you for your help, Guys,
    Marius SANNA

    Which version of Photoshop do you have? The current version is 13.0.6.

  • Code to call friends class method

    Hello,
    Please can someone help me with friends class method call. in global classes
    Thanks
    Megh
    Moderator message: please search for available information/documentation before asking.
    Edited by: Thomas Zloch on Nov 2, 2010 5:29 PM

    What is your exact problem?
    The class whose private and protected section you want to use, needs declaration of its friends. You do it in Friends tabstrip. All these classes are allowed then to access these "hiden" sections from outside of the class. Below example how it works with local classes. For global ones the principle stays the same
    CLASS lcl_main DEFINITION DEFERRED.
    CLASS lcl_other DEFINITION FRIENDS lcl_main. "only LCL_MAIN can use may hiden sections
      PROTECTED SECTION.
        METHODS prot_meth.
      PRIVATE SECTION.
        METHODS priv_meth.
    ENDCLASS.                  
    CLASS lcl_other IMPLEMENTATION.
      METHOD prot_meth.
        WRITE / 'This is protected method of class lcl_other'.
      ENDMETHOD.                    "prot_meth
      METHOD priv_meth.
        WRITE / 'This is private method of class lcl_other'.
      ENDMETHOD.                    "priv_meth
    ENDCLASS.                   
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        METHODS call_friends_methods.
      PRIVATE SECTION.
        DATA mr_my_friend TYPE REF TO lcl_other.
    ENDCLASS.                  
    CLASS lcl_main IMPLEMENTATION.
      METHOD call_friends_methods.
        CREATE OBJECT mr_my_friend.
        mr_my_friend->prot_meth( ).
        mr_my_friend->priv_meth( ).
      ENDMETHOD.                   
    ENDCLASS.           
    START-OF-SELECTION.
      DATA gr_main TYPE REF TO lcl_main.
      CREATE OBJECT gr_main.
      gr_main->call_friends_methods( ).
    Regards
    Marcin

  • HT4972 hello friends i have a problem in my ipod touch it has 4.2.1 version of software but it doesnot supports any aps so how to update the ios please anybody help me..

    hello friends i have a problem in my ipod touch 3g it has 4.2.1 version of software but it doesnot supports any apps so how to update the ios 5 or more than this please anybody help me..i am in trouble.

    I suspect you really have a 2G iPod. Those can only go to iOS 4.2.1.
    Identifying iPod models
    iPod touch (3rd generation)
    iPod touch (3rd generation) features a 3.5-inch (diagonal) widescreen multi-touch display and 32 GB or 64 GB flash drive. You can browse the web with Safari and watch YouTube videos with Wi-Fi. You can also search, preview, and buy songs from the iTunes Wi-Fi Music Store on iPod touch.
    The iPod touch (3rd generation) can be distinguished from iPod touch (2nd generation) by looking at the back of the device. In the text below the engraving, look for the model number. iPod touch (2nd generation) is model A1288, and iPod touch (3rd generation) is model A1318.
    Otherwise connect to yor computer and update via iTunes. Yo need iTunes 10 or later on the computer.
    To more easily find compatilbe apps for 4.2.1
    iOSSearch - search the iTunes store for compatible apps.
    Vintapps 3.1.3 - paid app.
    Apple Club - filter apps by iOS version.
    Discussion post by msgarmar - technique to sort apps by date.

  • I've just brought myself a new MacBook Pro from a friend I have no idea how to use them I YouTube how to reset a MacBook Pro I done everything all we'll In till you reinstall then it say "this disk is locked"??? Can anyone help me please

    I've just brought myself a new MacBook Pro from a friend I have no idea how to use them I YouTube how to reset a MacBook Pro I done everything all we'll In till you reinstall then it say "this disk is locked"??? Can anyone help me please

    I done everything all we'll In till you reinstall
    Please detail ALL you have done so far in the way of troubleshooting?   Need this info to avoid the been there done that scenarios.
    Care to share which OS you are using?
    Which MBP model do you have? 

  • Use of Friend class in Class builder

    HI
    Can someone tell me how to use a friend class In class Builder
    SRidhar

    Hi,
    Please check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/b5/693ec8185011d5969b00a0c94260a5/frameset.htm
    Defining Relationships Between Object Types
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/c035b7a6c611d1b4790000e8a52bed/frameset.htm
    Examples
    http://help.sap.com/saphelp_nw04/helpdata/en/47/5f643a7c5dd813e10000000a114084/frameset.htm
    Best regards,
    raam

  • How to find out in program which all classes have implemented an interface

    Hello,
    I have created an interface and few classes are implementing the interface.
    I want to know in a program which all class have implemented the interface.
    Is it possible to find it out and how?
    Regards,
    Bikash.

    Hi Bikash,
    Read the Database view VSEOIMPLEM with where condition REFCLSNAME = Interface Name and version = 1.
    This would give you all the classes which have implemented the interface and are active...
    If you want to look at the values that the field version can have then see Type Group SEOC ans search for version....
    Hope this help...
    Regards,
    Sitakant

  • Two classes have the same XML type name??? Please, help...

    Hello!
    I have a simple web service class. I generated the ws server-side classes using wsgen.
    I created a jar file from the generated code.
    Then :
    Endpoint endPoint = Endpoint.create(
    new WebServicesUnitImpl()
    String wsFinalName = "http://localhost:9999/akarmi";
    endPoint.publish( wsFinalName );
    The web service started fine.
    Then called wsimport, and the generated classes have been placed into a jar file.
    Then called the code like this:
    WebServicesUnitImplService service = new WebServicesUnitImplService();
    WebServicesUnitImpl unit = service.getWebServicesUnitImplPort();
    unit.serviceXXX();
    but the code doesn't work at all, resulting this error message:
    Two classes have the same XML type name "{http://ws.components.core.ilogique.vii.com/}getMessages". Use @XmlType.name and @XmlType.namespace to assign different names to them.
         this problem is related to the following location:
              at com.vii.ilogique.core.components.ws.GetMessages
              at public com.vii.ilogique.core.components.ws.GetMessages com.vii.ilogique.core.components.ws.ObjectFactory.createGetMessages()
              at com.vii.ilogique.core.components.ws.ObjectFactory
         this problem is related to the following location:
              at com.vii.ilogique.core.components.ws.GetMessages
    I have this error report on all generated class file! How can i fix this?
    What is the main problem? The SE usage? I copied the lates jax-ws jars into endorsed lib resulting the same.
    Any help is appreciate.

    Hello!
    I have a simple web service class. I generated the ws server-side classes using wsgen.
    I created a jar file from the generated code.
    Then :
    Endpoint endPoint = Endpoint.create(
    new WebServicesUnitImpl()
    String wsFinalName = "http://localhost:9999/akarmi";
    endPoint.publish( wsFinalName );
    The web service started fine.
    Then called wsimport, and the generated classes have been placed into a jar file.
    Then called the code like this:
    WebServicesUnitImplService service = new WebServicesUnitImplService();
    WebServicesUnitImpl unit = service.getWebServicesUnitImplPort();
    unit.serviceXXX();
    but the code doesn't work at all, resulting this error message:
    Two classes have the same XML type name "{http://ws.components.core.ilogique.vii.com/}getMessages". Use @XmlType.name and @XmlType.namespace to assign different names to them.
         this problem is related to the following location:
              at com.vii.ilogique.core.components.ws.GetMessages
              at public com.vii.ilogique.core.components.ws.GetMessages com.vii.ilogique.core.components.ws.ObjectFactory.createGetMessages()
              at com.vii.ilogique.core.components.ws.ObjectFactory
         this problem is related to the following location:
              at com.vii.ilogique.core.components.ws.GetMessages
    I have this error report on all generated class file! How can i fix this?
    What is the main problem? The SE usage? I copied the lates jax-ws jars into endorsed lib resulting the same.
    Any help is appreciate.

  • I got an iPhone 3G off my sister who had got it off a friend, I have the latest update and everything seems to work fine, except when i put my telstra sim card in, a message pops up saying "sim failure", can this be fixed or this iPhone unusable? thanx :)

    .

    It might mean that the phone is locked to the previous carrier - if you put your sim card in and this happens, could be that the phone is locked.
    You would need to ask your sister to ask her friend if the phone was locked to the carrier she was using.  If so and you want to use another sim card in the phone the original phone company will have to unlock the phone before this can be done. 
    To get the phone unlocked though your sister's friend would have to contact the phone company to get it unlocked and she would be the last person to use the phone.

  • HT201364 Hi friends, I have a Mac Pro OS X 10.5.8, I want to upgrade newer version its possible, please help to get a solution thanks

    Hi friends, I have a Mac Pro OS X 10.5.8, I want to upgrade newer version its possible, please help to get a solution
    thanks
    Mujeeb

    See options below:
    Upgrading to Snow Leopard
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mavericks if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s iCloud services; fees and
               terms apply.
    Upgrading from Snow Leopard to Lion or Mavericks
    To upgrade to Mavericks you must have Snow Leopard 10.6.8, Lion, or Mountain Lion installed. Purchase and download Mavericks (Free) from the App Store. Sign in using your Apple ID. The file is quite large, over 5 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.
         OS X Mavericks- System Requirements
           Macs that can be upgraded to OS X Mavericks
             1. iMac (Mid 2007 or newer) — Model Identifier 7,1 or later
             2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) —
                 Model Identifier 5,1 or later
             3. MacBook Pro (Mid/Late 2007 or newer) — Model Identifier 3,1 or later
             4. MacBook Air (Late 2008 or newer) — Model Identifier 2,1 or later
             5. Mac mini (Early 2009 or newer) — Model Identifier 3,1 or later
             6. Mac Pro (Early 2008 or newer) — Model Identifier 3,1 or later
             7. Xserve (Early 2009) — Model Identifier 3,1 or later
    To find the model identifier open System Profiler in the Utilities folder. It's displayed in the panel on the right.
    Are my applications compatible?
             See App Compatibility Table — RoaringApps.
    Upgrading to Lion
    If your computer does not meet the requirements to install Mavericks, it may still meet the requirements to install Lion.
    You can purchase Lion at the Online Apple Store. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.

Maybe you are looking for