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

Add include in class

Former Member
0 Likes
3,372

Hi,

in my class i need to add include RPCBDT00 for read cluster PCL4, i need to access to import_from_pcl4 macro.

How can i do that ?

Thanks a lot.

Cheers.

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,401

In se24 in the main tool bar( right corner ) there is a button to include macro.

Read only

0 Likes
1,401

Yes i know but i don't want to create my macro i want to use an existing one in include RPCBDT00.

Read only

0 Likes
1,401

Hi,

Generally if the include only has macro definitions. Then it can be added there with include RPCBDT00 statement( for example you can add the include <CNTN02> directly there ). The include RPCBDT00 has data declarations, hence it will throw a syntax error. You can directly add it inside a method using the include statement.

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,401

Hello

This is not possible due to the non-OO compatible coding of include RPCBDT00.

If you include the INCLUDE into a method you get the syntax error (on ERP 6.0) that "...you can only TYPE to refer to ABAP dictionary types (not "LIKE" or "STRUCTURE").

See also: method PO_READ of class CL_PO_HEADER_HANDLE_MM:


METHOD po_read.

  INCLUDE mm_messages_mac.

  DATA: l_po_number TYPE ekko-ebeln.

  IF im_po_number NE space.
    l_po_number = im_po_number.
  ELSE.
    l_po_number = po_number.
  ENDIF.
...

Regards

Uwe