0% found this document useful (0 votes)
397 views10 pages

Abap Oops Example

Driver program to carry this class explicitly without giving access to the end user directly access the class in se24.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
397 views10 pages

Abap Oops Example

Driver program to carry this class explicitly without giving access to the end user directly access the class in se24.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Basic bank operations:

Goto se24

Create a class zaccountaa1.

1
[Link]@[Link]
31/12/2010
2
[Link]@[Link]
31/12/2010
3
[Link]@[Link]
31/12/2010
4
[Link]@[Link]
31/12/2010
5
[Link]@[Link]
31/12/2010
6
[Link]@[Link]
31/12/2010
7
[Link]@[Link]
31/12/2010
8
[Link]@[Link]
31/12/2010
In se38 create a driver program to carry this class explicitly without giving
access to the end user directly access the class in se24.

Driver program.
REPORT ZACCOUNTAA.
data: acct1 type REF TO ZACCOUNTAA1.
DATA: BAL TYPE I.
CREATE OBJECT : ACCT1.
SELECTION-SCREEN BEGIN OF BLOCK A.
PARAMETERS : P_AMNT TYPE DMBTR,
P_DPST TYPE DMBTR,
P_WDRW TYPE DMBTR.
SELECTION-SCREEN END OF BLOCK A.

START-OF-SELECTION.
CALL METHOD ACCT1->SET_BALANCE( P_AMNT ).
* exporting
* new_balance =
* .
WRITE :/ 'SET BALANCE TO' , P_AMNT.
9
[Link]@[Link]
31/12/2010
BAL = ACCT1->DEPOSIT( P_DPST ).
WRITE:/ 'DEPOSITED' , P_DPST, 'BUCKS MAKING BALANCE TO ' , 'BAL'.
BAL = ACCT1->WITHDRAW( P_WDRW ).
WRITE :/ 'WITHDRAW', P_WDRW,
'BUCKS MAKING BALANCE TO ' , BAL.

10
[Link]@[Link]
31/12/2010

You might also like