!--a11y-->
Hazardous Substance Master Filling 
See Filling of the Hazardous Substance Master.
See Filling of the Hazardous Substance Master.
Filling the hazardous substance master runs as follows:
...
1. The system checks whether you have authorization to fill hazardous substance master data, that is, whether you have authorization to display, create, change, and delete hazardous substance master data. The system then carries out the following steps only for the countries and regions for which you have the authorizations described. If you do not have these authorizations for any country or region, the system cancels filling.

If you schedule the report program HS_FILL, the user under which the system performs filling requires authorization to display, create, change, and delete hazardous substance data for all countries and regions for which the system needs to create or change hazardous substance master records. The date and time of the last filling are each stored in only one environment parameter, so it is not possible, for example, for different users with authorizations for different countries to schedule and run filling for different countries.
2. The system reads the data from Customizing, for example, the countries and regions of the hazardous substance warehouses and the values of the environment parameters.
3. The system determines the relevant hazardous substance specifications and materials. We differentiate between the following cases:
¡ If you set the Fill Changed Objects Onlyindicator or if the report program is executed automatically without a variant, the system determines all specifications that were created or changed since the last update. It then determines all assigned materials for these specifications.
¡ If you have not set the Fill Changed Objects Only indicator, the system determines the specifications based on the entries on the selection screen. It then determines all assigned materials for these specifications and further limits these based on the entries on the selection screen. If you have not made any entries on the selection screen, the system determines all specifications to which materials are assigned and the assigned materials.
4. From the materials found, the system removes all those that are not relevant for hazardous substances. These are the materials for which the Relevant for Hazardous Substances indicator is not set in the material master in the WM Execution view. If a hazardous substance-relevant material appears several times in the materials found, the system uses this material only once in the continued process.

For more information about how to set up the Relevant for Hazardous Substances indicator in the WM Execution view, see the Implementation Guide (IMG) for the Hazardous Substance Master under Set Up Hazardous Substance Indicator in Material Master.
5. The system determines the specifications that are assigned to the remaining materials. If more than one specification is assigned to a material, the system attempts to filter out one specification only from these using the Business Add-In (BAdI) Conflict Resolution in Hazardous Substance Master Filling. If this is not possible, the system ignores the respective hazardous substance master record in filling, meaning it is not filled and a message is displayed in the filling log.
6. The system checks whether you are authorized to read the specification data for the remaining specifications. It checks all specification authorizations here, that is the authorizations for the specification header, for the value assignments, and for usages. If you have entered an authorization group on the selection screen, the system also checks whether you have the correct authorization for this authorization group. If you do not have the correct authorization, the system ignores the respective hazardous substance master record in filling, meaning it is not filled and a message is displayed in the filling log.
7. The system creates the hazardous substance master records for each remaining material in accordance with the countries and regions you specified in the IMG activity Assign Countries and Regions to Warehouse Numbers. That means it creates a hazardous substance master record for a material for each country and each region specified.
8. The system determines the required specification data for each of these hazardous substance master records from the specification assigned to the material. This is the data for the value assignment types and characteristics that you defined as source objects for filling in the IMG activity Assign Source Objects to Target Objects.
9. For each value assignment type, the system determines the data that is relevant for the hazardous substance master record from the data found as follows:
a. The system takes into account only the value assignment instances whose data has a validity area that is assigned in the IMG activity Specify Priorities for Validity Areas to the country or region of the warehouse for which the hazardous substance master record is to be created. If no such value assignment instance exists, the value assignment type is not taken into account in filling and the corresponding data from any previous filling is deleted.
b. The system takes into account only the value assignment instances whose data is active and that have a rating that is specified in the IMG activity Specify Priorities for Ratings. If no such value assignment instance exists, the value assignment type is not taken into account in filling.
c. If more than one value assignment instance remains, the system takes into account only the value assignment instances whose rating has the highest priority.
d. If more than one value assignment instance remains, the system takes into account only the value assignment instances whose validity area has the highest priority.
e. If more than one value assignment instance remains, the system attempts to determine one value assignment instance only from these using the BAdI Conflict Resolution in Hazardous Substance Master Filling. If more than one value assignment instance still remains, the value assignment type is not taken into account in filling in the standard system.
10. The system creates the hazardous substance master records based on the data determined or changes existing hazardous substance master records. The following applies here:
¡ If the hazardous substance master record does not yet exist and the system could determine data for at least one value assignment type, it creates the hazardous substance master record.
¡ If the hazardous substance master record already exists, the system transfers the determined data to the hazardous substance master record. Here it changes the data that already exists in the hazardous substance master record but that differs from the determined data. The system deletes any data that already exists in the hazardous substance master record but that it could no longer determine. The following are possible reasons why the system could no longer determine data:
§ You have deleted the data in specification management since the last filling.
§ You have changed the validity area or the rating for the data in specification management since the last filling.
§ You have created a new value assignment instance in specification management since the last filling and the system can no longer determine a value assignment instance exactly.
The following graphic shows an overview of the hazardous substance master filling process:

