Deletion of Objects in ABAP Workbench

Hi,
I want do delete an self defined interface in the ABAP Workbench. But for some reason it is not possible to delete this interface, although its not used anywhere. I got the message
Object cannot be edited with Class Builder
Message no. OO612
But where else should I delete the interface if not in the class builder or in the workbench?
Any ideas how to solve this problem?

Good day,
I also ran into this issue when trying to deploy some wd objects with SAPlink.
I managed to delete the objects by using the "OO_INTERFACE_DELETE" function module. There is also a function module called "OO_CLASS_DELETE" to delete classes.
In either case you just populate the parameters in the following way:
INTERFACE (or CLASS) = <your class\interface name>
COMMIT = 'X'
FORCE = 'X'
Hope this helps.
Regards,
Shaun

Similar Messages

  • Problem in creating new objects in ABAP workbench

    Hi ,
        I am getting error in a newly installed SAP system when try to create new objects in ABAP workbench. The error is like'No changes for the user allowed'.
    Can you tell me what the error is here? What can be done for this so that I can create new object.
    Thanks,
    Manas

    Hi,
    Run tcode SU01. (Provided if u hav authorization to run this Tcode)
    Enter SAP* as user and click on the Copy button.
    Enter the name for your new user in the dialog box and click Continue
    Enter a password for your new user.
    Goto Profile sheet and adjust the profiles to be SAP_ALL and SAP_NEW.
    Save the user and logon with it.
    Now you'll be able to do your changes.
    Reward Points if useful.
    Regards
    Rose
    Edited by: Rose Preethi on Mar 31, 2008 5:20 PM

  • Do we have a ABAP code / program to delete all objects viz. InfoObjects etc

    I am working on a SAP BI7.0 implementation project and seek help on the following points -
    Do we have a ABAP code / program to delete all objects viz. InfoObjects, InfoProviders, Datasources, Infopackages, DTP, Transformations etc. in ONE shot
    Secondly, does anyone have a template created for capturing information on Transports created for release?
    Please do let me know.
    Thanks in advance,
    Venkat

    It may be hard to delete objects containing data.
    Try
    RSDG_CUBE_DELETE               Deleting InfoCubes
    RSDG_IOBC_DELETE               Deleting InfoCubes
    RSDG_IOBJ_DELETE               Deleting InfoObjects (without automatic transport connection !)
    RSDG_MPRO_DELETE               Deleting InfoCubes
    Also check :
    How to delete multiple InfoObjects in one shot?

  • ABAP Workbench in SAP R/3

    Can any one give me shot description?
    ABAP in the SAP R/3 System.
    Architecture of SAP R/3 Applications.
    Database Layer.
    Application Layer.
    Presentation Layer.
    Work Processes.
    Work Processes.
    Screen Processor.
    ABAP Processor.
    Types of Work Process.
    Program Flow and Program Types.
    Flow of ABAP Programs.
    Executable Programs.
    Non-Executable Programs
    thanks,
    Krishna

    Hi
    Work processes:
    the actual Place where the ABAP work is done
    there are following work processes:
    DIALOG,UPDATE, SPOOL, BACKGROUND, ENQUE/DEQUE,MESSAGE etc
    See this
    ABAP FAQ:
    1. How data is stored in cluster table?
    Each field of cluster table behaves as tables which contains the no. of entries.
    2. What are client dependant objects in abap/sap?
    SAP Script layout, text element, and some DDIC objects.
    3. On which even we can validate the input fields in module progams?
    In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain and End chain statement.)
    4. In selection screen I have three fields, plant mat no and material group. If I input plant how do I get the mat no and material group based on plant dynamically?
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' to get material and material group for the plant.
    5. How do you get output from IDOC?
    Data in IDOc is stored in segments, the output from Idoc is obtained by reading the data stored in its respective segments.
    6. When top of the page event is triggered?
    After excuteing first write statement in start-of-selection event.
    7. Can we create field without data element and how?
    In SE11 one option is available above the fields strip. Data element/ direct type.
    8. How do we debug sapscript?
    Go to SE71 give lay set name , go to utilities select debugger mode on.
    9. Which transaction code can I used to analyze the performance of ABAP program.
    TCode AL21.
    10. How can I copy a standard table to make my own z_table.
    Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of the standard table and in the Target table enter Z table name and press enter.
    Following are some of the answers which I gave upto my knowledge.
    1. What is the use of 'outerjoin'
    Ans. With the use of outer join you can join the tables even there is no entry in all the tables used in the view.
    In case of inner join there should be an entry in al the tables use in the view.
    2. When to use logical database?
    Ans. Advantage of Logical databases:
    less coding s required to retrieve data compared to normal internel tables.
    Tables used LDB are in hierarchial structure.
    3. What is the use of 'table index'?
    Ans .Index is used for faster access of data base tables.
    4. What is the use of 'FOR ALL ENTRIES'?
    Ans. To avoid nested select statements we use SELECT FOR ALL ENTRIES statement.
    If there r more than 10000 records SELECT FOR ALL ENTRIES is used.
    Performance wise SELECT FOR ALL ENTRIES is better to use.
    5. Can you set up background processing using CALL TRANSACTION?
    Yes,Using No Screen Mode.
    6. What are table buffers?
    Table buffers reside locally on each application server in the system. The data of buffered tables can thus be accessed
    directly from the buffer of the application server. This avoids the time-consuming process of accessing the database.
    Buffering is useful if table needs to be accessed more no. of times in a program.
    ABAP Technical Interview Questions:
    1. What is the typical structure of an ABAP program?
    2. What are field symbols and field groups.? Have you used "component idx of structure" clause with field groups?
    3. What should be the approach for writing a BDC program?
    4. What is a batch input session?
    5. What is the alternative to batch input session?
    6. A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in background. How to do it?
    7. What is the difference between a pool table and a transparent table and how they are stored at the database level?
    8. What are the problems in processing batch input sessions? How is batch input process different from processing on line?
    9. What do you define in the domain and data element?
    10. What are the different types of data dictionary objects?
    11. How many types of tables exist and what are they in data dictionary?
    12. What is the step-by-step process to create a table in data dictionary?
    13. Can a transparent table exist in data dictionary but not in the database physically?
    14. What are the domains and data elements?
    15. Can you create a table with fields not referring to data elements?
    16. What is the advantage of structures? How do you use them in the ABAP programs?
    17. What does an extract statement do in the ABAP program?
    18. What is a collect statement? How is it different from append?
    19. What is open sql vs native sql?
    20. What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
    21. What is the meaning of ABAP editor integrated with ABAP data dictionary?
    22. What are the events in ABAP language?
    23. What is an interactive report? What is the obvious diff of such report compared with classical type reports?
    24. What is a drill down report?
    25. How do you write a function module in SAP? Describe.
    26. What are the exceptions in function module?
    27. What is a function group?
    28. How are the date abd time field values stored in SAP?
    29. What are the fields in a BDC_Tab Table?
    30. Name a few data dictionary objects?
    31. What happens when a table is activated in DD?
    32. What is a check table and what is a value table?
    33. What are match codes? Describe?
    34. What transactions do you use for data analysis?
    35. What is table maintenance generator?
    36. What are ranges? What are number ranges?
    37. What are select options and what is the diff from parameters?
    38. How do you validate the selection criteria of a report? And how do you display initial values in a selection screen?
    39. What are selection texts?
    40. What is CTS and what do you know about it?
    41. When a program is created and need to be transported to prodn does selection texts always go with it? if not how do you make sure? Can you change the CTS entries? How do you do it?
    42. What is the client concept in SAP? What is the meaning of client independent?
    43. Are programs client dependent?
    44. Name a few system global variables you can use in ABAP programs?
    45. What are internal tables? How do you get the number of lines in an internal table? How to use a specific number occurs statement?
    46. How do you take care of performance issues in your ABAP programs?
    47. What are datasets?
    48. How to find the return code of a stmt in ABAP programs?
    49. What are interface/conversion programs in SAP?
    50. Have you used SAP supplied programs to load master data?
    2. Adapted from response by Maram Roja on Tuesday, June 15, 2004
    1. What are the techniques involved in using SAP supplied programs? Do you prefer to write your own programs to load master data? Why?
    2. What are logical databases? What are the advantages/disadvantages of logical databases?
    3. What specific statements do you using when writing a drill down report?
    4. What are different tools to report data in SAP? What all have you used?
    5. What are the advantages and disadvantages of ABAP query tool?
    6. What are the functional areas? User groups? How does ABAP query work in relation to these?
    7. Is a logical database a requirement/must to write an ABAP query?
    8. What is the structure of a BDC sessions.
    9. What are Change header/detail tables? Have you used them?
    10. What do you do when the system crashes in the middle of a BDC batch session?
    11. What do you do with errors in BDC batch sessions?
    12. How do you set up background jobs in SAP? What are the steps? What are the event driven batch jobs?
    13. Is it possible to run host command from SAP environment? How do you run?
    14. What kind of financial periods exist in SAP? What is the relevant table for that?
    15. Does SAP handle multiple currencies? Multiple languages?
    16. What is a currency factoring technique?
    17. How do you document ABAP programs? Do you use program documentation menu option?
    18. What is SAPscript and layout set?
    19. What are the ABAP commands that link to a layout set?
    20. What is output determination?
    ABAP Interview Questions
    1.Without using Tcode SE11, How can we enter the values in to the table???
    2.What is the difference between Collect statement and Append Statement???
    3.What do you mean by correction and Transportation system???
    4.What is the difference between User Exits and BADI????
    5.How can we identify User exits in our screen???
    6.What do you mean by Inbound and Outbound interface???
    7.In realtime do we configure ALE systems or Administator will take care of that??
    8.How to release an object???
    9.What is the flow of a Sales document???
    10.What is the flow of Purchase order???
    12.What is the flow of Invoice???
    13.What are the standard IDOC's used???
    14.What do you mean by table control???Where will we use this???
    15.What are field symbols??Where will we use these symbols???
    Deepti
    1. There are other ways of entering data into a DB table. ex. B D C
    2. Collect statement collect/adds the records basing on a key field. allows to create summarised data sets.
    Append will append/add a record at the end of existing records
    8. to release an object - use se10/se9
    9. sales doc flow: S. A. - S. O. - Delivery - Billing
    12. Delivery - invoice.
    15. field symbols are used for dynamic allocation. at runtime u can assign a concrete field to field-symbol.
    Kishore
    1. you can go to abap editor (se38) and use insert statement for insertion update for update and modify for modifications.
    2. collect will not allow duplicate entries, while append can allow duplicates.
    3. if any changes are made to objects they are to be transported to different systems i.e, change and transport.
    4. in user exits we go by general method for enhancements while BADIs we use objects (oops concepts)
    methods for enhancement.
    14. table controls are enhanced version for step loops where we can expand rows .main difference between these two
    is step loop can be expanded to two lines table controls can`t.
    15. field symbols are just like pointers concept which are used in C language. We use them when we want to refer to
    the fields considered,it doesnt allocate any memory for it.
    Venu Rapolu
    1. Ans: Using BDC., LSMW,,ALE., BAPI
    2. Ans: Collect: it adds the numeric fields to the existing non numeric key field records., thereby avoiding duplicate
    values., and append will simply adds the record
    3 . Ans: The CTS contains work bench organizer and transport system :
    The workbench organizer is used to record and contol changes to the ABAP/4 development objects;
    The transport system is used to move objects from an SAP dev.system to production system
    6. Ans: Outbound interface is used to send IDocs to the ALE server.,
    Inbound interface is used to Analyse the received Idoc.
    7. Ans: We (ABAPers) don't do.
    8. Ans: se09 or se10
    13. Ans: MATMAS
    CREMAS
    DEBMAS
    GLMAST etc...
    14. Ans: to display records in table format., we use in Screens
    15. Ans: we assign the field content at run time with ASSIGN stmt.
    Satish D
    1. goto se16 u can view the table contents
    2. collect will collects all the numeric fields of nonnumeric field values
    append will append record at the end of table
    3. when we are creatiing new task like dev. a new prg.. after completion of dev. that will be trnsported to testing system or production system to do that we are assigning an
    transport request from our dev.class(system) by using se09
    4. badis are dev. by class and inheritence methods where as user exitsdev by SAP only and empty shells filled wit user logic
    5. go to system then status
    6. outbound generating an idoc in ale layer with master_idoc_create_messgetype,
    inbound is receivng system with idoc_inbound_process, gives an return variable wether it is sucess or not
    7. no we have to configur that
    8. go to se09 or se01 there write your task no and use release button it will asks whats the other system name
    and number enter them and relase by pressing jeep button
    9. inquiry
    quotation
    sales order
    shipping
    delivery
    invoice
    return goods
    12. after creation of delivry note invoice is prepared
    13. master_idoc_distribute will generate standard idoc
    Deepti
    I am enclosing some of answers which I know.
    1. We can use t.Code SE16 to enter values into table only if table maintainence is allowed for that table.
    2. Append will add new entries into the table where as collect add into the numeric type fields if other charatcer fields
    matches to your selection criteria.
    3. CTS used for creation of ABAP development transport requests.The transaction code for this is SE10.
    4. UserExits r used for adding additional functionality to the existing SAP standard transactions.Using UserExits we can add additional functionality standard SAP functionality without making any changes to the original code.BADI is a standardized interface for ABAP sources that enables partners and customers to enhance SAP-delivered programs in their namespace.
    5 .We can identify User exits by using transactions CMOD and SMOD.
    6. After entering transaction code SE10 select the transport request which u want to transport and click on transport icon(Truck symbol) to release it.
    10. Purchase Requistion->RFQ->Vendor Evaluation->Purchase Order(ME21).
    14. Table control is the only facility provide thru dialog programming when we come acrosse the use of updating standared,deletion,insertion and all database operations.
    15. Field symbols r pointers to the existing data types(like 'C') which does not allocate any memory space. These are used faster access of data.
    Answers to some ABAP Interview Questions:
    Questions which I have faced in an interview:
    1) What is runtime analysis? Have you used this?
    2) What is meant by performance analysis? Have done anything to improve the performance?
    3) How to transfer the objects? Have to transferred any objects?
    4) How did you test the developed objects?
    5) What is the difference between SAP Memory and ABAP Memory?
    6) In order to upload Purchase order details, how you handle multiple values for a single field?
    Eg: Item field may contain no. of values for a record
    7) What is the procedure you followed to upload the data?
    8) How did you handle errors in Call Transaction?
    9) Among the Call Transaction and Session Method, which is faster?
    10) What are the difference between Interactive and Drill Down Reports?
    11) How to pass the variables to forms?
    12) How to create a link between modified form and modified print program?
    13) What is the table, which contain the details of all the name of the programs and forms?
    14) How did you test the form u developed? How did you taken print?
    15) What are Standard Texts?
    16) What is the difference between Clustered Tables and Pooled Tables?
    17) What is pf-status?
    18) Among "Move" and "Move Corresponding", which is efficient one?
    19) What are the output type and Tcodes?
    20) Where we use Chain and Endchain?
    21) Do you use select statement in loop endloop, how will be the performance? To improve the performance?
    22) In select-options, how to get the default values as current month first date and last date by default?
    Eg: 1/12/2004 and 31/12/2004
    Go thru these answers:
    1) What is runtime analysis? Have you used this?
    It's checks program execution time in microseconds. When you go to se30.if you give desired program name in performance file. It will take you to below screen. You can get how much past is your program.
    2) What is meant by performance analysis? Have done
    3) How to transfer the objects? Have you transferred any objects?
    4) How did you test the developed objects?
    I was testing a developed object. There are two types of testing
    - Negative testing
    - Positive testing
    In negative testing we will give negative data in input and we check any errors occurs.
    In positive testing we will give positive data in input for checking errors.
    8) How did you handle errors in Call Transaction?
    We can create a internal table like 'bsgmcgcoll'. All the messages will go to internal table. We can get errors in this internal table.
    Below messages are go to internal table. when you run the call transaction.
    - Message type
    - Message id
    - Message Number
    - Variable1
    - Variable2
    - Variable3
    9) Among the Call Transaction and Session Method, which is faster?
    Call transaction is faster then session method. But usually we use session method in real time...because we can transfer large amount of data from internal table to database and if any errors in a session. Process will not complete until session get correct.
    10) What are the difference between Interactive and Drill Down Reports?
    ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-COMMAND (pressing a button). You can use these events to move through layers of information about individual items in a list.
    Drill down report is nothing but interactive report...drilldown means above paragraph only.
    11) How to pass the variables to forms?
    12) What is the table, which contain the details of all the name of the programs and forms?
    Table contains vertical and horizontal lines. We can store the data in table as blocks. We can scroll depends upon your wish. And these all are stored in database (data dictionary).
    Which contain the details of all the name of the programs and forms? (I don't know).
    13) How did you test the form u developed? How did you taken print?
    14) What are Standard Texts?
    16) What is the difference between Clustered Tables and Pooled Tables?
    A pooled table is used to combine several logical tables in the ABAP/4 dictionary. Pooled tables are logical tables that must be assigned to a table pool when they are defined.
    Cluster table are logical tables that must be assigned to a table cluster when they are defined.
    Cluster table can be used to store control data they can also used to store temporary data or text such as documentation.
    17) What is pf-status?
    Pf status is used in interactive report for enhancing the functionality. If we go to se41, we can get menus, items and different function keys, which we are using for secondary list in interactive report.
    18) Among "Move" and "Move Corresponding", which is efficient one?
    I guess, 'move corresponding' is very efficient then 'move' statement. Because usually we use this stamtent for internal table fields only...so if we give move corresponding. Those fields only moving to other place (what ever you want).
    19) What are the output type and Tcodes?
    20) Where we use Chain and End chain?
    21) Do you use select statement in loop end loop, how will be the performance? To improve the performance?
    22) In select-options, how to get the default values as current month first date and last date by default?
    Eg: 1/12/2004 and 31/12/2004
    SAP ABAP interview questions
    Thanks to the reader who sent in this question set:
    1. What is an ABAP data dictionary?- ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.
    2. What are domains and data element?- Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.
    3. What is foreign key relationship?- A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.
    4. Describe data classes.- Master data: It is the data which is seldomly changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data:It is the data which R/3 system needs for itself.
    5. What are indexes?- Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form ease fast access to the field of the tables. In order that other fields are also read, a pointer to the associated record of the actual table are included in the index. Yhe indexes are activated along with the table and are created automatically with it in the database.
    6. Difference between transparent tables and pooled tables.- Transparent tables: Transparent tables in the dictionary has a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary has a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.
    7. What is an ABAP/4 Query?- ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists: For analytical reports. - For creating a ABAP/4 Query, programmer has to create user group and a functional group. Functional group can be created using with or without logical database table. Finally, assign user group to functional group. Finally, create a query on the functional group generated.
    8. What is BDC programming?- Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a automatic procedure referred to as BDC(Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into “sessions”.
    9. What are the functional modules used in sequence in BDC?- These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules. BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.
    10. What are internal tables?- Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
    11. What is ITS? What are the merits of ITS?- ITS is a Internet Transaction Server. ITS forms an interface between HTTP server and R/3 system, which converts screen provided data by the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be developed and tested in R/3 system. All transaction components, including those used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system. The advantage of automatic language processing in the R/3 system can be utilized to language-dependent HTML documents at runtime.
    12. What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.
    13. What are screen painter and menu painter?- Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of an ABAP/4 applications.
    14. What are the components of SAP scripts?- SAP scripts is a word processing tool of SAP which has the following components: Standard text. It is like a standard normal documents. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.
    15. What is ALV programming in ABAP? When is this grid used in ABAP?- ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
    16. What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.
    17. What is CTS and what do you know about it?- The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.
    18. What are logical databases? What are the advantages/ dis-advantages of logical databases?- To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic. dis advantages: i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)There is no ENDGET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).
    19. What is a batch input session?- BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
    20. How to upload data using CATT ?- These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.
    21. What is Smart Forms?- Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.
    22. How can I make a differentiation between dependent and independent data?- Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific, some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.
    23. What is the difference between macro and subroutine? - Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.
    Please check these links.
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://sap.ittoolbox.com/documents/document.asp?i=3240
    http://www.techinterviews.com/?p=198
    Reward points if useful
    Regards
    Anji

  • Error in FM DDIF_NAMETAB_GET when deleting BI objects via transport request

    Dear all,
    when importing a transport request in which several types of BI objects are deleted (Infocubes, DSO's, transformations, routines, DTP's, query elements, infosets, process chains). The import terminates only when transporting from acceptance to production with return code 12 due to an uncaught exception:
    Transporting from development to acceptance did not raise this exception.
    The ST22 dump (see below) refers in the "contents of system fields" section to a DSO, and to post-import activities. The DSO and the associated tables could not be found (rsa1 & se16), since they are deleted as desired.
    Some of the relevant notes that I have found do refer to DSO related problems, but they all indicate to install SP19 which we already have installed (BW 7.0 Patch Level 23)
    Could you please assist in pointing out potential solutions based on the information from the ST22 Runtime Error below?
    Kind regards,
    PJ
    Runtime Errors         UNCAUGHT_EXCEPTION
    Except.                CX_RS_PROGRAM_ERROR
    Date and Time          08.02.2011 10:48:14
    Short text
        An exception occurred that was not caught.
    What happened?
        The exception 'CX_RS_PROGRAM_ERROR' was raised, but it was not caught anywhere
        along the call hierarchy.
        Since exceptions represent error situations and this error was not
        adequately responded to, the running ABAP program
        'CL_RSDD_DS====================CP' has to be
        terminated.
    Error analysis
        An exception occurred which is explained in detail below.
        The exception, which is assigned to class 'CX_RS_PROGRAM_ERROR', was not caught
        and therefore caused a runtime error.
        The reason for the exception is:
        Error in BW: Error in DDIF_NAMETAB_GET
    How to correct the error
        If the error occurs in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "UNCAUGHT_EXCEPTION" "CX_RS_PROGRAM_ERROR"
        "CL_RSDD_DS====================CP" or "CL_RSDD_DS====================CM001"
        "APPEND_DS_TEC_FIELDS"
    System environment
        SAP-Release 700
        Application server... "dp1ci"
        Network address...... "<removed>"
        Operating system..... "HP-UX"
        Release.............. "B.11.23";
        Hardware type........ "ia64"
        Character length.... 16 Bits
        Pointer length....... 64 Bits
        Work process number.. 45
        Shortdump setting.... "full"
        Database server... "spisap02"
        Database type..... "ORACLE"
        Database name..... "DP1"
        Database user ID.. "SAPBIW"
        Terminal................. " "
        Char.set.... "C"
        SAP kernel....... 700
        created (date)... "Dec 14 2009 20:47:35"
        create on........ "HP-UX B.11.23 U ia64"
        Database version. "OCI_102 (10.2.0.1.0) "
        Patch level. 236
        Patch text.. " "
        Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*"
        SAP database version. 700
        Operating system..... "HP-UX B.11";
        Memory consumption
        Roll.... 5979936
        EM...... 0
        Heap.... 1459888
        Page.... 40960
        MM Used. 6988880
        MM Free. 415648
    User and Transaction
        Client.............. 000
        User................ "DDIC"
        Language key........ "E"
        Transaction......... " "
        Transactions ID..... "4D5111661004210BE10000000AFA2502"
        Program............. "CL_RSDD_DS====================CP"
        Screen.............. "SAPMSSY0 1000"
        Screen line......... 6
    Information on where terminated
        Termination occurred in the ABAP program "CL_RSDD_DS====================CP" -
         in "APPEND_DS_TEC_FIELDS".
        The main program was "RDDEXECU ".
        In the source code you have the termination point in line 61
        of the (Include) program "CL_RSDD_DS====================CM001".
        The program "CL_RSDD_DS====================CP" was started as a background job.
        Job Name....... "RDDEXECL"
        Job Initiator.. "DDIC"
        Job Number..... 10475900
    Source Code Extract
    Line  SourceCde
       31         RAISE EXCEPTION TYPE cx_rs_program_error
       32           EXPORTING
       33             text = 'Invalid DSO subtype'.                   "#EC NOTEXT
       34     ENDCASE.
       35
       36 *   get table name from DDIC
       37     CALL METHOD cl_rsd_odso=>get_tablnm
       38       EXPORTING
       39         i_odsobject = n_infoprov
       40         i_tabt      = l_tab
       41       IMPORTING
       42         e_tablnm    = l_tablnm
       43       EXCEPTIONS
       44         OTHERS      = 1.
       45
       46     IF sy-subrc <> 0.
       47       RAISE EXCEPTION TYPE cx_rs_program_error
       48         EXPORTING
       49           text = 'Error in CL_RSD_ODSO=>get_Tablnm'.        "#EC NOTEXT
       50     ENDIF.
       51
       52     CALL FUNCTION 'DDIF_NAMETAB_GET'
       53       EXPORTING
       54         tabname   = l_tablnm
       55       TABLES
       56         dfies_tab = l_t_comp
       57       EXCEPTIONS
       58         not_found = 1
       59         OTHERS    = 2.
       60     IF sy-subrc <> 0.
    >>>>>       RAISE EXCEPTION TYPE cx_rs_program_error
       62         EXPORTING
       63           text = 'Error in DDIF_NAMETAB_GET'.        "#EC NOTEXT
       64     ENDIF.
       65
       66
       67   ELSE.
       68 *   model table only needed for standard datastore objects, for
       69 *   write optimized DSOs target table is a changelog that is fully described by
       70 *   dta_pro (infoobjects)
       71     CHECK n_s_dta-odsotype = rsdod_c_type-standard.
       72
       73 *   get model table fields to add
       74     CALL METHOD cl_rsd_odso=>get_mod_tab
       75       IMPORTING
       76         e_mod_fld_ur = l_t_comp.
       77   ENDIF.
       78
       79 * according to T.B. ( 13.04.2007) the correct position is
       80 * not needed in the D version
    Contents of system fields
    Name     Val.
    SY-SUBRC 0
    SY-INDEX 0
    SY-TABIX 1
    SY-DBCNT 1
    SY-FDPOS 0
    SY-LSIND 0
    SY-PAGNO 0
    SY-LINNO 1
    SY-COLNO 1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE Execute Post-Import Methods and XPRAs for Transport Request
    SY-MSGTY E
    SY-MSGID DA
    SY-MSGNO 300
    SY-MSGV1 /BIC/AV_AMOFCB40
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    SY-MODNO 0
    SY-DATUM 20110208
    SY-UZEIT 104759
    SY-XPROG SAPLSYST
    SY-XFORM SYSTEM_HOOK_OPEN_DATASET

    Hi All
    We are also experiencing this same error when transporting deletions of multiple objects.
    Although the transport was cancelled in the destination system (production) it appears to have largely deleted all objects successfully except for DSOs.
    The DSOs still appear in the table RSDODSO (via SE11) but are not visible anywhere else.  When you try to view the DSO via RSDODS a warning appears saying "DataStore object to be deleted by transport -> delete only allowed".  If you try to delete them in this transaction the same ABAP runtime error as the transport appears.
    Any assistance would be greatly appreciated!
    Regards
    David

  • Unknown object in ABAP dictionary- TADIR^SRCDEP

    Hi,
    I found an entry in unknown object in ABAP dictionary while monitoring the system.
    This this the location I found this entry DBACOCKPIT-> Diagnostics-> missing table and indexes-> unknown object in ABAP dictionary.
    Could you please help to figure out how to solve this?
    Thanks in advance.
    Regards,
    Pradeep

    Hello,
    You can ignore the index TADIR^SRCDEP in transaction DB2.
    The installation creates the index TADIR^SRCDEP to avoid hanging
    situations on the database while executing reports. When the
    installation is finished you can delete this index.
    Drop the index TADIR^SRCDEP on the database:
        o  start SQL Server Management Studio
        o  connect to your SQL Server
        o  open a query window and execute the following command (replace
           SID by the uppercase system name, sid by the lowercase system
           name):
           drop index [TADIR^SRCDEP] on SID.sid.TADIR
    Best regards
      Clas

  • Empty Objectlist in ABAP Workbench (Trial version) after installation

    Hi,
    In ABAP Workbench/Object Navigator I (BCUSER) don't see the dropdown control (object list). The slot containing the objects is empty and disabled.
    The system state is after new installation of the Trial version without any problems or errors, no changes have been made.
    Any help is appreciated.
    regards
    Michael

    Hi Subhash,
    My version of SAPGUI (from DVD) is 640 and up to date. To be sure I downloaded the last version from sdn (Full ABAP edition trial, SAPGUI only). The installation wizard has detected, that I have the latest version installed.
    The SAP version is Netweaver 2004s 7.00 SP8 (from same DVD).
    Any other idea?
    thankyou very much!
    regards
    Michael

  • How to delete proxy Objects/structure in R/3

    Hi Experts,
    In my scenario i generated ABAP proxy. I want to delete that proxy now. I am selected the particular proxy and i deleted. but here only service interface only deleting. not deleting all objects like message type and data type and proxy generated objects are not deleting.
    While i am deleting it was allowing me to delete only root object. under root table structure and datatype/message type objects are not deleting. here even i deleted lock entrys also.
    Here my question is how to delete all proxy objects. please give me your valuable suggestions.
    thanks
    Srini

    refer this Problem in deleting Proxy Objects that talks about the same issue .

  • Lock the ABAP Workbench in EHP installation

    I'm installing the EHP5 for ERP, and in pre-processing phase witn EHPI installer, therefore i lock the ABAP workbench
    The installation guide say this:
    The installation program asks you in this phase to confirm the lock of the ABAP Workbench on all SAP instances. This lock is needed to prevent development objects (for example, ABAP reports, table definitions, and so on) from being changed during the installation process, since these modifications would be lost.
    You can continue to use your SAP system in production operation, even if you confirm that the ABAP Workbench can be locked. However, after you have confirmed the ABAP Workbench lock, no more transports can be made into or out of the SAP system.
    The installation program waits until the time you entered as the maximum synchronization time for all the instances has expired.
    I have some questions about that.
    1. I know that I can´t do transport from development system. But can I open the client and do manual modifications?(Urg3nt corrections). WilI I lost  these modifications after downtime?
    2. After finish the pre-processing phase, the installation ask for a full backup, but also give an option:
    Go productive Again
    What's the meaning of this option???  If I select Go productive Again, can I do transports again?
    If yes, I lost the installation process? and Must I restart the installation from beggining or the installation can be resumed re-starting the ehpi installer.
    I don't have very clear f I select Go productive Again what really happen and how to do urg3nt changes while the installation is running.

    Dear Manfred, Please find the reply to your queries
    1. I know that I can´t do transport from development system. But can I open the client and do manual modifications?(Urg3nt corrections). WilI I lost these modifications after downtime?
    Answer : You will loose modifications if you perform manual modifications after locking and the changes wont be available after downtime phase.
    2. After finish the pre-processing phase, the installation ask for a full backup, but also give an option:
    Go productive Again -
    Answer : This option is provided as a backout solution - this means this is the last stage/screen from where you can return to your current system(system before upgrade) - After passing this stage/screen system can be reverted back to previous stage from SAP level.
    What's the meaning of this option??? If I select Go productive Again, can I do transports again? -
    Answer : If you select go productiive again you system will be back to normal state as you started before EHPi.
    If yes, I lost the installation process? - Installation process as in you would need to build the shadow instance again with the pramaters provided.
    and Must I restart the installation from beggining or the installation can be resumed re-starting the ehpi installer. - Answer :  I would suggest re-set the installation process and remove EHPi instalaltion directories before starting the instalaltion again.
    Hope it helps.
    Regards, Amber S | AO

  • Object oriented abap

    hello abapers,
    am new to object oriented abap.cud u pls help me out in explaining me object oriented abap with examples.cud u also pls send me some links related to OO ABAP..
    explanation wid suitable examples will b rewarded higher pints.
    regards,
    praveen

    Hi,
    please find the below material with examples,
    reward points if helpful.
    Public attributes
    Public attributes are defined in the PUBLIC section and can be viewed and changed from outside the class. There is direct access to public attributes. As a general rule, as few public attributes should be defined as possible.
    PUBLIC SECTION.
      DATA: Counter type i.
    Private attributes
    Private attributes are defined in the PRIVATE section. The can only be viewes and changed from within the class. There is no direct access from outside the class.
    PRIVATE SECTION.
        DATA: name(25) TYPE c,
              planetype LIKE saplane-planetyp,
    Instance attributes
    There exist one instance attribute for each instance of the class, thus they exist seperately for each object. Instance attributes are declared with the DATA keyword.
    Static attributes
    Static attributes exist only once for each class. The data are the same for all instances of the class, and can be used e.g. for instance counters. Static attributes are defined with the keyword CLASS-DATA.
    PRIVATE SECTION.
      CLASS-DATA: counter type i,  
    Public methods
    Can called from outside the class
    PUBLIC SECTION.
      METHODS:  set_attributes IMPORTING p_name(25) TYPE c,
                                                                p_planetype LIKE saplane-planetyp,
    Private methods
    Can only be called from inside the class. They are placed in the PRIVATE section of the class.
    Constructor method
    Implicitly, each class has an instance constructor method with the reserved name constructor and a static constructor method with the reserved name class_constructor.
    The instance constructor is executed each time you create an object (instance) with the CREATE OBJECT statement, while the class constructor is executed exactly once before you first access a class.
    The constructors are always present. However, to implement a constructor you must declare it explicitly with the METHODS or CLASS-METHODS statements. An instance constructor can have IMPORTING parameters and exceptions. You must pass all non-optional parameters when creating an object. Static constructors have no parameters.
    Static constructor
    The static constructor is always called CLASS_CONSTRUCTER, and is called autmatically before the clas is first accessed, that is before any of the following actions are executed:
    •     Creating an instance using CREATE_OBJECT
    •     Adressing a static attribute using 
    •     Calling a ststic attribute using CALL METHOD
    •     Registering a static event handler
    •     Registering an evetm handler method for a static event
    The static constructor cannot be called explicitly.
    Protected components
    When we are talking subclassing and enheritance there is one more component than Public and Private, the Protected component. Protected components can be used by the superclass and all of the subclasses. Note that Subclasses cannot access Private components.
    Polymorphism
    Polymorphism: When the same method is implemented differently in different classes. This can be done using enheritance, by redefining a method from the superclass in subclasses and implement it differently.
    Template for making a class
    Delete the parts that should not be used
    Definition part
    CLASS xxx DEFINITION.
    Public section
      PUBLIC SECTION.
        TYPES:
        DATA:
      Static data
        CLASS-DATA:
      Methods
        METHODS:
        Using the constructor to initialize parameters
           constructor    IMPORTING xxx type yyy,
        Method with parameters
          mm1 IMPORTING iii   TYPE ttt.
        Method without parameters
          mm2.
      Static methods
        CLASS-METHODS: 
    Protected section. Also accessable by subclasses
      PROTECTED SECTION.
    Private section. Not accessable by subclasses
      PRIVATE SECTION.
    ENDCLASS.
    Implementation part
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
      ENDMETHOD.
      METHOD mm1.
      ENDMETHOD.
      METHOD mm2.
      ENDMETHOD.
    ENDCLASS.
    Template for calling a class
    Create reference to class lcl_airplane
    DATA: airplane1 TYPE REF TO lcl_airplane.
    START-OF-SELECTION.
    Create instance using parameters in the cosntructor method
      CREATE OBJECT airplane1 exporting im_name = 'Hansemand'
                                        im_planetype = 'Boing 747'.
    Calling a method with parameters
      CALL METHOD: airplane1->display_n_o_airplanes,
                   airplane1->display_attributes.
    Subclass
    CLASS xxx DEFINITION INHERITING FROM yyy.
    Using af class as a parameter for a method
    The class LCL_AIRPLANE is used as a parameter for method add_a_new_airplane:
    METHODS:
      add_a_new_airplane importing im_airplane TYPE REF to lcl_airplane.
    Interfaces
    In ABAP interfaces are implemented in addition to, and independently of classes. An interface only has a declaration part, and do not have visibillity sections. Components (Attributes, methods, constants, types) can be defined the same way as in classes.
    •     Interfaces are listed in the definition part lof the class, and must always be in the PUBLIC SECTION.
    •     Operations defined in the interface atre impemented as methods of the class. All methods of the interface must be present in the
    •     implementation part of the class.
    •     Attributes, events, constants and types defined in the interface are automatically available to the class carying out the implementation.
    •     Interface components are adresse in the class by ]
    Define, implement and use simple class
    ***INCLUDE ZBC404_HF_LCL_AIRPLANE .
    Definition part
    CLASS lcl_airplane DEFINITION.
    Public section
      PUBLIC SECTION.
        TYPES: t_name(25) TYPE c.
        METHODS:
          constructor,
          set_attributes IMPORTING p_name       TYPE t_name
                                   p_planetype  TYPE saplane-planetype,
          display_attributes,
          display_n_o_airplanes.
    Private section
      PRIVATE SECTION.
      Private attributes
        DATA: name(25) TYPE c,
              planetype TYPE saplane-planetype.
      Private static attribute
        CLASS-DATA n_o_airplanes TYPE i.
    ENDCLASS.
    Implementation part
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
      Counts number of instances
        n_o_airplanes = n_o_airplanes + 1.
      ENDMETHOD.
      METHOD set_attributes.
        name      = p_name.
        planetype = p_planetype.
      ENDMETHOD.
      METHOD display_attributes.
        WRITE:/ 'Name:', name, 'Planetype:', planetype.
      ENDMETHOD.
      METHOD display_n_o_airplanes.
        WRITE: / 'No. planes:', n_o_airplanes.
      ENDMETHOD.
    ENDCLASS.
    REPORT zbc404_hf_maintain_airplanes .
    INCLUDE zbc404_hf_lcl_airplane.
    Create reference to class lcl_airplane
    DATA: airplane1 TYPE REF TO lcl_airplane,
          airplane2 TYPE REF TO lcl_airplane.
    START-OF-SELECTION.
    Create instance
      CREATE OBJECT airplane1.
      CALL METHOD: airplane1->display_n_o_airplanes.
      CREATE OBJECT airplane2.
    Setting attributes using a method with parameters
      CALL METHOD airplane1->set_attributes EXPORTING p_name      = 'Kurt'
                                                      p_planetype = 'MD80'.
    END-OF-SELECTION.
    Using methods
      CALL METHOD: airplane1->display_n_o_airplanes,
                   airplane1->display_attributes. 
    The resulting report:
    Maintain airplanes                                                                               
    No. planes:          1                                
    No. planes:          2                                
    Name: Kurt                      Planetype: MD80       
    Use constructor to create an object with parameters
    CLASS lcl_airplane DEFINITION.
      PUBLIC SECTION.
        TYPES: t_name(25) TYPE c.
        METHODS:
          constructor    importing p2_name      type t_name
                                   p2_planetype  TYPE saplane-planetype,
    ..... more code .......
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
        name      = p2_name.
        planetype = p2_planetype.
    ..... more code .......
    START-OF-SELECTION.
      CREATE OBJECT airplane1 exporting p2_name = 'Hansemand'
                                        p2_planetype = 'Boing 747'.
    Subclassing
    This example uses a superclass LCL_AIRPLANE and subclasses it into LCL_PASSENGER_AIRPLANE and LCL_CARGO_PLANE.
    LCL_AIRPLANE has a method display_n_o_airplanes that displays the number of object instances.
    LCL_PASSENGER_AIRPLANE has the private instance attribute n_o_seats, and redefines the superclass method display_attributes, so it also displays n_o_seats.
    LCL_CARGO_PLANE has the private instance attribute cargomax, and redefines the superclass method display_attributes, so it also displays cargomax.
    All instance attributes are provided by the cunstructor method.
    Superclass LCL_AIRPLANE
    ***INCLUDE ZBC404_HF_LCL_AIRPLANE .
    Definition part
    CLASS lcl_airplane DEFINITION.
    Public section
      PUBLIC SECTION.
        TYPES: t_name(25) TYPE c.
        METHODS:
          constructor    IMPORTING im_name      TYPE t_name
                                   im_planetype  TYPE saplane-planetype,
          display_attributes.
      Static methods
        CLASS-METHODS:
          display_n_o_airplanes.
    Protected section
      PROTECTED SECTION.
      Private attributes
        DATA: name(25) TYPE c,
              planetype TYPE saplane-planetype.
      Private static attribute
        CLASS-DATA n_o_airplanes TYPE i.
    ENDCLASS.
    Implementation part
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
        name      = im_name.
        planetype = im_planetype.
      Counts number of instances
        n_o_airplanes = n_o_airplanes + 1.
      ENDMETHOD.
      METHOD display_attributes.
        WRITE:/ 'Name:', name, 'Planetype:', planetype.
      ENDMETHOD.
      METHOD display_n_o_airplanes.
        WRITE: / 'No. planes:', n_o_airplanes.
      ENDMETHOD.
    ENDCLASS.
    Sub class LCL_PASSENGER_AIRPLANE
    ***INCLUDE ZBC404_HF_LCL_PASSENGER_PLANE .
    This is a subclass of class lcl_airplane
    CLASS lcl_passenger_airplane DEFINITION INHERITING FROM lcl_airplane.
      PUBLIC SECTION.
      The constructor contains the parameters from the superclass
      plus the parameters from the subclass
        METHODS:
          constructor IMPORTING im_name      TYPE t_name
                                im_planetype TYPE saplane-planetype
                                im_n_o_seats TYPE sflight-seatsmax,
        Redefinition of superclass method display_attributes
          display_attributes REDEFINITION.
      PRIVATE SECTION.
        DATA: n_o_seats TYPE sflight-seatsmax.
    ENDCLASS.
    CLASS lcl_passenger_airplane IMPLEMENTATION.
      METHOD constructor.
      The constructor method of the superclass MUST be called withing the
      construtor
        CALL METHOD super->constructor
                              EXPORTING im_name      = im_name
                                        im_planetype = im_planetype.
        n_o_seats = im_n_o_seats.
      ENDMETHOD.
      The redefined  display_attributes method
      METHOD display_attributes.
        CALL METHOD super->display_attributes.
        WRITE: / 'No. seats:', n_o_seats.
      ENDMETHOD.
    ENDCLASS.
    Sub class LCL_CARGO_PLANE
    ***INCLUDE ZBC404_HF_LCL_CARGO_PLANE .
    This is a subclass of class lcl_airplane
    CLASS lcl_cargo_plane DEFINITION INHERITING FROM lcl_airplane.
      PUBLIC SECTION.
        METHODS:
        The constructor contains the parameters from the superclass
        plus the parameters from the subclass
          constructor IMPORTING im_name      TYPE t_name
                                im_planetype TYPE saplane-planetype
                                im_cargomax  type scplane-cargomax,
        Redefinition of superclass method display_attributes
          display_attributes REDEFINITION.
      PRIVATE SECTION.
        DATA:cargomax TYPE scplane-cargomax.
    ENDCLASS.
    CLASS lcl_cargo_plane IMPLEMENTATION.
      METHOD constructor.
      The constructor method of the superclass MUST be called withing the
      constructor
        CALL METHOD super->constructor
                              EXPORTING im_name      = im_name
                                        im_planetype = im_planetype.
        cargomax = im_cargomax.
      ENDMETHOD.
      METHOD display_attributes.
      The redefined  display_attributes method
        CALL METHOD super->display_attributes.
        WRITE: / 'Cargo max:', cargomax.
      ENDMETHOD.
    ENDCLASS.
    The Main program that uses the classes
    REPORT zbc404_hf_main .
    Super class
    INCLUDE zbc404_hf_lcl_airplane.
    Sub classes
    INCLUDE zbc404_hf_lcl_passenger_plane.
    INCLUDE zbc404_hf_lcl_cargo_plane.
    DATA:
    Type ref to sub classes. Note: It is not necesssary to make typeref to the superclass
      o_passenger_airplane TYPE REF TO lcl_passenger_airplane,
      o_cargo_plane        TYPE REF TO lcl_cargo_plane.
    START-OF-SELECTION.
    Display initial number of instances = 0
      CALL METHOD  lcl_airplane=>display_n_o_airplanes.
    Create objects
      CREATE OBJECT o_passenger_airplane
        EXPORTING
          im_name      = 'LH505'
          im_planetype = 'Boing 747'
          im_n_o_seats = 350.
      CREATE OBJECT o_cargo_plane
        EXPORTING
          im_name      = 'AR13'
          im_planetype = 'DC 3'
          im_cargomax = 35.
    Display attributes
      CALL METHOD o_passenger_airplane->display_attributes.
      CALL METHOD o_cargo_plane->display_attributes.
    Call static method display_n_o_airplanes
    Note: The syntax for calling a superclass method, differs from the syntax when calling a subclass method.
    When calling a superclass => must be used instead of ->
      CALL METHOD  lcl_airplane=>display_n_o_airplanes.
    Result:
    No. planes: 0
    Name: LH505 Planetype: Boing 747
    No. seats: 350
    Name: AR13 Planetype: DC 3
    Cargo max: 35,0000
    No. planes: 2
    Polymorphism
    Polymorphism: When the same method is implemented differently in different classes. This can be done using enheritance, by redefining a method from the superclass in subclasses and implement it differently.
    Classes:
    •     lcl_airplane Superclass
    •     lcl_cargo_airplane Subclass
    •     lcl_passenger_airplane Subclass
    The method estimate_fuel_consumption is implemented differently in the 3 classes, as it depends on the airplane type.
    Object from different classes are stored in an internal table (plane_list) consisting of references to the superclass, and the processed
    identically for all the classes.
    What coding for the estimate_fuel_consumption method taht is actually executed, depends on the dynamic type of the plane reference variable,
    that is, depends on which object plane points to.
    DATA: cargo_plane            TYPE REF to lcl_cargo_airplane,
              passenger_plane    TYPE REF to lcl_passenger_airplane,
              plane_list                  TYPE TABLE OF REF TO lcl_airplane.
    Creating the list of references
    CREATE OBJECT cargo_plane.
    APPEND cargo_plane to plane_list.
    CREATE OBJECT passenger_plane
    APPEND passenger_plane to plane list.
    Generic method for calucalting required fuel
    METHOD calculate required_fuel.
      DATA: plane TYPE REF TO lcl_airplane.
      LOOP AT plane_list INTO plane.
        re_fuel = re_fuel + plane->estimate_fuel_consumption( distance ).
      ENDLOOP.
    ENDMETHOD.
    Working example:
    This example assumes that the classes lcl_airplane,  lcl_passnger_airplane and lcl_cargo plane (Se Subcallsing)  exists.
    Create objects of type lcl_cargo_plane and lcl_passenger_airplane, adds them to a list in lcl_carrier, and displays the list. 
    *& Include  ZBC404_HF_LCL_CARRIER                                      *
          CLASS lcl_carrier DEFINITION                                   *
    CLASS lcl_carrier DEFINITION.
      PUBLIC SECTION.
        TYPES: BEGIN OF flight_list_type,
                  connid   TYPE sflight-connid,
                  fldate   TYPE sflight-fldate,
                  airplane TYPE REF TO lcl_airplane,
                  seatsocc TYPE sflight-seatsocc,
                  cargo(5) TYPE p DECIMALS 3,
               END OF flight_list_type.
        METHODS: constructor IMPORTING im_name TYPE string,
                 get_name RETURNING value(ex_name) TYPE string,
                 add_a_new_airplane IMPORTING
                                       im_airplane TYPE REF TO lcl_airplane,
        create_a_new_flight importing
                              im_connid   type sflight-connid
                              im_fldate   type sflight-fldate
                              im_airplane type ref to lcl_airplane
                              im_seatsocc type sflight-seatsocc
                                        optional
                            im_cargo    type p optional,
         display_airplanes.
      PRIVATE SECTION.
        DATA: name              TYPE string,
              list_of_airplanes TYPE TABLE OF REF TO lcl_airplane,
              list_of_flights   TYPE TABLE OF flight_list_type.
    ENDCLASS.
          CLASS lcl_carrier IMPLEMENTATION
    CLASS lcl_carrier IMPLEMENTATION.
      METHOD constructor.
        name = im_name.
      ENDMETHOD.
      METHOD get_name.
        ex_name = name.
      ENDMETHOD.
      METHOD create_a_new_flight.
        DATA: wa_list_of_flights TYPE flight_list_type.
        wa_list_of_flights-connid   = im_connid.
        wa_list_of_flights-fldate   = im_fldate.
        wa_list_of_flights-airplane = im_airplane.
        IF im_seatsocc IS INITIAL.
          wa_list_of_flights-cargo = im_cargo.
        ELSE.
          wa_list_of_flights-seatsocc = im_seatsocc.
        ENDIF.
        APPEND wa_list_of_flights TO list_of_flights.
      ENDMETHOD.
      METHOD add_a_new_airplane.
        APPEND im_airplane TO list_of_airplanes.
      ENDMETHOD.
      METHOD display_airplanes.
        DATA: l_airplane TYPE REF TO lcl_airplane.
        LOOP AT list_of_airplanes INTO l_airplane.
          CALL METHOD l_airplane->display_attributes.
        ENDLOOP.
      ENDMETHOD.
    ENDCLASS.
    REPORT zbc404_hf_main .
    This reprort uses class LCL_AIRPLNAE and subclasses
    LCL_CARGO_PLANE and LCL_PASSENGER_AIRPLANE and class LCL_CARRIER
    Super class for airplanes
    INCLUDE zbc404_hf_lcl_airplane.
    Sub classes for airplanes
    INCLUDE zbc404_hf_lcl_passenger_plane.
    INCLUDE zbc404_hf_lcl_cargo_plane.
    Carrier class
    INCLUDE zbc404_hf_lcl_carrier.
    DATA:
    Type ref to classes
      o_passenger_airplane  TYPE REF TO lcl_passenger_airplane,
      o_passenger_airplane2 TYPE REF TO lcl_passenger_airplane,
      o_cargo_plane         TYPE REF TO lcl_cargo_plane,
      o_cargo_plane2        TYPE REF TO lcl_cargo_plane,
      o_carrier             TYPE REF TO lcl_carrier.
    START-OF-SELECTION.
    Create objects
      CREATE OBJECT o_passenger_airplane
        EXPORTING
          im_name      = 'LH505'
          im_planetype = 'Boing 747'
          im_n_o_seats = 350.
      CREATE OBJECT o_passenger_airplane2
        EXPORTING
          im_name      = 'SK333'
          im_planetype = 'MD80'
          im_n_o_seats = 110.
      CREATE OBJECT o_cargo_plane
        EXPORTING
          im_name      = 'AR13'
          im_planetype = 'DC 3'
          im_cargomax = 35.
      CREATE OBJECT o_cargo_plane2
        EXPORTING
          im_name      = 'AFL124'
          im_planetype = 'Iljutsin 2'
          im_cargomax = 35000.
      CREATE OBJECT o_carrier
        EXPORTING im_name = 'Spritisch Airways'.
    Add passenger and cargo planes to the list of airplanes
      CALL METHOD o_carrier->add_a_new_airplane
         EXPORTING im_airplane = o_passenger_airplane.
      CALL METHOD o_carrier->add_a_new_airplane
         EXPORTING im_airplane = o_passenger_airplane2.
      CALL METHOD o_carrier->add_a_new_airplane
         EXPORTING im_airplane = o_cargo_plane.
      CALL METHOD o_carrier->add_a_new_airplane
         EXPORTING im_airplane = o_cargo_plane2.
    Display list of airplanes
      call method o_carrier->display_airplanes.
    Result:
    Name: LH505                     Planetype: Boing 747        
    No. seats:       350                                        
    Name: SK333                     Planetype: MD80             
    No. seats:       110                                        
    Name: AR13                      Planetype: DC 3             
    Cargo max:             35,0000                              
    Name: AFL124                    Planetype: Iljutsin 2       
    Cargo max:         35.000,0000                              
    Events
    Below is a simple example of how to implement an event.
    REPORT zbc404_hf_events_5.
          CLASS lcl_dog DEFINITION
    CLASS lcl_dog DEFINITION.
      PUBLIC SECTION.
      Declare events
        EVENTS:
          dog_is_hungry
            EXPORTING value(ex_time_since_last_meal) TYPE i.
        METHODS:
          constructor
              IMPORTING im_name TYPE string,
          set_time_since_last_meal
              IMPORTING im_time TYPE i,
          on_dog_is_hungry FOR EVENT dog_is_hungry OF lcl_dog
              IMPORTING ex_time_since_last_meal.
    ENDCLASS.
          CLASS lcl_dog IMPLEMENTATION
    CLASS lcl_dog IMPLEMENTATION.
      METHOD constructor.
        WRITE: / 'I am a dog and my name is', im_name.
      ENDMETHOD.
      METHOD set_time_since_last_meal.
        IF im_time < 4.
          SKIP 1.
          WRITE: / 'You fool, I am not hungry yet'.
        ELSE.
       Subsrcribe for event:
       set handler <Event handler method>
       FOR <ref_sender>!FOR ALL INSTANCES [ACTIVATION <var>]
          SET HANDLER on_dog_is_hungry FOR ALL INSTANCES ACTIVATION 'X'.
       Raise event
          RAISE EVENT dog_is_hungry
            EXPORTING ex_time_since_last_meal = im_time.
        ENDIF.
      ENDMETHOD.
      METHOD on_dog_is_hungry.
      Event method, called when the event dog_is_hungry is raised
        SKIP 1.
        WRITE: /  'You son of a *****. I have not eaten for more than',
                  ex_time_since_last_meal, ' hours'.
        WRITE: / 'Give me something to eat NOW!'.
      ENDMETHOD.
    ENDCLASS.
          R E P O R T
    DATA: o_dog1 TYPE REF TO lcl_dog.
    START-OF-SELECTION.
      CREATE OBJECT o_dog1 EXPORTING im_name = 'Beefeater'.
      CALL METHOD o_dog1->set_time_since_last_meal
        EXPORTING im_time = 2.
    This method call will raise the event dog_is_hungy
    because time > 3
      CALL METHOD o_dog1->set_time_since_last_meal
        EXPORTING im_time = 5.
    Result:
    I am a dog and my name is Beefeater
    You fool, I am not hungry yet
    You son of a *****. I have not eaten for more than 5 hours
    Give me something to eat NOW!
    1. Simple class
    This example shows how to create a simple employee class. The constructor method is used to initialize number and name of thje employee when the object is created. A display_employee method can be called to show the attributes of the employee, and CLASS-METHOD dosplay_no_of_employees can be called to show the total number of employees (Number of instances of the employee class).
    REPORT zbc404_hf_events_1.
    L C L _ E M P L O Y E E
    *---- LCL Employee - Definition
    CLASS lcl_employee DEFINITION.
      PUBLIC SECTION.
    The public section is accesible from outside  
        TYPES:
          BEGIN OF t_employee,
            no  TYPE i,
            name TYPE string,
         END OF t_employee.
        METHODS:
          constructor
            IMPORTING im_employee_no TYPE i
                      im_employee_name TYPE string,
          display_employee.
      Class methods are global for all instances      
        CLASS-METHODS: display_no_of_employees.
      PROTECTED SECTION.
    The protecetd section is accesible from the class and its subclasses 
      Class data are global for all instances      
        CLASS-DATA: g_no_of_employees TYPE i.
      PRIVATE SECTION.
    The private section is only accesible from within the classs 
        DATA: g_employee TYPE t_employee.
    ENDCLASS.
    *--- LCL Employee - Implementation
    CLASS lcl_employee IMPLEMENTATION.
      METHOD constructor.
        g_employee-no = im_employee_no.
        g_employee-name = im_employee_name.
        g_no_of_employees = g_no_of_employees + 1.
      ENDMETHOD.
      METHOD display_employee.
        WRITE:/ 'Employee', g_employee-no, g_employee-name.
      ENDMETHOD.
      METHOD display_no_of_employees.
        WRITE: / 'Number of employees is:', g_no_of_employees.
      ENDMETHOD.
    ENDCLASS.
    R E P O R T
    DATA: g_employee1 TYPE REF TO lcl_employee,
          g_employee2 TYPE REF TO lcl_employee.
    START-OF-SELECTION.
      CREATE OBJECT g_employee1
        EXPORTING im_employee_no = 1
                  im_employee_name = 'John Jones'.
      CREATE OBJECT g_employee2
        EXPORTING im_employee_no = 2
                  im_employee_name = 'Sally Summer'.
      CALL METHOD g_employee1->display_employee.
      CALL METHOD g_employee2->display_employee.
      CALL METHOD g_employee2->display_no_of_employees.
    2. Inheritance and polymorphism
    This example uses a superclass lcl_company_employees and two subclasses lcl_bluecollar_employee and lcl_whitecollar_employee to add employees to a list and then display a list of employees and there wages. The wages are calcukated in the method add_employee, but as the wages are calculated differently for blue collar employees and white collar emplyees, the superclass method add_employee is redeifined in the subclasses.
    Principles:
    Create super class LCL_CompanyEmployees.
    The class has the methods:
    •     Constructor
    •     Add_Employee - Adds a new employee to the list of employees
    •     Display_Employee_List - Displays all employees and there wage
    •     Display_no_of_employees - Displays total number of employees
    Note the use of CLASS-DATA to keep the list of employees and number of employees the same from instance to instance.
    Create subclasses lcl_bluecollar_employee and lcl_whitecollar_employee. The calsses are identical, except for the redifinition of the add_employee method, where the caclculation of wage is different.
    Methodes:
    •     Constructor. The constructor is used to initialize the attributes of the employee. Note that the constructor in the supclasss has to be called from within the constructor of the subclass.
    •     Add_Employee. This is a redinition of the same method in the superclass. In the redefined class the wage is calcuated, and the superclass method is called to add the employees to the emploee list.:
    The program
    REPORT zbc404_hf_events_2 .
    Super class LCL_CompanyEmployees
    CLASS lcl_company_employees DEFINITION.
      PUBLIC SECTION.
        TYPES:
          BEGIN OF t_employee,
            no  TYPE i,
            name TYPE string,
            wage TYPE i,
         END OF t_employee.
        METHODS:
          constructor,
          add_employee
            IMPORTING im_no   TYPE i
                      im_name TYPE string
                      im_wage TYPE i,
          display_employee_list,
          display_no_of_employees.
      PRIVATE SECTION.
        CLASS-DATA: i_employee_list TYPE TABLE OF t_employee,
                    no_of_employees TYPE i.
    ENDCLASS.
    *-- CLASS LCL_CompanyEmployees IMPLEMENTATION
    CLASS lcl_company_employees IMPLEMENTATION.
      METHOD constructor.
        no_of_employees = no_of_employees + 1.
      ENDMETHOD.
      METHOD add_employee.
      Adds a new employee to the list of employees
        DATA: l_employee TYPE t_employee.
        l_employee-no = im_no.
        l_employee-name = im_name.
        l_employee-wage = im_wage.
        APPEND l_employee TO i_employee_list.
      ENDMETHOD.
      METHOD display_employee_list.
      Displays all employees and there wage
        DATA: l_employee TYPE t_employee.
        WRITE: / 'List of Employees'.
        LOOP AT i_employee_list INTO l_employee.
          WRITE: / l_employee-no, l_employee-name, l_employee-wage.
        ENDLOOP.
      ENDMETHOD.
      METHOD display_no_of_employees.
      Displays total number of employees
        SKIP 3.
        WRITE: / 'Total number of employees:', no_of_employees.
      ENDMETHOD.
    ENDCLASS.
    Sub class LCL_BlueCollar_Employee
    CLASS lcl_bluecollar_employee DEFINITION
              INHERITING FROM lcl_company_employees.
      PUBLIC SECTION.
        METHODS:
            constructor
              IMPORTING im_no             TYPE i
                        im_name           TYPE string
                        im_hours          TYPE i
                        im_hourly_payment TYPE i,
             add_employee REDEFINITION.
      PRIVATE SECTION.
        DATA:no             TYPE i,
             name           TYPE string,
             hours          TYPE i,
             hourly_payment TYPE i.
    ENDCLASS.
    *---- CLASS LCL_BlueCollar_Employee IMPLEMENTATION
    CLASS lcl_bluecollar_employee IMPLEMENTATION.
      METHOD constructor.
      The superclass constructor method must be called from the subclass
      constructor method
        CALL METHOD super->constructor.
        no = im_no.
        name = im_name.
        hours = im_hours.
        hourly_payment = im_hourly_payment.
      ENDMETHOD.
      METHOD add_employee.
      Calculate wage an call the superclass method add_employee to add
      the employee to the employee list
        DATA: l_wage TYPE i.
        l_wage = hours * hourly_payment.
        CALL METHOD super->add_employee
          EXPORTING im_no = no
                    im_name = name
                    im_wage = l_wage.
      ENDMETHOD.
    ENDCLASS.
    Sub class LCL_WhiteCollar_Employee
    CLASS lcl_whitecollar_employee DEFINITION
        INHERITING FROM lcl_company_employees.
      PUBLIC SECTION.
        METHODS:
            constructor
              IMPORTING im_no                 TYPE i
                        im_name               TYPE string
                        im_monthly_salary     TYPE i
                        im_monthly_deductions TYPE i,
             add_employee REDEFINITION.
      PRIVATE SECTION.
        DATA:
          no                    TYPE i,
          name                  TYPE string,
          monthly_salary        TYPE i,
          monthly_deductions    TYPE i.
    ENDCLASS.
    *---- CLASS LCL_WhiteCollar_Employee IMPLEMENTATION
    CLASS lcl_whitecollar_employee IMPLEMENTATION.
      METHOD constructor.
      The superclass constructor method must be called from the subclass
      constructor method
        CALL METHOD super->constructor.
        no = im_no.
        name = im_name.
        monthly_salary = im_monthly_salary.
        monthly_deductions = im_monthly_deductions.
      ENDMETHOD.
      METHOD add_employee.
      Calculate wage an call the superclass method add_employee to add
      the employee to the employee list
        DATA: l_wage TYPE i.
        l_wage = monthly_salary - monthly_deductions.
        CALL METHOD super->add_employee
          EXPORTING im_no = no
                    im_name = name
                    im_wage = l_wage.
      ENDMETHOD.
    ENDCLASS.
    R E P O R T
    DATA:
    Object references
      o_bluecollar_employee1  TYPE REF TO lcl_bluecollar_employee,
      o_whitecollar_employee1 TYPE REF TO lcl_whitecollar_employee.
    START-OF-SELECTION.
    Create bluecollar employee obeject
      CREATE OBJECT o_bluecollar_employee1
          EXPORTING im_no  = 1
                    im_name  = 'Gylle Karen'
                    im_hours = 38
                    im_hourly_payment = 75.
    Add bluecollar employee to employee list
      CALL METHOD o_bluecollar_employee1->add_employee
          EXPORTING im_no  = 1
                    im_name  = 'Gylle Karen'
                    im_wage = 0.
    Create whitecollar employee obeject
      CREATE OBJECT o_whitecollar_employee1
          EXPORTING im_no  = 2
                    im_name  = 'John Dickens'
                    im_monthly_salary = 10000
                    im_monthly_deductions = 2500.
    Add bluecollar employee to employee list
      CALL METHOD o_whitecollar_employee1->add_employee
          EXPORTING im_no  = 1
                    im_name  = 'Karen Johnson'
                    im_wage = 0.
    Display employee list and number of employees. Note that the result
    will be the same when called from o_whitecollar_employee1 or
    o_bluecolarcollar_employee1, because the methods are defined
    as static (CLASS-METHODS)
      CALL METHOD o_whitecollar_employee1->display_employee_list.
      CALL METHOD o_whitecollar_employee1->display_no_of_employees.
    The resulting report
    List of Employees
    1 Karen Johnson 2.850
    2 John Dickens 7.500
    Total number of employees: 2
    3. Interfaces
    This example is similiar to th eprevious example, however an interface is implemented with the method add_employee. Note that the interface is only implemented in the superclass ( The INTERFACE stament), but also used in the subclasses.
    The interface in the example only contains a method, but an iterface can also contain attrbutes, constants, types and alias names.
    The output from example 3 is similiar to the output in example 2.
    All changes in the program compared to example 2 are marked with red.
    REPORT zbc404_hf_events_3 .
          INTERFACE lif_employee
    INTERFACE lif_employee.
      METHODS:
        add_employee
           IMPORTING im_no   TYPE i
                      im_name TYPE string
                      im_wage TYPE i.
    ENDINTERFACE.
    Super class LCL_CompanyEmployees
    CLASS lcl_company_employees DEFINITION.
      PUBLIC SECTION.
        INTERFACES lif_employee.
        TYPES:
          BEGIN OF t_employee,
            no  TYPE i,
            name TYPE string,
            wage TYPE i,
         END OF t_employee.
        METHODS:
          constructor,
         add_employee      "Removed
            IMPORTING im_no   TYPE i
                      im_name TYPE string
                      im_wage TYPE i,
          display_employee_list,
          display_no_of_employees.
      PRIVATE SECTION.
        CLASS-DATA: i_employee_list TYPE TABLE OF t_employee,
                    no_of_employees TYPE i.
    ENDCLASS.
    *-- CLASS LCL_CompanyEmployees IMPLEMENTATION
    CLASS lcl_company_employees IMPLEMENTATION.
      METHOD constructor.
        no_of_employees = no_of_employees + 1.
      ENDMETHOD.
      METHOD lif_employee~add_employee.
      Adds a new employee to the list of employees
        DATA: l_employee TYPE t_employee.
        l_employee-no = im_no.
        l_employee-name = im_name.
        l_employee-wage = im_wage.
        APPEND l_employee TO i_employee_list.
      ENDMETHOD.
      METHOD display_employee_list.
      Displays all employees and there wage
        DATA: l_employee TYPE t_employee.
        WRITE: / 'List of Employees'.
        LOOP AT i_employee_list INTO l_employee.
          WRITE: / l_employee-no, l_employee-name, l_employee-wage.
        ENDLOOP.
      ENDMETHOD.
      METHOD display_no_of_employees.
      Displays total number of employees
        SKIP 3.
        WRITE: / 'Total number of employees:', no_of_employees.
      ENDMETHOD.
    ENDCLASS.
    Sub class LCL_BlueCollar_Employee
    CLASS lcl_bluecollar_employee DEFINITION
              INHERITING FROM lcl_company_employees.
      PUBLIC SECTION.
        METHODS:
            constructor
              IMPORTING im_no             TYPE i
                        im_name           TYPE string
                        im_hours          TYPE i
                        im_hourly_payment TYPE i,
             lif_employee~add_employee REDEFINITION..
      PRIVATE SECTION.
        DATA:no             TYPE i,
             name           TYPE string,
             hours          TYPE i,
             hourly_payment TYPE i.
    ENDCLASS.
    *---- CLASS LCL_BlueCollar_Employee IMPLEMENTATION
    CLASS lcl_bluecollar_employee IMPLEMENTATION.
      METHOD constructor.
      The superclass constructor method must be called from the subclass
      constructor method
        CALL METHOD super->constructor.
        no = im_no.
        name = im_name.
        hours = im_hours.
        hourly_payment = im_hourly_payment.
      ENDMETHOD.
      METHOD lif_employee~add_employee.
      Calculate wage an call the superclass method add_employee to add
      the employee to the employee list
        DATA: l_wage TYPE i.
        l_wage = hours * hourly_payment.
        CALL METHOD super->lif_employee~add_employee
          EXPORTING im_no = no
                    im_name = name
                    im_wage = l_wage.
      ENDMETHOD.
    ENDCLASS.
    Sub class LCL_WhiteCollar_Employee
    CLASS lcl_whitecollar_employee DEFINITION
        INHERITING FROM lcl_company_employees.
      PUBLIC SECTION.
        METHODS:
            constructor
              IMPORTING im_no                 TYPE i
                        im_name               TYPE string
                        im_monthly_salary     TYPE i
                        im_monthly_deductions TYPE i,
             lif_employee~add_employee REDEFINITION.
      PRIVATE SECTION.
        DATA:
          no                    TYPE i,
          name                  TYPE string,
          monthly_salary        TYPE i,
          monthly_deductions    TYPE i.
    ENDCLASS.
    *---- CLASS LCL_WhiteCollar_Employee IMPLEMENTATION
    CLASS lcl_whitecollar_employee IMPLEMENTATION.
      METHOD constructor.
      The superclass constructor method must be called from the subclass
      constructor method
        CALL METHOD super->constructor.
        no = im_no.
        name = im_name.
        monthly_salary = im_monthly_salary.
        monthly_deductions = im_monthly_deductions.
      ENDMETHOD.
      METHOD lif_employee~add_employee.
      Calculate wage an call the superclass method add_employee to add
      the employee to the employee list
        DATA: l_wage TYPE i.
        l_wage = monthly_salary - monthly_deductions.
        CALL METHOD super->lif_employee~add_employee
          EXPORTING im_no = no
                    im_name = name
                    im_wage = l_wage.
      ENDMETHOD.
    ENDCLASS.
    R E P O R T
    DATA:
    Object references
      o_bluecollar_employee1  TYPE REF TO lcl_bluecollar_employee,
      o_whitecollar_employee1 TYPE REF TO lcl_whitecollar_employee.
    START-OF-SELECTION.
    Create bluecollar employee obeject
      CREATE OBJECT o_bluecollar_employee1
          EXPORTING im_no  = 1
                    im_name  = 'Gylle Karen'
                    im_hours = 38
                    im_hourly_payment = 75.
    Add bluecollar employee to employee list
      CALL METHOD o_bluecollar_employee1->lif_employee~add_employee
          EXPORTING im_no  = 1
                    im_name  = 'Karen Johnson'
                    im_wage = 0.
    Create whitecollar employee obeject
      CREATE OBJECT o_whitecollar_employee1
          EXPORTING im_no  = 2
                    im_name  = 'John Dickens'
                    im_monthly_salary = 10000
                    im_monthly_deductions = 2500.
    Add bluecollar employee to employee list
      CALL METHOD o_whitecollar_employee1->lif_employee~add_employee
          EXPORTING im_no  = 1
                    im_name  = 'Gylle Karen'
                    im_wage = 0.
    Display employee list and number of employees. Note that the result
    will be the same when called from o_whitecollar_employee1 or
    o_bluecolarcollar_employee1, because the methods are defined
    as static (CLASS-METHODS)
      CALL METHOD o_whitecollar_employee1->display_employee_list.
      CALL METHOD o_whitecollar_employee1->display_no_of_employees.
    4. Events
    This is the same example as example 4. All changes are marked with red. There have been no canges to the subclasses, only to the superclass and the report, sp the code for th esubclasses is not shown.
    For a simple example refer to Events in Examples.
    REPORT zbc404_hf_events_4 .
          INTERFACE lif_employee
    INTERFACE lif_employee.
      METHODS:
        add_employee
           IMPORTING im_no   TYPE i
                      im_name TYPE string
                      im_wage TYPE i.
    ENDINTERFACE.
    Super class LCL_CompanyEmployees
    CLASS lcl_company_employees DEFINITION.
      PUBLIC SECTION.
        TYPES:
        BEGIN OF t_employee,
          no  TYPE i,
          name TYPE string,
          wage TYPE i,
       END OF t_employee.
      Declare event. Note that declaration could also be placed in the
      interface

  • Netweaver, Objectlist in ABAP Workbench empty

    Hi,
    In ABAP Workbench/Object Navigator I (BCUSER) don't see the dropdown control (object list). The slot containing the objects is empty and diabled.
    The system state is after new installation of the Trial version without any problems or errors, no changes have been made.
    Any help is appreciated.
    regards
    Michael

    Hi Michael,
    I'm afraid you've posted in the wrong forum, I don't think we can help you with your issue.
    If not already done, please try to find a more suited forum, possibly a forum which is more directly involved with your Netweaver release version.
    Regards,
    Roland

  • Debugging a Module Pool Program(Object Oriented ABAP)

    Hello Experts,
    Could you please advise me on an efficient debugging technoque of Module Pool Program which is based on Object Oriented ABAP?

    Hi
    Debugging Module pool program using ABAP objects is same as debugging any other report/module pool program.
    Click on the Create shortcut icon on the toolbar.
    In the popup window choose "System command" and in the command enter "/h"
    A shortcut on the desktop would be created
    Drag and drop the shortcut to the modal window to set debugging on.
    Approach 2:
    Create a txt file on the desktop with the following lines:
    [FUNCTION]
    Command=/H
    Title=Debugger
    Type=SystemCommandDrag and drop this file to the modal window to set debugging on.
    How do I switch between the Classic and New Debugger
    From within the ABAP workbench, select the Utilities->Settings Menu
    Select the ABAP Editor Tab
    Select the Debugging tab within the ABAP Editor Tab
    Select the Classic Debugger or New Debugger radio button
    Refer to this thread
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    Debugging
    Check these documents.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_nw04/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    ABAP Debugging
    http://www.saplinks.net/index.php?option=com_content&task=view&id=24&Itemid=34
    Look at the SAP help link below
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    Reward points if useful
    Regards
    Anji

  • Change Javascript Files in Abap Workbench

    Hi,
    I'm currently creating some javascript ui5 applications, which are running in an ABAP System. All works fine. Now I have to change something in the javascript coding which is currently displayed as a mine object in the System.
    To change something an external editor (Textpad) is opened. Is there a way to open the document directly in the SAP GUI?
    I found this thread where Emil created something like this.
    How to integrate custom tool in Abap Workbench(se80)?
    Does someone has an idea?
    Thx

    If all you want is use of the text-based change of the files, maybe you could ignore se80 (I believe that could be just too much). You could try creating an own transaction to do all this (with some enjoy controls, like the tree for the projects / files hierarchy, textedit for the code itself).
    Using this approach you would not need to handle special situations witth the status buttons of the screen in the environment and everything could be set-up easily in customer transaction.

  • IDES ABAP Workbench and access key

    Hi everyone,
    I am new to SAP, please Help.
    1. How i can use OSS ID.
    2. I installed 4.6B IDES, but ABAP - Workbench is not
       accessable.
    3. How i can get Access Key for ABAP Workbench.
    Thanks in Advance
    Shareef

    Hi,
    If you have OSS ID, you can use it to logon to service.sap.com where you have all kinds of support and help services available. That is where you use it.
    ABAP workbench will be accessible if you have authorization. I think you mean to say you are not able to create/change objects. For this you will have to register your userid as developer (again at service.sap.com) and that will give you the developer access key that you can then use.
    If you are changing any SAP object, you will need to get the corresponding key from OSS.
    If you do not have OSS logon, then you can forget about it (well, not strictly so, but that is the official 'truth'.).
    cheers,
    Ajay

  • APIs for SE80 / ABAP WORKBENCH

    Hi,
    I need to connect an external software to the ABAP Workbench (SE80). So, are there any APIs providing at least read-only access to the ABAP Workbench objects like packages, function groups, function modules...?
    Many thanks,
    Konrad

    Thanks
    > C160_EDITOR_CALL_FOR_REPORT
    ok...
    > EDITOR_CALL
    Do you know how to use it? I provided an existing FM as input parameter and the result was an empty line with line number 1 and I was not able to get back (I had to close the window).
    > G_RW_PROGRAM_EDITOR
    Not sure how to use it either. I_REPORT_GROUP is mandatory and I do not know what to enter here...
    Anyway, I was more looking for a functionality without GUI to read all existing objects and pass them to the external software.
    Thanks,
    Konrad

Maybe you are looking for

  • Rendering service by providing material to vendor

    Hi, I need to render service with reference of project for Painting of building , In this case I am providing all the material required for painting and POP to vendor, please suggest me how to create a service PO by specifying the details of material

  • HttpServletRequest content returning to the browser

    I�m implementing a test servlet, which receives a file upload POST... I�m trying to get the string received by the HttpServletRequest and then return it as html to the browser.. I need it to watch the post structure my form is sending to the servlet.

  • TS3694 getting error message 3194 when trying to restore iPhone

    Trying to restore iPhone after iOS7 failure and getting 3194 as error message. Any ideas please?

  • User account available hard drive space

    I have multiple computers in an office of 20+ that are used for rotating student interns. I have a user account set up for each student, 2 on any one machine. The issue is that an individual user only has roughly 8.5 gb available for hard drive space

  • Itunes crash then reopen with only half of library!

    i was about to check the itunes store in germany to see if a new album was released here, yet!  itunes closed!  then up came the window to reopen, and it took forever.  when it finally opened, half of my library was gone, including cd's i purchased a