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

reg : class defination and implementation in code

Former Member
0 Likes
350

Hi floks ,

in my requirement is same like below code can be utilized in that program .

how can declare in class in program [defination component as well as implementation component] to access data /get data .

Could u please help out in this program ...........

data: catsxt_tab type catsxt_wa_itab,

docflow_tab type catsxt_flow_alv_itab,

data: ls_docflow like line of docflow_tab.

call method gr_dbsel->get_time_sheet_data

exporting

im_personnel_number_tab = pernr_sel_tab

importing

ex_catsxt_data = catsxt_tab

ex_docflow = docflow_tab.

thanks for ur better advanced support,

Suresh

1 REPLY 1
Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
0 Likes
313

Hi,

Look at this code, maybe it's usefull for you.

----


  • CLASS time_sheet DEFINITION

----


CLASS time_sheet DEFINITION.

PUBLIC SECTION.

METHODS get_time_sheet_data

IMPORTING

im_personnel_number_tab TYPE pernr "Type ?

EXPORTING

ex_catsxt_data TYPE catsxt_wa_itab

ex_docflow TYPE catsxt_flow_alv_itab.

ENDCLASS.

----


  • CLASS time_sheet IMPLEMENTATION

----


CLASS time_sheet IMPLEMENTATION.

METHOD get_time_sheet_data.

*if necessary DATA: ls_docflow LIKE LINE OF docflow_tab.

  • im_personnel_number_tab is filled

  • Fill ex_catsxt_data / ex_docflow.

ENDMETHOD.

ENDCLASS.

DATA: catsxt_tab TYPE catsxt_wa_itab,

docflow_tab TYPE catsxt_flow_alv_itab,

pernr_sel_tab TYPE pernr,

obj_time_sheet TYPE REF TO time_sheet.

START-OF-SELECTION.

CREATE OBJECT obj_time_sheet.

CALL METHOD obj_time_sheet->get_time_sheet_data

EXPORTING

im_personnel_number_tab = pernr_sel_tab

IMPORTING

ex_catsxt_data = catsxt_tab

ex_docflow = docflow_tab.

Regards.

Marcelo Ramos