reenageorge5
New Member
Define Variable code like pt_part.
Define Variable ans as Logical Format "yes/no" No-Undo.
Define Temp-Table result field ptpart like pt_mstr.pt_part
field ptprodline like pt_prod_line
field ptchr05 like pt_mstr.pt__chr05
field trpart like tr_hist.tr_part
field trtype like tr_hist.tr_type
field trdate like tr_hist.tr_date
field ptstatus like pt_status
field ptprice like pt_price
field ptordqty like pt_ord_qty
field ptrop like pt_rop
field trqtyreq like tr_qty_req
field trqtyshort like tr_qty_short
field trshiptype like tr_ship_type.
Form header space (15)" **************ITEM DEATILS*************" WITH FRAME B.
Form "Item code:" ptpart space(15) "Transaction Type:" trtype SKIP(2)
"Date:" trdate SPACE(31) "Product Line:" ptprodline SKIP(2)
"CBU Code:" ptchr05 Space(27) "Price:" ptprice Skip(2)
"Ordered Quantity:" ptordqty space(17) "Re-Order Point:" ptrop skip(2)
"Status:" ptstatus space(29) "Quantity Required:" trqtyreq Skip(2)
"Shortage:" trqtyshort space(23) "Ship Type:" trshiptype
with frame b 20 down width 100.
Repeat While ans = No:
Prompt-For pt_mstr.pt_part Label "Item Number" WITH FRAME a CENTERED.
Assign code = Input pt_mstr.pt_part.
Hide frame a.
Find First pt_mstr where pt_mstr.pt_part = code NO-ERROR.
FInd first tr_hist where tr_hist.tr_part = code.
If avail pt_mstr Then
Create result.
ptpart = pt_part.
ptprodline = pt_prod_line.
ptchr05 = pt__chr05.
trpart = tr_part.
trtype = tr_type.
trdate = tr_date.
ptstatus = pt_status.
ptprice = pt_price.
ptordqty = pt_ord_qty.
ptrop = pt_rop.
trqtyreq = tr_qty_req.
trqtyshort = tr_qty_short.
trshiptype = tr_ship_type.
For each result:
Display ptpart
trdate
trtype
ptprodline
ptchr05
ptprice
ptstatus
ptrop
ptordqty
trqtyreq
trqtyshort
trshiptype
with frame b no-Labels.
Message " Do You want to Continue..........?? <y>es or <n>o" .
If (ans = yes) Then
Assign ans = Yes.
End.
i Have re-written the code .But still the pbm is if im selecting yes or No it is prompting for item code.what should i do to remove it.
Define Variable ans as Logical Format "yes/no" No-Undo.
Define Temp-Table result field ptpart like pt_mstr.pt_part
field ptprodline like pt_prod_line
field ptchr05 like pt_mstr.pt__chr05
field trpart like tr_hist.tr_part
field trtype like tr_hist.tr_type
field trdate like tr_hist.tr_date
field ptstatus like pt_status
field ptprice like pt_price
field ptordqty like pt_ord_qty
field ptrop like pt_rop
field trqtyreq like tr_qty_req
field trqtyshort like tr_qty_short
field trshiptype like tr_ship_type.
Form header space (15)" **************ITEM DEATILS*************" WITH FRAME B.
Form "Item code:" ptpart space(15) "Transaction Type:" trtype SKIP(2)
"Date:" trdate SPACE(31) "Product Line:" ptprodline SKIP(2)
"CBU Code:" ptchr05 Space(27) "Price:" ptprice Skip(2)
"Ordered Quantity:" ptordqty space(17) "Re-Order Point:" ptrop skip(2)
"Status:" ptstatus space(29) "Quantity Required:" trqtyreq Skip(2)
"Shortage:" trqtyshort space(23) "Ship Type:" trshiptype
with frame b 20 down width 100.
Repeat While ans = No:
Prompt-For pt_mstr.pt_part Label "Item Number" WITH FRAME a CENTERED.
Assign code = Input pt_mstr.pt_part.
Hide frame a.
Find First pt_mstr where pt_mstr.pt_part = code NO-ERROR.
FInd first tr_hist where tr_hist.tr_part = code.
If avail pt_mstr Then
Create result.
ptpart = pt_part.
ptprodline = pt_prod_line.
ptchr05 = pt__chr05.
trpart = tr_part.
trtype = tr_type.
trdate = tr_date.
ptstatus = pt_status.
ptprice = pt_price.
ptordqty = pt_ord_qty.
ptrop = pt_rop.
trqtyreq = tr_qty_req.
trqtyshort = tr_qty_short.
trshiptype = tr_ship_type.
For each result:
Display ptpart
trdate
trtype
ptprodline
ptchr05
ptprice
ptstatus
ptrop
ptordqty
trqtyreq
trqtyshort
trshiptype
with frame b no-Labels.
Message " Do You want to Continue..........?? <y>es or <n>o" .
If (ans = yes) Then
Assign ans = Yes.
End.
i Have re-written the code .But still the pbm is if im selecting yes or No it is prompting for item code.what should i do to remove it.