Use This function module enables you to calculate the goods issue ofmaterials> orreal substances> to which amaterial is assigned.Input In the interface, an amount category> and ameasured value/reference value category> arepassed to the module. As an option, a start date and end date for theselection period and a key date can be passed. If these are not filledat the interface, the current system date is used. A table of risk assessment header records for which the calculation isto be carried out is also passed. If it exists, a table of existingamount records is passed.Output If no new data could be calculated on the basis of the values passed,the E_FLG_NO_VALUES indicator is set to "X" (= true). The newly calculated amount records with the goods issue data for theindividual materials or real substances are returned in theE_QUANTITY_TAB table. Here, each amount record is assigned a headerrecord of the risk assessment in the E_EXPOSURE_HEADER_TAB table. If an error occurs in processing that does not lead to an exceptionhandling being triggered, error information is returned to the callingprogram via the E_ERROR_STRUC structure. Functionality Processing is done in the following steps: Input check> First the input parameters are checked. If the passed amount category,the measured value/reference value category, or the table for the riskassessment header records are empty, further processing is canceled. Thepassed data is also transferred to a local work table. Check for material or real substance> A check is run on the passedagent type>. The agent typemust be a material or a real substance because executing a materialmovement determination only makes sense for these. If the agent type isnot a material or a real substance, processing is ended without errorsand no data is returned. Determine material assignment> If the passed agent type is a real substance, for all passedspecifications> contained inthe risk assessment header records, the material assignments aredetermined within the specification database and updated in the worktable. If it is a material, only the local work table is updated. Entries in the work table for which no material exists - either directlyor via an assignment - are deleted. If the work table is then empty,processing is ended without errors. Determine work area assignment and integration objects> To determine the movement data for the material, both the assignment ofthe agent to the work area and the assignment of a storage location tothe work area are used. The work area is assigned directly via the risk assessment header. The assignment of the storage location to the work area is made usingthe data integration> function in the work area. The assignment data is transferred to the work table, entries with noassignment are deleted. If the work table is empty, further processingis ended without error messages. Determine RFC destination> The module is prepared for a link to the material data via RemoteFunction Call (RFC>). Forthis purpose, a check is made for each plant via an environmentparameter whether a link has been set up via RFC. This means it ispossible in principle to set up one Plant Maintenance system for eachplant. Read material movement data> Once all required data has been entered in the work table, the materialmovement data can be read. Prepare output> Output is now prepared by writing the calculated data to the amounttable for export. The following is important here: The link to its header record must be entered in the new amount record.To do this, the RECN of the relevant header record is transferred to theamount record as RECNROOT. A check must be made whether the unit of the calculated material stockhas the same dimension> asis set for the amount category (see Specify MeasurementItems>). If an amount record already exists for thismeasurement item>, afollow-on record can be created. Here, a check is run to determinewhether the start of validity of the existing record is not equal to thecurrent key date and whether the end of validity is the 12/31/9999("high date"). Only if this is the case is a record split permitted andthe SPLITTFLG indicator of the exported amount record can be set to true("X"). Export calculated data> The final step checks whether the export table for amounts containsentries. If it does, the export indicator E_FLG_NO_VALUES is set tofalse (" ").Prerequisites So that the function module can be used it must be active in the systemand be assigned to at least onemeasurement item> inCustomizing for Industrial Hygiene and Safety> in the IMG activitySpecify Measurement Items>. When you edit the activity , also make sure that the dimension of the amount category matches thedimension in inventory management>, and that the units ofmeasurement for inventory management> are contained in thedimension for the amount category.Notes If the function module was assigned as described in Customizing, it canbe called from the Industrial Hygiene and Safety> menu usingAgents -> Amount Determination>. Before determination is started,you must specify the amount category and the measured value/referencevalue category.Further_sources_of_inf INCLUDE EHS_CBIH_UE_READ_QUANTITIES OBJECT DOKU ID TX |