I have no quick fix for you, but why do you want this? It can end up weird if you can have Various amount of products in your orders. If you have one ID with many products and the rest with few then uou will end up with a table with many columns and empty cells.
Consider if a pivot table of the original data source could meet your demands, it is an easier to accomplish and more dynamic approach to the visualisation.
You can do this at the script level with the Generic Load prefix. See http://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/
qvf and qvw examples attached. Script for your data would look like:
LOAD * INLINE [
ID, Sale Date, Product, Price
A, 01-02-2017, book, 50
A, 01-02-2017, computer, 500
B, 02-01-2017, Phone, 60
B, 02-01-2017, cup, 10
'Product' & AutoNumber(RecNo(),ID),
'Price' & AutoNumber(RecNo(),ID),
If you want to re-assemble the generic tables back into the main data table, use the script loop shown at the end of the blog post. Or use the Qlikview Components CALL Qvc.JoinGenericTables('Data', 'Pivoted');
I would second Vegar's caution. They may be a simpler approach to your ultimate goal.