ABAP OO Definitions

Hi,
Please give me the ABAP OO Definitions
Thanks,
Sreekar.

OOPS – OO ABAP
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.
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
http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
DIRLL DOWN AND INTERACTIVE REPORT
http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm
PAGE BREAK FOR ALV LIST
check out this link
http://www.abap4.it/download/ALV.pdf
good book on ABAP objects(OOPS)
http://www.esnips.com/doc/bc475662-82d6-4412-9083-28a7e7f1ce09/Abap-Objects---An-Introduction-To-Programming-Sap-Applications
How to check Cluster Table Data
https://forums.sdn.sap.com/click.jspa?searchID=5215473&messageID=3520315
http://www.sap-img.com/abap/the-different-types-of-sap-tables.htm
http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
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
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
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
Reward Points if useful.

Similar Messages

  • Create Java class out of ABAP class definition

    Hi all,
    is there a way to create a Java class definition based on a given ABAP class? Of course I have to implement the functionality again in Java, but it would be great if I could get a java class definition with all the methods, attributes etc.
    Best regards,
    Nils

    I don't know that something like that exists.  I think you will have to look at the class in SE24 and manually do the java code.
    Regards,
    Rich Heilman

  • ABAP DDIC  table name for structure definition

    Hello,
      Can anybody tell me what is the name of DDIC table used for storing ABAP structure definition and also its related tables.
    Thanks&Regards,
    Prajesh

    Hi again,
    1. There is one more field
        in DD03L table.
    2. DEPTH
    3. Normally this field will be blank.
    4. In your case,
       u have 2 common fields.
      eg. F2
    5. Then
       it will be like this in table
       F2  - space
       F2  - 1
    6. The second entry is for DEPTH.
    regards,
    amit m.

  • HR-ABAP basic questions

    1) What is the reason for using infotypes with different way(not the same way as in ABAP) of saving the records the database is used in the ABAP-HR Programming?
    2) What is the some reason for using Logical Database more ABAP-HR?
    3) What is the reason for using precoded macro's in ABAP-HR?

    Matt,
      I am trying to learn ABAP-HR and found that many things that sound different in HR-ABAP can be achieved through normal ABAP below are the some
        1) Infotypes - I had read some where that records get saved horizantally (record1 record2 record3) instead in a vertial save ( record1
                                                          recordn).
           Why is that this type of database design is adapted. Ofcourse these are called repeate structures I guess.
           Why is that infotype need to have self built database table, internal table and structure?
           This is being already handled in Normal ABAP by creating internal table refering database table/structure.
          So my 1st question in the previous to know what is making infotype different than normal way of having a internal table.
        2) Macro - is the precoded select query but that is already coded in TRMAC. My question over this when we can have select query what is the need for the precoded stuff?.
          For example why to have "RP-READ-INFOTYPE" on some Infotype when this can done through  Select * from TABLE pA0*** where field1 = 'xxxx'  .
    Any ways Thanks for your response,I have 2 years of experience in ABAP and want to shift my self to ABAP-HR. I always try to have strong foundation/understanding of the basics and post the questions to know the differents views (approach of thinking of other ABAPER's). Many times the response provide me very...very valuable stuff and this is the frist time  that I have a response that is different from Grath & Sameer. But I guess any response that posted to question which is related always related to  ABAP is definitely going to be helpful in one or the other way (may for having good understanding  or for preinterview..or some thing else) . 
          If the post is found to be non sense there is responsible person "MODERATOR" to block the post. I Dont know what made these two guys bother them much.
         That's great! that you gave me a repsonse that I was always expecting
    Ty
    SDN Powered

  • Export Dictionary structure definitions to WSDL or XSD

    Hi all,
    I need to export some structure definitions from CRM 2007 to a XI instance. I have been told by the XI responsible that the ideal mechanism is that I provide him some WSDL or XSD files so he can import them.
    The point is: how do I export my ABAP Dictionary definitions to a WSDL?.
    I have tryed to do it already in an indirect way creating an ABAP Proxy, but I always get plenty of errors there and I am sure that has to be a faster and more elegant way to do it.
    Thanks in advance, lot of points for the one who solve it ;-).
    Best Regards,
    Luis V. de P.

    Hi Gonzalo,
    I dont think even if you convert into xsd it will go. The best would be to use XMLAnonymizerBean in your sender communication channel. Please see stefans blog for this:
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Regards,
    ---Satish

  • Class Definition & Implementation

    Hi,
      In JAVA or Other OOP languages the class definition & implementation are doing within the same task i.e with in the class only they are defining & implementing.But when it comes to ABAP the definition part & implementation part of a class are divided into 2 tasks. Why they are designed like that?

    Hi Suresh Reddy,
    The main intention behind this design is
    " to differentiate the class definition and implementation clearly ."
    Even if you have a chance to including both  class definition and implementation in same structure, it is difficult to differentiate  these things in lengthy implementation classes.
    Thank you,
    Prasad GVK.

  • ABAP-HR MODULE(HOW TO CALCULATE AGE & YEARS OF SERVICE)

    HI,
    HOW TO CALCULATE AGE & YEARS OF SERVICE means for example
    I AM USING PNPCE LDB.
    (1) whose age is greater than 52.833 years with 7.833 years of service, with annual rate of pay $170,000 or more, or
    (2) age plus employment service is 65 or more, with annual rate of pay of $ 170,000 or more.
    Note that the $ 170,000 parameter would be a variable that could change annually when this report would be generated. In the past, age and service value were determined as of the run date. The determination date would also be a variable that would change when the report would be generated.
    Thanks&Regards
    Rahul.

    Hi Rahul,
    This is the 2nd warning !!! Please... use the correct or most appropriate forum.
    The ABAP Objects Forum should be used for: ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    This thread will be moved from to .
    You're asking this question in two thread, so the duplicated thread will be deleted.
    Please have a look at [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    Also read this thread Welcome and Rules of Engagement.
    Greetings,
    Marcelo Ramos

  • How to make use of SE37- Function Module & how to find out the table?

    Hi ,
    1.Could anyone help me what's this SE37-Function module is all about,How to make use of this?
    For Eg,If i want to delete a BOM permanently from the system then I have to use the Function module CM_DB_DEL_FROM_ROOT_BOM.
    But after giving the particular name what should i do?
    Please help me.
    2.How to find out the respective table for a particular field sya for T code-COGI, T code MFBF,where its values are getting populated.,Please help in this issue.
    Thanks in adavnce for spending some time
    Raj.S

    Hi Raj
    Function Modules
    Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
    The Function Builder  also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
    Check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    You can execute function module in SE37ie you can perform the activiites defined in the function module by executing it.
    By deleting BOM you mention the FM name in se37 and execute. In some function module it will ask input parameters as developed in the program , you have to give the input parameters and execute.

  • Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!

    Welcome to the SDN ABAP Development Forums!
    Please see the [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting to avoid potential problems (e.g. your posts are deleted).
    The [ABAP Development Forums|https://forums.sdn.sap.com/category.jspa?categoryID=42] have dedicated forums for the following ABAP related areas:
    => General questions about the ABAP language and language implementations. If in doubt, use this forum and do not cross-post.
    => Tables, views, structures, data elements, domains, search helps and types in the underlying relational database.
    => SAPscript and Smartforms form generation, editing and printing and the corresponding programs.
    => Classical Dynpro, Screen Painter and Controls Framework (ALV grid, Table Controls).
    => Enhancing ABAP code through techniques as CMOD, SMOD and the newer BADIs, Switch and Enhancement Frameworks.
    => Code quality, ABAP Unit, Testing, Debugging, efficient code techniques and database reads, SQL trace tools and Runtime Analysis.
    => Data Transfer Techniques, Batch Data Communication, Legacy System Migration Workbench, Application Link Enabling, IDOCs, BAPIs.
    => ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    Please...
    - Use the correct or most appropriate forum,
    - Do not cross-post or multiple-post, and
    - Search for information before asking basic questions, again.
    Using these categories will enhance performance in the forums and improve the chances that your questions are answered quickly and more accurately!
    Other relevant blogs and rule related infos are:
    - Michael Schwandt's blog about [Moving to strict rules to improve quality and control|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/10047].
    - Michael Schwandt's blog about [Quality: Invitation To Clean Up Your Forum Threads|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11978].
    - Please follow-up on your threads and assign points correctly, as this also contributes to the [UN Food Program|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7898].
    Enjoy the forums and happy posting!!

    Start of related discussions about the above rules. Feel free to discuss the rules here...
    Dear Jan
    Sometime i found very difficuties and time taking process in putting questions in forum bcos i have to elaborate the whole pictorial process in words.
    Why Cant we make our this forum more Interactive in way of asking questions by allowing us to attach print preview of what we face in the system.
    If you kindly give a glance on this issue and try to implement it for us, forum members like us will be benefited and it will be beneficial for those who are all into in this forum.
    Thanks & Regards
    Saifur Rahaman

  • Consuming web service in PHP

    Hello,
    I have a PHP page that consumes the web service from ABAP side.
    ABAP is definitely returning a table with a list of materials to the PHP page because we have set a remote breakpoint in the ABAP system and it is breaking at that particular point.
    Now i would wish to iterate through the results from the return table.
    $client = new SoapClient($wsdlfile,
                    array('login'      => "xxx",
                          'password'   => "xxx",
                          'trace'        => true,
                          'exceptions' => true));
      try {
         $results = $client->ZxtGetMaterialList();
           print_r($results);
    For the print_r function, it is giving me the following.
    stdClass Object ( [ItBapimatdoa] => stdClass Object ( ) )
    Does anyone has any idea how to iterate through the results?

    Hi Gregor,
    Thanks for the reply,
    There is no input parameters for the function module and a table is returned successfully.
    Anyway I have generated the codes by using the scripting languages tool provided over here, http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/cdbe319e-0d01-0010-92b7-dd4625e7e9de&overridelayout=true
    The generated php codes works fine. And i will follow up from the generated code.
    thank you.

  • Different types of function module

    hi,
    When we create a function module : in one of the tabs we can find
      1 general function module
      2. remote function module
    3. update function module.
    What is meant by update function module and remote function module. can anyone explain me with an example and when shd we opt for 2 and 3.
    thanxs
    hari

    Function Modules:
    Function modules allow you to encapsulate and reuse global functions in the R/3 System.
    They are stored in a central library. The R/3 System contains a wide range of predefined
    function modules that you can call from any ABAP program.
    Unlike subroutines, you do not define function modules in the source code of your program.
    Instead, you use the Function Builder. The actual ABAP interface definition remains hidden
    from the programmer. You can define the input parameters of a function module as optional.
    You can also assign default values to them. Function modules also support exception handling.
    This allows you to catch certain errors while the function module is running. You can test
    function modules without having to include them in a program using the Function Builder.
    Function Groups:
    Function groups are containers for function modules. You cannot execute a function group.
    When you call a function module, the system loads the whole of its function group into the
    internal session of the calling program.
    Calling Function Modules in ABAP:
    To call a function module, use the CALL FUNCTION statement:
    CALL FUNCTION <module>
    [EXPORTING f1 = a 1.... f n = a n]
    [IMPORTING f1 = a 1.... f n = a n]
    [CHANGING f1 = a 1.... f n = a n]
    [TABLES f1 = a 1.... f n = a n]
    [EXCEPTIONS e1 = r 1.... e n = r n [ERROR_MESSAGE = r E]
    [OTHERS = ro]].
    You can specify the name of the function module <module> either as a literal or a variable.
    Each interface parameter <fi> is explicitly assigned to an actual parameter <a i>. You can
    assign a return value <r i> to each exception <e i>. The assignment always takes the form
    <interface parameter> = <actual parameter>. The equals sign is not an assignment operator
    in this context.
    • After EXPORTING, you must supply all non-optional import parameters with values
    appropriate to their type. You can supply values to optional import parameters if you
    wish.
    [email protected]
    34
    • After IMPORTING, you can receive the export parameters from the function module by
    assigning them to variables of the appropriate type.
    • After CHANGING or TABLES, you must supply values to all of the non-optional
    changing or tables parameters. When the function module has finished running, the
    changed values are passed back to the actual parameters. You can supply values to
    optional changing or tables parameters if you wish.
    You can use the EXCEPTIONS option to handle the exceptions of the function module. If an
    exception <e i > is raised while the function module is running, the system terminates the
    function module and does not pass any values from the function module to the program,
    except those that were passed by reference. If <e i > is specified in the EXCEPTION option,
    the calling program handles the exception by assigning <r i > to SY-SUBRC. <r i > must be a
    numeric literal.
    If you specify of ERROR_MESSAGE in the exception list you can influence the message
    handling of function modules. Normally, you should only call messages in function modules
    using the MESSAGE ... RAISING statement. With ERROR_MESSAGE you can force the system
    to treat messages that are called without the RAISING option in a function module as follows
    for various FM's
    http://www.erpgenie.com/abap/functions.htm
    Calling Function Modules
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm
    remote enabled fm's are BAPI's
    refer
    Introduction to BAPIs:
    Definition
    The SAP Business Objects held in the Business Object Repository (BOR) encapsulate their data
    and processes. External access to the data and processes is only possible by means of specific
    methods - BAPIs (Business Application Program Interfaces).
    A BAPI is defined as a method of a SAP Business Object.
    For example, the functionality that is implemented with the SAP Business Object type
    "Material" includes a check for the material’s availability. Thus, the Business Object type
    "Material" offers a BAPI called "Material.CheckAvailability".
    Use
    To use a BAPI method, an application program only needs to know how to call the method;
    that is, it needs to know the method’s interface definition. Therefore, when including a BAPI
    invocation in your application program, you only need to supply the appropriate interface
    information.
    A BAPI interface is defined by:
    • Import parameters, which contain data to be transferred from the calling program to
    the BAPI
    • Export parameters, which contain data to be transferred from the BAPI back to the
    calling program
    • Import/export (table) parameters for both importing and exporting data
    Structure
    The BAPIs in the R/3 System are currently implemented as function modules, all of which are
    held in the Function Builder. Each function module underlying a BAPI:
    • Supports the Remote Function Call (RFC) protocol
    • Has been assigned as a method to an SAP Business Object in the BOR
    • Is processed without returning any screen dialogs to the calling application
    Integration
    The architecture enables SAP to change the details of a BAPI’s implementation without
    affecting external applications, which are using the BAPI.
    Advantages of Using BAPIs
    BAPIs are standardized methods of SAP Business Objects that enable customers and third
    parties to integrate their software components with the R/3 System and the Business
    Framework.
    Business Standard
    SAP Business Objects and their BAPIs provide a business content standard, rather than a
    technical interoperability standard; that is, they enable the integration of R/3 and other
    software components on a business level, not on a technical level.
    [email protected]
    97
    Standards Conformance
    BAPIs are being developed as part of the SAP joint initiative with customers, partners, and
    leading standards organizations. BAPIs are becoming a communication standard between
    business systems.
    You can access SAP Business Objects and their BAPIs by using object-oriented interfacing
    technologies such as Microsoft’s COM/DCOM (Component Object Model/Distributed Component
    Object Model).
    The SAP Business Objects already comply with the Open Applications Group (OAG)
    specifications, and, in conjunction with ObjectBridge from VisualEdge, conform to the Object
    Management Group’s CORBA (Common Object Request Broker Architecture) guidelines.
    Stability and Downward Compatibility
    Once a BAPI is implemented and released by SAP, its interface definition and parameters
    remain stable in the long term, thus ensuring that your application program remains
    unaffected by any changes to the underlying R/3 software and data.
    SAP can make any necessary extensions to the BAPIs, for example, additional optional
    parameters, without destabilizing the operation of existing applications and, at the same time,
    can offer the enhanced functionality to new applications.
    Object Orientation
    As methods of the SAP Business Objects, BAPIs provide access to R/3 data and processes
    following an object-oriented programming model. BAPIs can be called using object-oriented
    interfacing technologies, such as COM/DCOM, thus enabling software components from SAP
    and third parties to interact freely.
    Openness
    You can access BAPIs from all development platforms that support the SAP Remote Function
    Call (RFC) protocol.
    BAPI Definition
    A Business Application Programming Interface (BAPI) is a precisely defined interface providing
    access to processes and data in business application systems such as R/3. BAPIs are defined
    as API methods of SAP Business Objects. These business objects and their BAPIs are described
    and stored in the Business Object Repository (BOR).
    A BAPI is implemented, however, as a function module, that is stored and described in the
    Function Builder.
    BAPIs can be called within the R/3 System from external application systems and other
    programs. BAPIs are the communication standard for business applications. BAPI interface
    technology forms the basis for the following developments:
    • R/3 satellite systems
    • Isolating components within the R/3 System in the context of Business Framework
    • Distributed R/3 scenarios using Application Link Enabling (ALE)
    • Connecting R/3 Systems to the Internet using Internet Application Components (IACs)
    • Visual Basic programs as front-end to R/3 Systems
    • Workflow applications that extend beyond system boundaries
    • Customers’ and partners’ own developments
    • Connections to non-SAP software
    • Connections to legacy systems
    [email protected]
    98
    Standardized BAPIs
    Some BAPIs and methods provide basic functions and can be used for most SAP Business
    Objects. Such BAPIs are known as "standardized" BAPIs.
    Using the descriptions below as a guide, verify whether you can implement the BAPI as a
    standardized BAPI.
    Features
    BAPIs for Reading Data
    The following BAPIs provide you with read-only access to data in the associated business
    object:
    • GetList
    With this BAPI you can select a range of object key values, for example, company
    codes and material numbers. To specify appropriate selection requirements the calling
    program must pass the relevant parameters to the interface. The key values selected
    by the BAPI GetList are returned to the calling program in a table, together with other
    useful information, for example, short texts. The key values can then be passed on to
    another BAPI for further processing, for example, the BAPI GetDetail, as listed below.
    • GetDetail
    The BAPI GetDetail uses a key to retrieve details about an instance(s specific
    occurrence) of a business object and returns this data to the calling program.
    • GetStatus
    The BAPI GetStatus is used to query the status of an SAP Business Object, for
    example, to display the processing status of a sales order. This BAPI is used only for
    displaying the status of an object and does not retrieve full details like the BAPI
    GetDetail.
    • ExistenceCheck
    The BAPI ExistenceCheck checks, whether an entry exists for an SAP Business Object,
    for example, whether the customer master has been created. You should implement
    this method as a workflow method and not as a BAPI (RFC capable function module).
    The method CompanyCode.ExistenceCheck of the business object CompanyCode
    (BUS0002) is an example of this. This workflow method is indirectly invoked when the
    calling program instantiates an object, for example, by using
    GetSAPObject("CompanyCode") from within Visual Basic.
    BAPIs for Creating or Changing Data
    The following BAPIs can create, change or delete instances of a business object: If required,
    you can implement these BAPIs so that, several instances of a business object can be created,
    deleted or modified simultaneously in the same call. In such cases "multiple" is added to the
    method name, for example ChangeMultiple.
    BAPIs that can create, change or delete instances are:
    • Create or CreateFromData
    The BAPI Create or CreateFromData creates an instance of an SAP Business Object,
    for example, a sales order. Create is the preferred name for this BAPI. Use the name
    CreateFromData only when a workflow method called Create already exists for the
    business object in question.
    [email protected]
    99
    • Change
    The BAPI Change changes an existing instance of a SAP Business Object, for example,
    a sales order.
    • Delete
    The BAPI Delete deletes an instance of a SAP Business Object, for example, sales
    order.
    BAPIs for Replicating Business Object Instances
    The BAPIs below can be implemented as methods of business objects that can be replicated.
    They enable specific instances of an object type to be copied to one or more different systems.
    These BAPIs are used mainly to transfer data between distributed systems within the context
    of Application Link Enabling (ALE).
    The method below must be implemented for each business object to be replicated.
    • Replicate
    The BAPI Replicate is called in the system, which contains the originals of the business
    object instances to be replicated. It is used to:
    • Identify the business objects to be replicated and to organize the required data.
    • Call the clone methods described below in the receiving system
    Moreover, at least one of the clone methods below must be implemented for each business
    object to be replicated.
    • Clone
    The BAPI Clone is used by a system to replicate one business object on another
    system or to modify one business object that has already been cloned.
    • CloneMultiple
    The BAPI CloneMultiple is used by a system to replicate several business objects on
    another system or to modify several business objects that have already been cloned.
    Defining and Implementing the BAPI
    Purpose
    Various components of the ABAP Workbench are used when you define and implement a BAPI.
    A BAPI is an API method of a business object and is defined as such in the Business Object
    Repository (BOR). However, a BAPI is implemented as an RFC capable function module, which
    is maintained in the Function Builder. The definitions and descriptions of the data structures
    used by the BAPI are stored in the ABAP Dictionary.
    For function modules that implement BAPIs, certain standards and rules must be adhered to
    over and above the standard programming rules for function modules. For example, COMMIT
    WORK commands must not be used in the function modules that a BAPI is based on.
    The following sections guide you through the steps involved in developing a BAPI. The sections
    contain information about the guidelines and conventions that you should adhere to when
    defining and implementing a BAPI. When implementing BAPIs follow the requirements below
    to ensure you achieve consistent behavior and representation of BAPIs as object oriented
    methods of SAP Business Objects.
    [email protected]
    100
    BAPI Programming
    BAPI Definition
    A Business Application Programming Interface (BAPI) is a precisely defined interface providing
    access to processes and data in business application systems such as R/3.
    BAPIs are defined as API methods of SAP Objects. These objects and their BAPIs are described
    and stored in the BOR (BOR).
    Use
    BAPIs can be called within the R/3 System from external application systems and other
    programs. A BAPI call can either be made as an object oriented method call or as a remote
    function call (RFC).
    BAPIs are a global communication standard for business applications.
    Examples of what BAPIs can be used for include:
    • R/3 satellite systems
    • Distributed R/3 scenarios using Application Link Enabling (ALE)
    • Connecting R/3 Systems to the Internet using Internet application components (IACs)
    • Visual Basic programs as front-end to R/3 Systems
    • Workflow applications that extend beyond system boundaries
    • Customers’ and partners’ own developments
    • Connections to non-SAP software
    • Connections to legacy systems
    BOR Definition
    The Business Object Repository (BOR) is the object-oriented repository in the R/3 System. It
    contains, among other objects, SAP Business Objects and their methods. In the BOR a
    Business Application Programming Interface (BAPI) is defined as an API method of an SAP
    Business Object. Thus defined, the BAPIs become standard with full stability guarantees as
    regards their content and interface.
    Use
    With regard to SAP Business Objects and their BAPIs, the BOR has the following functions:
    • Provides an object-oriented view of R/3 System data and processes.
    R/3 application functions are accessed using methods (BAPIs) of SAP Business
    Objects. Implementation information is encapsulated; only the interface functionality
    of the method is visible to the user.
    • Arranges the various interfaces in accordance with the component hierarchy, enabling
    functions to be searched and retrieved quickly and simply.
    • Manages BAPIs in release updates.
    BAPI interface enhancements made by adding parameters are recorded in the BOR.
    Previous interface versions can thus be reconstructed at any time. When a BAPI is
    created the release version of the new BAPI is recorded in the BOR. The same applies
    when any interface parameter is created.
    The version control of the function module that a BAPI is based on is managed in the
    Function Builder.
    • Ensures interface stability.
    Any interface changes that are carried out in the BOR, are automatically checked for
    syntax compatibility against the associated development objects in the ABAP
    Dictionary.
    [email protected]
    101
    Integration
    You should only define a BAPI as a SAP Business Object method in the BOR if the function
    module that the BAPI is based on has been fully implemented. Full access to the BOR is
    restricted to the persons responsible for the objects involved and for quality control.
    BOR-BAPI Wizard
    The BOR-BAPI Wizard assists with creating new BAPI methods in the BOR. It takes you
    through the creation process step by step.
    Transaction Model for Developing BAPIs Purpose
    The transaction model in which BAPIs are used determines how you have to program BAPIs.
    The transaction model described here has been used to develop BAPIs for R/3 Releases 3.1
    and 4.0A.
    Logical Unit of Work (LUW) and Statelessness
    Within the context of this transaction model a transaction represents one processing step or
    one logical unit of work (LUW). When a transaction is called, database operations are either
    fully executed or not at all. The whole transaction must be programmed to be stateless.
    This transaction model requires that:
    • No data is imported that may indirectly affect the result. If a transaction is called more
    than once, each call must have the same result. For BAPIs this means, for example,
    that Set or Get parameters cannot be used. However, you can keep Customizing data
    in a global memory, as this data remains unchanged even if transaction calls are
    repeated.
    • There must be no functional dependencies between two transactions.
    • Either all relevant data has to be changed in the database or none at all.
    Determining the SAP Business Object and Its Key Fields
    You have to identify the relevant SAP Business Object in the Business Object Repository (BOR)
    and determine whether the key fields of the Business Object are relevant for your BAPI.
    A key is defined in the BOR for most SAP Business Objects. This key can consist of several key
    fields. The content of these key fields uniquely identifies one individual instance of an SAP
    Business Object.
    You can differentiate between instance-dependent and instance-independent BAPI methods.
    Unlike instance-independent methods, instance-dependent methods relate to one instance
    (one specific occurrence) of an SAP Business Object type, for example to one specific sales
    order.
    In the case of instance-dependent BAPIs, the key fields of the corresponding SAP Business
    Object must be used as parameters in the function module the BAPI is based on so that the
    associated object instance can be identified. The names of the key fields in the SAP Business
    Object and the corresponding parameters in the BAPI function module must be the same,
    because the name links the key fields to the parameters.
    All the key fields defined in the BOR for the SAP Business Object in question must be used as
    the parameters in the function module.
    Example
    SAP Business Object Creditor has a key field named CreditorId.
    This key field must be defined as a parameter with the name CREDITORID in the function
    modules of the instant-dependent BAPIs for this Business Object.
    [email protected]
    102
    To display the Business Object and its key fields follow the steps below:
    1. Select Tools -> ABAP Workbench -> Overview -> Business Object Browser . The
    business objects are displayed in the order of the R/3 application hierarchy.
    2. Select the required SAP Business Object in the application hierarchy and double click it
    to open it.
    3. To display the Business Object’s key fields, expand the node Key fields.
    Defining the Interface Structure of the BAPI
    In this step you are going to define the BAPI interface, that is, the individual import, export
    and table parameters required for calling the BAPI.
    Caution
    You cannot use Changing and Exception parameters in a function module which implements a
    BAPI.
    Process Flow
    To define the interface parameters, proceed as follows:
    1. Check whether the key fields of the SAP Business Object are required in the interface. The
    key fields of the SAP Business Object are some of the most important BAPI parameters.
    If a key value is to be passed to the BAPI by the calling program, the key field must be set as
    an import parameter in the function module of the BAPI. That way a specific instance of the
    Business Object is identified.
    For example, this could be a customer number (CustomerNo) in the BAPIs Customer.GetDetail
    and Customer.CheckPassword, or the number of a sales document in the BAPI
    SalesOrder.GetStatus.
    For BAPIs that generate instances, for example, the BAPIs Create or CreateFromData, the key
    field of the Business Object should be set as an export parameter in the BAPI function module.
    These BAPIs return one key value, for example, an order number in the BAPI
    SalesOrder.CreateFromData.
    For BAPIs that are class methods a key field is neither set as an import nor as an export
    parameter in the BAPI function module. Class methods are instance-independent and are
    called without the use of key values. Usually they return a table with a selection of key values.
    2. Specify what other data is relevant as import, export or table parameters for the BAPI.
    Every BAPI must have an Export parameter return that reports messages back to the calling
    program.
    Example
    The BAPI to be developed is to read data from the SAP Business Object Creditor. To read
    creditor details, the calling program has to pass the ID of the creditor and the company code.
    The creditor data returned is to include general details, specific details and bank details.
    To map these requirements onto the BAPI interface, the following parameters must be set in
    the function module which the BAPI is based on:
    • The key field CreditorID of the SAP Business Object as an import parameter
    • An import parameter for the company code
    • A Return parameter that reports messages back to the calling program
    • A parameter for general details of the creditor
    • A parameter for specific details of the creditor
    • A parameter for bank details of the creditor
    for BAPI list
    refer www.sapbapi.com
    for FM's refer www.se37.com
    regards
    srinivas
    <b>*reward for useful answers*</b>

  • Smartform Output Amount display in Parenthesis

    Hi,
    In a Smartform Output my varaible (X_VAR type p decimals 2) is printing out as 434543.65-.
    I want my output to be in this format (434543.65) rather than with negative Sign.
    Due to my requirement I can't change the type of variables.
    Any idea how to Show it on Smartform .Unfortunately Concatenation doesn't work with Variables of Type p.
    Any ideas?
    Regards
    Vara

    Omitting the Leading Sign:
    The ITCDP-TDULPOS field contains the value -100.00. The ABAP Dictionary definition for this field includes a leading sign.
    &ITCDP-TDULPOS& -> 100.00-
    &ITCDP-TDULPOS(S)& -> 100.00
    You might be getting syntax error since smart form editor
    is case sensitive. Try with all capital.
    Hope this helps..
    Thanks,
    vamshi

  • Regarding the function modules

    Hi anybody pls tell me
    what are the scenarios for the creation of function module
    can you give me the some examples
    thanks in advance

    <b>Function Modules</b>
    Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the  Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the  Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the  Function Builder.
    The  Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed

  • What is Material master workflow

    Hi gurus ,
    Can anybody explain what is Material master workflow & Function Module ?what is its use?
    Dev
    Edited by: dev .. on Oct 15, 2008 8:21 AM

    Dear,
    You can find much info about workflows at: http://www.erpgenie.com/workflow/index.htm
    http://help.sap.com/saphelp_46c/helpdata/EN/04/926f8546f311d189470000e829fbbd/frameset.htm
    Workflow is a tool for automating the business process so that the process itself flows smoothly, without bottlenecks and without dead ends. Critical parts of the process can be streamlined with deadline monitoring and contingency options. Participants are informed of milestones in the process. The process definition itself is powerful enough to allow business re-engineering with re-training and to eliminate the impact of workforce changes on the basic business process.
    SAP Business Workflow is the R/3 tool for handling the process automation within R/3 or between R/3 systems and other systems involved in the business process. It is flexible enough to handle ad hoc processes such as the circulation of an electronic document. It is robust enough to handle mission critical process in the production system such as the creation of a material master.
    The different R/3 applications supply standard workflows for the commonly occurring processes. Once these workflow templates are activated, they are ready for immediate use. A complete set of workflow tools, including the workflow editor and workflow generation wizard, are provided to enhance these standard workflows or create new workflows. These tools are complemented with transactions for monitoring, tracking and the statistical analysis of the processes.
    Because the business process often does not step at the R/3 boundary, various interfaces and third party tools are available for extending the process across systems.
    Function module
    Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
    The Function Builder  also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
    http://help.sap.com/saphelp_nw70/helpdata/EN/9f/db988735c111d1829f0000e829fbfe/content.htm
    Regards,
    Syed Hussain.

  • Change label of table control column - SAPMV45A Screen 4900

    Hello,
    SAPMV45A / 4900 is the table control in the Sales tab of transaction VA01/02/03 (Sales Order Creation/Change/Display). On this table control there is a field ( RV45A-ETDAT ) with standard label First Date . The date displayed on this column is the first date on the schedule line tab at item level - changing the label of data element ETDAT didn't work for this table control, it seems the label is not taken from ETDAT labels.
    Is there any ehancemement technique that I can use to change ths label?
    Regards,
    Joã

    Hi,
    if you go to SE80 and display screen 4900
    Goto .-> Secondary window -> element list
    if you click on the red option "Dict. Attrib"
    there in "Modified" option you will see that *RV45A-ETDAT has an 'F' value (Text Fixed modified).
    http://help.sap.com/saphelp_nwpi71/helpdata/en/d1/801c47454211d189710000e8322d00/content.htm
    Modified
    The system sets this attribute if it detects a difference between the ABAP Dictionary definition for the field and the way it is used on the screen. You set this attribute if you do not want to copy all field properties from the dictionary definition.
    Best regards.
    Edited by: Pablo Casamayor on Mar 22, 2011 3:55 PM

Maybe you are looking for

  • Installed on Windows 8.1 and desktop illustrator too small buttons to work with tools

    Please, if you know what I need to do... talk to me please. Now my up - buttons on my workspase is 1\4 - 1\5 of all window.  I have so much free plase on my workspace and so small buttons...((( I don't know what I need to do...

  • Connecting a 15" MBP to an arcade cabinet CRT

    Hello all, I'm interested in hooking up my 15" MBP to an arcade cabinet's CRT display. The CRT takes VGA input and requires a 15 KHz horizontal refresh rate. I'll be using the Apple DVI -> VGA adapter that came with my MBP. I am somewhat worried abou

  • Fault policy files in MDS repository is not working..

    Hi All, I have created my fault policy and fault bindings file and tested in my local project. It worked fine. To make it available in MDS, I added the files under JDeveloperHome/jdeveloper/integration/seed/apps/faulthandling I deployed this MDS repo

  • SQL Report - IF/CASE

    Hi guys, This is mainly a SQL question related to SCCM 2012. I've got the below query which works fine with x86 VM's: SELECT distinct SYS.Netbios_Name0, Gvm.PhysicalHostName0, SYS.User_Name0, SYS.Resource_Domain_OR_Workgr0,OPSYS.Caption0 as C054, OPS

  • Hoe to get data from basic list

    Hi, I have a requirement that, there are records in basic list about customer,after selecting the records from the basic list. run a transaction XD06 for this records using bdc,  how to get these selected records into a internal table to run a bdc. R