📄 updsfctb.pas
字号:
unit updSFCTB;
interface
uses sysUtils, dbtables, bde, updBASE;
type
TUpdateSFCTB = class(TBaseUpdateUnit)
private
function update_byACPI02(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
uses LibStrs,CONSTDEF;
function TUpdateSFCTB.update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
Result := True;
self.saveVar(xAction, xOtherVar, xUserData);
try
self.setDBname(xQrySource.DatabaseName);
if (compareText(self.SourceTxnCode, 'TXNACPI02') = 0) then
Result := update_byACPI02(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query2.close;
end;
xMsg := self.Msg;
end;
function TUpdateSFCTB.update_byACPI02(xQrySource: TQuery): Boolean;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'SFCTB';
With xQrySource do
self.Msg[2] := FieldByName('TB001').asString+' '+
FieldByName('TB002').asString;
// if not ((xQrySource.FieldByName('TB004').asString='1') or (xQrySource.FieldByName('TB004').asString='2')) then Exit;
try
with self.Query1 do
begin
close;
SQL.clear;
RequestLive := False;
SQL.add('select TB001 from $$SFCTB ');
SQL.add(' where TB001=:TB001 AND TB002=:TB002 ');
ParamByName('TB001').asString := xQrySource.FieldByName('TB005').asString;
ParamByName('TB002').asString := xQrySource.FieldByName('TB006').asString;
Open;
first;
if not eof then //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -