[stackoverflow] [progress Openedge Abl] How To List The Top Ten Customers Form The Given...

Status
Not open for further replies.
S

sri

Guest
a single customer could have multiple orders and corresponding cost. now the cost/price has to be added and according to the max price the customer's should be displayed. i have just written the skeleton of the prog , please help me.

define temp-table ttorder
field ocust-num like order.cust-num
field oorder-num like order.order-num.
define variable i as int.
define variable a as int.

define temp-table ttorderln
field oprice like order-line.price.

for each order where order-date > 01/08/93 /*by cust-num*/ .

create ttorder .
assign
ttorder.ocust-num =cust-num
ttorder.oorder-num = order-num.

for each order-line where order-line.order-num = ttorder.oorder-num break by ocust-num.

i = order-line.price.
a = i + a.
/* display cust-num order-num a. */
if last-of (ttorder.ocust-num) then
do:


create ttorderln.
ttorderln.oprice=a.

end.

display ttorderln.

end.


end.

Continue reading...
 
Status
Not open for further replies.
Top