The method ChangeStatus enters the results of the count for a
count list requested by the method GetItems,
updates the relevant stock values at retail and changes the item status from A ("to be counted") to B ("stock counted,revaluation not yet carried out") or C ("revaluation carried out").
When method GetItems is used, the system checks the authorization object for revaluation at retail (W_WBEF_WRK).
The following compulsory fields in the parameter import structure ListInput have to be filled:PlantDate of retail price change andItem status
You also have to indicate calling SAP Retail Store by setting the flag ListIinput-VORGA to '4'.
The table CountedItems contains the material quantities entered:MaterialCounted material quantity andSales unit
Further table fieldsretail revaluation document numberretail revaluation document year and
retail revaluation document item
are required internally to uniquely identify and assign items. This iswhy a storage location (with the material and the quantity entered) is not required in this table.
The success/error log of the method is returned in the parameter Return.
To create a count list using the method GetItems, the relevantretail revaluation documents for the retail price changes in theconditions have to have been created using report RWVKU001 or via the POS inbound interface.
The method can only function as required if no error messages are generated in the Return table. This is the case when the retail revaluation document items are selected without any error and, forexample, there is no database lock preventing the stock values being updated at retail.
If an error occurs, the count quantities passed to the BAPI are savedin the relevant retail revaluation documents and their status ischanged from A ("to be counted") to B ("stock counted, revaluation is not yet carried out").
Transaction control is not implemented. The calling program must
therefore trigger the "COMMIT WORK" itself after successfully calling this method.