Creating inventory adjustment codes
To add inventory adjustment codes for your store:
Procedure
-
Create an XML file (with a name of your choice) similar to the following example, and place it
in a location where the massload utility can find it. In the XML file, specify values for the
invadjcode and invadjdesc elements to add the new inventory adjustment code to two database tables:
INVADJCODE and INVADJDESC table. The invadjcode_id should be the
same value in both tables for any given code.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE import SYSTEM "wcs.dtd"> <import> <invadjcode invadjcode_id="404" adjustcode="BRKN" storeent_id="-1" markfordelete="0" /> <invadjdesc invadjcode_id="404" description="BROKEN" language_id="-1" /> </import>
Where:
- invadjcode_id
- An adjustment code identifier you assign. The identifier is used internally and is not displayed to users in the WebSphere Commerce user interface.
- adjustcode
- A 4-character code that uniquely identifies the code, suitable for display in a user interface.
- storeent_id
- The identifier for the store entity or store group. To add this inventory adjustment code to all stores, enter a value of "-1". Otherwise, provide a specific store entity or store group identifier.
- description
- A text description of the inventory adjustment code, suitable for display in a user interface.
- language_id
- The default language for information displayed to customers shopping in the store.
If you have a need to add more than one inventory adjustment code, you can specify multiple codes in the XML file.
-
Run the Load command against your XML file to load your data into the target database.
- massload.cmd -dbname dbname -dbuser dbuser -dbpwd dbpwd -infile xml_file_name -method sqlimport
- Become wasuser first (the WebSphere Application Server user ID): su - wasuser
- Issue this command:
./massload.sh -dbname dbname -dbuser dbuser -dbpwd dbpwd -infile xml_file_name -method sqlimport
- Start a Qshell session. Then, run the following command from the
WC_installdir/bin
directory:-
massload.sh -dbname dbname -dbuser dbuser -dbpwd dbpwd -infile xml_file_name -method sqlimport
-
- Start a Qshell session. Then, run the following command from the
- Confirm the addition of the inventory adjustment codes by running a database query to view the new code values were added to both tables.