Infor LN (BaaN ERP)论坛

 找回密码
 加入Baan会员

QQ登录

只需一步,快速开始

QQ群一:61560730(已满)QQ群二:34342363
查看: 3691|回复: 0

Query:工单上加版本信息

[复制链接]
发表于 2009-2-8 20:25:08 | 显示全部楼层 |阅读模式
query:

select
       tisfc001.pdno,         | Production Order
       tisfc001.mitm,         | Item
       tcibd001.citg,         | Item Group
       tisfc001.osta,         | Order Status
       tisfc001.qrdr,         | Quantity Ordered
       tisfc001.qtdl,         | Quantity to Deliver
       tisfc001.qdlv,         | Quantity Delivered
       tisfc001.qrjc,         | Quantity Rejected
       tisfc001.efdt,      |referce date
       tisfc001.prdt,         | Production Start Date and Ti
       tisfc001.dldt          | (Re) Planned Delivery Date
from
       tcibd001,              | General Item Data
       tisfc001               | Production Orders
|tiedm100
where
       tisfc001.mitm >= tisfc001.mitm.f and
       tisfc001.mitm <= tisfc001.mitm.t and
       tcibd001.citg >= tcibd001.citg.f and
       tcibd001.citg <= tcibd001.citg.t and
       tisfc001.efdt >= tisfc001.efdt.f and
       tisfc001.efdt <= tisfc001.efdt.t and

       tisfc001.mitm = tcibd001.item and
       tisfc001.osta <> tcosta.closed and
       tisfc001.osta <> tcosta.completed
order by
       tisfc001.mitm

report script:

declaration:
table ttiedm100 |engineering item revisions
table ttisfc001 |production orders
extern domain tiedm.revi order.revi

Detail.1:
before.layout:
order.revi = ""

select tisfc001.efdt
from tisfc001
where tisfc001.pdno = :tisfc001.pdno
selectdo
endselect
select tiedm100.revi
from tiedm100
where tiedm100.eitm = :tisfc001.mitm and
  tiedm100.indt <= :tisfc001.efdt and
  (tiedm100.exdt >= :tisfc001.efdt or tiedm100.exdt = 0)
selectdo
  order.revi = tiedm100.revi
selectempty
endselect
您需要登录后才可以回帖 登录 | 加入Baan会员

本版积分规则

QQ|Archiver|手机版|小黑屋|Infor LN Baan论坛 沪ICP备20006045号-3

GMT+8, 2024-12-4 01:15 , Processed in 0.138840 second(s), 17 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表