Pseudo-Algorithm for Reorder
Get the Order Entry - Orders, Order Entry - Line Items, and Order Item XA business components. Get an instance of the Catalog business object and of the Quote, Quote Item, and Quote Item XA business components from this Catalog business object instance.
The Order Entry - Orders business component is already positioned on the correct record, as the Reorder method is row-sensitive.
Create a record in the Quote business component. Use Quote|Order FieldMap n to copy fields from the Order Entry - Orders business component to Quote.
For each record in the Order Entry - Line Items business component, copy it to the Quote Item business component using Quote Item|Order Item FieldMap n field maps. To maintain hierarchical relationships, copy the parent record before copying its child records. Also, copy records from the grandchild business component Order Item XA to Quote Item XA.
Note:When doing step 3, for each record in the Order Entry - Line Items business component:
Set the Error Message output argument if there is any error;
If Return Error Code = N, do not return an error;
Else return an error.