02-08-04 01:43 PM
On 26 Jan 2004 10:45:53 -0800, akarchm01_nospam@yahoo.com (Adam)
wrote:
Can't you have three logical-equals functoid that each has RecordType
as input and then also a constant (AA, BA, PR). Connect the output to
three value mappening functoids and let the value
mappening-second-input be the sum you have counted. Let the output
from the valuemappening functoids be the correct field in the output.
>Here is a sample XML instance
> <Availability_V1>
> <Identification PurchaserIDNumber="1008" UserName="RICKMOLICA"
>FromOrgID="C" DateCreated="20031022">
> <Item ItemIDNo="1199" ItemDescription="x" PurchaserItemIDNo="253510"
>PurchaserItemDescription="0">
> <ShipWeek ShipWeek="200404" StartWeek="200340" HoldWeeks="5">
> <RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="10"
>OrderNumber="0" />
> <RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="20"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="30"
>OrderNumber="" />
> </ShipWeek>
> <ShipWeek ShipWeek="200404" StartWeek="200352" HoldWeeks="">
> <RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="11"
>OrderNumber="" />
> <RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="21"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="31"
>OrderNumber="" />
> </ShipWeek>
> <ShipWeek ShipWeek="200406" StartWeek="200401" HoldWeeks="">
> <RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="12"
>OrderNumber="" />
> <RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="22"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="32"
>OrderNumber="" />
> </ShipWeek>
> </Item>
> <Item ItemIDNo="2284" ItemDescription="y" PurchaserItemIDNo="0"
>PurchaserItemDescription="Unable to map">
> <ShipWeek ShipWeek="200414" StartWeek="200404" HoldWeeks="5">
> <RecordType RecordType="AA" UnitsAvailable="2" QtyAvailable="20"
>OrderNumber="0" />
> <RecordType RecordType="BA" UnitsAvailable="3" QtyAvailable="30"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="4" QtyAvailable="40"
>OrderNumber="" />
> </ShipWeek>
> </Item>
> </Identification>
> </Availability_V1>
>
>Here is what I want to do:
>
>Within each ItemIDNo loop
>
>
>While Shipweek <= Current Week
> If RecordType = AA cumulate the value for Qty as AAQTY
>
> If RecordType = BA cumulate the value for Qty as BRQTY
>
> If RecordType = PR cumulate the value for Qty as PRQTY
>
>Wend
>
>
>Map AAQTY to GeneralAvailabilityQty (found in dest. doc)
>
>Map BRQTY to BlanketQty (found in dest. doc)
>
>Map PRQTY to PurchaserReserveQty (found in dest. doc)
>
>I can calculate the current week, but how can I map the AAQTY and
>BRQTY and PRQTY to the dest doc? I am having difficutly
>conceptualizing how to distinguish 3 seperate sums and map them
>accordingly.
>
>The relevant section of the destination doc look like this:
>...
><Item GeneralAvailabiltiyQty="" BlanketQty="" PurchaserReserveQty = ""
>/>
>...
>
>Thoughts and advice are appreciated.
>
>
>Adam
--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
[ Post a follow-up to this message ]
|