In this exercise, we shall take up an Excel sheet that contains Stock Item Master records with Standard Cost and Standard Price details. As the data for a single MASTER record may span to multiple rows, we have used the SCROLL attribute which is described later on.
Here's a snapshot of the Excel sheet that we shall be using in this exercise. You can create a similar sheet or Download it from here.
STEP 1
Write XML tags to create UNIT masters
<MASTER TYPE="UNIT"/>
<NAME COLUMNREFERENCE="D"/>
<ISSIMPLEUNIT>Yes</ISSIMPLEUNIT>
</MASTER>
Remarks:-
a) The above XML tags instruct UDIMagic to create UNIT Masters based on Column D data in the Excel sheet.
STEP 2
Write XML tags to create STOCKGROUP masters
<MASTER TYPE="STOCKGROUP"/>
<NAME.LIST>
<NAME COLUMNREFERENCE="C"/>
<NAME.LIST>
</MASTER>
STEP 3
Write XML tags to create Stock Item Masters
<!-- Create STOCKITEM Masters -->
< MASTER TYPE="STOCKITEM">
<NAME.LIST>
<!-- Fetch the value for NAME tag from Column A of Excel Sheet -->
<NAME COLUMNREFERENCE="A"/>
<!-- ALIAS to be taken from Column B of Excel Sheet -->
<NAME COLUMNREFERENCE="B"/>
</NAME.LIST>
<!-- StockGroup Name is to be taken from Column C-->
<PARENT COLUMNREFERENCE="C"/>
<!-- BaseUnits is to be taken from Column D-->
<BASEUNITS COLUMNREFERENCE="D"/>
<!-- Standard Cost details -->
<STANDARDCOSTLIST.LIST SCROLL="Yes">
<DATE COLUMNREFERENCE="E"/>
<RATE FORMULA="=+F# & "/" & +G#"/>
</STANDARDCOSTLIST.LIST>
<!-- Standard Price details -->
<STANDARDPRICELIST.LIST SCROLL="Yes">
<DATE COLUMNREFERENCE="H"/>
<RATE FORMULA="=+I# & "/" & +J#"/>
</STANDARDPRICELIST.LIST>
</MASTER>
Remarks:-
a) The SCROLL attribute is used to specify that the data spans to multiple rows.
b) The SCROLL attribute is UDI Magic specific.
c) As you can see in the Excel sheet, the Standard Cost and Standard Price data for the first Master Record "BunnyBT1" spans to 3 rows. Also note that the Column A (key-field) contains the same Name i.e. "BunnyBT1" as all these 3 rows are part of one MASTER record.
d) Example:-
<STANDARDCOSTLIST.LIST SCROLL="Yes">
<DATE COLUMNREFERENCE="E"/>
<RATE FORMULA="=+F# & "/" & +G#"/>
</STANDARDCOSTLIST.LIST>
The SCROLL attribute used in the above XML tags, instructs UDI Magic that the data spans to multiple rows.
e) Use option "Alter Standard Rates" to specify the Standard Cost and Price details in the Stock Item Master as shown below:-
No comments:
Post a Comment