2010 Jul 15 4:33 AM
Hello folks,
I am new to OOPS concept in ABAP. I am using a Method which is defiend as private section. I want to use the selection screen parameter in my method for some validation purpose.. This might be a basic thing in OOPS but i am not sure how to do it..
Could you please suggest how to do so...
Thanks in advance,
Shyam.
2010 Jul 15 6:11 AM
Shyam,
check this
&----
*& Report ZDEMO
*&
&----
*&
*&
&----
REPORT ZDEMO.
tables:pa0000.
SELECTION-SCREEN begin of BLOCK b1.
PARAMETERS p1 type i .
SELECTION-SCREEN end of block b1.
class lc DEFINITION.
PUBLIC SECTION.
data ty type i.
methods:
get.
PRIVATE SECTION.
methods:
getty.
ENDCLASS.
class lc IMPLEMENTATION.
method getty.
ty = p1.
ENDMETHOD.
method get.
me->getty( ).
write ty.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
data obj type ref to lc.
create OBJECT obj.
call METHOD obj->get( ).
Thanks
Bala Duvvuri
Shyam,
check this
&----
*& Report ZDEMO
*&
&----
*&
*&
&----
REPORT ZDEMO.
tables:pa0000.
SELECTION-SCREEN begin of BLOCK b1.
PARAMETERS p1 type i .
SELECTION-SCREEN end of block b1.
class lc DEFINITION.
PUBLIC SECTION.
data ty type i.
methods:
get.
PRIVATE SECTION.
methods:
getty.
ENDCLASS.
class lc IMPLEMENTATION.
method getty.
ty = p1.
ENDMETHOD.
method get.
me->getty( ).
write ty.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
data obj type ref to lc.
create OBJECT obj.
call METHOD obj->get( ).
Thanks
Bala Duvvuri
2010 Jul 15 6:11 AM
Shyam,
check this
&----
*& Report ZDEMO
*&
&----
*&
*&
&----
REPORT ZDEMO.
tables:pa0000.
SELECTION-SCREEN begin of BLOCK b1.
PARAMETERS p1 type i .
SELECTION-SCREEN end of block b1.
class lc DEFINITION.
PUBLIC SECTION.
data ty type i.
methods:
get.
PRIVATE SECTION.
methods:
getty.
ENDCLASS.
class lc IMPLEMENTATION.
method getty.
ty = p1.
ENDMETHOD.
method get.
me->getty( ).
write ty.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
data obj type ref to lc.
create OBJECT obj.
call METHOD obj->get( ).
Thanks
Bala Duvvuri
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |