ArticlesArticles Most Helpful ArticlesMost Helpful Articles Language SettingsLanguage Settings LoginLogin
RSS Feeds
DrillDown Icon Table of Contents
DrillDown Icon MX
DrillDown Icon MANUALS and Other Info for SQL MANEX Client Server
DrillDown Icon Customer Relationship Management (CRM)
DrillDown Icon ManEx Minute
DrillDown Icon ManEx Component Exchange
DrillDown Icon ManEx Supplier Directory & Rankings
  Email This ArticlePrint PreviewPrint Current Article and All Sub-Articles
 
PO Query - Purchase Order Basic Table Query

*seepos
clear
close all
set safety off
public m.pono
m.pono = space(10)

@ 12,12 SAY "ENTER Purchase Order :" GET m.pono
READ
m.pono = padl(alltrim(m.pono),15,"0")
? m.pono
* CLEAR
 
SET STEP ON

use pomain order tag ponum in 0
use poitems order tag ponum in 0

sele pomain
set relation to ponum  into poitems

seek m.pono

brow last nowait

use poitschd order tag uniqlnno in 0
use porecdtl order tag uniqlnno in 0
use porecloc order tag uniqdetno in 0
use poreclot in 0
use podock order tag uniqlnno in 0
use porecmrb order tag DMR in 0
use invtmfgr order tag uniqmfgrhd in 0
USE INVENTOR ORDER TAG UNIQ_KEY IN 0
use invtlot order tag w_keylot in 0
use invt_rec order tag uniqmfgrhd IN 0

sele poitems
set relation to uniqlnno into poitschd
set relation to uniqlnno into porecdtl additive
set relation to uniqlnno into podock additive
SET RELATION TO UNIQ_KEY INTO INVENTOR ADDITIVE
set relation to uniqmfgrhd into invtmfgr addi
set relation to uniqmfgrhd into invt_rec addi
sele invtmfgr
set relation to w_key into invtlot
sele poitschd
set relation to uniqdetno into porecloc
sele porecdtl
set relation to transno into porecmrb

sele poitschd
brow last NOWAIT
sele porecdtl
brow last NOWAIT
sele porecloc
brow last NOWAIT
sele podock
brow last NOWAIT
sele poitems
brow last NOWAIT
sele porecmrb
brow last NOWAIT
SELE INVENTOR
BROW LAST NOWAIT
SELE INVtmfgr
BROW LAST NOWAIT
SELE invtlot
brow last nowait

Article ID: 3163