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

Similar Messages

  • 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.

  • 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??

  • 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...

  • 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

  • Module pool  with object oriented programming

    can anyone send me links for module pool with object oriented programming.

    hi,
    some helful links.
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    <u>Sample std pgms.</u>
    ABAP_OBJECTS_ENJOY_0           Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1           Model Solution 1: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_2           Model Solution 2: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_3           Model Solution 3: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_4           Model Solution 4: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_5           Model Solution 5: ABAP Objects Enjoy Course      
    DEMO_ABAP_OBJECTS              Complete Demonstration for ABAP Objects          
    DEMO_ABAP_OBJECTS_CONTROLS     GUI Controls on Screen                           
    DEMO_ABAP_OBJECTS_EVENTS       Demonstration of Events in ABAP Objects          
    DEMO_ABAP_OBJECTS_GENERAL      ABAP Objects Demonstration                       
    DEMO_ABAP_OBJECTS_INTERFACES   Demonstration of Interfaces in ABAP Objects      
    DEMO_ABAP_OBJECTS_METHODS      Demonstration of Methods in ABAP Objects         
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    Rgds
    Reshma

  • 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 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

  • Help with objects, classes, etc...

    Im having a little trouble grasping the concept of all of these names. I know that every Java program is a class. Now, is a method what we call in C++ a function? It seems as though this is what it is while reading this book but just want to clarify it. And also, what is a good defninition for an object. I know that parseInt() is an object but does that mean that is is some kind of function/method that was declared or made in a class?

    lol ... ok; it's easy to get caught up in the jargon...
    A class is a "type" of thing, complete with values which describe the thing and operations that the thing can perform. For instance, a "dog" can be described in terms of its breed, size, markings, and things that it does (eat, do tricks, bark, etc).
    An object is a dinstinct instance of a class. So, if you are talking about one particular dog, let's say Lassie, you can describe it as a collie, of a certain size, etc, etc.
    Object oriented programming makes use of this jargon. The act of creating an object from a class description is known as "instantiation".
    You mentioned C++. In C++, you can have functions which stand alone, or functions which are part of classes. C++ functions which are part of class definitions are known as "member functions"; Java methods are like C++ member functions.
    now, on to parseInt(). remember how we said that a class definition can define operations (like "eat", for a dog)? well, although we can define the eat operation, only a instance of dog (e.g., Lassie) can actually perform the operation. so, if you have Lassie and RinTinTin in front of you, and you say, "Lassie, bark!", only Lassie will perform that operation.
    in object oriented programming, a method which makes sense for one object (that is, one particular instance of a class) to perform is known as an instance method. there's another abstraction, though... you can define variables and methods which belong to all instances of a class (as a group), rather than any one particular object. These are known as class variables and class methods, and Java uses the keyword "static" to identify them.
    So, if I had the class dog, it might look a little like:
    public class Dog {
        private float weight;  // each dog object will have its own weight variable
        static private int count;  // this is shared by all instantiated dog objects!
        public void bark() {
            // instance method.  call this with respect to a particular dog object
            System.out.println ("Woof.");
        public static int getCount() {
            // this method is shared by all instantiated dog objects.  It's called using the syntax
            // Dog.getCount(), rather than by instantiating a dog object and using the object to call
            // the method
            return count;
    // etc...
    }Does that make sense? some variables belong to each particular instantiated object, while others don't need an object in order to refer to them.
    one more thing: in Java, there are objects and there are primitives. the primitives are data types such as int, float, boolean, etc. Java also provides wrappers for these primitives, so you can refer to them in object contexts; for example, Integer, Boolean, etc.
    OK... now back to your question. parseInt() is a static method of class Integer. (therefore, you don't need an instance of Integer in order to call parseInt().
    the parseInt() method returns an int.
    make sense?

  • ExternalInterface.call problem with object-orientation

    Hi
    I am using an swf inside a PDF. In a PDF-context the ExternalInterface-class works much the same as it does within a website. So far calling a function in the document-script works.
    The thing now is, that I really try to use an object-oriented approach as often as I can. In this case I have a function I could call using
    var jsCaller:Object = ExternalInterface.call("myFunction",parameters);
    This works as expected.
    However, I have now made that function a method in an object, so I can access it within JS using dot-notation: myCoolObject.myFunction(); This works as well, so the problem is not the function itself. However, the call
    var jsCaller:Object = ExternalInterface.call("myCoolObject.myFunction",parameters);
    does not work.
    This means there's either something I'm missing, or it's a limitation of ExternalInterface, or it's a limitation of externalInterface in a pdf-context.
    Anyone to enlighten me?

    If EI calls eval it should be able to resolve the object-path. However, this doesn't seem to be the case. Also note that my parameter is an array, so this probably wouldn't work, even if the syntax did.
    Anyway, I tested your syntax in my PDF, and it showed the same behaviour as before (i.e. the function in which the EI-call was placed could not be executed, and acrobat claimed there was no such function). It didn't work with my normal function, and not even with a simple console.println-statement that way. So in PDFs it definitely doesn't work like that.
    But thanks for the suggestion!

  • HELP with object carousel

    Hi,
    I need some help with the use of the DSM-CC object carousel.
    In my Xlet, I need to read a file (previsioni.TXT), that is in the package testo; this is the structure of my folder:
    \\mio; the first package
    \\ MyXlet.java
    \\ testo; package with the text
    \\ previsioni.TXT
    1. so I create un object carousel and then access the file with the java.io.File :
    try {
                   System.out.println("Requesting file");
                        DSMCCObject carouselFile = new DSMCCObject("testo/previsioni.TXT");
              carouselFile.synchronousLoad();
              FileInputStream inFile = new FileInputStream(carouselFile);
              //Construct a DataInputStream by using the
                   //FileInputStream in the constructor method.
              DataInputStream inData = new DataInputStream (inFile);
              //Invoke methods of DataInputStream to read data from the data source.
         String s = inData.readUTF();
         System.out.println(s);
              //Close the FilterInputStream.
         inData.close ();
                   catch (InvalidPathNameException e) {
                        System.out.println("Invalid path name!");
                   catch (IOException e){
                        System.out.println("Problem reading previsioni.txt ");
    but when I run this code Xletview write
    [XleTView]-INFO->loading Xlet... [mio.StatiXlet]
    [XleTView]-INFO->XLET started... [mio.StatiXlet]
    mio.StatiXlet : Inizializzazione avvenuta!
    mio.StatiXlet : Hello TV World
    Requesting file
    xjava.io.File -
    Problem reading previsioni.txt
    and so there is an IO execption. Can someone help me?
    2. then, when the file is in the string s, i would display this file; I try with the Htext:
    texts = new HText( s, 20, 20, 200, 300, new Font("Tiresias", Font.BOLD, 26), Color.black, Color.white, new HDefaultTextLayoutManager());
    but when I compile the code appear:
    StatiXlet.java:173: cannot resolve symbol
    symbol : variable s
    location: class mio.StatiXlet
    texts = new HText( s, 20, 20, 200, 300, new Font("Tiresi
    as", Font.BOLD, 26), Color.black, Color.white, new HDefaultTextLayoutManager());
    ^
    1 error
    Do you know how can I display this file?
    Thank you very much

    Hi beker,
    thank you so much for your help, but I have another question.
    I use your code and when I compile is OK, but when I run it in XletView it doesn't find the file previsioni.TXT and write this:
    [XleTView]-INFO->loading Xlet... [mio.StatiXlet]
    [XleTView]-INFO->XLET started... [mio.StatiXlet]
    mio.StatiXlet : Inizializzazione avvenuta!
    mio.StatiXlet : Hello TV World
    xjava.io.File - testo/previsioni.TXT
    java.io.FileNotFoundException: E:\Documenti\tirocinio\xlet esempi\testo\previsio
    ni.TXT (Impossibile trovare il percorso specificato)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at xjava.io.FileInputStream.<init>(Unknown Source)
    at xjava.io.FileInputStream.<init>(Unknown Source)
    at mio.StatiXlet.startXlet(StatiXlet.java:97)
    at net.beiker.xletview.xlet.XletManager.resumeRequest(Unknown Source)
    at net.beiker.xletview.xlet.XletManager.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:536)
    s=not read
    What does it mean? I'm sure that the path is right, what do you think?
    Thank you very much beiker for your help

  • 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.

  • Plz help in object oriented report

    Hi experts ,
    i have a report in which i am fetching data from som tables and applying some checks to get desired data and finally displaying the data in an ALV .
    not i want to convert this whole thing into Object oriented approach .
    plz guide me how i can do it .
    please give me any example code of this type of report
    thanx in advance

    hi use this example.
    *& Report  ZKN_ALV_GRID                                                *
    REPORT  zkn_alv_grid                                                .
    DATA itab_saplane TYPE TABLE OF saplane.
    DATA: r_container TYPE REF TO cl_gui_custom_container,
          r_grid TYPE REF TO cl_gui_alv_grid.
    START-OF-SELECTION.
      SELECT * FROM saplane INTO TABLE itab_saplane.
      CALL SCREEN 100.
    *&      Module  create_control  OUTPUT
          text
    MODULE create_control OUTPUT.
      CHECK r_container IS INITIAL.
      CREATE OBJECT r_container
        EXPORTING
          container_name              = 'CONTAINER_1'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CREATE OBJECT r_grid
        EXPORTING
          i_parent          = r_container
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init   = 2
          error_cntl_link   = 3
          error_dp_create   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL METHOD r_grid->set_table_for_first_display
        EXPORTING
          i_structure_name              = 'SAPLANE'
        CHANGING
          it_outtab                     = itab_saplane
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 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.
    ENDMODULE.                 " create_control  OUTPUT
    reward if useful.

  • Need help with Object States or Buttons?

    I currently work in InDesign to compile layouts and present design decks to clients. Our template includes an approval section (Not Approved, Revised, Approved) that we currently have as white/black bubbles that we change manually on each page. I've been trying to find a way to speed up this process. I know that in InDesign you can create buttons than you can then click on-off on your PDF - we used to do this but it is too time consuming (we have PDF's anywhere from 25-120 pages). I have been playing around with Object States, so we can quickly update the bubbles in InDesign itself as we work.
    Does anyone know of a way to change the state of multiple objects on multiple pages at the same time? (For example, if I want to change all pages to "Approved" at the same time - or if I only wanted to do some, but not all, of the pages.)
    Can anyone recommend any other InDesign tools that may be able to create a similar function for an "approval" stamp, but that still is done in InDesign (not in the PDF after exporting)?

    I was hoping that wouldn't be the only way. My have multiple master pages already, and not all pages will be "approved" at the same time. So we've run into issues with putting these on the masters as it gets easier to miss them.

Maybe you are looking for

  • Performance on logical/canonical level joins

    We are writing Xquery at the canonical layer to aggregate data from various oracle platforms. The performance of these queries is very poor. Should our physical data services include functions like getXXXById in order to improve performance? (Rather

  • Acrobat XI Pro - can't add pages :(

    I was using Acrobat 9 Pro - I could add pages easily. With XI - it hangs or crashes just before the screen "add pages before or after" - it's driving me mad - might uninstall it and go back to 9 which was quite stable. Lots of other new features/layo

  • Powerbook not sleeping

    I know this is a perennial favourite but I thought I'd see if there were any easy solutions out there ...! My powerbook has recently stopped going to sleep unless I manually put it to sleep via the Apple menu or power button. I've scanned the discuss

  • NullPointerException in XMLSignatureImpl if no KeyInfo provided

    Hi, The XML Signature verfication fails (NullPointerException in XMLSignatureImpl) if the ds:Signature Element contains no KeyInfo Element but a Text Node with a newline character. IMHO, this behaviour is a bug. The following XML Signature leads to a

  • Slow internet on mac mini lion

    Hi. Fequently when I'm trying to get connected with the web regardless if I use Safari or firefox it's very slow. I have my PC laptop in the same room and it works perfectly at the same time. Some days it works normally and some days it has a bad "ha