pegaga1979
24th November 2015, 05:55
Hi,
i tried to insert qty stock balance at standard report bom multilevel.
i add at script as below,
extern domain tcqiv1 A, B
detail.1:
before.layout:
Select whmwd215.*
from whwmd215
where whwmd215.item=:tibom010.sitem
select do
if whwmd215.cwar = "A" then
A = whwmd215.qhnd
else if whwmd215.cwar = "B" then
B = whwmd215.qhnd
endif
endselect
does anyone can help me where i am wrong?
vamsi_gujjula
24th November 2015, 07:23
if whwmd215.cwar = "A" then
A = whwmd215.qhnd
else
if whwmd215.cwar = "B" then
B = whwmd215.qhnd
endif
endif
and also make sure that table is defined in the script
pegaga1979
24th November 2015, 08:01
Hi Vamsi,
thank you for your notice. i forget to put another 'endif' :)
but i still get the same error after amend the script...
the original report doesn't has table whwmd215.
so i use Select.
pegaga1979
24th November 2015, 08:43
Hi,
i hv amend and having new error: Unknown table 'whmwd215'
my new script:
table twhwmd215
extern domain tcqiv1 A, B
domain tccwar whwmd215.cwar
domain tcqiv1 whwmd215.qhnd
detail.1:
before.layout:
Select whmwd215.*
from whwmd215
where whwmd215.item=:tibom010.sitem
selectdo
if whwmd215.cwar = "A" then
A = whwmd215.qhnd
else if whwmd215.cwar = "B" then
B = whwmd215.qhnd
endif
endif
endselect
Juergen
24th November 2015, 08:58
Hi,
simple typing error.
Change "Select whmwd215.*" to "Select whwmd215.*"
Regards,
Jürgen
pegaga1979
24th November 2015, 09:07
Hi Jürgen
thank you very much :)
need another eyes for this :)
Now, it can compile successfully.
But, i still can't get the result i want :(
The script is insert so that i can print stock balance based on warehouse A and B at BOM multilevel standard report.
The result i got is 0.
Does anyone knows?
andreas.toepper
24th November 2015, 09:24
I think cwar will be filled with trailing spaces. Try: strip$(whwmd215.cwar) = "x" in your statements.
pegaga1979
24th November 2015, 09:38
Hi,
Tried to use strip$(whwmd215.cwar) = "x" but it still print stock at warehouse A and B as 0 for childpart at bom.
you can see from the attachment.
bdittmar
24th November 2015, 12:19
Hi,
i hv amend and having new error: Unknown table 'whmwd215'
my new script:
table twhwmd215
extern domain tcqiv1 A, B
domain tccwar whwmd215.cwar
domain tcqiv1 whwmd215.qhnd
detail.1:
before.layout:
Select whmwd215.*
from whwmd215
where whwmd215.item=:tibom010.sitem
selectdo
if whwmd215.cwar = "A" then
A = whwmd215.qhnd
else if whwmd215.cwar = "B" then
B = whwmd215.qhnd
endif
endif
endselect
Hello,
always selectempty, because "where whwmd215.item=:tibom010.sitem"
it's tibom010.sitm !
Regards
pegaga1979
25th November 2015, 03:39
Hello,
always selectempty, because "where whwmd215.item=:tibom010.sitem"
it's tibom010.sitm !
Regards
Hi,
i already change to tibom010.sitm.
may i know where to put selectempty and y?
Thank you for the details :)