Deknor
2nd October 2015, 04:47
Hi all,
May i ask something about my code?
This is example of my code. My code didn't give the error.
The problem:
1)But the data which is print for issue quantity become 0,no value. Only the receipt quantities print out.
2) The data print out more than 1. The data becomes double.
|****************************** function section ******************************
functions:
function read.main.table()
{
long i,i2,x
domain tcqiv1 v.quan
domain tctrns.date qty.date, qty2.date
|utc.to.date(date.f,yy,mm,dd,hh,nn,ss)
|date.f = date.to.utc(yy,mm,dd,0,0,0)
|utc.to.date(date.t,yy,mm,dd,hh,nn,ss)
|date.t = date.to.utc(yy,mm,dd,23,59,59)
for i = 1 to 30 || initialize transaction date
utc.add(date.f,0,0,+(i-1),0,0,0,date.title(i))
i2 = i
if date.title(i) >= date.t then
i = 30
endif
endfor
|read files
select whwmd400.*,tcibd100.*,whinp100.*
from whwmd400,tcibd100,whinp100
where whwmd400._index1 inrange {:item.f} and {:item.t}
and whinp100.item refers to tcibd100
and tcibd100.item refers to whwmd400
|order by whwmd400.item |add item group
order by whwmd400._index1
|set.mem(QtyReceipt,0)
selectdo
qty2.date= 0
select whinp100.*
from whinp100
where whinp100._index2 = {:tcibd100.item}
and whinp100.kotr = tckotr.receipt
order by whinp100._index2
selectdo
qty2.date = whinp100.date
for i = 1 to 30
if qty2.date = date.title(i) then
QtyReceipt(i) = QtyReceipt(i) + whinp100.qana
endif
endfor
endselect
|Planned Qty Issue
|selectdo
qty.date = 0
select whinp100.*
from whinp100
where whinp100._index2 = {:tcibd100.item}
and whinp100.kotr = tckotr.requirement
order by whinp100._index2
selectdo
qty.date = whinp100.date
for i = 1 to 30
if qty.date = date.title(i) then
QtyIssue(i) = QtyIssue(i) + whinp100.qana
endif
endfor
endselect
rprt_send()
endselect
}
The attachment is a example of my results:
Your kindness I'm very appreciate,:)
May i ask something about my code?
This is example of my code. My code didn't give the error.
The problem:
1)But the data which is print for issue quantity become 0,no value. Only the receipt quantities print out.
2) The data print out more than 1. The data becomes double.
|****************************** function section ******************************
functions:
function read.main.table()
{
long i,i2,x
domain tcqiv1 v.quan
domain tctrns.date qty.date, qty2.date
|utc.to.date(date.f,yy,mm,dd,hh,nn,ss)
|date.f = date.to.utc(yy,mm,dd,0,0,0)
|utc.to.date(date.t,yy,mm,dd,hh,nn,ss)
|date.t = date.to.utc(yy,mm,dd,23,59,59)
for i = 1 to 30 || initialize transaction date
utc.add(date.f,0,0,+(i-1),0,0,0,date.title(i))
i2 = i
if date.title(i) >= date.t then
i = 30
endif
endfor
|read files
select whwmd400.*,tcibd100.*,whinp100.*
from whwmd400,tcibd100,whinp100
where whwmd400._index1 inrange {:item.f} and {:item.t}
and whinp100.item refers to tcibd100
and tcibd100.item refers to whwmd400
|order by whwmd400.item |add item group
order by whwmd400._index1
|set.mem(QtyReceipt,0)
selectdo
qty2.date= 0
select whinp100.*
from whinp100
where whinp100._index2 = {:tcibd100.item}
and whinp100.kotr = tckotr.receipt
order by whinp100._index2
selectdo
qty2.date = whinp100.date
for i = 1 to 30
if qty2.date = date.title(i) then
QtyReceipt(i) = QtyReceipt(i) + whinp100.qana
endif
endfor
endselect
|Planned Qty Issue
|selectdo
qty.date = 0
select whinp100.*
from whinp100
where whinp100._index2 = {:tcibd100.item}
and whinp100.kotr = tckotr.requirement
order by whinp100._index2
selectdo
qty.date = whinp100.date
for i = 1 to 30
if qty.date = date.title(i) then
QtyIssue(i) = QtyIssue(i) + whinp100.qana
endif
endfor
endselect
rprt_send()
endselect
}
The attachment is a example of my results:
Your kindness I'm very appreciate,:)