Object oriented programming (OOP)
We get an exception.
Given below is an example code for using the global class we defined.
REPORT ZGB_OOPS_BANK .
DATA: acct1 type ref to zaccountaa.
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 ).
write:/ 'Set balance to ', p_amnt.
bal = acct1->deposit( p_dpst ).
write:/ 'Deposited ', p_dpst ,' bucks making balance to ', bal.
bal = acct1->withdraw( p_wdrw ).
write:/ 'Withdrew ', p_wdrw ,' bucks making balance to ', bal.
This is the output.

2 comments:
Nice blog,thanks for sharing this informative artcle.
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Big Data and Hadoop Training In Hyderabad
Nice blog Thanks For sharing this informative article.
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Big Data and Hadoop Training In Hyderabad
Post a Comment