Reg: Contructor and methods

Hi all
i am new to abap objects and i am going thro' the sap materials and i am facing some probelm in understanding the constructor part which is also  a type of method..can any one please let me know what is the difference between methods and constructors..
Your explanations are greatly welcome instead of links.
Thanks

Hi,
actualy constructor is a special method in OOABAP which is used for initialisation and it is always named as constructor.
Constructors are of 2 type 1. CLASS or Static Constructor
                                and 2 . Method Constructor.
Check the following code for the use and effect of both types of constructors
REPORT  demo_constructor_ANIRBAN.
      CLASS cl1 DEFINITION
CLASS cl1 DEFINITION.
  PUBLIC SECTION.
    METHODS:
      add,
      constructor IMPORTING v1 TYPE i
                            v2 TYPE i,
      display.
    CLASS-METHODS:
     class_constructor.
  PRIVATE SECTION.
    DATA:
    w_var1   TYPE i,
    w_var2   TYPE i,
    w_var3   TYPE i,
    w_result TYPE i.
ENDCLASS.                    "cl1 DEFINITION
      CLASS cl1 IMPLEMENTATION
CLASS cl1 IMPLEMENTATION.
  METHOD constructor.
    w_var1 = v1.
    w_var2 = v2.
  ENDMETHOD.                    "constructor
  METHOD class_constructor.
    WRITE:
    / 'Tihs is a class or static constructor.'.
  ENDMETHOD.                    "class_constructor
  METHOD add.
    w_result = w_var1 + w_var2.
  ENDMETHOD.                    "add
  METHOD display.
    WRITE:
    /'The result is =  ',w_result.
  ENDMETHOD.                    "display
endclass.
" Main program----
data:
  ref1 type ref to cl1.
parameters:
  w_var1 type i,
  w_var2 type i.
  start-of-selection.
  create object ref1 exporting v1 = w_var1
                              v2 = w_var2.
   ref1->add( ).
   ref1->d isplay( ).

