03-21-2008 3:27 PM
Dear Experts,
Can anyone explain below macro.
DEFINE get_value.
call method of excel 'Cells' = cell
EXPORTING
#1 = &1 "v_rcount
#2 = &2. "2
get property of cell 'Value' = &3. " value from the table .
if not &3 is initial and &4 = 'T'. "e_file
&4 = 'F'.
endif.
END-OF-DEFINITION.
I never used Macros, Please explain in detail.
Thanks
Cris
03-21-2008 7:51 PM
Hello Cris
Macros are used to "abbreviate" coding. The repetitive part of the coding is defined in the macro. Below is and example of filling the itab of excluded functions for an ALV toolbar:
DATA: lt_excltab TYPE ui_functions.
APPEND cl_gui_alv_grid=>mc_func_loc_info TO lt_excltab.
APPEND cl_gui_alv_grid=>mc_func_loc_graph TO lt_excltab.
APPEND cl_gui_alv_grid=>... TO lt_excltab.
...
Use of macro:
DEFINE mac_exclude_function.
APPEND &1 TO lt_excltab.
END-OF-DEFINITON.
mac_exclude_function: cl_gui_alv_grid=>mc_func_loc_info,
cl_gui_alv_grid=>mc_func_loc_graph,
...
Regards
Uwe
03-21-2008 7:51 PM
Hello Cris
Macros are used to "abbreviate" coding. The repetitive part of the coding is defined in the macro. Below is and example of filling the itab of excluded functions for an ALV toolbar:
DATA: lt_excltab TYPE ui_functions.
APPEND cl_gui_alv_grid=>mc_func_loc_info TO lt_excltab.
APPEND cl_gui_alv_grid=>mc_func_loc_graph TO lt_excltab.
APPEND cl_gui_alv_grid=>... TO lt_excltab.
...
Use of macro:
DEFINE mac_exclude_function.
APPEND &1 TO lt_excltab.
END-OF-DEFINITON.
mac_exclude_function: cl_gui_alv_grid=>mc_func_loc_info,
cl_gui_alv_grid=>mc_func_loc_graph,
...
Regards
Uwe
03-21-2008 10:01 PM