cancel
Showing results for 
Search instead for 
Did you mean: 

regarding include and macro

0 Kudos

hi folks,

what is the diff between Include and MACRO?

is both r same??

regards,

sathish.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (4)

Answers (4)

bpawanchand
Active Contributor
0 Kudos

HI

INCLUDE :

Include programs are global R/3 Repository objects. They are solely for modularizing source code, and have no parameter interface. Where ever you write the include statement at that point the code that you have defined in the INCLUDE it is substituted in the place of INCLUDE<name> and include do no have any parameter interface. we can debug INclude.

MACROS :

If you want to reuse the same set of statements more than once in a program, you can include them in a macro. For example, this can be useful for long calculations or complex WRITE statements. You can only use a macro within the program in which it is defined, and it can only be called in lines of the program following its definition.

The following statement block defines a macro <macro>:

DEFINE <macro>.

<statements>

END-OF-DEFINITION.

And one important thing about MACROS is that we cannot Debug the macros and every MACRO can have at max 9 place holders that means for MACROS we can have PARAMETER INTERFACE i;e we can pass the values to the MACROS

Regards

Pavan

Former Member
0 Kudos

Hi,

check this............

Include: can use globally like,can call the include program from other multiple programs.we can't execute it in the same program.

INCLUDE Z PROGRAM NAME -->it will call it.

Macro : keyword is DEFINE.

Here we have to call the macro after the actual defination.This is used with in the program only.

write: '........'.

define mac1.

write:............'.

end-of-definition.

Both r to modularize the code into eassier way.

we will write abap statements in a module,we keep that module program.

Both are may not be same as per my knowledge.

Regards

Krishna

former_member181995
Active Contributor
0 Kudos

Satish,

refer:

Amit.

Former Member
0 Kudos

Hi,

Ther are not same at all.

Check this link you will get the answer-

http://pranshu.in/

Scroll down.

Regards,

Sujit