0
Sep 16, 2011 at 01:05 PM

# Reusing a MACRO definition

46 Views

HI Folks,

I have defined a macro to build up a RANGE as below.I need 4 to 5 ranges which are similar to this.Can anyone here please let me know how we can define one macro which can be reused to build up RANGE.

```
*For ex this is a macro m_r_mand for building up a range r_mand_fields.
define m_r_mand.
r_mand_fields-sign   = &1.
r_mand_fields-option = &2.
r_mand_fields-low     = &3.
append *r_mand_fields.*
clear  r_mand_fields.
end-of-definition.

m_r_mand 'I' 'EQ'  'BOART_AG'.
m_r_mand 'I' 'EQ'  'VKORG'.
m_r_mand 'I' 'EQ'  'VTWEG'.

*This is another macro m_r_sdh which builds up a range r_sdh.
define m_r_sdh.
r_sdh-sign   = &1.
r_sdh-option = &2.
r_sdh-low    = &3.
append *r_sdh.*
clear  r_sdh.
end-of-definition.

m_r_sdh 'I' 'EQ' 'VTWEG'    .
m_r_sdh 'I' 'EQ' 'SPART'    .
m_r_sdh 'I' 'EQ' 'BOTEXT'   .

```

The only difference is the RANGE.In one macro I am building up a range r_mand_fields and in another r_sdh.

Instead of defining two Macros is it possible to define one Macro which can be reused for a situation like the above?

Thanks,

Kiran.