Abap OOP Question

Dear Experts!
Generally how can I use this method correctly?
Interface IF_WD_SELECT_OPTIONS has a method named ADD_SELECTION_FIELD.
Especially the import Parameter I_VALUE_HELP_TYPE is the most interesting one for me.
Because I need a special type : CO_VH_TYPE_CLOCK .
data ztest type ref to IF_WD_SELECT_OPTIONS.
create object ztest.
CALL METHOD ztest->add_selection_field
  EXPORTING
     i_id                         = 'BUKRS'
     i_value_help_type            = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK .
Please help me I dont know how to solve this requirement.
regards
sa

max it is very easy.
instead
data ztest type ref to CL_WDR_SELECT_OPTIONS.
data: i_value_help_type type string.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
  EXPORTING
    i_id              = 'BUKRS'
    i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE.
this
data ztest type ref to CL_WDR_SELECT_OPTIONS.
data: i_value_help_type type string.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
  EXPORTING
     i_id                         = 'BUKRS'
     i_value_help_type            = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK
to sum up:
no CO_PREFIX_NONE
but CO_VH_TYPE_CLOCK
OK????

Similar Messages

  • Regarding ABAP interveiw question

    HI experts,
    Will u tell send me ABAP interview question which can help to prepare for getting job in abap.
    will you send me some guidelines that how to prepare for abap interview.
    Thanks
    Raman

    Hi
    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
    INTERVIEW
    http://www.4futureengineers.com/tests/abaptest.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://www.techinterviews.com/?p=198
    http://www.techinterviews.com/?p=326
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.allinterview.com/Interview-Questions/ABAP.html
    Start with this.Refer this
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Reports
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    Debugging Document.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    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
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    alv
    http://www.sap-img.com/abap/important-abap-faq.htm
    http://wiki.ittoolbox.com/index.php/FAQ:How_do_I_insert_a_logo_in_ALV_using_Function_Modules%3F
    http://www.sap-img.com/abap/what-is-alv-programming.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Remote Function Call:
    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
    RFCs manage the communication process, parameter transfer and error handling.
    http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/sap

  • ABAP  OOP example and invitation

    For quite a while, I've been trying to learn more about ABAP OOP. But, I've
    found many of the examples on the web, and in SAP provided articles, either
    difficult to understand or outright lame. They never seemed to illustrate
    much of what a staff ABAP programmer is called upon to do.
    So, last week I decided to take the problem head on and see if I could come
    up with something we all could use as a starting point to learn more about
    ABAP objects.
    Here's a chunk of code that I want everybody to pick apart, critique,
    modify, append or whatever. The only stipulation is that you post your
    suggestions back to this forum. Maybe after we get some nice ABAP objects
    together, the forum manager can put them into an OOP area of this website.
    ================================================================
    The first object I created uses the MARC (Plant Data for Material) table.
    I wanted to use it to learn more about how "Selection Sets" can be used with
    ABAP OOP.
    The class has five methods:
    -o- constructor
    -o- return_marc_table
    -o- return_subset_marc_table
    -o- length
    -o- write_marc_table
    This class isn't, really, very useful. But, it does show how selection-sets
    can be used with ABAP oop. The code is studded with commented BREAK-POINTS
    that you can turn on and off to examine things.
    Split the code into two files: Main program and Top include. Look at the
    initialization section and you should be able to see how you can tweak
    the materials selected for your environment.
    enjoy
    [email protected]
    REPORT zejb_oop_sel_set2 .
    This program is designed to demonstrate passing selection sets
    to an ABAP object
    The program has some educational value. But, other than that
    probably isn't of much use.
    =========================================== Main Program - BEGIN
    INCLUDE zejb_oop_sel_set2_top.      "data and class definitions
    SELECT-OPTIONS:
      s_matnr FOR marc-matnr,
      s_werks FOR marc-werks.
    DATA: my_marc TYPE REF TO marc_object .
    ============================================= START-OF-SELECTION
    START-OF-SELECTION.
      matnr_selector[] = s_matnr[] .
      werks_selector[] = s_werks[].
    call the constructor table and create the CLASS-DATA
      CREATE OBJECT my_marc
        EXPORTING
          s_matnr  = matnr_selector
          s_werks  = werks_selector .
    ================================================ END-OF-SELECTION
    END-OF-SELECTION.
      CALL METHOD my_marc->return_marc_table
        IMPORTING
          return_marc = tb_marc.
    BREAK-POINT. " inspect tb_marc
      CALL METHOD my_marc->length
        IMPORTING
          table_size = zzlines.
      WRITE:/ 'Class-Data table in object my_marc has '
               , zzlines , ' lines'.
      ULINE.
      WRITE:/ 'printing internal table tb_marc'.
      CALL METHOD my_marc->write_marc_table
        EXPORTING
          print_table = tb_marc.
      SKIP.
    BREAK-POINT.
      examine matnr_subset_selector
      examine werks_subset_selector
      CALL METHOD my_marc->return_subset_marc_table
        EXPORTING
          s_matnr     = matnr_subset_selector
          s_werks     = werks_subset_selector
        IMPORTING
          return_marc = tb_subset_marc.
    BREAK-POINT.
      examine tb_subset_marc
      ULINE.
      WRITE:/ 'printing internal table tb_subset_marc'.
      CALL METHOD my_marc->write_marc_table
        EXPORTING
          print_table = tb_subset_marc.
      ULINE.
    ================================================== INITIALIZATION
    INITIALIZATION.
      DEFINE range_append.                                      "#EC *
    1 == range_name
        clear &1.                                               "#EC *
        &1-sign = &2.                                           "#EC *
        &1-option = &3.                                         "#EC *
        &1-low = &4.                                            "#EC *
        &1-high = &5.                                           "#EC *
        append &1. clear &1.                                    "#EC *
      END-OF-DEFINITION.                                        "#EC *
      DEFINE fill_range.                                        "#EC *
    1 == range_name
        clear &1.                                               "#EC *
        &1-sign = &2.                                           "#EC *
        &1-option = &3.                                         "#EC *
        &1-low = &4.                                            "#EC *
        &1-high = &5.                                           "#EC *
      END-OF-DEFINITION.                                        "#EC *
    modify these materials and plants to suit your environment
    or create a selection variant
      range_append s_matnr 'I' 'EQ' 'HAP100' space.
      range_append s_matnr 'I' 'EQ' 'HAP205' space.
      range_append s_matnr 'I' 'EQ' 'HAP221' space.
      range_append s_matnr 'I' 'EQ' 'HAP240' space.
      range_append s_matnr 'I' 'EQ' 'HAP245' space.
      range_append s_matnr 'I' 'EQ' 'HAP250' space.
      range_append s_matnr 'I' 'EQ' 'HAP260' space.
      range_append s_werks 'I' 'EQ' '1000' space.
      range_append s_werks 'I' 'EQ' '1020' space.
    fill subset selector
      fill_range st_matnr_selector 'I' 'EQ' 'HAP205' space.
      APPEND st_matnr_selector TO matnr_subset_selector.
      fill_range st_matnr_selector 'I' 'EQ' 'HAP250' space.
      APPEND st_matnr_selector TO matnr_subset_selector.
      fill_range st_werks_selector 'I' 'EQ' '1000' space.
      APPEND st_werks_selector TO werks_subset_selector.
    ============================================ Main Program - End
    *&  Include           ZEJB_OOP_SEL_SET2_TOP                       *
    ============================================ Top include - BEGIN
    TABLES : marc.
    DATA: tb_marc TYPE TABLE OF marc,
          tb_subset_marc TYPE TABLE OF marc,
          st_marc TYPE marc.                                    "#EC *
    "^^^^^^^ to/from structure. use as needed
    DATA: st_matnr_selector TYPE range_s_matnr,
    st_werks_selector TYPE range_werks,
    matnr_selector TYPE TABLE OF range_s_matnr,
    werks_selector TYPE TABLE OF range_werks,
    matnr_subset_selector TYPE TABLE OF range_s_matnr,
    werks_subset_selector TYPE TABLE OF range_werks.
    DATA: zzlines TYPE i. " size of class_data table.
          CLASS marc_object DEFINITION
    NOTE: for those new to abap objects, EVERYTHING in abap OOP
          must be explicitly "TYPED". more on this as I go along
    CLASS marc_object DEFINITION.
      PUBLIC SECTION.
        TYPES:
          typ_marc TYPE TABLE OF marc,
          typ_matnr_selector TYPE TABLE OF range_s_matnr,
          typ_werks_selector TYPE TABLE OF range_werks.
        DATA: return_marc TYPE typ_marc,
              print_table TYPE typ_marc.
        CLASS-DATA:
          class_marc
            TYPE typ_marc. " <== inside public area
        ^^^^^^^ this table will be available to all methods
        ^^^^^^^ in the class
        METHODS:
          constructor
            IMPORTING
              s_matnr  TYPE typ_matnr_selector
              s_werks  TYPE typ_werks_selector OPTIONAL ,
          return_marc_table
            EXPORTING return_marc TYPE typ_marc ,
          return_subset_marc_table
            IMPORTING
              s_matnr  TYPE typ_matnr_selector
              s_werks  TYPE typ_werks_selector OPTIONAL
            EXPORTING
              return_marc TYPE typ_marc,
          length EXPORTING table_size TYPE i,
          write_marc_table
            IMPORTING print_table TYPE typ_marc.
      PROTECTED SECTION.
      PRIVATE SECTION.
    ENDCLASS.                    "marc_object DEFINITION
    *EJECT
          CLASS zget_sales_order_change IMPLEMENTATION
    CLASS marc_object IMPLEMENTATION.
      METHOD constructor .
        DATA:
          s_lcl_matnr TYPE TABLE OF  range_s_matnr ,
          s_lcl_werks TYPE TABLE OF  range_werks .
        s_lcl_matnr[] = s_matnr[] .
        s_lcl_werks[] = s_werks[] .
        SELECT * FROM marc
          APPENDING TABLE class_marc
          WHERE matnr IN s_lcl_matnr
            AND werks IN s_lcl_werks.
        SORT class_marc BY matnr werks.
       BREAK-POINT.
      ENDMETHOD.                    "xxx
      METHOD return_marc_table.
        return_marc[] = class_marc[] .
       BREAK-POINT. " examine class_marc
      ENDMETHOD.                    "return_marc table
      METHOD        return_subset_marc_table.
        DATA: st_marc TYPE marc.
        REFRESH return_marc.
        LOOP AT class_marc INTO st_marc
          WHERE matnr IN s_matnr
            AND werks IN s_werks  .
          APPEND st_marc TO return_marc.
        ENDLOOP.
       BREAK-POINT. " examine return_marc
      ENDMETHOD.                    "return_subset_marc_table
      METHOD length.
        DESCRIBE TABLE class_marc LINES  table_size.
      ENDMETHOD.                    "length
      METHOD write_marc_table.
        DATA: st_marc TYPE marc.
        LOOP AT print_table INTO st_marc.
          WRITE:/ 'Material ' , st_marc-matnr,
          'Plant ' , st_marc-werks.
        ENDLOOP.
      ENDMETHOD.                    "write_marc_table
    ENDCLASS.                    "marc_object IMPLEMENTATION
    ============================================== Top include - END

    Search using " ALV Factory methods" u'll get lots of material.
    for instance u can a look at this wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap%2b-%2bdeveloping%2binteractive%2balv%2breport%2busing%2booabap
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/community/object%2bmodel%2balv%2b-%2binteractive
    [ALVOO PDF|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]

  • Scrolling Issue - ALV- ABAP OOPS!

    Hello All,
    I have a strange issue with regards to ALV developed using ABAP OOPS. I have more than 25 fields on the output screen.
    For each field on output screen, F4 help is possible. So when I scroll to the right most fields on the screen, do a f4 help and fill the value, the alv output screen automatically moves to the left side.
    I tried to resolve using SET_SCROLL_INFO_VIA_ID method of the class CL_GUI_ALV_GRID.
    CALL METHOD g_alvgrid->set_scroll_info_via_id
        EXPORTING
          is_row_info = v_scrl_row_info
          is_col_info = v_scrl_col_info.
    * Set Scroll Position
      CALL METHOD g_alvgrid->set_current_cell_via_id
        EXPORTING
          is_row_id    = v_scrl_row_set
          is_column_id = v_scrl_col_set.
    But still moves to the left side.
    If you have some ideas on this, pls share the same. Thanks in advance.
    Best Regards
    Himayat.
    Edited by: Himayatullah Md on Nov 25, 2011 4:42 PM
    Please use code tags
    Edited by: Rob Burbank on Nov 25, 2011 10:49 AM

    If you use [refresh_table_display|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5531ed30911d2b467006094192fe3/frameset.htm] set paramter is_stable to keep scrollbar on desired position.
    Regards
    Marcin

  • ABAP OOPs concept

    why u want Events and whts the use of it in ABAP OOPs concept

    Locked for the same reason the others are
    And please don't use textspeak.
    Rob

  • Reports using abap-oops

    Hi,
    This is chakravarthi. I have to learn abap-oops.
    Sure! No Problem. You can find a classroom course and get on with it.
    Edited by: kishan P on Apr 15, 2011 11:56 AM

    check ur fcat

  • Use of "super" key word in abap oops...

    Hi,
      Can any one explain me what is the use of ' super ' key word in abap oops. excluding super class.
    With Regards,
    M.S.Amirtharaj Vijay.

    Vijay,
    please read the sap documentation or f1 help
    Thanks
    Bala Duvvuri

  • Abap oops-netweaver-xi

    hi
    could anyone provide me with the abap oops from basics wat is required for netweaver-xi

    Hi,
    ABAP mapping and the ABAP proxies would be useful.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    ABAP Proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    Regards,
    Bhavesh

  • Material for ABAP OOPS

    hi everybody, i am new ABAP oops. can anybody tell me any site or suggest me any material to learn ABAP oops from basics.
                       thnx in advance,
                              santosh.

    Hi,
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Regards,
    Priyanka.

  • Basic abap-oops material

    hi ,
    i am very new to abap-oops concepts please help me in getting the basic oops concept materials
    regards
    Nandini

    Refer these link,
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Reward if found helpfull,
    Regards,
    K.Tharani.

  • Wrking on ABAP OOPS, oput is coming but 1 field name wd customer name is nt

    Hello,
    I am working on ABAP OOPS for first time, Report is workin fine but onr custmer name field is not coming,. cn u plz help..i hv gone thrugh sme steps like frst i gone thrugh system status..den  i clk on set_table for frst display..b den on t_output...where wll i get the fields..???
    Edited by: SAPKTAN on Feb 27, 2010 7:52 AM

    hi experts,
    i m new in BDC... i hav to upload bdc for vk11 trans and table konv. now uploading is basically ..
    frst doubt is
    i hv to run shdb transc?? or  just i hv to write program??
    nd cn any1 send me teps as hw to create upload..
    Condition Type     Sales Organisation     Distribution channel     Material     Price     Unit     Valid from     Valid to
    KSCHL     VKORG     VTWEG     MATNR_01     KBETR_01     KPEIN_01     DATAB_01     DATBI_01
    now plz tel me hw to do this...whether to run shdb or jus to write program in se38..
    or i hv to do both...bt plz tel me step by step

  • I need abap oops web site?

    i need abap oops help web site?

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

  • I need  abap oops help docu?

    i need abap oops help docu?

    Hi Karthikeyan,
    Chk this standard Programs.
    ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    links for OO ABAP.
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    some more materials.
    Go through the following Documents Links & Materials for ABAP Objects
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    /people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    OO ABAP is nothing but a class-method apprach to write ABAP codes and define them : below are few of the informations which will be of help for a newbie :
    Types of attributes and the basic concepts :
    Public attributes
    Private attributes
    Instance attributes
    Static attributes
    Public methods
    Private methods
    Constructor method
    Static constructor
    Protected components
    Polymorphism
    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 <classname>-><attrbute>
    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.
    Reward points if helpful.
    Regards,
    Harini.S

  • Info on ABAP-OOPS

    Hi All,
    I want to know where exactly can we use ABAP OOPS..
    Can  we use in Classical Reports,
                            Pool Programming
    If we can use them in Pool Programming can you help me out with a small example.
    Regards

    hi,
    Object Orientation
    A programming technique in which solutions reflect real world objects
    What are objects ?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat
    can be an object of that class .
    With respect to code, Object refers to a set of services ( methods /
    attributes ) and can contain data
    What are classes ?
    A class defines the properties of an object. A class can be instantiated
    as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Classes in abap
    Classes in ABAP are either local or global
    Global classes are declared in class builder (SE24 )
    Local classes are declared within programs
    Components of a class
    Attributes : Internal data fields of class
    Attributes can be either instance attributes – specific to each instance of the class ( object ) or static attributes which are common to all instances
    Methods :
    Subroutines / procedures in a class that define the behavior of the object. Methods can also be instance methods or static methods
    Encapsulation in ABAP
    Encapsulation is obtained through the restriction in visibility of attributes / methods attained through the definition of Public, Private and Protected section of a class
    Public Section
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    Protected Section
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it.
    Private Section
    Components that you declare in the private section are only visible in the methods of the same class.
    Inheritance in ABAP
    Inheritance allows you to derive a class based on an already existing class.
    CLASS <subclass> DEFINITION INHERITING FROM <superclass>.
    ENDCLASS.
    CLASS <subclass> IMPLEMENTATION.
    ENDCLASS.
    All attributes / methods of super class become the property of the subclass too. Only public and protected attributes / methods are visible in the subclass
    Polymorphism in ABAP
    When methods with same name perform differently under different
    circumstances we call it polymorphism.
    Methods redefined in a subclass is an example for Polymorphism
    Interfaces
    Interfaces are used to define the model of a class.
    They also like classes can be either local or global.
    Global interfaces are defined through SE24 and local interfaces are defined in program.
    Please check this online document (starting page 1291).
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Also check this links as well.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.futureobjects.de/content/intro_oo_e.html
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards
    Omkar

  • Need ABAP OOPs

    hi all
    I'm new for ABAP OOPS, I want to know about abap oops concept. Can you any one explain about that i want simple example.
    with regards.
    Muthukumar.K

    Hi Muthu,
    Please check out transaction ABAPDOCU. It contains multiple examples on ABAP Objects. Also, browse this site for more examples on ABAP Objects. I also have included a sample report that I did using ABAP Objects. Please check it out. Hope it helps...
    P.S. Please award points if it helps...
    *==================================================================
    * Program Name : ZFR_FOREX_REV_ACCTG
    * Author       : Aris Hidalgo
    * Date Created : August 3, 2006
    * Description  : Show the exchange rate for a given range of 7 years
    *==================================================================
    REPORT zfr_forex_rev_acctg
           NO STANDARD PAGE HEADING
           LINE-SIZE 500
           LINE-COUNT 0
           MESSAGE-ID zz.
    * Data dictionary table/s                     *
    TABLES: bsis,
            bsas,
            tcurr,
            t001.
    * Global Structure/s                          *
    TYPES: BEGIN OF t_bsis_bsas,
            hkont    TYPE bsis-hkont,   "General ledger account
            year_dum TYPE bsis-gjahr,
            belnr    TYPE bsis-belnr,   "Accounting document number
            bldat    TYPE bsis-bldat,   "Document date in document
            waers    TYPE bsis-waers,   "Currency Key
            dmbtr    TYPE bsis-dmbtr,   "Amount in local currency
            wrbtr    TYPE bsis-wrbtr,   "Amount in document currency
            shkzg    TYPE bsis-shkzg,   "Debit/credit indicator
            zuonr    TYPE bsis-zuonr,   "Assignment number
            gjahr    TYPE bsis-gjahr,   "Fiscal year
            blart    TYPE bsis-blart,   "Document type
           END OF t_bsis_bsas.
    TYPES: BEGIN OF t_summary,
            hkont    TYPE bsis-hkont,
            year_dum TYPE bsis-gjahr,
            waers    TYPE bsis-waers,
            rate     TYPE tcurr-ukurs,
            wrbtr    TYPE bsis-wrbtr,
            dmbtr    TYPE bsis-dmbtr,
            gl_bal   TYPE bsis-wrbtr,
            unrealized TYPE bsis-wrbtr,
           END OF t_summary.
    TYPES: BEGIN OF t_exch,
            year      TYPE bsis-gjahr,
            rate      TYPE bapi1093_1-rate_type,
            from_curr TYPE bapi1093_1-from_curr,
            exch_rate TYPE bapi1093_0-exch_rate_v,
           END OF t_exch.
    * Global Data                                 *
    DATA: gv_hkont TYPE bsis-hkont,
          it_bsis_bsas TYPE STANDARD TABLE OF t_bsis_bsas,
          it_exch      TYPE SORTED   TABLE OF t_exch WITH UNIQUE
                                         KEY year rate from_curr,
          it_summary   TYPE STANDARD TABLE OF t_summary,
          wa_summary   LIKE LINE OF it_summary,
          wa_exch      LIKE LINE OF it_exch,
          t_rate_type  TYPE bapi1093_1-rate_type  VALUE 'ME',
          t_from_curr  TYPE bapi1093_1-from_curr,
          t_to_curr    TYPE bapi1093_1-to_currncy VALUE 'USD',
          t_date       TYPE bapi1093_2-trans_date,
          t_date_out   TYPE bapi1093_2-trans_date,
          t_exch_rate  TYPE bapi1093_0,
          t_message    TYPE bapireturn1.
    FIELD-SYMBOLS: <fs_asof>      TYPE bsis-gjahr,
                   <fs_bsis_bsas> LIKE LINE OF it_bsis_bsas.
    * Selection screen                             *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_bukrs TYPE t001-bukrs OBLIGATORY,
                p_asof  TYPE bsis-budat OBLIGATORY,
                p_year  TYPE bsis-gjahr OBLIGATORY.
    SELECT-OPTIONS: s_hkont FOR bsis-hkont NO INTERVALS OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    */ CLASS DEFINITIONS
    *       CLASS lcl_main DEFINITION
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        METHODS: get_data,
                 get_diff,
                 display_subheader,
                 display_rate
                    IMPORTING
                       rate TYPE tcurr-ukurs
                       pos  TYPE i,
                 display_header,
                 top_of_page,
                 get_rate_and_show
                    EXPORTING
                       ex_bsis_bsas LIKE it_bsis_bsas
                       ex_exch      LIKE it_exch,
                 conversion
                    IMPORTING
                       year      TYPE bsis-gjahr
                       rate_type TYPE bapi1093_1-rate_type
                       from_curr TYPE bapi1093_1-from_curr
                       to_curr   TYPE bapi1093_1-to_currncy
                    EXPORTING
                       exch_rate TYPE bapi1093_0
                       t_date    TYPE bapi1093_2-trans_date.
        EVENTS: no_data EXPORTING value(hkont) TYPE bsis-hkont.
      PRIVATE SECTION.
        TYPES: BEGIN OF t_waers,
                waers TYPE bsis-waers,
               END OF t_waers.
        TYPES: BEGIN OF t_local,
                year      TYPE bsis-gjahr,
                rate      TYPE tcurr-ukurs,
               END OF t_local.
        DATA: it_waers     TYPE SORTED TABLE OF t_waers WITH UNIQUE
                                KEY waers,
              it_local     TYPE SORTED TABLE OF t_local WITH UNIQUE
                                KEY year,
              wa_waers     LIKE LINE OF it_waers,
              wa_local     LIKE LINE OF it_local,
              lv_counter   TYPE i,
              lv_asof      TYPE bsis-gjahr,
              lv_year      TYPE bsis-gjahr,
              lv_check     TYPE i,
              lv_7years    TYPE i,
              lv_date      TYPE pc226-endda,
              lv_pos       TYPE i,
              lv_pos2      TYPE i,
              lv_vline     TYPE i,
              lv_rate      TYPE p DECIMALS 5,
              lv_givendate TYPE syst-datum.
    ENDCLASS.
    *       CLASS lcl_summary DEFINITION
    CLASS lcl_summary DEFINITION INHERITING FROM lcl_main.
      PUBLIC SECTION.
        METHODS: display_summary_header,
                 display_summary
                    IMPORTING
                       im_bsis_bsas LIKE it_bsis_bsas
                       im_exch      LIKE it_exch.
    ENDCLASS.
    *       CLASS lcl_handler DEFINITION
    CLASS lcl_handler DEFINITION.
      PUBLIC SECTION.
        METHODS handle_event FOR EVENT no_data OF lcl_main
        IMPORTING hkont.
    ENDCLASS.
    */ CLASS IMPLEMENTATIONS
    *       CLASS lcl_main IMPLEMENTATION
    CLASS lcl_main IMPLEMENTATION.
    * METHOD get_data                              *
      METHOD get_data.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
    *     PERCENTAGE       = 0
           text             = 'Getting data. Please wait...'
    *   get records from BSIS
        SELECT hkont zuonr gjahr belnr waers bldat blart dmbtr wrbtr shkzg
        FROM bsis
        INTO  CORRESPONDING FIELDS OF TABLE it_bsis_bsas
        WHERE bukrs = p_bukrs
          AND hkont IN s_hkont
          AND budat <= p_asof.
    *   get records from BSAS
        SELECT hkont zuonr gjahr belnr waers bldat blart dmbtr wrbtr shkzg
        FROM bsas
        APPENDING CORRESPONDING FIELDS OF TABLE it_bsis_bsas
        WHERE bukrs = p_bukrs
          AND hkont IN s_hkont
          AND budat <= p_asof
          AND augdt > p_asof.
    *   if itab has no records, raise event
        IF it_bsis_bsas[] IS INITIAL.
          RAISE EVENT no_data EXPORTING hkont = s_hkont-low.
        ENDIF.
      ENDMETHOD.
    * METHOD get_diff                              *
      METHOD get_diff.
        DATA: lv_sub7 TYPE i.
        lv_asof = p_year + 6.
        IF lv_asof > p_asof+0(4).
          lv_asof = p_asof+0(4).
        ENDIF.
        lv_year = p_year.
    *   determine how many years will be displayed
        lv_counter = lv_asof - lv_year.
        ADD 1 TO lv_counter.
        lv_sub7   = lv_asof - 6.
        lv_7years = lv_asof - lv_sub7.
        ADD 1 TO lv_7years.
      ENDMETHOD.
    * METHOD display_subheader                     *
      METHOD display_subheader.
        DATA: lv_date(10)  TYPE c,
              lv_gdatu     TYPE tcurr-gdatu,
              lv_flag(1)   TYPE c,
              lv_pos_dum   TYPE i.
        FIELD-SYMBOLS: <fs_bsis_bsas> LIKE LINE OF it_bsis_bsas.
    *   pre-defined length of uline and vline depending on the
    *   number of years to be displayed
        CASE lv_counter.
          WHEN 1.
            lv_pos   = 24.
            lv_pos2  = 37.
            lv_vline = 126.
          WHEN 2.
            lv_pos   = 45.
            lv_pos2  = 58.
            lv_vline = 147.
          WHEN 3.
            lv_pos   = 66.
            lv_pos2  = 79.
            lv_vline = 168.
          WHEN 4.
            lv_pos   = 87.
            lv_pos2  = 100.
            lv_vline = 189.
          WHEN 5.
            lv_pos   = 108.
            lv_pos2  = 121.
            lv_vline = 210.
          WHEN 6.
            lv_pos   = 128.
            lv_pos2  = 141.
            lv_vline = 230.
          WHEN 7.
            lv_pos   = 148.
            lv_pos2  = 161.
            lv_vline = 250.
        ENDCASE.
    *  get currency
        IF NOT lv_check = 1.
          LOOP AT it_bsis_bsas ASSIGNING <fs_bsis_bsas>.
            MOVE <fs_bsis_bsas>-waers TO wa_waers.
            INSERT wa_waers INTO TABLE it_waers.
            <fs_bsis_bsas>-year_dum = <fs_bsis_bsas>-bldat+0(4).
          ENDLOOP.
        ENDIF.
        ASSIGN lv_asof TO <fs_asof>.
        IF NOT lv_check = 1.
          SORT it_bsis_bsas BY hkont year_dum belnr bldat waers dmbtr wrbtr.
          IF <fs_bsis_bsas> IS ASSIGNED.
            UNASSIGN <fs_bsis_bsas>.
            READ TABLE it_bsis_bsas INDEX 1 ASSIGNING <fs_bsis_bsas>.
            IF sy-subrc = 0 AND <fs_bsis_bsas> IS ASSIGNED.
              gv_hkont = <fs_bsis_bsas>-hkont.
            ENDIF.
          ENDIF.
        ENDIF.
    *   write sub-header
        DESCRIBE TABLE it_waers LINES sy-tfill.
        LOOP AT it_waers INTO wa_waers.
          IF sy-tfill = 1 AND wa_waers-waers = 'PHP'.
            lv_flag = 1 .
          ENDIF.
          IF NOT lv_flag = 1.
            IF lv_check IS INITIAL.
              WRITE: AT /103 sy-uline(lv_pos),
                     AT /103 sy-vline.
            ENDIF.
    *       write the years in the sub-header
            IF NOT lv_check = 1.
              lv_pos_dum = 110.
              FORMAT COLOR COL_HEADING.
              DO lv_counter TIMES.
                IF sy-index = 6.
                  WRITE: AT lv_pos_dum(14) <fs_asof> RIGHT-JUSTIFIED.
                ELSEIF sy-index = 7.
                  WRITE: AT lv_pos_dum(13) <fs_asof> RIGHT-JUSTIFIED.
                ELSE.
                  WRITE: AT lv_pos_dum(15) <fs_asof> RIGHT-JUSTIFIED.
                ENDIF.
                ADD 21 TO lv_pos_dum.
                SUBTRACT 1 FROM <fs_asof>.
              ENDDO.
              WRITE sy-vline.
              FORMAT COLOR OFF.
            ENDIF.
            IF sy-tabix = 1 AND wa_waers-waers = 'PHP'.
              WRITE: AT /90 sy-uline(lv_pos2).
            ENDIF.
            IF wa_waers-waers <> 'PHP'.
              IF lv_check IS INITIAL.
                WRITE: AT /90 sy-uline(lv_pos2).
                WRITE: AT /90 sy-vline.
              ELSE.
                WRITE: AT /90 sy-vline.
              ENDIF.
            ENDIF.
            FORMAT COLOR COL_NORMAL.
            IF NOT wa_waers-waers = 'PHP'.
             WRITE: AT 91(10) wa_waers-waers CENTERED.   "write the currency
            ENDIF.
          ENDIF.
          lv_asof = p_year + 6.
          IF lv_asof > p_asof+0(4).
            lv_asof = p_asof+0(4).
          ENDIF.
    *     get exchange rate from PHP to USD
          IF lv_check IS INITIAL.
            t_from_curr = 'PHP'.
            DO lv_counter TIMES.
    *         use BAPI to get exchange rate
              CALL METHOD me->conversion EXPORTING
                                           year      = <fs_asof>
                                           rate_type = t_rate_type
                                           from_curr = t_from_curr
                                           to_curr   = t_to_curr
                                          IMPORTING
                                           exch_rate = t_exch_rate
                                           t_date    = t_date_out.
    *         if no exchange rate was fetched, get directly from TCURR
    *         using given date
              IF t_exch_rate-exch_rate_v IS INITIAL.
                WRITE t_date_out TO lv_date USING EDIT MASK '__/__/____'.
                CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
                     EXPORTING
                          input  = lv_date
                     IMPORTING
                          output = lv_date.
                SELECT SINGLE ukurs FROM tcurr
                INTO t_exch_rate-exch_rate_v
                WHERE kurst = 'ME'
                  AND fcurr = 'PHP'
                  AND tcurr = 'USD'
                  AND gdatu = lv_date.
              ENDIF.
              IF NOT t_exch_rate-exch_rate_v IS INITIAL.
                t_exch_rate-exch_rate_v = abs( t_exch_rate-exch_rate_v ).
                wa_local-year = <fs_asof>.
                wa_local-rate = t_exch_rate-exch_rate_v.
                INSERT wa_local INTO TABLE it_local.
              ENDIF.
              SUBTRACT 1 FROM <fs_asof>.
              CLEAR: t_exch_rate, wa_local, t_date_out, lv_date.
            ENDDO.
          ENDIF.
          lv_pos = 106.
    *     get exchange rate from itab to USD
          CLEAR: t_exch_rate, lv_gdatu.
          t_from_curr = wa_waers-waers.
          lv_asof = p_year + 6.
          IF lv_asof > p_asof+0(4).
            lv_asof = p_asof+0(4).
          ENDIF.
          DO lv_counter TIMES.
            IF t_from_curr = 'USD'.
              READ TABLE it_local WITH KEY year = <fs_asof>
                                           INTO wa_local TRANSPORTING rate.
              lv_rate = wa_local-rate.
            ELSEIF t_from_curr = 'PHP'.
              READ TABLE it_local WITH KEY year = <fs_asof>
                                           INTO wa_local TRANSPORTING rate.
              lv_rate = wa_local-rate.
            ELSE.
    *         use BAPI to get exchange rate for currencies that is
    *         not 'PHP' and 'USD'
              CALL METHOD me->conversion EXPORTING
                                          year      = <fs_asof>
                                          rate_type = t_rate_type
                                          from_curr = t_from_curr
                                          to_curr   = t_to_curr
                                         IMPORTING
                                          exch_rate = t_exch_rate
                                          t_date    = t_date_out.
    *         if no exchange rate was fetched, get directly from TCURR
    *         using given date
              IF t_exch_rate-exch_rate_v IS INITIAL.
                WRITE t_date_out TO lv_date USING EDIT MASK '__/__/____'.
                CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
                     EXPORTING
                          input  = lv_date
                     IMPORTING
                          output = lv_date.
                SELECT SINGLE ukurs FROM tcurr
                INTO t_exch_rate-exch_rate_v
                WHERE kurst = 'ME'
                  AND fcurr = wa_waers-waers
                  AND tcurr = 'USD'
                  AND gdatu = lv_date.
              ENDIF.
              IF NOT t_exch_rate-exch_rate_v IS INITIAL.
                READ TABLE it_local WITH KEY year = <fs_asof>
                                            INTO wa_local TRANSPORTING rate.
                IF sy-subrc = 0.
                  IF t_exch_rate-exch_rate_v <> wa_local-rate.
                    lv_rate = 1 / t_exch_rate-exch_rate_v * wa_local-rate.
                  ELSE.
                    lv_rate = t_exch_rate-exch_rate_v.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
            IF NOT lv_rate IS INITIAL.
              lv_rate = abs( lv_rate ).
              wa_exch-year      = <fs_asof>.
              wa_exch-rate      = t_rate_type.
              wa_exch-from_curr = t_from_curr.
              wa_exch-exch_rate = lv_rate.
              INSERT wa_exch INTO TABLE it_exch.
              IF NOT lv_flag = 1.
                IF NOT wa_waers-waers = 'PHP'.
                  CALL METHOD me->display_rate
                     EXPORTING
                        rate = wa_exch-exch_rate
                        pos  = lv_pos.
                  CLEAR wa_exch.
                ENDIF.
              ENDIF.
            ENDIF.
            ADD 21 TO lv_pos.
            SUBTRACT 1 FROM <fs_asof>.
            CLEAR: t_exch_rate, wa_local, t_date_out,
                   lv_date,lv_rate.
          ENDDO.
          IF NOT lv_flag = 1.
            WRITE: AT lv_vline sy-vline.
          ENDIF.
          FORMAT COLOR OFF.
          lv_asof = p_year + 6.
          IF lv_asof > p_asof+0(4).
            lv_asof = p_asof+0(4).
          ENDIF.
          lv_check = 1.
          CLEAR lv_flag.
        ENDLOOP.
      ENDMETHOD.
    * METHOD display_rate                          *
      METHOD display_rate.
        WRITE: AT pos(15) rate RIGHT-JUSTIFIED.
      ENDMETHOD.
    * METHOD display_header                        *
      METHOD display_header.
        CLEAR lv_pos.
        lv_asof = p_year + 6.
        IF lv_asof > p_asof+0(4).
          lv_asof = p_asof+0(4).
        ENDIF.
        CLEAR lv_pos2.
        CASE lv_counter.
          WHEN 1.
            lv_pos2 = 126.
          WHEN 2.
            lv_pos2 = 147.
          WHEN 3.
            lv_pos2 = 168.
          WHEN 4.
            lv_pos2 = 189.
          WHEN 5.
            lv_pos2 = 210.
          WHEN 6.
            lv_pos2 = 230.
          WHEN 7.
            lv_pos2 = 250.
        ENDCASE.
        lv_pos = 110.
        FORMAT COLOR COL_HEADING.
        WRITE: /   sy-uline(lv_pos2),
               /   sy-vline,
             (18) 'Allocation'         CENTERED,
             (04) 'DT'                 CENTERED,
             (11) 'Doc. No.'           CENTERED,
             (11) 'Doc. Date'          LEFT-JUSTIFIED,
             (06) 'Cur.'               LEFT-JUSTIFIED,
             (20) 'Transaction Curr.'  CENTERED,
             (20) 'Local Curr. (PHP)'  CENTERED.
        DO lv_counter TIMES.
          WRITE: AT lv_pos(14) <fs_asof> RIGHT-JUSTIFIED.
          SUBTRACT 1 FROM <fs_asof>.
          ADD 21 TO lv_pos.
        ENDDO.
        WRITE: AT lv_pos2 sy-vline,
               /  sy-uline(lv_pos2).
        FORMAT COLOR OFF.
      ENDMETHOD.
    * METHOD top_of_page                           *
      METHOD top_of_page.
        DATA: text1         TYPE string,
              text2         TYPE string,
              lv_asof       TYPE bsis-budat,
              lv_pageno(03) TYPE n,
              lv_date(10)   TYPE c.
    *   get company code description
        SELECT SINGLE butxt FROM t001
        INTO t001-butxt
        WHERE bukrs = p_bukrs.
        WRITE: / t001-butxt,
               / sy-title.
    *   write account code(HKONT)
        CONCATENATE: gv_hkont '/' p_bukrs
                     INTO text1.
        CONCATENATE: 'Account:' text1
                     INTO text2
                     SEPARATED BY space.
        WRITE: / text2.
        CLEAR: text1, text2.
    *   write as of date
        WRITE p_asof TO lv_date USING EDIT MASK '__/__/____'.
        CONCATENATE: 'As of' lv_date
                       INTO text1
                       SEPARATED BY space.
        WRITE: / text1.
        CLEAR: text1, lv_date.
    *   from year to as of year
        lv_asof = p_asof+0(4).
        CONCATENATE: 'Year:' p_year 'to' lv_asof
                     INTO text1
                     SEPARATED BY space.
        WRITE: / text1.
        CLEAR text1.
    *   page number
        lv_pageno = sy-pagno.
        CONCATENATE: 'Page No:' lv_pageno
                     INTO text1
                     SEPARATED BY space.
        WRITE: / text1.
        CLEAR text1.
        SKIP 2.
      ENDMETHOD.
    * METHOD get_rate_and_show                     *
      METHOD get_rate_and_show.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
    *       PERCENTAGE       = 0
           text             = 'Combining data.Please wait... '
        DATA: lv_amount(15)    TYPE p DECIMALS 2,
              lv_color(1)      TYPE n VALUE 1,
              lv_index1(15)    TYPE p DECIMALS 2,
              lv_index2(15)    TYPE p DECIMALS 2,
              lv_index3(15)    TYPE p DECIMALS 2,
              lv_index4(15)    TYPE p DECIMALS 2,
              lv_index5(15)    TYPE p DECIMALS 2,
              lv_index6(15)    TYPE p DECIMALS 2,
              lv_index7(15)    TYPE p DECIMALS 2,
              lv_total1(15)    TYPE p DECIMALS 2,
              lv_total2(15)    TYPE p DECIMALS 2,
              lv_total3(15)    TYPE p DECIMALS 2,
              lv_total4(15)    TYPE p DECIMALS 2,
              lv_total5(15)    TYPE p DECIMALS 2,
              lv_total6(15)    TYPE p DECIMALS 2,
              lv_total7(15)    TYPE p DECIMALS 2,
              lv_dmbtr(15)     TYPE p DECIMALS 2,
              lv_dmbtr_tot(15) TYPE p DECIMALS 2,
              lv_old           TYPE bsis-hkont,
              lv_new           TYPE bsis-hkont.
        lv_asof = p_year + 6.
        IF lv_asof > p_asof+0(4).
          lv_asof = p_asof+0(4).
        ENDIF.
        CLEAR lv_check.
        ADD 1 TO lv_check.
        SORT it_bsis_bsas BY hkont year_dum belnr bldat waers dmbtr wrbtr.
    *   write details
        LOOP AT it_bsis_bsas ASSIGNING <fs_bsis_bsas>.
          IF lv_color = 1.
            lv_color = 2.
          ELSE.
            lv_color = 1.
          ENDIF.
    *     if <fs_bsis_bsas>-shkzg = 'H', multiply WRBTR and
    *     DMBTR by -1
          IF <fs_bsis_bsas>-shkzg = 'H'.
            <fs_bsis_bsas>-wrbtr = <fs_bsis_bsas>-wrbtr * -1.
            <fs_bsis_bsas>-dmbtr = <fs_bsis_bsas>-dmbtr * -1.
          ENDIF.
    *     for every new account no.(HKONT), create a new page
          lv_new = <fs_bsis_bsas>-hkont.
          gv_hkont = <fs_bsis_bsas>-hkont.
          IF lv_new <> lv_old AND NOT lv_old IS INITIAL.
            NEW-PAGE.
            CALL METHOD me->display_subheader.
            CALL METHOD me->display_header.
          ENDIF.
          lv_old = lv_new.
    *     write details
          FORMAT INTENSIFIED OFF COLOR = lv_color.
          WRITE: /   sy-vline,
                (18) <fs_bsis_bsas>-zuonr   CENTERED,
                (04) <fs_bsis_bsas>-blart   CENTERED,
                (10) <fs_bsis_bsas>-belnr   CENTERED,
                (10) <fs_bsis_bsas>-bldat   RIGHT-JUSTIFIED,
                (05) <fs_bsis_bsas>-waers   RIGHT-JUSTIFIED,
                (20) <fs_bsis_bsas>-wrbtr   RIGHT-JUSTIFIED,
                (20) <fs_bsis_bsas>-dmbtr   RIGHT-JUSTIFIED.
          ADD <fs_bsis_bsas>-dmbtr TO: lv_dmbtr, lv_dmbtr_tot.
    *     write the converted amount for a given year
          WHILE lv_check <= lv_counter.
            IF <fs_asof> >= <fs_bsis_bsas>-bldat+0(4).
              t_from_curr = <fs_bsis_bsas>-waers.
              READ TABLE it_exch WITH KEY year      = <fs_asof>
                                          rate      = t_rate_type
                                          from_curr = t_from_curr
                                        INTO wa_exch TRANSPORTING exch_rate.
              IF sy-subrc = 0.
                IF <fs_bsis_bsas>-waers = 'PHP'.
                  lv_amount = 1 / wa_exch-exch_rate * wa_exch-exch_rate.
                  lv_amount = <fs_bsis_bsas>-wrbtr * lv_amount.
                ELSE.
                  lv_amount = <fs_bsis_bsas>-wrbtr * wa_exch-exch_rate.
                ENDIF.
                WRITE: (20) lv_amount RIGHT-JUSTIFIED.
                CASE sy-index.
                  WHEN 1.
                    ADD lv_amount TO lv_index1.
                    ADD lv_amount TO lv_total1.
                  WHEN 2.
                    ADD lv_amount TO lv_index2.
                    ADD lv_amount TO lv_total2.
                  WHEN 3.
                    ADD lv_amount TO lv_index3.
                    ADD lv_amount TO lv_total3.
                  WHEN 4.
                    ADD lv_amount TO lv_index4.
                    ADD lv_amount TO lv_total4.
                  WHEN 5.
                    ADD lv_amount TO lv_index5.
                    ADD lv_amount TO lv_total5.
                  WHEN 6.
                    ADD lv_amount TO lv_index6.
                    ADD lv_amount TO lv_total6.
                  WHEN 7.
                    ADD lv_amount TO lv_index7.
                    ADD lv_amount TO lv_total7.
                ENDCASE.
              ENDIF.
            ENDIF.
            CLEAR: lv_amount, wa_exch.
            SUBTRACT 1 FROM <fs_asof>.
            ADD 1 TO lv_check.
          ENDWHILE.
          WRITE AT lv_pos2 sy-vline.
    *     write sub-total for every year for the same account code(HKONT)
          AT END OF year_dum.
            FORMAT COLOR COL_TOTAL.
            WRITE: / sy-vline,
                   <fs_bsis_bsas>-year_dum,
                   'Sub-total:'.
            IF NOT lv_dmbtr IS INITIAL.
              WRITE: AT 76(20) lv_dmbtr RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index1 IS INITIAL.
              WRITE: (20) lv_index1     RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index2 IS INITIAL.
              WRITE (20) lv_index2      RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index3 IS INITIAL.
              WRITE (20) lv_index3      RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index4 IS INITIAL.
              WRITE (20) lv_index4      RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index5 IS INITIAL.
              WRITE (20) lv_index5      RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index6 IS INITIAL.
              WRITE: (20) lv_index6     RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_index7 IS INITIAL.
              WRITE: (20) lv_index7      RIGHT-JUSTIFIED.
            ENDIF.
            WRITE: AT lv_pos2 sy-vline.
            FORMAT COLOR OFF.
            CLEAR: lv_index1, lv_index2, lv_index3,
                   lv_index4, lv_index5, lv_index6,
                   lv_index7, lv_dmbtr.
          ENDAT.
    *     write total for a given account code(HKONT)
          AT END OF hkont.
            FORMAT COLOR COL_TOTAL INTENSIFIED.
            WRITE: / sy-vline,
                     'Total', <fs_bsis_bsas>-hkont, 'GI'.
            IF NOT lv_dmbtr_tot IS INITIAL.
              WRITE: AT 76(20) lv_dmbtr_tot RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total1 IS INITIAL.
              WRITE: (20) lv_total1         RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total2 IS INITIAL.
              WRITE (20) lv_total2          RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total3 IS INITIAL.
              WRITE (20) lv_total3          RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total4 IS INITIAL.
              WRITE (20) lv_total4          RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total5 IS INITIAL.
              WRITE (20) lv_total5          RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total6 IS INITIAL.
              WRITE: (20) lv_total6         RIGHT-JUSTIFIED.
            ENDIF.
            IF NOT lv_total7 IS INITIAL.
              WRITE: (20) lv_total7         RIGHT-JUSTIFIED.
            ENDIF.
            WRITE: AT lv_pos2 sy-vline.
            FORMAT COLOR OFF.
            CLEAR: lv_total1, lv_total2, lv_total3,
                   lv_total4, lv_total5, lv_total6,
                   lv_total7, lv_dmbtr_tot.
            WRITE: / sy-uline(lv_pos2).
          ENDAT.
          lv_asof = p_year + 6.
          IF lv_asof > p_asof+0(4).
            lv_asof = p_asof+0(4).
          ENDIF.
          CLEAR lv_check.
          ADD 1 TO lv_check.
          FORMAT COLOR OFF.
        ENDLOOP.
        SKIP 5.
        ex_bsis_bsas[] = it_bsis_bsas[].
        ex_exch[]      = it_exch[].
      ENDMETHOD.
    * METHOD conversion                            *
      METHOD conversion.
        IF year = p_asof+0(4).
    *     get last date of a given month and year
          CALL FUNCTION 'LAST_DAY_OF_MONTHS'
           EXPORTING
             day_in                  = p_asof
           IMPORTING
             last_day_of_month       = lv_givendate
    *     EXCEPTIONS
    *       DAY_IN_NO_DATE          = 1
    *       OTHERS                  = 2
          IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ELSE.
    *   get last date of a given year
          CALL FUNCTION 'HR_E_GET_FISC_YEAR_DATES'
            EXPORTING
              fisc_year         = year
          IMPORTING
    *      FISC_FECINI       =
             fisc_fecfin       = lv_date
    *    EXCEPTIONS
    *      ERROR             = 1
    *      OTHERS            = 2
          IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
        IF lv_date IS INITIAL.
          t_date = lv_givendate.
          CLEAR lv_givendate.
        ELSE.
          t_date = lv_date.
          CLEAR lv_date.
        ENDIF.
    *   get exchange rate from a given currency to US dollars
        CALL FUNCTION 'BAPI_EXCHANGERATE_GETDETAIL'
          EXPORTING
            rate_type        = rate_type
            from_curr        = from_curr
            to_currncy       = to_curr
            date             = t_date
          IMPORTING
            exch_rate        = t_exch_rate
    *      RETURN           =
      ENDMETHOD.
    ENDCLASS.
    *       CLASS lcl_summary IMPLEMENTATION
    CLASS lcl_summary IMPLEMENTATION.
    * METHOD display_summary                       *
      METHOD display_summary.
        TYPES: BEGIN OF t_total,
                hkont      TYPE bsis-hkont,
                waers      TYPE bsis-waers,
                wrbtr      TYPE bsis-wrbtr,
                dmbtr      TYPE bsis-dmbtr,
                gl_bal     TYPE bsis-wrbtr,
                unrealized TYPE bsis-wrbtr,
               END OF t_total.
        DATA: lv_balance        TYPE bsis-wrbtr,
              lv_date(10)       TYPE c,
              lv_color(1)       TYPE n VALUE '1',
              lv_wrbtr          TYPE bsis-wrbtr,
              lv_dmbtr          TYPE bsis-dmbtr,
              lv_gl_bal         TYPE bsis-wrbtr,
              lv_unrealized     TYPE bsis-wrbtr,
              lv_old_year       TYPE bsis-gjahr,
              lv_new_year       TYPE bsis-gjahr,
              lv_flag(1)        TYPE n,
              lt_bsis_bsas_dum  TYPE STANDARD TABLE OF t_bsis_bsas,
              lt_total          TYPE STANDARD TABLE OF t_total,
              wa_total          LIKE LINE OF lt_total.
        FIELD-SYMBOLS: <fs_dum> LIKE LINE OF lt_bsis_bsas_dum.
        it_bsis_bsas[] = im_bsis_bsas[].
        it_exch[]      = im_exch[].
        CLEAR wa_exch.
        SORT it_bsis_bsas BY hkont year_dum DESCENDING waers.
        lt_bsis_bsas_dum[] = it_bsis_bsas[].
        LOOP AT it_bsis_bsas ASSIGNING <fs_bsis_bsas>.
          AT NEW hkont.
            MOVE <fs_bsis_bsas>-hkont TO wa_summary-hkont.
          ENDAT.
          AT NEW year_dum.
            MOVE <fs_bsis_bsas>-year_dum TO wa_summary-year_dum.
          ENDAT.
          AT NEW waers.
            MOVE <fs_bsis_bsas>-waers TO wa_summary-waers.
            t_from_curr = wa_summary-waers.
            READ TABLE it_exch WITH KEY year      = wa_summary-year_dum
                                        rate      = t_rate_type
                                        from_curr = t_from_curr
                                        INTO wa_exch TRANSPORTING exch_rate.
            IF sy-subrc = 0.
              MOVE wa_exch-exch_rate TO wa_summary-rate.
            ELSE.
              CALL METHOD me->conversion
                 EXPORTING
                    year      = wa_summary-year_dum
                    rate_type = t_rate_type
                    from_curr = t_from_curr
                    to_curr   = t_to_curr
                 IMPORTING
                    exch_rate = t_exch_rate
                    t_date    = t_date_out.
              IF t_exch_rate-exch_rate_v IS INITIAL.
                WRITE t_date_out TO lv_date USING EDIT MASK '__/__/____'.
                CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
                     EXPORTING
                          input  = lv_date
                     IMPORTING
                          output = lv_date.
                SELECT SINGLE ukurs FROM tcurr
                INTO t_exch_rate-exch_rate_v
                WHERE kurst = 'ME'
                  AND fcurr = 'PHP'
                  AND tcurr = 'USD'
                  AND gdatu = lv_date.
              ENDIF.
              IF NOT t_exch_rate-exch_rate_v IS INITIAL.
                t_exch_rate-exch_rate_v = abs( t_exch_rate-exch_rate_v ).
                MOVE t_exch_rate-exch_rate_v TO wa_summary-rate.
              ENDIF.
            ENDIF.
          ENDAT.
          LOOP AT lt_bsis_bsas_dum ASSIGNING <fs_dum>
             WHERE hkont    = wa_summary-hkont
               AND year_dum = wa_summary-year_dum
               AND waers    = wa_summary-waers.
            ADD <fs_dum>-wrbtr TO wa_summary-wrbtr.
            ADD <fs_dum>-dmbtr TO wa_summary-dmbtr.
            IF NOT wa_exch-exch_rate IS INITIAL.
              IF <fs_dum>-waers = 'PHP'.
                lv_balance = 1 / wa_exch-exch_rate * wa_exch-exch_rate.
                lv_balance = <fs_dum>-wrbtr * lv_balance.
                ADD lv_balance TO wa_summary-gl_bal.
              ELSE.
                lv_balance = <fs_dum>-wrbtr * wa_exch-exch_rate.
                ADD lv_balance TO wa_summary-gl_bal.
              ENDIF.
            ENDIF.
            CLEAR lv_balance.
            DELETE lt_bsis_bsas_dum.
          ENDLOOP.
          DELETE it_bsis_bsas WHERE hkont    = wa_summary-hkont
                                AND year_dum = wa_summary-year_dum
                                AND waers    = wa_summary-waers.
          wa_summary-unrealized = wa_summary-dmbtr - wa_summary-gl_bal.
          APPEND wa_summary TO it_summary.
          CLEAR wa_summary.
        ENDLOOP.
        IF NOT it_summary[] IS INITIAL.
          CALL METHOD me->display_summary_header.
          CLEAR wa_summary.
          SORT it_summary BY hkont year_dum DESCENDING waers.
    */     WRITE SUMMARY
          LOOP AT it_summary INTO wa_summary.
            IF lv_color = 1.
              lv_color = 2.
            ELSE.
              lv_color = 1.
            ENDIF.
            MOVE: wa_summary-hkont     TO wa_total-hkont,
                  wa_summary-waers     TO wa_total-waers.
            READ TABLE lt_total WITH KEY hkont = wa_summary-hkont
                                         waers = wa_summary-waers
                                         INTO wa_total.
            IF sy-subrc = 0.
              ADD: wa_summary-wrbtr      TO wa_total-wrbtr,
                   wa_summary-dmbtr      TO wa_total-dmbtr,
                   wa_summary-gl_bal     TO wa_total-gl_bal,
                   wa_summary-unrealized TO wa_total-unrealized.
              MODIFY lt_total FROM wa_total TRANSPORTING
               wrbtr dmbtr gl_bal unrealized
                  WHERE hkont = wa_summary-hkont
                    AND waers = wa_summary-waers.
              CLEAR wa_total.
              lv_flag = 1.
            ELSE.
              ADD: wa_summary-wrbtr      TO wa_total-wrbtr,
                   wa_summary-dmbtr      TO wa_total-dmbtr,
                   wa_summary-gl_bal     TO wa_total-gl_bal,
                   wa_summary-unrealized TO wa_total-unrealized.
            ENDIF.
    *       write sub-total for every end of a year
            lv_new_year = wa_summary-year_dum.
            IF lv_new_year <> lv_old_year AND NOT lv_old_year IS INITIAL.
              FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
              WRITE: /    sy-vline,
                     (42) 'Subtotal',
                     (18) lv_wrbtr      RIGHT-JUSTIFIED,
                     (18) lv_dmbtr      RIGHT-JUSTIFIED,
                     (18) lv_gl_bal     RIGHT-JUSTIFIED,
                     (18) lv_unrealized RIGHT-JUSTIFIED,
                          sy-vline.
              FORMAT COLOR OFF.
              CLEAR: lv_wrbtr, lv_dmbtr, lv_gl_bal, lv_unrealized.
            ENDIF.
            lv_old_year = lv_new_year.
            ADD: wa_summary-wrbtr      TO lv_wrbtr,
                 wa_summary-dmbtr      TO lv_dmbtr,
                 wa_summary-gl_bal     TO lv_gl_bal,
                 wa_summary-unrealized TO lv_unrealized.
            FORMAT INTENSIFIED OFF COLOR = lv_color.
            WRITE: /    sy-vline,
                   (15) wa_summary-hkont,
                   (04) wa_summary-year_dum,
                   (05) wa_summary-waers,
                   (15) wa_summary-rate,
                   (18) wa_summary-wrbtr,
                   (18) wa_summary-dmbtr,
                   (18) wa_summary-gl_bal,
                   (18) wa_summary-unrealized,
                        sy-vline.
            FORMAT COLOR OFF.
            IF NOT lv_flag = 1.
              APPEND wa_total TO lt_total.
              CLEAR wa_total.
            ENDIF.
            AT END OF hkont.
    *         write the last sub-total
              FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
              WRITE: /    sy-vline,
                     (37) 'Subtotal', wa_summary-year_dum,
                     (18) lv_wrbtr      RIGHT-JUSTIFIED,
                     (18) lv_dmbtr      RIGHT-JUSTIFIED,
                     (18) lv_gl_bal     RIGHT-JUSTIFIED,
                     (18) lv_unrealized RIGHT-JUSTIFIED,
                          sy-vline.
              FORMAT COLOR OFF.
              CLEAR: lv_wrbtr, lv_dmbtr, lv_gl_bal, lv_unrealized.
    *         write the total for a given account code(HKONT)
              FORMAT COLOR COL_TOTAL INTENSIFIED ON.
              LOOP AT lt_total INTO wa_total
                 WHERE hkont = wa_summary-hkont.
                WRITE: /    sy-vline.
                IF sy-tabix = 1.
                  WRITE: (25) 'Total', wa_summary-hkont.
                ENDIF.
                IF sy-tabix = 1.
                  WRITE: (05) wa_total-waers,
                         (18) wa_total-wrbtr,
                         (18) wa_total-dmbtr,
                         (18) wa_total-gl_bal,
                         (18) wa_total-unrealized,
                              sy-vline.
                ELSE.
                  WRITE: AT 40(05) wa_total-waers,
                              (18) wa_total-wrbtr,
                              (18) wa_total-dmbtr,
                              (18) wa_total-gl_bal,
                              (18) wa_total-unrealized,
                                   sy-vline.
                ENDIF.
              ENDLOOP.
              FORMAT COLOR OFF.
            ENDAT.
            CLEAR lv_flag.
          ENDLOOP.
          WRITE: / sy-uline(122).
        ENDIF.
      ENDMETHOD.
    * METHOD display_summary                       *
      METHOD display_summary_header.
        FORMAT COLOR COL_HEADING.
        WRITE: /    sy-uline(122),
               /    sy-vline,
               (15) 'GL Account'  CENTERED,
               (04) 'Year'        CENTERED,
               (05) 'Curr.'       CENTERED,
               (15) 'Rate'        CENTERED,
               (18) 'Trans. Curr' CENTERED,
               (18) 'Local Curr.' CENTERED,
               (18) 'GL Balance'  CENTERED,
               (18) 'Unrealized'  CENTERED,
                     sy-vline,
               /     sy-uline(122).
        FORMAT COLOR OFF.
      ENDMETHOD.
    ENDCLASS.
    *       CLASS lcl_handler IMPLEMENTATION
    CLASS lcl_handler IMPLEMENTATION.
      METHOD handle_event.
        MESSAGE i008 WITH 'No data found for account no:' hkont.
        LEAVE LIST-PROCESSING.
      ENDMETHOD.
    ENDCLASS.
    * TOP-OF-PAGE                                  *
    TOP-OF-PAGE.
      DATA: o_top TYPE REF TO lcl_main.
      CREATE OBJECT o_top.
      CALL METHOD o_top->top_of_page.
    * START-OF-SELECTION                           *
    START-OF-SELECTION.
      DATA: o_main           TYPE REF TO lcl_main,
            o_handler        TYPE REF TO lcl_handler,
            o_summary        TYPE REF TO lcl_summary,
            it_bsis_bsas_dum TYPE STANDARD TABLE OF t_bsis_bsas,
            it_exch_dum      LIKE it_exch.
      CREATE OBJECT: o_main, o_handler, o_summary.
      SET HANDLER o_handler->handle_event FOR ALL INSTANCES.
      CALL METHOD o_main->get_data.
      CALL METHOD o_main->get_diff.
      CALL METHOD o_main->display_subheader.
      CALL METHOD o_main->display_header.
      CALL METHOD o_main->get_rate_and_show
         IMPORTING
            ex_bsis_bsas = it_bsis_bsas_dum
            ex_exch      = it_exch_dum.
      CALL METHOD o_summary->display_summary
         EXPORTING
            im_bsis_bsas = it_bsis_bsas_dum
            im_exch      = it_exch_dum.

Maybe you are looking for