Hi all,
I have found a solution to this issue. I have stored the values in the UD01
table
{bo/UD01_ds.i}
{lib/globals.i}
....................
Define var vb-UD01 as handle no-undo.
Define buffer bittUD01 for ttUD01.
run bo/UD01.p persistent set vb-UD01.
find first UD01 where UD01.Company = ttIssueReturn.Company and
UD01.Key1 = "CoilData" and UD01.Key2 = DCD-UserId no-lock no-error.
if avail(UD01) then do:
create bittUD01.
buffer-copy UD01 to bittUD01.
assign bittUD01.RowMod = ''.
assign bittUD01.dbrowident = rowid(UD01).
assign bittUD01.rowident = string(rowid(UD01)).
create ttUD01.
buffer-copy bittUD01 to ttUD01.
assign ttUD01.RowMod = 'U'.
end.
else do:
create ttUD01.
assign ttUD01.Company = ttIssueReturn.Company.
assign ttUD01.Key1 = 'CoilData'.
assign ttUD01.Key2 = DCD-UserId.
assign ttUD01.RowMod = 'A'.
end.
assign ttUD01.Number01 = (Coils + 0).
assign ttUD01.Number02 = decimal(ttIssueReturn.TranQty).
assign ttUD01.ShortChar06 = ttIssueReturn.PartNum.
assign ttUD01.ShortChar07 = ttIssueReturn.LotNum.
assign ttUD01.ShortChar08 = ttIssueReturn.FromBinNum.
assign ttUD01.ShortChar09 = ttIssueReturn.FromWarehouseCode.
assign ttUD01.CheckBox01 = true.
run update in vb-UD01({&input-output_dataset_UD01dataset}).
delete object vb-UD01.
Hope someone else finds
________________________________
From: Mark Kamsika <m.kamsika@...>
To: Vantage Yahoo Group <vantage@yahoogroups.com>
Sent: Tue, 21 June, 2011 13:50:42
Subject: [Vantage] Progress Procedure for Issue return
Hi All,
My system has various method directives which have been provided by epicor.
IssueReturn.p is one provided for issuing material. We have an extra unit of
measure called a coil. We have in this procedure a validation method
PerformMaterialManagementBefore and a method PerformMaterialManagementAfter for
updating this second unit of measure.
{Bpm/Bpm.i &OBJECT_NAME=IssueReturn}
{actions/ud/csgBPMException.i}
{actions/ud/csgBPMDataStore.i}
procedure PerformMaterialMovementBefore:
define input-output parameter plNegQtyAction as logical.
define input-output parameter table for ttIssueReturn.
define input-output parameter table for ttLegalNumberGenerate.
define input-output parameter table for ttSelectedSerialNumbers.
define input-output parameter table for ttSNFormat.
define input-output parameter LegalNumberMessage as character.
{&TRY_PRIVATE}
/*UD0001 TJF 08/04/09 Coils/Bales Usage. Start */
def var xCoils as char no-undo.
def var Coils as decimal no-undo initial 0.
def var Tilde as char no-undo initial "~~".
find first ttIssueReturn where ttIssueReturn.RowMod ne '' no-lock no-error.
if avail ttIssueReturn then do:
/* MK 04/05/2011 We need to check to see if the lot has a material burden or if
it does not have any landed costs */
find first PartLot where PartLot.Company = ttIssueReturn.Company and
PartLot.PartNum = ttIssueReturn.PartNum and PartLot.LotNum =
ttIssueReturn.LotNum exclusive-lock no-error.
if avail PartLot then do:
/* throwinfo('Partlot found'). */
if PartLot.Checkbox01 = False and Partlot.lotmtlburcost=0 then do:
throwexception('3','Lot ' + PartLot.LotNum + ' does not have a
landed cost. You cannot allocate this lot. Please contact Purchasing').
end.
end.
/*End of MK code*/
if ttIssueReturn.FromJobNum = '' then do:
if index(ttIssueReturn.DimCodeDimCodeDescription,Tilde) > 0 then do:
xCoils = entry(2,ttIssueReturn.DimCodeDimCodeDescription,Tilde).
Coils = decimal(xCoils).
assign ttIssueReturn.DimCodeDimCodeDescription =
entry(1,ttIssueReturn.DimCodeDimCodeDescription,Tilde) no-error.
end.
find first Part where Part.Company = ttIssueReturn.Company and
Part.PartNum = ttIssueReturn.PartNum no-lock no-error.
if avail Part then do:
if (Coils + 0) ne 0 then do:
if Part.CheckBox01 = false then do:
throwexception('3','Item ' + ttIssueReturn.PartNum + ' is
not flagged for Coils/Bales Usage, but Coils/Bales have been entered').
end.
end.
if Part.CheckBox01 = true then do:
if (Coils + 0) = 0 then do:
/* throwinfo('WARNING-Item ' + ttIssueReturn.PartNum + ' is
flagged for Coils/Bales Usage, but Coils/Bales have not been entered').*/
throwexception('3','Item ' + ttIssueReturn.PartNum + ' is
flagged for Coils/Bales Usage, but Coils/Bales have not been entered').
end.
putdata('xCoils',xCoils).
/* The LotNum & BinNum is apparently lost by the time we get to
PerFormMaterialMovementAfter, so I save them here*/
putdata ('Lot',ttIssueReturn.LotNum).
putdata ('Bin',ttIssueReturn.FromBinNum).
end.
end.
end.
end.
/*UD0001 TJF 08/04/09 Coils/Bales Usage. End */
{&CATCH_PRIVATE}
end procedure.
The issue I am having is that we loose the xCoils, lot number and bin number
when we reach the PerFormMaterialMovementAfter procedure. The put statement that
the epicor developer used have never worked and we were told to use another
screen to alter this coil quantity. Is there a way of storing these 3 values
perhaps in a text file which I can recover them from and use in
the PerformMaterialMovementAfter procedure. I have added an exception in
the PerformMaterialMovementAfter procedure to try and show the contents of
ttIssue material but it appears to be empty with the exception of the company
string. I have included the procedure below.
procedure PerformMaterialMovementAfter:
define input-output parameter plNegQtyAction as logical.
define input-output parameter table for ttIssueReturn.
define input-output parameter table for ttLegalNumberGenerate.
define input-output parameter table for ttSelectedSerialNumbers.
define input-output parameter table for ttSNFormat.
define input-output parameter LegalNumberMessage as character.
{&TRY_PRIVATE}
/*UD0001 TJF 08/04/09 Coils/Bales Usage. Start */
Def var xCoils as char no-undo.
def var Coils as decimal no-undo.
def var Number01 as decimal no-undo.
def var Lot as char no-undo.
assign Lot = getdata('Lot').
def var Bin as char no-undo.
assign Bin = getdata('Bin').
assign xCoils = getdata('xCoils').
Coils = decimal(xCoils).
if (Coils + 0) ne 0 then do:
find first ttIssueReturn where ttIssueReturn.RowMod = '' no-lock no-error.
if avail ttIssueReturn then do:
/**/
/* Reduce the Stock in the From Warehouse */
/**/
/* throwexception('3','Lot ' + ttIssueReturn.LotNum + ' Bin ' +
ttIssueReturn.FromBinNum). */
find first PartBin where PartBin.Company = ttIssueReturn.Company and
PartBin.PartNum = ttIssueReturn.PartNum and PartBin.WarehouseCode =
ttIssueReturn.FromWarehouseCode
and PartBin.LotNum = Lot and PartBin.DimCode =
ttIssueReturn.DimCode and PartBin.BinNum = Bin exclusive-lock no-error.
if avail PartBin then do:
Number01 = PartBin.Number01 - Coils.
run lib\UpdateTableBuffer.p(input Buffer
PartBin:Handle,'Number01',Number01).
end.
find first PartLot where PartLot.Company = ttIssueReturn.Company and
PartLot.PartNum = ttIssueReturn.PartNum and PartLot.LotNum = Lot exclusive-lock
no-error.
if avail PartLot then do:
Number01 = PartLot.Number01 - Coils.
run lib\UpdateTableBuffer.p(input Buffer
PartLot:Handle,'Number01',Number01).
end.
find last PartTran where PartTran.Company = ttIssueReturn.Company and
PartTran.PartNum = ttIssueReturn.PartNum and PartTran.LotNum = Lot
and PartTran.TranDate = Today and PartTran.TranQty =
ttIssueReturn.TranQty and PartTran.SysTime > 0 and (PartTran.Number01 + 0) = 0
exclusive-lock no-error.
if avail PartTran then do:
Number01 = 0 - Coils.
run lib\UpdateTableBuffer.p(input Buffer
PartTran:Handle,'Number01',Number01).
end.
end.
end.
/*UD0001 TJF 08/04/09 Coils/Bales Usage. End */
{&CATCH_PRIVATE}
end procedure.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
I have found a solution to this issue. I have stored the values in the UD01
table
{bo/UD01_ds.i}
{lib/globals.i}
....................
Define var vb-UD01 as handle no-undo.
Define buffer bittUD01 for ttUD01.
run bo/UD01.p persistent set vb-UD01.
find first UD01 where UD01.Company = ttIssueReturn.Company and
UD01.Key1 = "CoilData" and UD01.Key2 = DCD-UserId no-lock no-error.
if avail(UD01) then do:
create bittUD01.
buffer-copy UD01 to bittUD01.
assign bittUD01.RowMod = ''.
assign bittUD01.dbrowident = rowid(UD01).
assign bittUD01.rowident = string(rowid(UD01)).
create ttUD01.
buffer-copy bittUD01 to ttUD01.
assign ttUD01.RowMod = 'U'.
end.
else do:
create ttUD01.
assign ttUD01.Company = ttIssueReturn.Company.
assign ttUD01.Key1 = 'CoilData'.
assign ttUD01.Key2 = DCD-UserId.
assign ttUD01.RowMod = 'A'.
end.
assign ttUD01.Number01 = (Coils + 0).
assign ttUD01.Number02 = decimal(ttIssueReturn.TranQty).
assign ttUD01.ShortChar06 = ttIssueReturn.PartNum.
assign ttUD01.ShortChar07 = ttIssueReturn.LotNum.
assign ttUD01.ShortChar08 = ttIssueReturn.FromBinNum.
assign ttUD01.ShortChar09 = ttIssueReturn.FromWarehouseCode.
assign ttUD01.CheckBox01 = true.
run update in vb-UD01({&input-output_dataset_UD01dataset}).
delete object vb-UD01.
Hope someone else finds
________________________________
From: Mark Kamsika <m.kamsika@...>
To: Vantage Yahoo Group <vantage@yahoogroups.com>
Sent: Tue, 21 June, 2011 13:50:42
Subject: [Vantage] Progress Procedure for Issue return
Hi All,
My system has various method directives which have been provided by epicor.
IssueReturn.p is one provided for issuing material. We have an extra unit of
measure called a coil. We have in this procedure a validation method
PerformMaterialManagementBefore and a method PerformMaterialManagementAfter for
updating this second unit of measure.
{Bpm/Bpm.i &OBJECT_NAME=IssueReturn}
{actions/ud/csgBPMException.i}
{actions/ud/csgBPMDataStore.i}
procedure PerformMaterialMovementBefore:
define input-output parameter plNegQtyAction as logical.
define input-output parameter table for ttIssueReturn.
define input-output parameter table for ttLegalNumberGenerate.
define input-output parameter table for ttSelectedSerialNumbers.
define input-output parameter table for ttSNFormat.
define input-output parameter LegalNumberMessage as character.
{&TRY_PRIVATE}
/*UD0001 TJF 08/04/09 Coils/Bales Usage. Start */
def var xCoils as char no-undo.
def var Coils as decimal no-undo initial 0.
def var Tilde as char no-undo initial "~~".
find first ttIssueReturn where ttIssueReturn.RowMod ne '' no-lock no-error.
if avail ttIssueReturn then do:
/* MK 04/05/2011 We need to check to see if the lot has a material burden or if
it does not have any landed costs */
find first PartLot where PartLot.Company = ttIssueReturn.Company and
PartLot.PartNum = ttIssueReturn.PartNum and PartLot.LotNum =
ttIssueReturn.LotNum exclusive-lock no-error.
if avail PartLot then do:
/* throwinfo('Partlot found'). */
if PartLot.Checkbox01 = False and Partlot.lotmtlburcost=0 then do:
throwexception('3','Lot ' + PartLot.LotNum + ' does not have a
landed cost. You cannot allocate this lot. Please contact Purchasing').
end.
end.
/*End of MK code*/
if ttIssueReturn.FromJobNum = '' then do:
if index(ttIssueReturn.DimCodeDimCodeDescription,Tilde) > 0 then do:
xCoils = entry(2,ttIssueReturn.DimCodeDimCodeDescription,Tilde).
Coils = decimal(xCoils).
assign ttIssueReturn.DimCodeDimCodeDescription =
entry(1,ttIssueReturn.DimCodeDimCodeDescription,Tilde) no-error.
end.
find first Part where Part.Company = ttIssueReturn.Company and
Part.PartNum = ttIssueReturn.PartNum no-lock no-error.
if avail Part then do:
if (Coils + 0) ne 0 then do:
if Part.CheckBox01 = false then do:
throwexception('3','Item ' + ttIssueReturn.PartNum + ' is
not flagged for Coils/Bales Usage, but Coils/Bales have been entered').
end.
end.
if Part.CheckBox01 = true then do:
if (Coils + 0) = 0 then do:
/* throwinfo('WARNING-Item ' + ttIssueReturn.PartNum + ' is
flagged for Coils/Bales Usage, but Coils/Bales have not been entered').*/
throwexception('3','Item ' + ttIssueReturn.PartNum + ' is
flagged for Coils/Bales Usage, but Coils/Bales have not been entered').
end.
putdata('xCoils',xCoils).
/* The LotNum & BinNum is apparently lost by the time we get to
PerFormMaterialMovementAfter, so I save them here*/
putdata ('Lot',ttIssueReturn.LotNum).
putdata ('Bin',ttIssueReturn.FromBinNum).
end.
end.
end.
end.
/*UD0001 TJF 08/04/09 Coils/Bales Usage. End */
{&CATCH_PRIVATE}
end procedure.
The issue I am having is that we loose the xCoils, lot number and bin number
when we reach the PerFormMaterialMovementAfter procedure. The put statement that
the epicor developer used have never worked and we were told to use another
screen to alter this coil quantity. Is there a way of storing these 3 values
perhaps in a text file which I can recover them from and use in
the PerformMaterialMovementAfter procedure. I have added an exception in
the PerformMaterialMovementAfter procedure to try and show the contents of
ttIssue material but it appears to be empty with the exception of the company
string. I have included the procedure below.
procedure PerformMaterialMovementAfter:
define input-output parameter plNegQtyAction as logical.
define input-output parameter table for ttIssueReturn.
define input-output parameter table for ttLegalNumberGenerate.
define input-output parameter table for ttSelectedSerialNumbers.
define input-output parameter table for ttSNFormat.
define input-output parameter LegalNumberMessage as character.
{&TRY_PRIVATE}
/*UD0001 TJF 08/04/09 Coils/Bales Usage. Start */
Def var xCoils as char no-undo.
def var Coils as decimal no-undo.
def var Number01 as decimal no-undo.
def var Lot as char no-undo.
assign Lot = getdata('Lot').
def var Bin as char no-undo.
assign Bin = getdata('Bin').
assign xCoils = getdata('xCoils').
Coils = decimal(xCoils).
if (Coils + 0) ne 0 then do:
find first ttIssueReturn where ttIssueReturn.RowMod = '' no-lock no-error.
if avail ttIssueReturn then do:
/**/
/* Reduce the Stock in the From Warehouse */
/**/
/* throwexception('3','Lot ' + ttIssueReturn.LotNum + ' Bin ' +
ttIssueReturn.FromBinNum). */
find first PartBin where PartBin.Company = ttIssueReturn.Company and
PartBin.PartNum = ttIssueReturn.PartNum and PartBin.WarehouseCode =
ttIssueReturn.FromWarehouseCode
and PartBin.LotNum = Lot and PartBin.DimCode =
ttIssueReturn.DimCode and PartBin.BinNum = Bin exclusive-lock no-error.
if avail PartBin then do:
Number01 = PartBin.Number01 - Coils.
run lib\UpdateTableBuffer.p(input Buffer
PartBin:Handle,'Number01',Number01).
end.
find first PartLot where PartLot.Company = ttIssueReturn.Company and
PartLot.PartNum = ttIssueReturn.PartNum and PartLot.LotNum = Lot exclusive-lock
no-error.
if avail PartLot then do:
Number01 = PartLot.Number01 - Coils.
run lib\UpdateTableBuffer.p(input Buffer
PartLot:Handle,'Number01',Number01).
end.
find last PartTran where PartTran.Company = ttIssueReturn.Company and
PartTran.PartNum = ttIssueReturn.PartNum and PartTran.LotNum = Lot
and PartTran.TranDate = Today and PartTran.TranQty =
ttIssueReturn.TranQty and PartTran.SysTime > 0 and (PartTran.Number01 + 0) = 0
exclusive-lock no-error.
if avail PartTran then do:
Number01 = 0 - Coils.
run lib\UpdateTableBuffer.p(input Buffer
PartTran:Handle,'Number01',Number01).
end.
end.
end.
/*UD0001 TJF 08/04/09 Coils/Bales Usage. End */
{&CATCH_PRIVATE}
end procedure.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]