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

Similar Messages

  • 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. 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...implementation of abstract method in se24...have ur ponts..

    Hi all,
    In SE24 i made an abstract class & made a method abstract successfully.
    Now i made another class that inherited my abstract class, it is showing my abstract method there.
    Now when i want to give implementation to that method, but when i double click on that system is showing "method is abstract & has not yet redefined".
    Pleas let me know..how i implement it..
    Thanx in advance..
    <b>Have ur point.s</b>

    Hi
    Inheritance Inheritance defines the implementation relationship between classes, in which one class (the subclass) shares the structure and the behavior defined in one or more other classes (superclasses). Note: ABAP Objects only allows single inheritance.
    Inheritance is a relationship, in which one class (the subclass) inherits all the main characteristics of another class (the superclass). The subclass can also add new components (attributes, methods, and so on) and replace inherited methods with its own implementations.
    <b>Single Inheritance</b>
    ABAP Objects only has single inheritance.
    A class may only have one direct superclass, but it can have more than one direct subclass. The empty class OBJECT is the root node of every inheritance tree in ABAP Objects.
    <b>Relationship between Superclasses and Subclasses</b>
    Common components only exists in  the superclass
            new components in the supercalss are automatically available in subclass
            amount of new coding is reduced ( programing by difference)
    Subclass are extremely dependent on superclases
           white box reuse – subclass must possess detailed knowledge of the implementation of the superclass
    <b>Inheritance: Syntax</b>
           Normally the only other entry required for subclasses is what has changed in relation to the direct superclass. Only additions are permitted in ABAP Objects, that  is, in a subclass you can "never take something away from a superclass". All components from the superclass are automatically present in the subclass.
    <b>Class name defination.
        public section.
             methods. First name importing some type some type
                                            returning value(value) type some type.
       private section
              data : make type string..
    Endclass.
    Class name1 definition inheriting name
    public section
           method. : get  returning value ( value) type get.
    Priavte section.
       data : max type some type
    endclass</b>
    <b> Redefining methods</b>
    The REDEFINITION statement for the inherited method must be in the same SECTION as the definition of the original method.
    If you redefine a method, you do not need to enter its interface again in the subclass, but only the name of the method.
    In the case of redefined methods, changing the interface (overloading) is not permitted; exception: Overloading is possible with the constructor.
    Within the redefined method, you can access components of the direct superclass using the SUPER reference.
    The pseudo-reference super can only be used in redefined methods.
    reward if usefull

  • 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

  • Reg. ALV....pleas understand.......& have ur ponts..sure

    Hi all,
    I have an ALV grid with a 1st column as character type with length 20.
    i want to remove the redundancy of that column.
    Pleas see the output carefully..
    wht i expect.
    <b>NAME          AMOUNT</b>
    PRADEEP       13
                           12
                           454
    SANDEEP       3434
                           545
                           8768
    MINI                34
                           87
    <b>ples understand....i don't want to have same name multiple times</b>

    Hi, Pradeep,
                  TO do like this in ALV you have to Sort this first column into the program like this.........
    Follow the steps below.........
    1) First of all define this variable of SLIS starting of the program
              W_SORT  TYPE  SLIS_SORTINFO_ALV,
             T_SORT  TYPE  SLIS_T_SORTINFO_ALV.
    2)  Then put code before calling Reuse_Alv_Grid _display
           W_SORT-FIELDNAME = 'name'           <----Here give Field name
           W_SORT-TABNAME = 'itab'.               <---- Here give Internal Table Name
           W_SORT-GROUP = 'X'.                     
          APPEND W_SORT TO T_SORT.
    3)  And finally when you call Reuse_Alv_Grid display function. In this function one parameter is ITSORT give there  T_SORT.
    Apply this logic
    Your Redundancy will Remove.
    PRADIP PAWAR
    ABAP

  • Decimation( Does decimation.vi have a low pass filter?)

    Hello,
        I have a question regarding decimation function (decimation(continuous).vi) in labview. Does it have a low pass filter to take care of aliasing, if yes is it a zero phase filter. Basically I am looking for some thing which can decimate 20KHz sampled signals to 5KHz.
    Thanks,
    kartik
    Solved!
    Go to Solution.

    Depends on your LabVIEW version and installed toolkits. 
    The Digital Filter Design Toolkit  has a decimation VI that includes a LP AA filter.  Open the LabVIEW Help and search for 'decimation' and 'filter' to see what tools are available.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Reg: Decimal Notation In quatity

    Dear All,
      i have 1 issue in decimal notation in quatity in script.
    Ex: I am getting quatity like 1000.000 it is assign to Character Varriable but
    i need to get like 1,000 but i am geeting 1.000
    This is happening for only 1st line items rest items it is geeting 1,000
    Please guide

    Hi
    I think the data declaration should not be char...try to give it the same data type as that of the standard quantity field.
    Regards,
    Vishwa.

  • Reg: Decimal Places

    Hi,
    I have an amount Key Figure. Currently, it is pulling 2 decimal places. Even if I define the no. of decimal places in the BEx Tab to be 0.0000 or 0.000 or Undefined etc, it is still pulling 2 decimal places.
    A new requirement has come whereby from R3, we should be pulling 3 decimal places.
    How should this be incorporated in BI as whatever changes I am making, it is only pulling 2 decimal places?
    Kindly suggest.
    Regards,
    Anjana

    Is that happening for all the Key Figures in the system having the same unit. This is amount KF as you have mentioned that I believe that you would have either USD, INR, GBP etc.
    Question: is this happening only for specific Key Figure or all the Key Figures having same reference currecy key. If it is happening for all the key figures containing reference characteristic,
    GO to CUNI,
    Find the specific currency and set the decimal place to 99, this would enable this KF to store and display the value with 99 decimal precision.
    NOTE: You can always override to less number of decimals in BEx, but you can not override more number of decimals.
    So, say currently you have 2 set in CUNI, you can not display it with 3 decimals. But if have set as 99,  you can display it with any decimal places less or equal to 99.
    - Danny

  • I got a letter from verizon stating i have 17290 ponts i want a gift card for whatever that represents

    can you hear me now or have you lost your voice???????

        Hello Larrylulu897!
    Smart Rewards are a great way to get discounts off of so many things! You are even able to purchase gift cards at a reduced cost! Have you registered for Smart Rewards? Here's a link with all of the information about them:
    http://vz.to/1hzxa0C
    Thanks,
    ChristinaB_VZW
    Follow us on Twitter @VZWSupport

  • Menu problem in ALV.....have ur ponts...

    Hi all,
    I copied standard SAP menu in Se41 then i used that in my ALV grid, Now i want to put my own function code on the exit button(red one), and in user command i m trapping that function code, but no action is going to be done...evern break-point is also not working in the user command...i mean control is not going on..
    Pleas assist me..
    Regards,
    pradeep phogat

    Hello Pradeep,
    you are setting your own PF-status in the report right.
    create an user command
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = l_f_repid
                is_layout                = l_r_layout
                it_fieldcat              = g_t_fieldcat
                i_callback_pf_status_set = 'PF_STATUS_SET'
                i_callback_user_command  = 'USER_COMMAND'
                i_save                   = 'X'
           TABLES
                t_outtab                 = g_t_data
           EXCEPTIONS
                program_error            = 1
                OTHERS                   = 2.
    create a form for the user command in that write the below code.
          FORM secondarylist                                            *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM secondarylist USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.
    CLEAR sy-ucomm.
      CASE r_ucomm.
        WHEN  'EXIT' .
          CLEAR r_ucomm.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDFORM.
    keep the break point in the line case r_ucomm and execute the report and when u press the exit button(red button) then ur code will stop at this place and u can execute it manually.
    Reward if useful.
    Regards,
    Phani.

  • REG: Want to have a dynamic length in the main window of the smartform

    Hi,
    Based on the table contents and the line items, the length and size of the table should either increase and decrease,
    It shall be very helpful in meeting a requirement..
    Regards
    Srikanth.P

    Hi,
    What exactly is it that you want to do?
    The lenght of the table will automatically be dynamic as the table will be build dynamically.
    If you want to place something after the table and for that reason need a dynamic main window you can put it in the footer of the table and it will place it after the table.

  • How to set reg.cgi for VideoPhoneLabs

    i start with stratus .i try set it to work with my dedicated apache server and sql but have no clue how to do it or where to put this file on my server.
    i realy have probleme with reg.cgi
    for now i did www/cgi-bin/reg.cgi and in the xml i set my websiteurl = "http://88..../cgi-bin/"
    also how to complete reg.cgi for have it to talk with my db ?
    here the reg.cgi file.
    help please ...
    #! /usr/bin/python --
    reg.cgi by Michael Thornburgh.
    This file is in the public domain.
    IMPORTANT: This script is for illustrative purposes only. It does
    not have user authentication or other access control measures that
    a real production service would have.
    This script should be placed in the cgi-bin location according to
    your web server installation. The database is an SQLite3 database.
    Edit the location of the database in variable "dbFile".
    Create it with the following schema:
    .schema
    CREATE TABLE registrations (
        m_username VARCHAR COLLATE NOCASE,
        m_identity VARCHAR,
        m_updatetime DATETIME,
        PRIMARY KEY (m_username)
    CREATE INDEX registrations_updatetime ON registrations (m_updatetime ASC);
    # CHANGE THIS
    dbFile = '.../registrations.db'
    import cgi
    import sqlite3
    import xml.sax.saxutils
    query = cgi.parse()
    db = sqlite3.connect(dbFile)
    user = query.get('username', [None])[0]
    identity = query.get('identity', [None])[0]
    friends = query.get('friends', [])
    print 'Content-type: text/plain\n\n<?xml version="1.0" encoding="utf-8"?>\n<result>'
    if user:
        try:
            c = db.cursor()
            c.execute("insert or replace into registrations values (?, ?, datetime('now'))", (user, identity))
            print '\t<update>true</update>'
        except:
            print '\t<update>false</update>'
    for f in friends:
        print "\t<friend>\n\t\t<user>%s</user>" % (xml.sax.saxutils.escape(f), )
        c = db.cursor()
        c.execute("select m_username, m_identity from registrations where m_username = ? and m_updatetime > datetime('now', '-1 hour')", (f, ))
        for result in c.fetchall():
            eachIdent = result[1]
            if not eachIdent:
                eachIdent = ""
            print "\t\t<identity>%s</identity>" % (xml.sax.saxutils.escape(eachIdent), )
            if f != result[0]:
                print "\t\t<registered>%s</registered>" % (xml.sax.saxutils.escape(result[0]), )
        print "\t</friend>"
    db.commit()
    print "</result>"

    Persistent binding is effectively provided by STMS (MPxIO) - is there anything in particular you're wanting to do that STMS doesn't provide?

  • File Adapter: trailing space in field using XSD:Decimal in a CSV file

    Hi Folks,
    I have a problem which i am unable to understand fully.
    We have a SAP to file via XI scenario where a mail adapter is used. We are producing a CSV file as an mail attachment.
    The issue is all the decimal fields have an extra space before the next delimiter i.e. comma.
    The data type used in mapping is XSD:Decimal with 'fraction' set as 2.
    I have checked the source XML and there is no trailing spaces there. Initially i thought this might be due to doing the conversion using transformation beans in mail adapter, to rule this out i checked other files produced using FILE adapter they also appear to have same issue.
    I can't get my head around it, could not find any parameter i need to pass in content conversion either in MAIL adapter or FILE adapter to supress trailing space before the delimiter.
    I suppose this must have occured with others as well.
    Any directions would be greatly appreciated.
    Btw, we are on PI 7.0 and ECC 6
    -Praveen
    Edited by: - External Consultants Mouchel on Sep 15, 2009 5:34 PM

    Hi Mouchel,
    I personally didnot encounter this kind of issue with the file adapter at any point of time. I would suggest you to check the message mapping before and after payload in sxmb_moni. If you see in mapping you may not find out, so view the source in notepad and then see.
    Regards,
    ---Satish

  • IWeb and 123-reg personal domain difficulties

    I have published before using iWeb but have now recently bought a domain name with 123-reg. I have changed my CNAME with 123-reg but cannot publish my website using iWeb. It just says:
    Publish Error - There was an error updating MobileMe.
    What am I doing wrong? Is it massively obvious? I've waited more than 48 hours.

    Try the following:
    delete the iWeb preference file, com.apple.iWeb.plist, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    launch iWeb and try again.
    OT

Maybe you are looking for

  • Problem regarding difference in FS10N and FBL3N

    Dear Friends,      We are facing a problem where the balance of FBL3N does not match with balance of FS10N for all reconciliation accounts for vendors (K). In fact FS10N itself the cumulative balance for a particular month doesn't match with line ite

  • Batch Managment Activation

    Hi, friends I want to activate Batch management at plant level.but there is stock in current period as well as previous period(in marterial master plant stock view).Stock exist unresticted stock,stock at vendor ,Quality Inspection stock.How i will do

  • Using an interface as a type

    Hi Im reading someone elses code and theres something i dont understand. I read the sun trial on interfaces and see that an interface can be declared as a type by a class which implements said interface. Also that interfaces cannot be instantiated. I

  • How to process AT END OF command for company code and transaction number.

    Hi,   I  have report with selection screen with company code and key date.  Based ON key date given I should calculate Accrued interest for all transaction with in each company code.     When I run report with one company code it works fine. But when

  • Cannot use the same credit card for another apple ID

    Hi, I recently created an apple ID and used a credit card to itunes store, now I'm trying to sign up another new apple id to itunes with the same credit card but now I'm getting an error, "Payment method declined, please try another method." Please h