SAP Program EHSWAR_SETUP_APP_QTY_UPDATE - Update Report for Quantity Update

Purpose
Update report EHSWAR_SETUP_APP_QTY_UPDATE checks and updates (ifrequired) the quantity update in Waste Management.
The quantity update consists of two parts, both of which are supportedby this report:

  • Quantity update of total quantity

  • The quantity update for the total quantity is active as standard, if youcreate disposal document items with reference to a waste approval andselect a waste code that is relevant to quantity update from this wasteapproval. To display or manually select the quantity update-relevantwaste code, in Customizing you must define the screen
    Change Disposal Documents so as to show the Waste Code tabpage.
    Depending on the update mode for the quantity update-relevant wastecode, remember that the update report may set a quantity update-relevantwaste code in the disposal document automatically.
    • Period-based quantity update

    • You can activate period-based quantity update in the IMG activitySpecify Waste Approval Types and choose betweendifferent activation levels (low, medium, or high tolerance). As forquantity update of the total quantity, the basis is the disposaldocument items plus the quantity update-relevant waste code. However,the disposal document items are updated according to the key datedefined in addition to the update of the total quantity for the relevantperiod.
      If you deactivate period-based quantity update, the update report doesnot check or update the quantities disposed of to date in the periods ofthe relevant waste code in the waste approval.
      When you activate period-based quantity update, you must run the updatereport in order to initialize period-based quantity update.
      For more information about quantity update, see the documentation onWaste Management (EHS-WA).

      Prerequisites

      Checks before calling the report
      Before running the update report, you must check the sort sequence ofwaste codes in the waste approval and may need to redefine it, so thatthe report can determine a quantity update-relevant waste code.
      For disposal document items that contain several waste codes and forwhich you do not want to determine new quantity update-relevant wastecodes, you must ensure that only the quantity update-relevant waste codeyou require is selected.

      Conversion rules
      If you specify different units of measure for the quantity disposed of,the alert quantity, and the licensed quantity for a waste code orperiod, you must specify global conversion rules in the IMG activityCheck Units of Measurement.
      You can specify the rules for converting units of measure for thequantity specified in the disposal document item into the units ofmeasure for the waste code or period as global conversion rules inCustomizing or as conversion rules for the waste material.
      In case of conversion errors, the report cannot correct the totalquantity or period-based quantity.

      Update mode for quantity update
      If you run the report in update mode for quantity update, all the wasteapprovals whose quantities are different to the calculated total of thedisposal document items must be locked for correction.
      If the update mode that you use for the quantity update-relevant wastecode determines a new quantity update-relevant waste code, the affecteddisposal document must also be locked to enable the correction to bemade.
      If a locking error occurs, the report cannot make the change orcorrection. You must then make sure that the waste approval or disposaldocument is unlocked, and then call the report again.
      If you want to use the report in update mode for quantity update, choosea time when no users are working in the Waste Management component.

      Upgrade/new installation
      If you are running an upgrade or installing Waste Management forthe first time, you must first run reportEHSWAR_INIT_FUNC_APP_DISPDOC torun an initialization.
      The initialization report defines a sort sequence of waste codes forwaste approvals, to determine the quantity update-relevant waste code ofthe disposal document item, and initializes the quantity update-relevantwaste code. The initialization of the quantity update-relevant wastecode is not identical to the process that reportEHSWAR_SETUP_APP_QTY_UPDATE supports by means of the sort sequence forwaste codes. If you want to continue to use the same waste code for thewaste approval after an upgrade, you must run the reportEHSWAR_SETUP_APP_QTY_UPDATE in update mode Retain Selection forRelevant Waste Code.

      Features
      Report EHSWAR_SETUP_APP_QTY_UPDATE runs a comprehensive check onquantity update (total quantity and # if active # period-based quan
      tities).
      This check calculates the total of all quantities for disposal documentitems that are assigned to the waste code of a waste approval. Disposaldocuments that are flagged for deletion and reversed disposal documentsare ignored in this total.
      Then the report compares the calculated total of disposal document itemswith the total quantity disposed of so far or the quantity disposed offor the period, and displays the result.
      Provided that no critical error occurs when calculating the total (forexample, an error when converting units of measure, or the exceeding ofthe licensed quantity), the report can correct the quantity disposed ofso far, if you are running the report in update mode for quantityupdate.
      The report can determine a quantity update-relevant waste code. Eachdisposal document item must contain exactly one quantity update-relevantwaste code, so that the disposal document item can be updated.
      The quantity update-relevant waste code and a corrected quantitydisposed of for quantity update are only written to the database if yourun the update report in update mode for quantity update.
      The report runs several consistency checks, for example, whether thewaste approval is valid and released. The results of this check are forinformation only and do not prevent any correction of the quantityupdate or a change to the quantity update-relevant waste code. Thereport assumes that the data was correct at the time when the disposaldocument or disposal document item was created.

      Selection screen

      Approval selection
      You can restrict the waste approvals to be checked or updated accordingto the authority-assigned waste approval number and disposal documenttype, or any combination thereof.
      If you leave the input fields blank, the report checks or updates allthe waste approvals in the system.

      Update mode for quantity update-relevant waste codes
      To retain the current quantity update-relevant waste code for thedisposal document item, select Retain Selection for Relevant WasteCode. First make sure that you have selected exactly one quantityupdate-relevant waste code in each disposal document item, and that theselected waste code is valid.
      To automatically determine a quantity update-relevant waste code for alldisposal document items where no quantity update-relevant waste code hasbeen selected, select Determine Relevant Waste Code for MissingSelection. This is the default setting.
      To determine new quantity update-relevant waste codes, select
      Determine Relevant Waste Code in Each Case. In this case the systemoverwrites any previous quantity update-relevant waste codes that areselected in each disposal document item. You can use this option toautomatically correct cases where multiple quantity update-relevantwaste codes have been selected for a disposal document item.
      Note that the quantity update-relevant waste code is only updated in thedisposal document items of disposal documents that are assigned to oneof the waste approvals within the scope of the selection.

      Output
      To display all disposal document items with the item quantities thatwere included in the total quantity disposed of to date, together withthe calculated quantity update data (total quantity and period quantityif applicable), select Display Assigned Disposal Document Items.

      Initialization/Update
      To run the report in update mode for quantity update, select UpdateQuantity Update.This means that the report saves the determinedquantity update-relevant waste codes to the database and corrects anyerrors that can be corrected.
      If you do not set this indicator, the report only runs a simulationwithout changing the data.

      Result output
      The report outputs the result as an application log, both on screen andin the database.
      However, the output on screen and the output in the database areslightly different. The screen shows one log, to facilitate export ofthe output, whereas the output in the database is split into severallogs, to make it easier to read.
      To display the database output, use transaction SLG1, object EHWM, andsubobject WMAPPQTY.
      You can influence the expiry date of the database output with the EH<(>
      <)>amp;s environment parameter
      WAM_PROT_EXPIRE_DAYS. If you do not specify a value for thisenvironment parameter, the report assumes a value of 30 days. Note thatthe database entries are needed in case of support queries aboutquantity update.
      The external identification of the application log specifies whether thereport runs as a check (simulation) or a correction (update).
      Each output section is introduced by one of the following messageslines. (For the database entries this means separately written logs withan identifier in the external identification to distinguish them):

      • Global

      • Messages that cannot be assigned to either a specific disposal documentor a specific waste approval.
        • Disposal document X

        • Messages for the disposal document and its disposal document items (forexample, the definition of a new quantity update-relevant waste code).
          • Waste approval Y

          • Messages for the waste approval and the data for quantity update of theassigned waste codes # total quantity and, if active, period quantities.
            if you have set the Display Assigned Disposal Document Itemsindicator, the disposal document items used to calculate the quantitydisposed of to date are displayed for each calculated total quantity orperiod quantity.
            All output sections are optional and are only shown if relevant messagesexist.
            The messages are sorted first according to relevance, then according toerror classification. For example, the first message may be aninformation message about a situation that is caused by an error shownin a later message.

            Check correct quantity update
            To ensure that the quantity update is correct, no new quantityupdate-relevant waste codes can be determined in the simulation, and alldata of the quantity update must be correct.
            When updating the quantity update, all the determined quantityupdate-relevant waste codes must be set correctly and in addition alldata of the quantity update must be either correct or corrected.
            If this is not the case, you must resolve the cause of any errors toensure the correctness of the quantity update (for example, increase thetotal licensed quantity, so that the update report can correct the totalquantity), then run the update report again in update mode for quantityupdate.

            Notes
            SAP recommends that you first run a simulation of the quantity update.
            Once you have checked the result by using the screen output or thecreated database entries in the application log, you can select updatemode for quantity update, which writes any new quantity update-relevantwaste codes determined and the corrected quantities disposed of to thedatabase.
            The update report can only automatically correct the quantity updateerrors that are shown in the simulation as correctable. In case ofcritical errors, the relevant quantity disposed of cannot be correctedautomatically, and the new quantity update-relevant waste code cannot beset. First you must resolve the critical error, then run the updatereport again.
            You can run the report any number of times.
            The update report calculates the quantities disposed of so far forquantity update, using the current system status. If you change theassignment of the disposal document status that corresponds to
            Reversed in Customizing, the calculated value of the quantitydisposed of so far may be incorrect.
            However, you can use the report to recalculate the quantity update dataaccording to the changed Customizing settings.