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

Include in ABAP class

Former Member
0 Likes
10,738

Hi all,

Would like to know how to use a INCLUDE in ABAP class.

Regrdas,

Akshay

5 REPLIES 5
Read only

Former Member
0 Likes
3,177
Read only

Former Member
0 Likes
3,177

Like any other INCLUDE. See below:

CLASS lcl_event_receiver_g1 DEFINITION.

PUBLIC SECTION.

include zr_snax_class_defs.

PRIVATE SECTION.

ENDCLASS.

CLASS lcl_event_receiver_g1 IMPLEMENTATION.

METHOD handle_toolbar.

include zr_snax_class_info2.

ENDMETHOD.

METHOD handle_user_command.

DATA: lt_rows TYPE lvc_t_row.

data: Proceed.

data: l_cnt type i.

Perform Clear_Refr_Variables .

  • get selected row

CALL METHOD grid1->get_selected_rows

IMPORTING et_index_rows = lt_rows.

CALL METHOD cl_gui_cfw=>flush.

assign P1[] to <TheGrid>.

Refresh_G1 = 'Y'.

include zr_snax_class_info3.

unassign <TheGrid>.

ENDMETHOD. "handle_user_command

ENDCLASS.

Read only

0 Likes
3,177

Hi,

do this way...

In SE24, you can add the include statement by doing the following.

Click Go To> Class-Local Types>Local Type Definitions.

Add the include there, you will be able to use the types from within in your class.

Regards,

Santosh

Read only

Former Member
0 Likes
3,177

Thanks for the inputs.

pls let me know how do use following include :

<b>Include <cntn02></b> in my class.

I am not able to add include statement the way you all have suggested.

Read only

0 Likes
3,177

Can you provide some more info what you would like archive?

What is in the include? types? data declaration? routines?

Peter