Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

class protected section

Former Member
0 Likes
533

Hi,

I want to move some values from data from protected section of class into new table (tab) which is needed for FM 'download' to transfer data from sap to excel.

How can I do it?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
507

If you want to do that from outside the instance ? In this case you'd have to implement a "get" method. Like

METHOD get_data EXPORTING E_MATNR type MATNR.
E_MATNR = ME->MATNR.
ENDMETHOD.

given that your class has a protected attribute MATNR.

You'd call that with

CALL METHOD myObject->get_data IMPORTING e_matnr = l_matnr.

Hope that helps ...

Frank

3 REPLIES 3
Read only

Former Member
0 Likes
508

If you want to do that from outside the instance ? In this case you'd have to implement a "get" method. Like

METHOD get_data EXPORTING E_MATNR type MATNR.
E_MATNR = ME->MATNR.
ENDMETHOD.

given that your class has a protected attribute MATNR.

You'd call that with

CALL METHOD myObject->get_data IMPORTING e_matnr = l_matnr.

Hope that helps ...

Frank

Read only

0 Likes
507

HI,

thaks for help

regards,

Joanna

Read only

0 Likes
507

My pleasure ...