SAP Function Modules

MASS_MARC_CHANGE_CELL_VALUE SAP Function module - Change color of cells in mass maintenance ALV grid







MASS_MARC_CHANGE_CELL_VALUE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name MASS_MARC_CHANGE_CELL_VALUE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MASS_MARC_UTILITIES
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM MASS_MARC_CHANGE_CELL_VALUE - MASS MARC CHANGE CELL VALUE





CALL FUNCTION 'MASS_MARC_CHANGE_CELL_VALUE' "Change color of cells in mass maintenance ALV grid
  EXPORTING
    new_color =                 " lvc_s_colo    ALV control: Color coding
*   fieldcatalog =              " lvc_t_fcat    Field catalog for ListViewer control
*   field_to_clear =            " mass_flag_clear  mass maintenance flags for LFM2
*   p_refsite_distr = SPACE     " c
*   at_least_one_mpop =         " flag          General Flag
*   at_least_one_wrpl =         " flag          General Flag
  TABLES
    table_to_change_from =      " mass_marc_table  table for MARC mass maintenance
    table_to_change =           " mass_marc_table  table for MARC mass maintenance
    previous_color_table =      " mass_marc_table  table for MARC mass maintenance
* CHANGING
*   lines_to_change =           " lvc_t_modi    ALV Control: Table of Modified Cells for the Application
    .  "  MASS_MARC_CHANGE_CELL_VALUE

ABAP code example for Function Module MASS_MARC_CHANGE_CELL_VALUE





The ABAP code below is a full code listing to execute function module MASS_MARC_CHANGE_CELL_VALUE including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_table_to_change_from  TYPE STANDARD TABLE OF MASS_MARC_TABLE,"TABLES PARAM
wa_table_to_change_from  LIKE LINE OF it_table_to_change_from ,
it_table_to_change  TYPE STANDARD TABLE OF MASS_MARC_TABLE,"TABLES PARAM
wa_table_to_change  LIKE LINE OF it_table_to_change ,
it_previous_color_table  TYPE STANDARD TABLE OF MASS_MARC_TABLE,"TABLES PARAM
wa_previous_color_table  LIKE LINE OF it_previous_color_table .

DATA(ld_lines_to_change) = 'Check type of data required'.
DATA(ld_new_color) = 'Check type of data required'.
DATA(ld_fieldcatalog) = 'Check type of data required'.
DATA(ld_field_to_clear) = 'Check type of data required'.
DATA(ld_p_refsite_distr) = 'Check type of data required'.
DATA(ld_at_least_one_mpop) = 'Check type of data required'.
DATA(ld_at_least_one_wrpl) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_table_to_change_from to it_table_to_change_from.

"populate fields of struture and append to itab
append wa_table_to_change to it_table_to_change.

"populate fields of struture and append to itab
append wa_previous_color_table to it_previous_color_table. . CALL FUNCTION 'MASS_MARC_CHANGE_CELL_VALUE' EXPORTING new_color = ld_new_color * fieldcatalog = ld_fieldcatalog * field_to_clear = ld_field_to_clear * p_refsite_distr = ld_p_refsite_distr * at_least_one_mpop = ld_at_least_one_mpop * at_least_one_wrpl = ld_at_least_one_wrpl TABLES table_to_change_from = it_table_to_change_from table_to_change = it_table_to_change previous_color_table = it_previous_color_table * CHANGING * lines_to_change = ld_lines_to_change . " MASS_MARC_CHANGE_CELL_VALUE
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_lines_to_change  TYPE LVC_T_MODI ,
ld_new_color  TYPE LVC_S_COLO ,
it_table_to_change_from  TYPE STANDARD TABLE OF MASS_MARC_TABLE ,
wa_table_to_change_from  LIKE LINE OF it_table_to_change_from,
ld_fieldcatalog  TYPE LVC_T_FCAT ,
it_table_to_change  TYPE STANDARD TABLE OF MASS_MARC_TABLE ,
wa_table_to_change  LIKE LINE OF it_table_to_change,
ld_field_to_clear  TYPE MASS_FLAG_CLEAR ,
it_previous_color_table  TYPE STANDARD TABLE OF MASS_MARC_TABLE ,
wa_previous_color_table  LIKE LINE OF it_previous_color_table,
ld_p_refsite_distr  TYPE C ,
ld_at_least_one_mpop  TYPE FLAG ,
ld_at_least_one_wrpl  TYPE FLAG .

ld_lines_to_change = 'Check type of data required'.
ld_new_color = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_table_to_change_from to it_table_to_change_from.
ld_fieldcatalog = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_table_to_change to it_table_to_change.
ld_field_to_clear = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_previous_color_table to it_previous_color_table.
ld_p_refsite_distr = 'Check type of data required'.
ld_at_least_one_mpop = 'Check type of data required'.
ld_at_least_one_wrpl = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name MASS_MARC_CHANGE_CELL_VALUE or its description.