Hello,
I have to deliver last year the Net Sales value by Vat Code By Ship To Country
I requred as follow
Ship From, Ship To Country, Sold To, Vat Code, Net Amount.
I have created the below script but the each line is displaying two times
output to netsales.xls.
def var Amount as dec no-undo.
def var custcntry as char no-undo.
def var shipfrom as char no-undo.
for each ih_hist where ih_domain = "001"
and ih_ship_date > 10/01/08
and ih_ship_date < 10/01/09 no-lock,
each ad_mstr where ad_domain = "001"
and ad_addr = ih_ship no-lock,
each idh_hist where idh_domain = "001"
and idh_nbr = ih_nbr no-lock:
assign amount = idh_qty_inv * idh_price.
if ih_domain = "001" then shipfrom = "hrl".
put shipfrom "~011"
ih_cust "~011"
ih_ship "~011"
ad_ctry "~011"
ih_inv_nbr "~011"
idh_line "~011"
idh_part "~011"
idh_taxc "~011"
amount "~011"
skip.
output close.
Pls help me out to resolve this issue.
I have to deliver last year the Net Sales value by Vat Code By Ship To Country
I requred as follow
Ship From, Ship To Country, Sold To, Vat Code, Net Amount.
I have created the below script but the each line is displaying two times
output to netsales.xls.
def var Amount as dec no-undo.
def var custcntry as char no-undo.
def var shipfrom as char no-undo.
for each ih_hist where ih_domain = "001"
and ih_ship_date > 10/01/08
and ih_ship_date < 10/01/09 no-lock,
each ad_mstr where ad_domain = "001"
and ad_addr = ih_ship no-lock,
each idh_hist where idh_domain = "001"
and idh_nbr = ih_nbr no-lock:
assign amount = idh_qty_inv * idh_price.
if ih_domain = "001" then shipfrom = "hrl".
put shipfrom "~011"
ih_cust "~011"
ih_ship "~011"
ad_ctry "~011"
ih_inv_nbr "~011"
idh_line "~011"
idh_part "~011"
idh_taxc "~011"
amount "~011"
skip.
output close.
Pls help me out to resolve this issue.