Similar Messages

  • Reg classes and methods

    hi all
    how to find the use or purpose  of CL_RECA_DDIC_DOMA  and the methods declared in it.

    Hi,
    actualy constructor is a special method in OOABAP which is used for initialisation and it is always named as constructor.
    Constructors are of 2 type 1. CLASS or Static Constructor
                                    and 2 . Method Constructor.
    Check the following code for the use and effect of both types of constructors
    REPORT  demo_constructor_ANIRBAN.
          CLASS cl1 DEFINITION
    CLASS cl1 DEFINITION.
      PUBLIC SECTION.
        METHODS:
          add,
          constructor IMPORTING v1 TYPE i
                                v2 TYPE i,
          display.
        CLASS-METHODS:
         class_constructor.
      PRIVATE SECTION.
        DATA:
        w_var1   TYPE i,
        w_var2   TYPE i,
        w_var3   TYPE i,
        w_result TYPE i.
    ENDCLASS.                    "cl1 DEFINITION
          CLASS cl1 IMPLEMENTATION
    CLASS cl1 IMPLEMENTATION.
      METHOD constructor.
        w_var1 = v1.
        w_var2 = v2.
      ENDMETHOD.                    "constructor
      METHOD class_constructor.
        WRITE:
        / 'Tihs is a class or static constructor.'.
      ENDMETHOD.                    "class_constructor
      METHOD add.
        w_result = w_var1 + w_var2.
      ENDMETHOD.                    "add
      METHOD display.
        WRITE:
        /'The result is =  ',w_result.
      ENDMETHOD.                    "display
    endclass.
    " Main program----
    data:
      ref1 type ref to cl1.
    parameters:
      w_var1 type i,
      w_var2 type i.
      start-of-selection.
      create object ref1 exporting v1 = w_var1
                                  v2 = w_var2.
       ref1->add( ).
       ref1->d isplay( ).

  • Reg : Classes And Methods In ABAP HR

    Hii...
    Can anyone tell me what are the standard OOPS classes and Interfaces related to ABAP HR Technical. I want to know the detailed view of all the classes and interfaces which can be used in HR technically.
    Or is there any way I can find.
    Your suggestions will be helpful for me. So, Kindly help me with this.
    Thanks,
    Regards,
    Rahul Gupta

    Venkat,
        Try look for any SAP Note or create Customer Message to SAP. It's clearly Program Error. We can't collect  "lcl_transform" class into Transport Request Independently as it was local Class not Global Class.
    Try transporting Transformations again, if it still gives problem. Contact SAP.
    Let us know if you implement any SAP Notes.
    all the best.
    Regards,
    Nagesh Ganisetti.
    Assign Points if it helps.

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

  • Getting all the members (variables, methods AND method bodies) of a java source file

    For a project I want to programmatically get access to the members of java source file (member variables, methods etc) as well as to the source code of those members. My question is what is the best method for this? So far I have found the following methods:
    Use AST's provided by the Java Source API and Java Tree API, as discussed in the following posts:
    http://today.java.net/pub/a/today/2008/04/10/source-code-analysis-using-java-6-compiler-apis.html
    http://weblogs.java.net/blog/timboudreau/archive/2008/02/see_java_code_t.html
    http://netbeans.dzone.com/announcements/new-class-visualization-module
    This has the disadvantage that the classes actually have to be compilable. When I look at the Netbeans Navigator view however, it provides me with a nicely formatted UI list, regardless of the "compilable" state of the class.
    Thus I started looking at how to do this... The answer appears to be through the use of tools such as JavaCC: https://javacc.dev.java.net/
    ANTLR: http://www.antlr.org/
    which are lexers and parsers of source code. However, since the Navigator panel already does this, couldn't I use part of this code to get me the list of variables and methods in a source file? Does the Navigator API help in this regard?
    Another route seems to be through tools such as
    BeautyJ: http://beautyj.berlios.de/
    which run on top of JavaCC if I am correct, and which has the ability to provide a clean view on your java code (or an XML view). However, BeautyJ does not seem to be too actively developed, and is only j2se1.4 compatible.
    I hope someone can shed a light on the best way to go about what I want to achieve. Somebody already doing this?
    (I crossposted on the Netbeans forums too, hope this is OK...)

    I'm currently developing a LaTeX editor(MDI) and I do the same thing, but I don't know what exactly do you need.

  • How we can use class and methods for the FM of reuse_alv_list_display

    Hi Abapers,
    Please provide the sample code of class and method of REUSE_ALV_LIST_DISPLAY.
    Which Class i can use for this Function module.
    I need to write a code using OOPS concept.
    I was done the GRID display  using this class cl_gui_alv_grid.
    But i want only List Display using the class & methods.
    Plz provide sample code.
    Thanks
    Nani.

    Hi Nani,
    This is the sample code..
    *& Report Z_OO_ALV
    *& We can Use Two containers in OOALV
    REPORT z_oo_alv LINE-COUNT 50.
    *types gt_struct type sflight.
    DATA BEGIN OF gt_struct.
    INCLUDE STRUCTURE sflight.
    DATA rcol(4) TYPE c.
    DATA colors TYPE lvc_t_scol.
    DATA END OF gt_struct.
    *ALV GRIDs
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid.
    DATA gr_alvgrid1 TYPE REF TO cl_gui_alv_grid.
    DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV'.
    DATA gc_custom_control_name1 TYPE scrfname VALUE 'CC_ALV1'.
    *CONTAINERs
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container.
    DATA gr_ccontainer1 TYPE REF TO cl_gui_custom_container.
    *FIELDCATALOGs
    DATA gt_fieldcat TYPE lvc_t_fcat WITH HEADER LINE.
    DATA gt_fieldcat1 TYPE lvc_t_fcat WITH HEADER LINE.
    *LAYOUTs
    DATA gs_layout TYPE lvc_s_layo.
    DATA gs_layout1 TYPE lvc_s_layo.
    DATA pt_exclude TYPE ui_functions. "internal table declaration to be passed.
    *DATA pt_cell TYPE lvc_t_cell with header line.
    DATA : gt_list LIKE gt_struct OCCURS 50 WITH HEADER LINE,
    gt_list1 LIKE gt_struct OCCURS 50 WITH HEADER LINE.
    *DATA v_ucomm TYPE sy-ucomm.
    CALL SCREEN 100.
    *& Module display_alv OUTPUT
    text
    MODULE display_alv OUTPUT.
    PERFORM display_alv.
    ENDMODULE. " display_alv OUTPUT
    *& Module PAI INPUT
    text
    MODULE pai INPUT.
    CASE sy-ucomm.
    WHEN 'EXIT'.
    PERFORM exit_program.
    WHEN 'PICK'.
    PERFORM cell_info.
    ENDCASE.
    ENDMODULE. " PAI INPUT
    *& Form display_alv
    text
    FORM display_alv.
    PERFORM prepare_field_catalog CHANGING gt_fieldcat[].
    PERFORM prepare_layout CHANGING gs_layout.
    PERFORM data_retrival.
    IF gr_alvgrid IS INITIAL.
    CREATE OBJECT gr_ccontainer
    EXPORTING
    container_name = gc_custom_control_name
    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.
    ENDIF.
    CREATE OBJECT gr_alvgrid
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = gr_ccontainer
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    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.
    PERFORM exclude_tb_functions CHANGING pt_exclude.
    PERFORM set_col.
    CALL METHOD gr_alvgrid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    it_toolbar_excluding = pt_exclude "excluding toolbar functions
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    it_outtab = gt_list[]
    it_fieldcatalog = gt_fieldcat[]
    IT_SORT =
    IT_FILTER =
    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.
    ELSE.
    CALL METHOD gr_alvgrid->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    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.
    ENDIF.
    PERFORM prepare_field_catalog1 CHANGING gt_fieldcat1[].
    PERFORM prepare_layout1 CHANGING gs_layout1.
    PERFORM data_retrival1.
    IF gr_alvgrid1 IS INITIAL.
    CREATE OBJECT gr_ccontainer1
    EXPORTING
    container_name = gc_custom_control_name1
    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.
    ENDIF.
    CREATE OBJECT gr_alvgrid1
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = gr_ccontainer1
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    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.
    PERFORM set_col1.
    CALL METHOD gr_alvgrid1->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout1
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    it_outtab = gt_list1[]
    it_fieldcatalog = gt_fieldcat1[]
    IT_SORT =
    IT_FILTER =
    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.
    ELSE.
    CALL METHOD gr_alvgrid1->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    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.
    ENDIF.
    ENDFORM. "display_alv
    *& Form prepare_field_catalog
    text
    -->GT_FIELDCAT text
    FORM prepare_field_catalog CHANGING pgt_fieldcat TYPE lvc_t_fcat.
    DATA ls_fieldcat TYPE lvc_s_fcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-fieldname = 'CARRID'.
    ls_fieldcat-scrtext_m = 'Air line code'.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-outputlen = 10.
    ls_fieldcat-emphasize = 'C400'.
    ls_fieldcat-key = 'X'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'CONNID'.
    ls_fieldcat-scrtext_m = 'Connection code'.
    ls_fieldcat-emphasize = 'C900'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-fieldname = 'PRICE'.
    ls_fieldcat-scrtext_m = 'PRICE'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ENDFORM. "prepare_field_catalog
    *& Form prepare_layout
    text
    -->GS_LAYOUT text
    FORM prepare_layout CHANGING gs_layout TYPE lvc_s_layo.
    gs_layout-stylefname = 'FIELD_STYLE'.
    gs_layout-zebra = 'X'.
    gs_layout-grid_title = 'FLIGHT'.
    gs_layout-sel_mode = 'A'.
    gs_layout-ctab_fname = 'COLORS'.
    ENDFORM. "prepare_layout
    *& Form data_retrival
    text
    FORM data_retrival.
    SELECT carrid
    connid
    price
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE gt_list
    UP TO 50 ROWS.
    ENDFORM. "data_retrival
    FORM EXIT_PROGRAM *
    FORM exit_program.
    CALL METHOD gr_ccontainer->free.
    CALL METHOD gr_ccontainer1->free.
    LEAVE TO SCREEN 0.
    ENDFORM. "exit_program
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'STAT'.
    SET TITLEBAR 'xxx'.
    IF W_CUSTOM_CONTAINER IS INITIAL.
    **sets TITLEBAR
    PERFORM TITLEBAR.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Form prepare_field_catalog1
    text
    -->GT_FIELDCAT text
    FORM prepare_field_catalog1 CHANGING pgt_fieldcat1 TYPE lvc_t_fcat.
    DATA ls_fieldcat TYPE lvc_s_fcat.
    ls_fieldcat-tabname = 'gt_list1'.
    ls_fieldcat-fieldname = 'SEATSMAX'.
    ls_fieldcat-scrtext_m = 'MAX. SEATS'.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-outputlen = 10.
    ls_fieldcat-emphasize = 'C400'.
    ls_fieldcat-key = ' '.
    APPEND ls_fieldcat TO pgt_fieldcat1.
    ls_fieldcat-tabname = 'gt_list1'.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'SEATSOCC'.
    ls_fieldcat-scrtext_m = 'SEATS OCCUPIED'.
    APPEND ls_fieldcat TO pgt_fieldcat1.
    ENDFORM. "prepare_field_catalog
    *& Form prepare_layout1
    text
    -->GS_LAYOUT text
    FORM prepare_layout1 CHANGING gs_layout1 TYPE lvc_s_layo.
    gs_layout1-stylefname = 'FIELD_STYLE'.
    gs_layout1-zebra = 'X'.
    gs_layout1-grid_title = 'DETAILS'.
    gs_layout-sel_mode = 'C'.
    gs_layout1-info_fname = 'RCOL'.
    gs_layout-no_toolbar = 'X'.
    ENDFORM. "prepare_layout
    *& Form data_retrival1
    text
    FORM data_retrival1.
    SELECT seatsmax
    seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE gt_list1
    UP TO 50 ROWS.
    ENDFORM. "data_retrival
    *& Form exclude_tb_functions
    &---- subroutine to exclude toolbar options -
    text
    -->PT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    DATA ls_exclude TYPE ui_func.
    ls_exclude = cl_gui_alv_grid=>mc_fc_maximum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_minimum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_sort.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_subtot.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_sum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_filter.
    APPEND ls_exclude TO pt_exclude.
    ENDFORM. "data_retrival1
    *& Form cell_info
    text
    FORM cell_info. "CHANGING pt_cell TYPE lvc_t_cell.
    DATA lt_cell TYPE lvc_t_cell WITH HEADER LINE.
    CALL METHOD gr_alvgrid->get_selected_cells
    IMPORTING
    et_cell = lt_cell[].
    LOOP AT lt_cell.
    WRITE : lt_cell-col_id , lt_cell-row_id.
    ENDLOOP.
    MODIFY pt_cell[] from lt_cell[].
    ENDFORM. "cell_info
    *& Form set_col
    text
    FORM set_col .
    DATA ls_cellcolor TYPE lvc_s_scol.
    LOOP AT gt_list.
    IF gt_list-price GT 500.
    ls_cellcolor-fname = 'PRICE'.
    ls_cellcolor-color-col = 5.
    ls_cellcolor-color-int = 1.
    ls_cellcolor-color-inv = 0.
    APPEND ls_cellcolor TO gt_list-colors.
    else.
    ls_cellcolor-fname = 'PRICE'.
    ls_cellcolor-color-col = 3.
    ls_cellcolor-color-int = 1.
    APPEND ls_cellcolor TO gt_list-colors.
    ENDIF.
    MODIFY gt_list.
    ENDLOOP.
    ENDFORM. "set_col
    *& Form set_col1
    text
    FORM set_col1.
    data : ind type sy-tabix,
    indx type sy-tabix.
    loop at gt_list1.
    ind = sy-tabix / 2.
    indx = sy-tabix - ind.
    if indx eq ind.
    gt_list1-rcol = 'C500'.
    endif.
    MODIFY gt_list1.
    endloop.
    ENDFORM. "set_col
    *FORM TITLEBAR.
    *SET TITLEBAR 'TITLE'.
    *ENDFORM.
    *double click on TITLE and write ur title
    Thanks,
    Samantak.
    Rewards points for useful answers.

  • Adding data members and methods to generated classes that will not produce

    I want to use XMLBeans XMLObject for a project, but for the classes generated by XMLBeans, I want to add some additional data members and methods to handle program state that I do not want to have written out to an XML document.
    I have been using .NET's system.xml.XmlParser class, and it provides this sort of capability.
    In looking at the code produced by XMLObject, it looks possible.
    Question: Does anyone have any thoughts on the best way to accomplish what I want to do? Is there a good design pattern to follow?
    Question: Are there any gotchas in doing this? The only immediate one I can think of is that everytime the .java files are regenerated by XMLObject, I will have to reinsert my data members and methods.

    Hi Chuck,
    Setting the dispaly Field property should in no way affect your validation execution.
    The valiadtion if is working fine on the field value when it is not a display field it should do so when a display field as well.
    Besides if you are working on MDM main table all the main table fields are display fields.even if you do not set the property.As main table fields are always visible in MDM Data manager.
    Which version of MDM you are currently working on.
    As I have tried on the SP06 version on MDM and the  Null  validation runs fine on Display fields as well.
    Check your MDM version and also your MDM clients as well as MDM server be on the same version.
    What I am finding confusing here is that initially you wish to keep the material number as Blank for the approver to enter the material number which will be send through a mail.
    But the validation is checking for the material field to be balnk then how are you poulating the same field with Material number in the later stage.As it will fail the validation here.As per teh vlaidation it should remain blank as soon as someone enters a value it will throw an error.
    Or in either which wise you need to mainatin 2 valiadtion steps before and after the Approver for blank and filled field check.
    Just check your process flow correctly and the order of it in case that is causing the records to fail.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Classes and methods in BW 7.0

    hI ,
    I wrote some peice of code in rule and activated in development system .
    It was activated and transproted into Test environment .
    It went with errors .
    The error is : 
    BI 7.0 is totallly OOABAP with classes and methods .
    for each and every rule BI 7.0 will create Class definetion and class implementation .
    I have declared glaobal variables in
    CLASS lcl_transform DEFINITION.
      PUBLIC SECTION.
    and i used those variables in  methods
    CLASS lcl_transform IMPLEMENTATION.
      METHOD compute_ZRELALLOC.
    when i tranasprorth this rule , the golabl declaration in Class are not going .
    Thatswhy my transport failed and it says that syntax error .
    how to transport this class ........
    Please help me

    Venkat,
        Try look for any SAP Note or create Customer Message to SAP. It's clearly Program Error. We can't collect  "lcl_transform" class into Transport Request Independently as it was local Class not Global Class.
    Try transporting Transformations again, if it still gives problem. Contact SAP.
    Let us know if you implement any SAP Notes.
    all the best.
    Regards,
    Nagesh Ganisetti.
    Assign Points if it helps.

  • Creating Properties and Methods for an exe built in LabVIEW

    Hi all,
    How do we create properties and methods for an executable built in LabVIEW.
    I know when building an exe, the "Enable ActiveX server" option in advanced has to be enabled.
    But after that how do we create Properties and methods for the activeX component.
    Your help is greatly appreciated.
    Regards,
    Muthuraman S
    Regards,
    Muthuraman

    You cannot build your own COM specific properties and methods for the ActiveX interface in LabVIEW, the only thing exposed are the normal VI server properties and methods.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Binding between Task and method dissappears

    The binding between task and method is dissappearing .
    I tried creating a new task altogether but still not working
    kindly help
    Edited by: kittu reddy on May 6, 2008 3:19 PM

    I have Zmethod and i have done binding between the task and the method and
    Task and workflow..
    Binding between Task  and work flow doesnt seem to Disappear
    but the binding between Task and the method kept on disappearing
    I have a Zmethod to Bus2091(delagated to Zbus2091)
    with an import parameter and an export parameter
    and now when creating the task and assigning the method the container elements of method are transferred to Task
    and next i wen to binding eeditor and generated automatic binding:
    From task to method
    and method to task
    with out errors and now on clicked green tick mark of the binding editor and saved the Task and now on checking back the binding editor
    i find the binding disppearead

  • How to learn technics in wrting class, objects and methods

    Hi ,
    I am new this oops methodology. I know java language but don't know the basics. I mean to say I have no idea how to write classes and methods. I can write one single class with all the methods and I can call that class from an another class but this is not the way... I knew it but I am kinda confuse how to write the well structured oops style classes and methods....
    Can anybody help me please........
    Thanks

    A short simple (overly simple) explanation is that objects are like little machines, which operate independantly from other objects (other little machines). You design an application as a collection of these little machine/objects, interacting with each other. Then you drill down another layer of detail, and design the machines themselves. You do this by defining the classes, which are like blueprints to make a little machine/object.
    In java, this is largely expressed by the interface definition at the higher level, and the class definition at the lower level. The interfaces say how various objects may talk to each other, and the class definitions say how any individual object may talk at all.
    This is a very basic description, and in fact isn't entirely accurate; if they want to lots of people on this forum could pick it apart. But hopefully it gets the idea across. (As my language design prof said, quoting somebody else, "teaching is just a series of lies.")
    There are resources on the web about object-oriented programming, object-oriented design, etc. mutmansky's right, a college course is best, but you can still learn a lot from docs on the web.

  • My organization is looking to invest ipads for the employees to perform everyday tasks. just wondering what would apples recommendation be for as far as apps and method of distribution would be?

    my organization is looking to invest ipads for the employees to perform everyday tasks. just wondering what would apples recommendation be for as far as apps and method of distribution would be?

    Use VPP.  Select an MDM.  Read the google doc below.
    IT Resources -- ios & OS X -- This is a fantastic web page.  I like the education site over the business site.
    View documentation, video tutorials, and web pages to help IT professionals develop and deploy education solutions.
    http://www.apple.com/education/resources/information-technology.html
       business site is:
       http://www.apple.com/lae/ipad/business/resources/
    Excellent guide. See announcment post -- https://discussions.apple.com/thread/4256735?tstart=0
    https://docs.google.com/document/d/1SMBgyzONxcx6_FswgkW9XYLpA4oCt_2y1uw9ceMZ9F4/ edit?pli=1
    good tips for initial deployment:
    https://discussions.apple.com/message/18942350#18942350
    https://discussions.apple.com/thread/3804209?tstart=0
    Educational institutions in the USA can use the App Store Volume Purchase Program (VPP) to buy Apps.
    https://support.assistiveware.com/index.php?pg=kb.page&id=54
    There are three ownership models:
        *     Personal
        *     Institution
        *     Layered. combines personal & institution.
    Watch this apple video on layered ownership.  It education based, but that's OK.
    http://www.apple.com/education/resources/videos/#ios-layered-ownership
    More ways to transfer files and access Word documents:
    https://discussions.apple.com/thread/4044866?tstart=0
    All of the "Office" document editing applications on the iPad have limitations.  Best try them out to see if they meet your needs.
    iWork by Apple
        * Keynote
        * Numbers
        * Pages
    DocsToGo
    • VIEW/EDIT/CREATE Word & Excel files(Office 2007/2008/2010)
    • VIEW PowerPoint, PDF, iWork, Text, .RTF, and more!
    • Send & receive attached supported documents using the built-in Mail app
    • FREE desktop application with your purchase! Compatible on Win & Mac allows you 2-way file sync with a WIFI connection.
    • Open & Edit files within DocsToGo from any 3rd party app that supports the “Open In” feature
    • Supports iTunes File Sharing via USB cable for manually moving files
    https://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    Office² HD
    "Office² HD, the most intuitive and straightforward office document editor available on the iPad, makes it easy to open, view, create and edit Word (DOC & DOCX), Excel (XLS & XLSX), and PowerPoint (PPT & PPTX) files right from your iPad!"
    https://itunes.apple.com/us/app/office2-hd/id364361728?mt=8
    Quickoffice Pro HD
    Create and edit ALL Microsoft® Office -- document, spreadsheet, and presentation formats, as well as view PDF files, on the go. Our advanced file manager lets you manage local files, access Google Drive or other cloud accounts, and works with your iPad email attachments so you can work anywhere, anytime - online and offline.
    https://itunes.apple.com/us/app/quickoffice-pro-hd-edit-office/id376212724?mt=8
    nsdjoey presents ways to edit office documents in this web page:
    https://discussions.apple.com/message/21953221#21953221

  • What is the difference between function and method

    Hey I need help I dont know which is the difference between function and method ?
    Does anybody can ask me this question.
    Thanks

    jverd wrote:
    The first two answers were also correct.Also the blocked message, quoted here for posterity:
    "Tinkerbell" wrote:
    Methods are defined by Java whereas functions are not. ~

  • Inherited fields and methods shown with the class own fields and methods

    In each subclass page, javadoc includes the fields and methods of the superclass as if they were declared in the subclass. However the methods inherited from Object are shown in a separate box.
    Is there a way to make javadoc group all inherited fields and mehods in separate boxes, one for each superclass?
    I'm using the javadoc tool from J2SE v 1.4.2_07 SDK with NetBeans 4.0 Bundle.
    Thanks.

    Yes, I know it does, but it seems that the superclass
    must be declared public.Sort of. Per default javadoc documents public and protected types and members. With this setting, where would you expect the documentation of public members of a package-private super class to be?
    If you specify -package or -private as an option for javadoc, package-private and/or private types and members are documented, too, so package-private super classes are documented as usual.

  • Could you please send me the material Opps concepts Classes and Methods

    Hi Experts,
    I am working on Opps concepts.I am new to this concept.
    Could you please send me the detailed presentation on Abap oops.
    Thanks inadvance,
    Regards,
    Rekha.

    Hi this will help u.
    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
    with regards,
    Hema.
    pls give points if helpful.

Maybe you are looking for