This is about abap objects

hi,
there is perform in normal abap program i have convert it into object oriented program we can write in call method but how to write the stmt in object oriented programing
perform abb (sapmov101) or perform  asd in program sapmov101
think sapmov101 is module pool program.
how to convert to 
call method
is it posible to have program parameter in object oriented programing .

Hi,
You have to define a class  in Se24 and methods for that class
You can define some parameters for that method.
define a object type ref to class
call the method  with the parameters..
something like below
  CALL METHOD im_header->get_data
    RECEIVING
      re_data = re_data.
reward if useful
regards,
Anji

Similar Messages

  • About ABAP Object

    Hello All,
    i have some question about ABAP Object.
    What is the meaning of friend class and singleton?
    Regards,
    Luke

    Hi,
    The addition Friends makes class class a friend of classes classi and or interfaces ifaci.At the sam time, all subclasses of classes classi, all classes that implement one of the interfaces ifaci and all interfaces that have one of the interfaces ifaci as a component interface become friends of class. you have to specify at least one class or interface.
    The friends of a class have unrestricted access to the protected and private components of that class, and can generate unrestricted instances of the class.
    The friends of class are not automatically friends of subclasses of class. the addition Friends does not make class a friend of its friends.
    Thea ddition global is allowed only when you use the addition public for the global class of a class pool at the same time.You can list other global classes and interfaces from the class library after global friends.This addition is generated when the Class Builder creates a global class and you specified friends at the corresponding tab page of the class Builder.
    `
    In the example , classs c2 is a friend of interface i1, and therefore also of the implementing class c1. It can instantiate these objects and access their private component a1.
    interface i1.
    endinterface.
    class c1 definition create private friends i1.
    private section.
    data a1(10) type c value 'Class 1'.
    endclass.
    class c2 definition.
    public section.
    interfaces i1.
    methods m2.
    endclass.
    class c2 implementation.
    method m2.
    data oref type ref to c1.
    create object oref.
    write oref->a1.
    endmethod.
    enclass.
    Kindly Reward Points If You Found The Reply Helpful,
    Cheers,
    Chaitanya.

  • About ABAP OBJECTS

    Hi Experts,
           Can anybody suggest documentation on ABAP OBJECTS....its great helpful to me.....
    Thanks
    Venkat

    HI,
    OBJECT:
    An object is a section of source code that contains 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.
    What are ABAP Objects?
    1) ABAP Objects is a new concept in R/3 Release 4.0. The term has two meanings. On the one hand, it stands for the entire ABAP runtime environment. On the other hand, it represents the object-oriented extension of the ABAP language.
    2) The new name ABAP Objects for the entire ABAP runtime environment is an indication of the way in which SAP has, for some time, been moving towards object orientation, and of its commitment to pursuing this line further.
    3) The ABAP Workbench allows you to create R/3 Repository objects such as programs, authorization objects, lock objects, Customizing objects, and so on.
    4) Using function modules, you can encapsulate functions in separate programs with a defined interface. The Business Object Repository (BOR) allows you to create SAP Business Objects for internal and external use (DCOM/CORBA).
    Just have a look at these links:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3412d190-0201-0010-aaaa-ff5a315ae5fe">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3412d190-0201-0010-aaaa-ff5a315ae5fe</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/ab/9d0a3ad259cd58e10000000a11402f/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/ab/9d0a3ad259cd58e10000000a11402f/frameset.htm</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/advancedsearch?query=abap%20objects&cat=sdn_all">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/advancedsearch?query=abap%20objects&cat=sdn_all</a>
    Regards,
    Gunasree.

  • See this question about static object

    1)static A a =new A();
    2) A a1=new A();
    what is the difference between them?

    static A a =new A();
    When this line is written in another class say : class b;
    a is accessible without the need for declaring an object of b.
    i.e., b.a
    Not in the other case.
    Many factory classes and methods are accessed this way coz, the classes are private and abstract, so u cannot make an object of that class.
    For example:
    System.out.println() - here println() is a method, out is an object of some class that is declared static in the class System. if it were'nt static, then we had to make an object of the System class and then access the out object,
    hope this helps
    let me know

  • Overriding attributes in ABAP objects

    Hello,
    I currently want know if it is possible to override attributes in ABAP objects. i know it is possible with methods. I have extend a previous class functionality and want to change the refrence type of an attribute from the parent class, but only on the child. Is this possible in ABAP object or even in normal object oriented techniques.
    Thanks
    Brendan

    Hi,
    ususally you can achive this with other technics. You can e.g. use the class hierarchy for this:
    The attribute is of type REF_SUPERCLASS. Within the superclass it should be working when you set subclasses of REF_SUPERCLASS as attribute.
    Another way is to use interfaces as reference type for your attribute.
    Please refer to [ABAP Objects|http://help.sap.com/saphelp_nw70/helpdata/EN/ce/b518b6513611d194a50000e8353423/frameset.htm]. Especially the chapters about Inheritance and Interfaces.
    Regards Rudi

  • Abap objects standards

    Hi Folks,
    I'm in need of help. I have just come into a shop that has no SAP OO standards. There are many kingdoms that are not even using SE24 to build classes. Is there a SAP document or guide I can use to set standards. I am really fighting with  producing good code over what is in place.
    Thanks
    Bruce

    Hi Bruce,
    I am sorry for saying things that have nothing to do with ABAP , i really thought that what i said about zevolving.com had something to do with ABAP OO, regarding design patterns and OO concepts applied to it.
    See below my reason to think it: (there's much more, i really appreciate this blog and several times i merged these approaches to mine )
    and etc,
    I like to learn concepts, because these are made of ideas. Ideas aren't bonded to physical limitations. Your physical resources may evolve and become obsolete over time, an idea can evolve but it can't die, although it can be changed with a tremendous flexibility, it will never be obsolete over a reasonable amount of time.
    I am a bit sad because you said i am hiding behind the first link i sent . Robert Martin (CEO of Object Mentor) has so much to say about this matter, and his text about Symptoms of Rotting Design says about an absurd quantity of problems i have seen and interacted with in my ABAP experience. The other book i mentioned has so much good concepts and ideas that in here ... i can't put in words.
    I am really sorry for being a nuisance. Lesson learned, i won't talk about matters that are so far from the topic ever again.
    Obs.: About official SAP documentation, in the SAP Official Course TAW12 (since 2007 *when i saw this subject in it), SAP released in part 1, around 300 pages of content about ABAP Objects. And there are others you can check in SAP PRESS
    Regards,
    Renan

  • ABAP-Object Services

    Hello Gurus,
        Can you guys enlighten me about ABAP-Object services? I've been doing ABAP objects for quite some time now. I want to know all about it (ABAP-Object services). I would like to confirm if this object is similar with the one I know in .net or in JAVA that is normally called <i><b>Class Libraries</b></i>.
    Thanks!
    Jeffrey

    Hi Jeff,
    Please refer the below links :
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/9d0a3ad259cd58e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/ab/9d0a3ad259cd58e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/65094de89011d4b2eb0050dadfb92b/frameset.htm
    Hope this helps.
    Sands

  • ABAP objects, drilling down into methods/parameter/method/parameter...

    Hello all,
    When creating or changing purchase orders using the enjoy transactions ME21N and ME22N, I want to force the users to have the same delivery address on every line item. I have found and activated the BADI ME_PROCESS_PO_CUST. I have added some code in method CHECK and put a breakpoint on that code. The transaction is stopping on my breakpoint. So far so good.
    Parameter IM_HEADER is of type IF_PURCHASE_ORDER_MM,
    that has method GET_ITEMS,
    that has parameter RE_ITEMS that is a table of  of type PURCHASE_ORDER_ITEMS,
    method GET_DATA
    with parameter RE_DATA
    with fields ADRNR &  ADRN2
    From inside of the method CHECK of BADI, what syntax do I need to create an internal table of the line item fields that are in parameter RE_DATA of method GET_DATA?  I am just starting to work with ABAP objects.  Any help would be greatly appreciated.
    Thanks
    Bruce

    Uwe,  thanks for the quick response.
    Your solution,
    DATA: lt_items      TYPE purchase_order_items,
               ls_item       TYPE purchase_order_item.
    CALL METHOD im_header->get_items
       receiving
         re_items = lt_items.
    Short version:
      lt_items = im_header->get_items( ).
      LOOP AT lt_items INTO ls_item.
      do something
      ENDLOOP.
    got me very close to the solution.  The table lt_items contain the number of entries corresponding to the actual line items.  But the data element ls_item does not contain the fields I'm expecting from:
    method GET_DATA ,
    parameter RE_DATA,
    type MEPOITEM.
    How do I populate ls_item with the 197 fields from structure MEPOITEM?
    If I knew more about ABAP objects, I'm sure I could easily change the code myself.  But today, I need the generosity of others to help me solve this.
    Thanks
    Bruce

  • Disable/Grey out a row in ABAP Objects

    HI,
    I have a reqmt where in which in the report -
    when check box display BOM is checked only BOM components needs to be displayed in the output but should not allow user to select the row and make changes by pressing anybutton.
    The display rows should get greyed out. How to achieve this functionality thru ABAP objects.
    Thanks

    Hi Namit,
    Open the particular page , and select dynamic navigation (from the right hand side corner Display drop down menu ) .
    U will get all the links which r there in the detailed navigation.
    and uncheck the visible property .
    Surekha.

  • New to Abap objects?

    Hi
    iam new to abap objects. can u please suggest me some links or material to read?
    thanks in advance
    chythanya

    Hi Chytanya,
    Please check this link for step by step tutorials.
    http://www.****************/Tutorials/OOPS/MainPage.htm
    Please check this form
    Need ABAP Objects Tutorial
    Need ABAP Objects Tutorial
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    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
    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
    Download the pdf'ds from here, willbe helpful.
    http://www.esnips.com/doc/6d16a298-9227-4d32-acf1-e91164c89daf/3-ABAP-Objects(P283)
    Best regards,
    raam

  • BOOK AOBOUT ABAP OBJECTS

    Hi,
    I want a book about ABAP OBJECTS in French.
    Thx in advance.

    hi said,
    check these links
    http://www.fetchbook.info/search_Horst_Keller/searchBy_Author.html
    http://www.fetchbook.info/search_Keller/searchBy_Author.html
    http://www.amazon.ca/s?ie=UTF8&search-type=ss&index=books-ca&field-author=Horst%20Keller&page=1
    http://www.amazon.ca/s?ie=UTF8&rh=n%3A939924%2Cp_3%3A%2450%20-%20%24100&page=1
    Reward with points if it is helpful
    Regards
    Alfred

  • ABAP objects for transfer/update rules - does this apply to include stateme

    I have a question about the new requirement for the code in the update/transfer rules to be written in ABAP Objects standards.  Does this still apply if in your update rules you using include programs?  Does this mean that when we upgrade we will have to follow the ABAP Objects standards (ie no header lines)?

    Routines will method based.
    In addition to what Chetan has sent, check this how to also.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    Ravi Thothadri

  • Adding leading zeros in abap objects.

    Can anyone explain me
    1. How to add leading zeros to a field in abap objects.
    For eg:
    data: dmb(6) type c value '123456',
    actually the output value of c should have leading zeros added to it for length 16.
    i.e '0000000000123456' . If the length of dmb is less than 16 then leading zeros should be added to that value to make it 16 as length.
    Please tell me how to do it in ABAP Objects.

    Hi Camila
    Try to use the statement
    DATA: ALPHABET(15) VALUE '     ABCDEFGHIJ',
          M1(4)        VALUE 'ABCD',
          M2(6)        VALUE 'BJJCA '.
    SHIFT ALPHABET LEFT DELETING LEADING M1.
    The field
    ALPHABET
    remains unchanged.
    SHIFT ALPHABET LEFT DELETING LEADING SPACE.
    The field ALPHABET now has the following contents:
    'ABCDEFGHIJ     '.
    SHIFT ALPHABET RIGHT DELETING TRAILING M2.
    <b>ALPHABET</b> now has the following contents:
    '      ABCDEFGHI'.
    <u><b>IN CHARACTER MODE</b></u>
    <b>Effect</b>
    This is the default setting (see above), and the addition is therefore optional.
    <b>Note
    Performance:</b>
    For performance reasons, you should avoid using SHIFT in WHILE loops.
    The runtime required to shift a field with length 10 by one character to the right or left requires about 5 msn (standardized microseconds). A cyclical shift requires around 7 msn. The runtime for the ...
    LEFT DELETING LEADING
    ... variant is around 3.5 msn, for ...
    RIGHT DELETING TRAILING
    ... around 4.5 msn.
    Reward all helpfull answers
    Regards
    Pavan

  • Poll: Development in ABAP Objects / Webdynpro vs. classical Dynpro

    Hey there ABAP developers,
    I just want to ask if you can give me one or two minutes of your attention for two poll questions.
    At the moment I´m writing my master thesis about the development of a monitoring tool in ABAP. One of my bigger chapters is about the decision, which programming paradigm should be used for new development projects in SAP. And another important one is about WebDynpro vs. classical Dynpros.
    Because of the fact, that I can´t create any polls in here, I just started this discussion and hope for many replies .
    It would be very nice if some of you could give me an answer to the following questions (only 2 ), so that I can maybe use the result of this poll in my master thesis, if there are enough responses.
    1. What percentage of new development projects are you developing in ABAP Objects? (Not to be considered small reports that just runs for only one time)
         A. 0 %
         B. less than 25%
         C. 25% - 49%
         D. 50% - 75%
         E. more than 75%
    2. Which GUI technology do you prefer?
         A. Classical Dynpro
         B. WebDynpro
         C. Business Server Pages (BSP)
         D. others (please mention)
    I want to thank you in advance for answering the questions,
    Best regards,
    Christoph

    Hi,
    Present SAP Implementation projects are very rare, maximum projects are support and up gradations only .
    If they want Implement the  SAP  newly  , defiantly they should creating ABAP Objects.
    Why Because  ABAP Objects are Object Oriented Concepts,  so,  for  future reference and re usability..etc .
    Now Come to the First Quetion.
    if it is implementation project   ABAP Objects are   25% - 49%.
    if it is Support project ABAP Objects are   25%
    Now Come to the Second Quetion.
    Depend upon Reqmnt, but Most of the Applications are Webdynpro .  i.e 70%.
    Remaining 30% All ( BSP and GUI ....Etc..)
    This is my opinion.
    Sambaiah.Paidipelli.

  • Single click in abap objects

    hi,
        can any1 pls explain me the single click event LINK_CLICK in abap object.
    does this single click event mean that if i click anywhere on my alv report it will trigger the event.
       pls explain me about this LINK_CLICK event in details pls

    answered the similar question last week. You can see here Event
    Link_click or ALV_Object Model HYPERLINK.
    This example demonstrates how to use a Hiperlink field in ALV. These example was based on 'SALV_DEMO_TABLE_COLUMNS' that contains Hiperlink, icon, Hotspot...
    The Code is:
    REPORT zsalv_mar NO STANDARD PAGE HEADING.
          CLASS lcl_handle_events DEFINITION
    CLASS lcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          on_link_click FOR EVENT link_click OF cl_salv_events_table
            IMPORTING row column.
    ENDCLASS.                    "lcl_handle_events DEFINITION
          CLASS lcl_handle_events IMPLEMENTATION
    CLASS lcl_handle_events IMPLEMENTATION.
      METHOD on_link_click.
        DATA: l_row_string TYPE string,
              l_col_string TYPE string,
              l_row        TYPE char128.
        WRITE row TO l_row LEFT-JUSTIFIED.
        CONCATENATE text-i02 l_row INTO l_row_string SEPARATED BY space.
        CONCATENATE text-i03 column INTO l_col_string SEPARATED BY space.
        MESSAGE i000(0k) WITH 'Single Click' l_row_string l_col_string.
      ENDMETHOD.                    "on_single_click
    ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
    DATA: gr_events TYPE REF TO lcl_handle_events.
    TYPES: BEGIN OF g_type_s_outtab.
    INCLUDE TYPE alv_tab.
    TYPES:   t_hyperlink TYPE salv_t_int4_column,
           END   OF g_type_s_outtab.
    DATA: gt_outtab TYPE STANDARD TABLE OF g_type_s_outtab.
    DATA: gr_table   TYPE REF TO cl_salv_table.
    TYPES: BEGIN OF g_type_s_hyperlink,
             handle    TYPE salv_de_hyperlink_handle,
             hyperlink TYPE service_rl,
             carrid    TYPE s_carrid,
           END   OF g_type_s_hyperlink.
    DATA: gt_hyperlink TYPE STANDARD TABLE OF g_type_s_hyperlink.
    SELECTION-SCREEN BEGIN OF BLOCK gen WITH FRAME.
    PARAMETERS: p_amount TYPE i DEFAULT 30.
    SELECTION-SCREEN END OF BLOCK gen.
    START-OF-SELECTION.
      PERFORM select_data.
      PERFORM display.
    *&      Form  select_data
          text
    -->  p1        text
    <--  p2        text
    FORM select_data .
      DATA: line_outtab  TYPE g_type_s_outtab,
            ls_hype      TYPE g_type_s_hyperlink,
            lt_hyperlink TYPE salv_t_int4_column,
            ls_hyperlink TYPE salv_s_int4_column,
            v_tabix      TYPE sytabix.
      SELECT *
        FROM alv_tab
        INTO CORRESPONDING FIELDS OF TABLE gt_outtab
            UP TO p_amount ROWS.
      LOOP AT gt_outtab INTO line_outtab.
        v_tabix = sy-tabix.
        ls_hype-handle    = sy-tabix.
        ls_hype-hyperlink = line_outtab-url.
        ls_hype-carrid    = line_outtab-carrid.
        INSERT ls_hype INTO TABLE gt_hyperlink.
        ls_hyperlink-columnname = 'URL'.
        ls_hyperlink-value      = sy-tabix.
        APPEND ls_hyperlink TO lt_hyperlink.
        line_outtab-t_hyperlink = lt_hyperlink.
        MODIFY gt_outtab FROM line_outtab INDEX v_tabix.
        CLEAR line_outtab.
        CLEAR lt_hyperlink.
        CLEAR ls_hyperlink.
      ENDLOOP.
    ENDFORM.                    " select_data
    *&      Form  display
          text
    -->  p1        text
    <--  p2        text
    FORM display .
      TRY.
          cl_salv_table=>factory(
            IMPORTING
              r_salv_table = gr_table
            CHANGING
              t_table      = gt_outtab ).
        CATCH cx_salv_msg.                                  "#EC NO_HANDLER
      ENDTRY.
      DATA: lr_functions TYPE REF TO cl_salv_functions_list.
      lr_functions = gr_table->get_functions( ).
      lr_functions->set_default( abap_true ).
    *... set the columns technical
      DATA: lr_columns TYPE REF TO cl_salv_columns_table,
            lr_column  TYPE REF TO cl_salv_column_table.
      lr_columns = gr_table->get_columns( ).
      lr_columns->set_optimize( abap_true ).
    *... §4.7 set hyperlink column
      DATA: lr_hyperlinks TYPE REF TO cl_salv_hyperlinks,
            ls_hyperlink  TYPE g_type_s_hyperlink.
      DATA: lr_functional_settings TYPE REF TO cl_salv_functional_settings.
      TRY.
          lr_columns->set_hyperlink_entry_column( 'T_HYPERLINK' ).
        CATCH cx_salv_data_error.                           "#EC NO_HANDLER
      ENDTRY.
      TRY.
          lr_column ?= lr_columns->get_column( 'URL' ).
          lr_column->set_cell_type( if_salv_c_cell_type=>link ).
          lr_column->set_long_text( 'URL' ).
        CATCH cx_salv_not_found.                            "#EC NO_HANDLER
      ENDTRY.
      lr_functional_settings = gr_table->get_functional_settings( ).
      lr_hyperlinks = lr_functional_settings->get_hyperlinks( ).
      LOOP AT gt_hyperlink INTO ls_hyperlink.
        TRY.
            lr_hyperlinks->add_hyperlink(
              handle    = ls_hyperlink-handle
              hyperlink = ls_hyperlink-hyperlink ).
          CATCH cx_salv_existing.                           "#EC NO_HANDLER
        ENDTRY.
      ENDLOOP.
      DATA: lr_events TYPE REF TO cl_salv_events_table.
      lr_events = gr_table->get_event( ).
      CREATE OBJECT gr_events.
      SET HANDLER gr_events->on_link_click FOR lr_events.
      gr_table->display( ).
    ENDFORM.                    " display

Maybe you are looking for

  • Firefox crashed and will not start. I tried IE which will no longer start either.

    I was surfing and when I clicked on ESPN.com firefox crashed without an error message. It would not start up after that. I did a restart and even tried to open up IE for a test (which didn't work either). Every time I shut down the computer it says F

  • Apple TV won't play music from one device via Home Sharing.

    So I have just bought a new Mac, with which I got an Apple TV. I'm trying to save disk space on my Mac so I've setup my old computer (with my old iTunes library) as a Home Sharing hub kind of thing. However, the Apple TV seems not to want to play mus

  • ICC Color Profiles

    Im trying to colorsync my macbook pro with my office designers macs. They setup their color profiles...and then sent me the Color.ICC profile that was created. I added this to my Macbook in Library > ColorSync > Profiles I am able to select this in m

  • Three finger swipe for nav. in finder, chrome etc

    I found it easier to navigate using three finger swipe for front and back say in finder or chrome. Is there a way to do that since after upgrading to lion im unable to swipe left or right except for safari.

  • Convert Half-Transparent Colour from Word in PDF

    Hello I'm trying to convert a word-document with half-transparent colours in it in a pdf-document using acrobat distiller (print option pdf). the half-transparent colour becomes a plainty full colour in pdf and the background ist covered. but the col