Regarding object oriented concept

hai i am a student..
i just want to know the opnions of everybody...
considering todays object oriented language what will be the future language features? (for example if u consider c language which is basis for c++.. it has polymorphism ,inheritance, encapsulation. etc features..which are not found in c).. if the future language design from c++ or java ,what will be its new concepts ?. i mean will be the new features..
do anybody find any flaws in todays oo language ..do any body have new ideas on basic concepts of oo design to be improved
i know this is very crazy.. i just want to know your ideas..

And the cross posting multi posting fiesta continues.
http://forum.java.sun.com/thread.jspa?threadID=692984&tstart=0
sr1_reddy stop posting this garbage please.

Similar Messages

  • Need documents of ABAP Object Oriented concepts

    Hi,
    I  need materials on ABAP Object Oriented Concepts to learn.
    If you have any good documents which covers all the topics of ABAP OO then please send me to [email protected]
    Thanks in advance.
    Regards,
    Chandru

    Chandra,
    Very good sites with docs.
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    Pls. reward if useful...

  • Notes on using Object  oriented concept in ABAP

    Hi ,
    I want somes notes on how to use Object  oriented concept in ABAP.
    Thanks in advance.
    Chetan

    Hi, this may help you
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    Example:
    REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L I N T E R N A L T A B L E S
    *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
    Field for traffic light
    TYPES: traffic_light TYPE c.
    Field for line color
    types: line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    G L O B A L D A T A
    DATA: ok_code LIKE sy-ucomm,
    Work area for internal table
    g_wa_sflight TYPE st_sflight,
    ALV control: Layout structure
    gs_layout TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container,
    o_event_receiver TYPE REF TO lcl_event_receiver.
    DATA:
    Work area for screen 200
    g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
    DATA:
    Internal table
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu TYPE i VALUE 2,
    c_separator TYPE i VALUE 3,
    c_radio_button TYPE i VALUE 4,
    c_checkbox TYPE i VALUE 5,
    c_menu_entry TYPE i VALUE 6.
    DATA:
    ls_toolbar TYPE stb_button.
    Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
    Append a new button that to the toolbar. Use E_OBJECT of
    event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
    This class has one attribute MT_TOOLBAR which is of table type
    TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
    Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
    PERFORM change_flight.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    DATA:
    For parameter IS_VARIANT that is sued to set up options for storing
    the grid layout as a variant in method set_table_for_first_display
    l_layout TYPE disvariant,
    Utillity field
    l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
    EXPORTING
    it_index_rows = gi_index_rows.
    CALL METHOD cl_gui_cfw=>flush.
    REFRESH gi_index_rows.
    ENDIF.
    Read data and create objects
    IF go_custom_container IS INITIAL.
    Read data from datbase table
    PERFORM get_data.
    Create objects for container and ALV grid
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_custom_container.
    Create object for event_receiver class
    and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    Layout (Variant) for ALV grid
    l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
    Set grid title
    gs_layout-grid_title = 'Flights'.
    Selection mode - Single row without buttons
    (This is the default mode
    gs_layout-sel_mode = 'B'.
    Name of the exception field (Traffic light field) and the color
    field + set the exception and color field of the table
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    Value of traffic light field
    g_wa_sflight-traffic_light = '1'.
    Value of color field:
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
    is_variant = l_layout
    i_save = 'A'
    is_layout = gs_layout
    CHANGING it_outtab = gi_sflight.
    *-- End of grid setup -
    Raise event toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
    Set focus to the grid. This is not necessary in this
    example as there is only one control on the screen
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0200 INPUT
    MODULE user_command_0200 INPUT.
    CASE ok_code.
    WHEN 'EXIT200'.
    LEAVE TO SCREEN 100.
    WHEN'SAVE'.
    PERFORM save_changes.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    *& Form get_data
    FORM get_data.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    ENDFORM. " load_data_into_grid
    *& Form change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
    FORM change_flight.
    DATA:l_lines TYPE i.
    REFRESH gi_index_rows.
    CLEAR g_selected_row.
    Read index of selected rows
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table gi_index_rows will be empty
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
    textline1 = 'You must choose a line'.
    EXIT.
    ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
    LOOP AT gi_index_rows INTO g_selected_row.
    IF sy-tabix = 1.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
    CLEAR g_screen200.
    MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
    LEAVE TO SCREEN '200'.
    ENDFORM. " change_flight
    *& Form save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
    FORM save_changes.
    DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
    MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
    MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    clear g_wa_sflight-line_color.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    clear g_wa_sflight-line_color.
    ENDIF.
    MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    LEAVE TO SCREEN '100'.
    ENDFORM. " save_changes
    chk this blog
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    Reward if helpfull.
    Regards Madhu.

  • Material for Object Oriented Concepts in ABAP

    Hi,
          Please provide me the material for Object Oriented Concepts in ABAP.

    Hi
    Please check this link, may be helpful
    http://www.sap-img.com/ab029.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    regards
    Srinivas

  • How the Object Oriented Concepts can be used in ALV

    Hi guys,
    Please tell me, how the Object Oriented Concepts are used in ALV? I request if someone can illustrate it by an example.
    Thnx
    Sid

    Hi,
    Check this example.
    REPORT  ZTEST_ALV_OO    MESSAGE-ID ZZ                           .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID,  "First
          G_GRID1 TYPE REF TO CL_GUI_ALV_GRID. "Second
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST', "First Container
          G_CONTAINER2 TYPE SCRFNAME VALUE 'TEST1',"Second container
          GS_LAYOUT TYPE LVC_S_LAYO.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         LFDAT like lips-vfdat,
         BOX(1),
         HANDLE_STYLE TYPE LVC_T_STYL,
         END OF ITAB.
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Handler to Check the Data Change
        HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
                             OF CL_GUI_ALV_GRID
                             IMPORTING ER_DATA_CHANGED
                                       E_ONF4
                                       E_ONF4_BEFORE
                                       E_ONF4_AFTER,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
        MESSAGE I000 WITH V_ROW 'clicked'.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          MESSAGE I000 WITH 'Click on POSNR row number '  E_ROW.
          "with this row num you can get the data
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    **Handle Data Change
      METHOD HANDLE_DATA_CHANGED.
      data:stable type LVC_S_STBL.
      stable-row = 'X'.
      stable-col = 'X'.
    call method g_grid->refresh_table_display
      EXPORTING
        IS_STABLE      =  stable
      EXCEPTIONS
        FINISHED       = 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.
      ENDMETHOD.                    "HANDLE_DATA_CHANGED
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER, "handler
                G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER. "Container2
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
    *                START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
        MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
    "First Grid
      CREATE OBJECT G_CUSTOM_CONTAINER
             EXPORTING CONTAINER_NAME = G_CONTAINER1.
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    "Second Grid
      CREATE OBJECT G_CUSTOM_CONTAINER1
             EXPORTING CONTAINER_NAME = G_CONTAINER2.
      CREATE OBJECT G_GRID1
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.
    * Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-BOX_FNAME = 'BOX'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
      GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
    *  SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.
    data: ls_outatb like line of itab,
          v_index type sy-tabix.
    DATA: LS_EDIT TYPE LVC_S_STYL,
            LT_EDIT TYPE LVC_T_STYL.
    LOOP AT ITAB INTO ls_outatb WHERE POSNR = '000010'.
        V_INDEX = SY-TABIX.
        LS_EDIT-FIELDNAME = 'VBELN'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        INSERT LINES OF LT_EDIT INTO TABLE ls_outatb-handle_style.
        MODIFY ITAB INDEX V_INDEX FROM ls_outatb  TRANSPORTING
                                          HANDLE_STYLE.
      ENDLOOP.
    * setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    * Build fieldcat and set editable for date and reason code
    * edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    **Calling the Method for ALV output for First Grid
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    **Calling the Method for ALV output for Second Grid
       CALL METHOD G_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
    *    EXPORTING
    *      IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    * Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
    *       Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-EDIT      = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
        L_POS = L_POS + 1.
        X_FIELDCAT-SCRTEXT_M = 'Del Date'(015).
      X_FIELDCAT-FIELDNAME = 'LFDAT'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Regards
    vijay

  • Is polymorphism a bad design for object oriented concept?

    i think polymorphism is bad concept for object oriented concept..having the same name with different parameter function ..according to my opinion may constitue in efficient skill in programming..instead if using the same name why we cannot use different name...for example each human being will have have unique characterstics..(i.e each persons DNA would be different..)so why can't we have different function names.. even if u choose a username to create a new account it would not support same names..i think it is confusing .. i think this concept is lessly used in modern programming usage... as it has less usage i think the future language designs should not support polymorphism..
    i just want to know ur opnions..

    Is it just me or did Sun fuck up the posting screens?I didn't notice anything; care to enlighten me?800-pixels-wide window and still a vertical scrollbar, but, to make up for
    that, 250 pixels of unused whitespace to the left. And the search text
    field is still unnamed.I agree with that rediculously wide left margin, i.e. rearranging some of
    those things would allow for a better screen estate usage. But didn't Sun
    already give us that crap in a previous incarnation of their mannah?
    Besides that, I still don't notice any difference ...
    kind regards,
    Jos (<--- call me a silly ignoramus)

  • Object oriented Concept

    Hi all, I feel confuse on object oriented.
    Basic, I get change to developer some online form. I use java bean , Servlet, JSTL and Mysql. In my java bean I only have the attribute set and get pattern. I just wonder I put my delete , search and update action on Servlet , not in the java bean , is that means that Is not object oriented enough? How to improve it ?
    thank you!

    Thank you for the reply, I did use some of the Spring in my Project, but only limit in flower control , such as simple spring + acegi , a lot of control still in servlet. I also try some other new stuff like display tag , but that only work on if your jsp page is out of the WEB-INF. I also go through some tutorials on JSF , but not time to figure out how JSF work with acegi yet.
    1 mention the display tag and JSF just try to explain, I looking for a new framework. But don?t want the whole framework to tire me up. For example in simple servlet I can use ? /WEB-INF/ + target to send my flower to any JSP page depend on the link that I click , but I don?t how to handle it spring. May be I did not get the real concept of spring yet. I looking for some framework that allow me to use new technology , but still allow me to use some old technology , like servlet then I can finish my project on time.
    But what is the relation between web framework and object oriented concept??

  • Help with object oriented concepts

    I am a senior highschool student and although I know Java syntax, I learned with Pascal and other procedural languages so I have a difficult time thinking in OOP concepts (which I will have to learn for college classes). So for practice I went to my college's website and found an assignment on the intro course to programming: [Here are the assignment instructions.|http://www.cs.gsu.edu/knguyen/teaching/2009/spring/csc2010/proj.pdf]
    My question is, how can I make my program illustrate more object oriented concepts?
    Links:
    ode-help.110mb.com/javaproject.java_

    Just a few comments (not necessarily about OO and in no particular order):
    It's probably not worth it to make constants for the letter A or the plus sign. Make constants for values people would not understand:
    // Ok
    public static final int ANSWER_TO_THE_UNIVERSE = 42;'
    // Probably overkill
    public static final int FORTY_TWO = 42;
    Good job on having DecimalFormat as a regular instance variable rather than static (since it is not thread-safe)
    Good job initializing your object in a consistent state (via the ctor). Now, make as many variables final as you can. Immutable objects are good:[www.javapractices.com/topic/TopicAction.do?Id=29]
    Not sure why you declared repeat() to return the boxed version of boolean, just use a primitive
    You have a run() method but are not implementing Runnable. Not that it is required, but usually when I see run(), I think of threading
    This is a matter of style, but you don't need to name the arguments in the ctor differently than the instance variables that get assigned. You can very easily say:
    // Note that it is final.  Make things immutable when you can.
    private final String bar;
    public Foo(final String bar) {
       // Note:  I don't need a different name here.  This is purely a matter of personal style.
       this.bar = bar;
    Consider a while loop in run() rather than a do-loop. What happens if you get no input the first time around?
    Java naming conventions dictate that classes start with a capital letter. Generally, an underscore is not used, camel-case is. So, your class should be JavaProject.
    Consider making an object for the arguments that are passed into input. Maybe call it GradeCategory, or whatever.
    That new object GradeCategory can have the output() method.
    For method names, also follow conventions using camel case. So get_double should be getDouble().
    Consider reworking such that you use an array or a collection of GradeCategory. You might want to then have an add method in your JavaProject. The add method should ensure the total weight of grades does not exceed 100%.
    You can rework the output method of JavaProject to iterate over your GradeCategory objects, calling their own output() methods. Perhaps it also first checks that the weight of all grades equals 100%.Just a few thoughts.
    - Saish

  • Object oriented concepts

    Hi Gurus,
    I want to know thw difference between objectoriented program and abap general programme?
    thanks in advance

    Hi Rama Krishna ,
    Object Orientation
    A programming technique in which solutions reflect real world objects
    What are objects ?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat
    can be an object of that class .
    With respect to code, Object refers to a set of services ( methods /
    attributes ) and can contain data
    What are classes ?
    A class defines the properties of an object. A class can be instantiated
    as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Classes in abap
    Classes in ABAP are either local or global
    Global classes are declared in class builder (SE24 )
    Local classes are declared within programs
    Components of a class
    Attributes : Internal data fields of class
    Attributes can be either instance attributes – specific to each instance of the class ( object ) or static attributes which are common to all instances
    Methods :
    Subroutines / procedures in a class that define the behavior of the object. Methods can also be instance methods or static methods
    Encapsulation in ABAP
    Encapsulation is obtained through the restriction in visibility of attributes / methods attained through the definition of Public, Private and Protected section of a class
    Public Section
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    Protected Section
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it.
    Private Section
    Components that you declare in the private section are only visible in the methods of the same class.
    Inheritance in ABAP
    Inheritance allows you to derive a class based on an already existing class.
    CLASS <subclass> DEFINITION INHERITING FROM <superclass>.
    ENDCLASS.
    CLASS <subclass> IMPLEMENTATION.
    ENDCLASS.
    All attributes / methods of super class become the property of the subclass too. Only public and protected attributes / methods are visible in the subclass
    Polymorphism in ABAP
    When methods with same name perform differently under different
    circumstances we call it polymorphism.
    Methods redefined in a subclass is an example for Polymorphism
    Interfaces
    Interfaces are used to define the model of a class.
    They also like classes can be either local or global.
    Global interfaces are defined through SE24 and local interfaces are defined in program.
    Please check this online document (starting page 1291).
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Also check this links as well.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.futureobjects.de/content/intro_oo_e.html
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    Hope this resolves your query.
    Reward all the helpful answers.
    Thanks & Regards
    Bhaskar rao.M

  • Regarding Object oreinted concepts

    hello all,
    do any one have basic learning material related to Object oreinted concepts in ABAP.
    plz do forward it to me at [email protected]
    thanks for ur help..
    if its useful i'll rewards points.

    Hi
    Here are few links
    http://www.erpgenie.com/abap/OO/defn.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    Hi
    go through the following limks...
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    Classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    Object Handling
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5f54f411d194a60000e8353423/content.htm
    Declaring and Calling methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    Inheritance.
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    Interfaces.
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Trigerring and handling Events
    http://help.sap.com/saphelp_47x200/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm
    What is Object Orientation?
    In the past, information systems used to be defined primarily by their functionality: data and functions were kept separate and linked together by means of input and output relations.
    The object-oriented approach, however, focuses on objects that represent abstract or concrete things of the real world. These objects are first defined by their character and their properties which are represented by their internal structure and their attributes (data). The behaviour of these objects is described by methods (functionality).
    Objects form a capsule which combines the character to the respective behaviour. Objects should enable programmers to map a real problem and its proposed software solution on a one-to-one basis.
    Typical objects in a business environment are, for example, ‘Customer’, ‘Order’, or ‘Invoice’. From Release 3.1 onwards, the Business Object Repository (BOR) of SAP Web Applicaton Server ABAP has contained examples of such objects. The BOR object model will be integrated into ABAP Objects in the next Release by migrating the BOR object types to the ABAP class library.
    A comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list of further reading, with a selection of titles about object orientation.
    Objects
    Objects are instances of classes. They contain data and provides services. The data forms the attributes of the object. The services are known as methods (also known as operations or functions). Typically, methods operate on private data (the attributes, or state of the object), which is only visible to the methods of the object. Thus the attributes of an object cannot be changed directly by the user, but only by the methods of the object. This guarantees the internal consistency of the object.
    Classes
    Classes describe objects. From a technical point of view, objects are runtime instances of a class. In theory, you can create any number of objects based on a single class. Each instance (object) of a class has a unique identity and its own set of values for its attributes.
    Object References
    In a program, you identify and address objects using unique object references. Object references allow you to access the attributes and methods of an object.
    In object-oriented programming, objects usually have the following properties:
    Encapsulation
    Objects restrict the visibility of their resources (attributes and methods) to other users. Every object has an interface, which determines how other objects can interact with it. The implementation of the object is encapsulated, that is, invisible outside the object itself.
    Inheritance
    You can use an existing class to derive a new class. Derived classes inherit the data and methods of the superclass. However, they can overwrite existing methods, and also add new ones.
    Polymorphism
    Identical (identically-named) methods behave differently in different classes. In ABAP Objects, polymorphism is implemented by redefining methods during inheritance and by using constructs called interfaces.
    Uses of Object Orientation
    Below are some of the advantages of object-oriented programming:
    · Complex software systems become easier to understand, since object-oriented structuring provides a closer representation of reality than other programming techniques.
    · In a well-designed object-oriented system, it should be possible to implement changes at class level, without having to make alterations at other points in the system. This reduces the overall amount of maintenance required.
    · Through polymorphism and inheritance, object-oriented programming allows you to reuse individual components.
    · In an object-oriented system, the amount of work involved in revising and maintaining the system is reduced, since many problems can be detected and corrected in the design phase.
    Achieving these goals requires:
    · Object-oriented programming languages
    Object-oriented programming techniques do not necessarily depend on object-oriented programming languages. However, the efficiency of object-oriented programming depends directly on how object-oriented language techniques are implemented in the system kernel.
    · Object-oriented tools
    Object-oriented tools allow you to create object-oriented programs in object-oriented languages. They allow you to model and store development objects and the relationships between them.
    · Object-oriented modeling
    The object-orientation modeling of a software system is the most important, most time-consuming, and most difficult requirement for attaining the above goals. Object-oriented design involves more than just object-oriented programming, and provides logical advantages that are independent of the actual implementation.
    This section of the ABAP User’s Guide provides an overview of the object-oriented extension of the ABAP language. We have used simple examples to demonstrate how to use the new features. However, these are not intended to be a model for object-oriented design. More detailed information about each of the ABAP Objects statements is contained in the keyword documentation in the ABAP Editor. For a comprehensive introduction to object-oriented software development, you should read one or more of the titles listed below.
    ABAP supports a hybrid programming model. You can use an object-oriented ("OO") programming model based on classes and interfaces, and you can use the more classic procedural and event-driven programming model based on function modules, subroutines, dialog modules, and event blocks. Both models can be used in parallel. You can use classes inside classic processing blocks or you can call classic procedures from methods. In ABAP Objects, SAP has implemented a cleanup of the ABAP language. Within the scope of this language cleanup, stricter syntax checks are performed in classes that restrict the usage of obsolete language elements.
    Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. This helps to simplify applications and make them more controllable.
    ABAP Objects is fully compatible with the existing language, so you can use existing statements and modularization units in programs that use ABAP Objects, and can also use ABAP Objects in existing ABAP programs.
    Check these links
    /people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    This is good for beginners
    /people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
    Reward all helpfull answers

  • Regarding  object oriented

    Hi,
    I am new to the  oops concept..
    i know  how to write methods...
    can any one guide to use these oops concept in  *REPORTS*,&
    hw can  i  implement (inheritance, polymorphism,& other concepts..)
    can any one give sample report for  using all oops concepts
    how can  implement the methods in Reports..
    Thanks& Regards
    Spandana

    hi if you wants to use oo in reports than u can go for alv.there you can get alot of options for using oo.
    as  a sample look into the below report whcih used 00 for events and displaying the list.
    *& Report yi_amra_yiamraber                                            *
    report yi_amra_yiamraber no standard page heading.
    tables: yiamra_ber,SWW_WI2OBJ.
    include <icon>.
    include <symbol>.
    type-pools: slis.
    class cl_gui_resources definition load.
    constants: con_true    type char1 value 'X',
              con_on      type char1 value '1',
              con_off      type char1 value '0',
              con_exit like sy-ucomm value 'EXIT',
              con_back like sy-ucomm value 'BACK',
              con_canc like sy-ucomm value 'CANC'.
    data: g_okcode                type sy-ucomm,
          g_container_d0100        type ref to cl_gui_custom_container,
          g_container_name_d0100  type scrfname value 'D0100_CONTAINER',
          g_grid_d0100            type ref to cl_gui_alv_grid.
    DATA: objkey LIKE sweinstcou-objkey.
    DATA: ls_ibfobject TYPE  sibflporb.
    data : v_WI_ID type SWW_WI2OBJ-WI_ID.
    DATA BEGIN OF GT_yiamra_ber OCCURS 0 .
            INCLUDE STRUCTURE yiamra_ber .
    DATA cellstyles TYPE lvc_t_styl.
    DATA text(28) TYPE c.
    DATA printer(10)  TYPE c.
    DATA workflow(13)  TYPE c.
    DATA END OF GT_yiamra_ber .
    DATA  ls_style    TYPE lvc_s_styl.
    DATA:  X_FIELDCAT  TYPE LVC_S_FCAT.
    DATA:L_POS TYPE I VALUE 1.
    data: gs_layout TYPE lvc_s_layo.
    class Definition.
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION .
        METHODS:
    *To control button clicks
        handle_button_click
        FOR EVENT button_click OF cl_gui_alv_grid
        IMPORTING es_col_id
                  es_row_no.
    *PRIVATE SECTION.
       METHODS:
         perform_copy_checks
           IMPORTING
               er_data_changed TYPE REF TO cl_alv_changed_data_protocol.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *&      Class (Implementation)  lcl_event_handler
           Text
    CLASS lcl_event_handler IMPLEMENTATION.
    METHOD handle_button_click .
        PERFORM handle_button_click USING es_col_id
                                          es_row_no.
      ENDMETHOD.
    ENDCLASS.              "lcl_event_handler
    Display Data
    start-of-selection.
    end-of-selection.
    call screen 0100.
    *&      Module  d0100_set_status  OUTPUT
         text
    module d0100_set_status output.
      perform d0100_set_status.
    endmodule.                            " d0100_set_status  OUTPUT
    *&      Module  d0100_prepare_container  OUTPUT
         text
    module d0100_prepare_container output.
      perform d0100_prepare_container.
    endmodule.                            " d0100_prepare_container  OUTPUT
    *&      Module  d0100_exit  INPUT
         text
    module d0100_exit input.
      perform d0100_exit changing g_okcode.
    endmodule.                            " d0100_exit  INPUT
    *&      Module  d0100_fcode  INPUT
         text
    module d0100_fcode input.
      perform d0100_fcode changing g_okcode.
    endmodule.                            " d0100_fcode  INPUT
    *&      Form  d0100_set_status
         text
    form d0100_set_status.
      set pf-status 'D0100' .
      set titlebar 'D0100'.
      SELECT * FROM yiamra_ber
      INTO corresponding fields of TABLE GT_yiamra_ber
      WHERE  LFDNR IN LFDNR
      AND POSNR  IN POSNR
      AND UNAME  IN UNAME
      AND ROLLE In ROLLE
      AND PRCTR IN PRCTR
      AND PRCTRGRP IN PRCTRGRP
      AND KOSTL IN KOSTL
      AND KOSTLGRP IN KOSTLGRP
      AND ABRECHNST  IN ABREC
      AND  ANFORDERER IN  ANFORD
      AND  DATUMNEU  IN DATUMU
      AND  DATUMANF IN  DATUMA
      AND  STATUS IN  STATUS
      AND  DATUMADM IN DATUM
      AND  DATUMBEG IN  DATUMB
      AND  DATUMEND IN  DATUME.
      loop at gt_yiamra_ber.
      CONCATENATE GT_yiamra_ber-lfdnr GT_yiamra_ber-posnr INTO objkey.
            ls_ibfobject-catid = 'BO'.
            ls_ibfobject-typeid = 'YIAMRAROLL'.
            ls_ibfobject-instid = objkey.
    clear v_WI_ID.
    select single WI_ID from SWW_WI2OBJ into v_WI_ID where INSTID = objkey.
          IF sy-subrc = 0.
        ls_style-fieldname = 'WORKFLOW'.
        ls_style-style = cl_gui_alv_grid=>mc_style_button.
        INSERT ls_style INTO TABLE GT_yiamra_ber-cellstyles.
    GT_yiamra_ber-anfordern = icon_workflow_event_producer.
    GT_yiamra_ber-printer = icon_print.
        GT_yiamra_ber-workflow = ICON_HISTORY.
        endif.
        ls_style-fieldname = 'TEXT' .
        ls_style-style = cl_gui_alv_grid=>mc_style_button .
        INSERT ls_style INTO TABLE gt_yiamra_ber-cellstyles.
        GT_yiamra_ber-text = ICON_DISPLAY_TEXT.
        MODIFY GT_yiamra_ber
          INDEX sy-tabix
          TRANSPORTING cellstyles Text workflow.
    endloop.
    endform.                              " d0100_set_status
    *&      Form  d0100_prepare_container
         text
    form d0100_prepare_container.
      data: ls_vari type disvariant,
            lt_fcat type lvc_t_fcat.
      DATA gr_event_handler TYPE REF TO lcl_event_handler .
    DATA IT_UI_FUNCTIONS TYPE UI_FUNCTIONS.
    APPEND '&DETAIL' TO IT_UI_FUNCTIONS.
      if g_container_d0100 is initial.
        create object g_container_d0100
                      exporting container_name = g_container_name_d0100.
        create object g_grid_d0100
                      exporting i_parent = g_container_d0100.
        CREATE OBJECT gr_event_handler .
        SET HANDLER gr_event_handler->handle_button_click FOR g_grid_d0100 .
        perform d0100_set_grid_vari changing ls_vari.
        perform d0100_set_grid_fcat changing lt_fcat.
       perform d0100_set_grid_fcat1 changing lt_fcat.
    call method g_grid_d0100->INIT_TOOLBAR
       EXPORTING
         IT_TOOLBAR_EXCLUDING = IT_UI_FUNCTIONS.
        call method g_grid_d0100->set_table_for_first_display
          EXPORTING
            is_layout      = gs_layout
            IT_TOOLBAR_EXCLUDING = IT_UI_FUNCTIONS
          CHANGING
            it_outtab      = gt_yiamra_ber[]
            it_fieldcatalog = lt_fcat.
        call method cl_gui_control=>set_focus
          EXPORTING
            control = g_grid_d0100.
      endif.
    endform.                              " d0100_prepare_container
    *&      Form  d0100_exit
         text
    form d0100_exit changing c_okcode type sy-ucomm.
      data: l_okcode like sy-ucomm.
      l_okcode = c_okcode.
      clear c_okcode.
      case l_okcode.
        when con_exit or con_back or con_canc.
          call method g_grid_d0100->free.
          call method g_container_d0100->free.
          call method cl_gui_cfw=>flush.
          clear g_container_d0100.
          clear g_grid_d0100.
          set screen 0.
          leave screen.
      endcase.
    endform.                              " d0100_exit
    *&      Form  d0100_fcode
         text
    form d0100_fcode changing c_okcode type sy-ucomm.
      data: l_okcode like sy-ucomm.
      l_okcode = c_okcode.
      clear c_okcode.
      call method cl_gui_cfw=>dispatch.
      case l_okcode.
        when con_exit or con_back or con_canc.
          call method g_container_d0100->free.
          call method cl_gui_cfw=>flush.
          clear g_container_d0100.
          clear g_grid_d0100.
          set screen 0.
          leave screen.
      endcase.
    endform.                              " d0100_fcode
    *&      Form  d0100_set_grid_fcat
         text
    form d0100_set_grid_fcat changing ct_fcat type lvc_t_fcat.
      data: ls_fcat type lvc_s_fcat.
      gs_layout-stylefname = 'CELLSTYLES'.
    *+++ STEP 1: retrieve the fieldcatalog
    call function 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
         i_structure_name      = 'YIAMRA_BER'
       CHANGING
         ct_fieldcat            = ct_fcat[]
       EXCEPTIONS
         inconsistent_interface = 1
         program_error          = 2
         others                = 3.
    if sy-subrc eq 0.
    *+++ STEP 2: modify the fieldcatalog.
       loop at ct_fcat into ls_fcat.
      clear ls_fcat.
      ls_fcat-fieldname = 'LFDNR' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'LFDNR' .
      APPEND LS_FCAT TO CT_FCAT.
    clear ls_fcat.
      ls_fcat-fieldname = 'POSNR' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'POSNR' .
      APPEND LS_FCAT TO CT_FCAT.
      clear ls_fcat.
      ls_fcat-fieldname = 'UNAME' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'UNAME' .
      APPEND LS_FCAT TO CT_FCAT.
        clear ls_fcat.
      ls_fcat-fieldname = 'ROLLE' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'ROLLE' .
      APPEND LS_FCAT TO CT_FCAT.
          clear ls_fcat.
      ls_fcat-fieldname = 'PRCTR' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'PRCTR' .
      APPEND LS_FCAT TO CT_FCAT.
            clear ls_fcat.
      ls_fcat-fieldname = 'PRCTRGRP' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'PRCTRGRP' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'KOSTL' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'KOSTL' .
      APPEND LS_FCAT TO CT_FCAT.
                clear ls_fcat.
      ls_fcat-fieldname = 'KOSTLGRP' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'KOSTLGRP' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'ABRECHNST' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'ABRECHNST' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'ANFORDERER' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'ANFORDERER' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'DATUMNEU' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'DATUMNEU' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'DATUMANF' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'DATUMANF' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'STATUS' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'STATUS' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'DATUMADM' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'DATUMADM' .
      APPEND LS_FCAT TO CT_FCAT.
              clear ls_fcat.
      ls_fcat-fieldname = 'DATUMBEG' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'DATUMBEG' .
      APPEND LS_FCAT TO CT_FCAT.
                clear ls_fcat.
      ls_fcat-fieldname = 'DATUMEND' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'DATUMEND' .
      APPEND LS_FCAT TO CT_FCAT.
      clear ls_fcat.
      ls_fcat-fieldname = 'WORKFLOW' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'WORKFLOW'.
      ls_fcat-icon = 'X'.
      APPEND LS_FCAT TO CT_FCAT.
        clear ls_fcat.
      ls_fcat-fieldname = 'TEXT' .
      ls_fcat-outputlen = '10' .
      ls_fcat-coltext = 'TEXT' .
      ls_fcat-icon = 'X'.
      APPEND LS_FCAT TO CT_FCAT.
         modify ct_fcat from ls_fcat.
       endloop.
    endif.
    endform.                              " d0100_set_grid_fcat
    *&      Form  d0100_set_grid_vari
         text
    form d0100_set_grid_vari changing cs_vari type disvariant.
    *+++ allow layout maintenance
    *+++ note report is compelling
    cs_vari-report      = .
    cs_vari-handle      = .
    cs_vari-log_group  = .
    cs_vari-username    = .
    cs_vari-variant    = .
    cs_vari-text        = .
    cs_vari-dependvars  = .
    endform.                              " d0100_set_grid_vari
    *&      Form  handle_button_click
         text
         -->P_ES_COL_ID  text
         -->P_ES_ROW_NO  text
    FORM handle_button_click  USING    P_ES_COL_ID TYPE lvc_s_col
                                      P_ES_ROW_NO TYPE lvc_s_roid.
    DATA: objkey LIKE sweinstcou-objkey.
      DATA: ls_ibfobject TYPE  sibflporb.
      DATA:  BEGIN OF ls_output OCCURS 0 .
            INCLUDE STRUCTURE yiamra_ber .
    DATA cellstyles TYPE lvc_t_styl.
    DATA text(28) TYPE c.
    DATA printer(10)  TYPE c.
    DATA workflow(13)  TYPE c.
    DATA END OF ls_output.
      READ TABLE GT_yiamra_ber INDEX p_es_row_no-row_id INTO ls_output.
      IF sy-subrc <> 0.
        RETURN.
      ENDIF.
      case  P_ES_COL_ID-fieldname.
        when 'TEXT'.
          IF GT_yiamra_ber-rolle IS NOT INITIAL.
            CALL FUNCTION 'Y_I_AMRA_ROLLE_TEXT'
              EXPORTING
                i_rolle = GT_yiamra_ber-rolle.
          endif.
        when 'WORKFLOW'.
          clear: objkey.
          IF sy-subrc = 0 AND p_es_col_id-fieldname = 'WORKFLOW'.
            CONCATENATE ls_output-lfdnr ls_output-posnr INTO objkey.
            ls_ibfobject-catid = 'BO'.
            ls_ibfobject-typeid = 'YIAMRAROLL'.
            ls_ibfobject-instid = objkey.
            CALL FUNCTION 'SWI_WF_CONNECTIONS_DISPLAY'
              EXPORTING
                ibf_object        = ls_ibfobject
              EXCEPTIONS
                not_found          = 1
                no_authority      = 2
                no_workflows_found = 3
                OTHERS            = 4.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
          endif.
      endcase.
    ENDFORM.                    " handle_button_click
    reward points if anwer is helpful

  • Give me some examples of syntax of object oriented concept in abap

    pls let me know

    Go to ABAPDOCU transaction.
    On the left hand side, you should open the node ABAP Objects .
    YOu can find lots of examples.
    for concepts go thru this link:
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm

  • LDB_PROCESS - In Object Oriented Concept

    Is there any equivalent method/class that can allow to process logical database ??
    If not how could we use this function module within Class/method?
    Thanks in advance for your ansewrs

    Hi Stephen,
    A where-used-list of the FM 'LDB_PROCESS' returned the method
    CALL_LDB_PROCESS of the class CL_DROB_LOGDB, please check if this can be of some help to you.
    Regards
    Rajesh

  • Wat is object oriented concept in abap

    pls let me know

    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Regards,
    Rich Heilman

  • Shifting from procedural to object oriented

    Hi people,
    I've been programming in ABAP in a procedural fashion since I started, because that's the way I was taught. Now I want to slowly shift to object oriented development. I know and understand all object oriented concepts (please don't copy paste OOP explanations or links merely to get points). Problem is, in the projects i'm involved everything is done in the old fashion. There's no use of UML whatsoever. I believe it's very difficult to shift my mind to OOP (an already difficult task for someone programming procedural for years) if the analisys and design is not done with OO as the base, as additionally I have very little practical experience with OOP (using ALV classes and such). If every other programmer does things in procedural way, when the time comes to integrate programs, problems arise.
    I've been experimenting with OOP in my safe minisap at home, but in day to day work as pressure is put to finish programs on time, always procedural solutions come to mind.
    Do you have any advice on how to cope with this? Can you post your experience on this subject? Has someone gone through this same problems?
    Many thanks.

    Hello Alejandro
    When I started with object-oriented ABAP programming about 2 years ago I made horrible mistakes in my classes and interfaces. However, I have my lessons learnt from these mistakes and improved my skills and knowledge step by step.
    I have 3 recommendations for you:
    <b>(1) Start now!</b>
    Do not expect to develop perfect interfaces and classes from the very beginning. Understanding Object-Orientation takes its time.
    <b>(2) Start with simple objects.</b>
    Interfaces (or classes) can be used to define globally visible constants. Your first classes may contain only static methods. Yet while developing these "simple" objects you will get familiar with the class builder (SE24).
    <b>
    (3) Make heavy use of SAP standard classes.</b>
    Before creating your own class(es) make a comprehensive search for available standard classes (of course, if you are dealing with custom-developed business objects you have to create your own classes).
    For example, if you have to work with purchase orders have a look at the following classes:
    - CL_PO_HEADER_HANDLE_MM
    - CL_PO_ITEM_HANDLE_MM
    If you create an instance of CL_PO_HEADER_HANDLE_MM you will have thousands of coding lines at your fingertip (e.g. method IF_PURCHASE_ORDER_MMGET_DATA returns the header data, method IF_PURCHASE_ORDER_MMGET_ITEMS returns the  order items -> no need of coding, just CALLING).
    Finally, you may have a look at the following examples:
    <a href="https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/UnderstandingABAPObjects">Understanding ABAP Objects</a>
    <a href="https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack">Message Handling - Finding the Needle in the Haystack</a>
    <a href="https://wiki.sdn.sap.com/wiki/display/Snippets/UnifiedAccesstoAllHR+Infotypes">Unified Access to All HR Infotypes</a>
    Regards
      Uwe

Maybe you are looking for

  • Safari 5.0.6 crashing - 'FlashPlayer-10.4-10.5 plugin' error

    Like many others, I am having problems with Safari crashing and giving an error related to the FlashPlayer plug-in. I am posting the report below - any help would be appreciated, since none of the other responses on this board were applicable to my s

  • 1. Non-modal popup or 2.minimize button on titlebar of popup

    Hi All, Firstly, is it now possible to open non-modal pop-ups ( as many pop-ups after executing an action method :( ) , or has anyone come across this found a work-around for this ? currently, I am opening a modal dialog itself. But when I click the

  • Formula in Excel Sheet shows #VALUE!.

    Hi, I have 11gr2 Forms/Reports with Windows Server 2008 64-bit. I have Excel sheet imported from Oracle Reports with destype=enhancedspreadsheet. Problem is in my Excel sheet, that when I add formula to multiply two columns, it shows #VALUE! error, w

  • Is it possible to use a program as a filter between Windows and the user?

    I was interested in working on an ACL for Windows 98. What I'd like to do is whenever an app attempts to be opened by the user if they don't have permission through my program it will cancel the request. I'd like to do this in Java but I'm wondering

  • Newsstand application won't connect to App Store

    It appears that the "Store" box in the upper right hand corner of the app (once opened) is greyed out. When I select the "Store" box nothing happens.