Infor LN (BaaN ERP)论坛

 找回密码
 加入Baan会员

QQ登录

只需一步,快速开始

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

opo without smi

[复制链接]
发表于 2009-2-17 13:02:00 | 显示全部楼层 |阅读模式
declaration:

table tfihub002
table ttcibd007
table tttadv130
table tfifam011
table tfifam003

domain tcmcs.str2 pp
domain tcmcs.str11 ss

extern domain tcyesno smi.item,smi.set,smi.foi,smi.both.set,temp.foi
long mm

detail.1:
before.layout:
mm = 0
smi.both.set = tcyesno.no

select fihub002.item,fihub002.iown
from fihub002
where fihub002._index1 = {:tdpur401.item}
selectdo
smi.item = tcyesno.yes
mm = mm + 1
if mm = 1 then
  if fihub002.iown = fihub.invt.flex then
   smi.foi = tcyesno.yes
  else
   smi.foi = tcyesno.no
  endif
else
  if fihub002.iown = fihub.invt.flex then
   temp.foi = tcyesno.yes
  else
   temp.foi =tcyesno.no
  endif
  if smi.foi <> temp.foi then
   smi.both.set = tcyesno.yes
  endif
endif
selectempty
smi.item = tcyesno.no
smi.set = tcyesno.no
smi.foi = tcyesno.no
smi.both.set = tcyesno.no
endselect

if smi.item = tcyesno.yes then
select fihub002.item
from fihub002
where fihub002._index1 = {:tdpur401.item,:tdpur401.otbp}
selectdo
  smi.set = tcyesno.yes
selectempty
  smi.set = tcyesno.no
endselect
endif

select tcibd007.ecpr
from tcibd007
where tcibd007._index1 = {:tdpur401.item}
selectdo

selectempty
tcibd007.ecpr(1) = 0
endselect

pp = tdpur401.acti(1;2)
ss = tdpur401.acti(3;11)

select ttadv130.desc
from ttadv130
where ttadv130._index1 between {:pp,"B50","c","",1,:ss}
                           and {:pp,"B50 ","c ","zzzz",1,:ss}
      and ttadv130._compnr = 000
   AS SET WITH 1 ROWS      
selectdo

selectempty
ttadv130.desc =""
endselect

select fifam011.*
from fifam011
where fifam011._index1 = {:tdpur401.orno,:tdpur401.pono,:tdpur401.sqnb}
selectdo
select fifam003.volu
from fifam003
where fifam003._index1 = {:tdpur401.item,:fifam011.mitm,:fifam011.manu}
       and fifam003.bpid = :tdpur401.otbp
selectdo

selectempty
  fifam003.volu = -50
endselect
selectempty
fifam003.volu = -100
endselect
您需要登录后才可以回帖 登录 | 加入Baan会员

本版积分规则

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

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

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

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