26. Februar 2010 14:21
IF "Sell-to County" = '' THEN BEGIN
SalesShipmentHeader := "<Sales Shipment Header1>";
IF Customer.GET("Sell-to Customer No.") THEN
SalesShipmentHeader."Sell-to County" := Customer.County;
IF SalesShipmentHeader. "Sell-to County" = '' THEN
SalesShipmentHeader."Sell-to County" := 'UNKNOWN';
SalesShipmentHeader.MODIFY;
END;
IF "Bill-to County" = '' THEN BEGIN
SalesShipmentHeader := "<Sales Shipment Header2>";
IF Customer.GET("Bill-to Customer No.") THEN
SalesShipmentHeader."Bill-to County" := Customer.County;
IF SalesShipmentHeader. "Bill-to County" = '' THEN
SalesShipmentHeader."Bill-to County" := 'UNKNOWN';
SalesShipmentHeader.MODIFY;
END;
26. Februar 2010 14:39
If "<Sales Shipment Header1>".GET(SalesShipmentHeader."No." Then Begin
IF "<Sales Shipment Header1>"."Sell-to County" = '' THEN BEGIN
IF Customer.GET("<Sales Shipment Header1>"."Sell-to Customer No.") THEN
"<Sales Shipment Header1>"."Sell-to County" := Customer.County;
END;
IF "<Sales Shipment Header1>"."Bill-to County" = '' THEN BEGIN
IF Customer.GET("<Sales Shipment Header1>"."Sell-to Customer No.") THEN
"<Sales Shipment Header1>"."Bill-to County" := Customer.County;
END;
IF "<Sales Shipment Header1>"."Sell-to County" = '' THEN
"<Sales Shipment Header1>"."Sell-to County" := 'UNKNOWN';
IF "<Sales Shipment Header1>"."Bill-to County" = '' THEN
"<Sales Shipment Header1>"."Bill-to County" := 'UNKNOWN';
END;
26. Februar 2010 14:52
If "<Sales Shipment Header1>".GET(SalesShipmentHeader."No." Then Begin
Ich würde nur einen Durchlauf machen
26. Februar 2010 14:57
IF ("Sell-to County" <> '') AND (Bill-to County" <> '') THEN
CurrReport.SKIP;
IF "Sell-to County" = '' THEN BEGIN
"Sell-to County" = 'UNKNOWN';
IF Customer.GET("Sell-to Customer No.") THEN
"Sell-to County" := Customer.County;
END;
IF "Bill-to County" = '' THEN BEGIN
"Bill-to County" = 'UNKNOWN';
IF Customer.GET("Bill-to Customer No.") THEN
"Bill-to County" := Customer.County;
END;
26. Februar 2010 15:44
26. Februar 2010 16:08
26. Februar 2010 16:31
26. Februar 2010 16:47
27. Februar 2010 23:07
1. März 2010 11:42
OBJECT Report 50082 Batch Set County Posted Docs
{
OBJECT-PROPERTIES
{
Date=01.03.10;
Time=10:00:00;
Modified=Yes;
Version List=100225;
}
PROPERTIES
{
Permissions=TableData 110=rim,
TableData 112=rim,
TableData 114=rim;
CaptionML=[DEU=Gebuchte Dokumente Bundesregion setzen;
ENU=Batch Set County Posted Docs];
UseReqForm=No;
ProcessingOnly=Yes;
OnPreReport=BEGIN
Window.OPEN(
' Die Daten in der Tabelle #10############ werden aktualisiert.\\\\' +
' Feld #11############# Datensatz#1####von#2#### @3@@@@@@@@@@@@@@@@@@\\' +
' Feld #12############# Datensatz#4####von#5#### @6@@@@@@@@@@@@@@@@@@\\' +
' Feld #13############# Datensatz#7####von#8#### @9@@@@@@@@@@@@@@@@@@\\' );
Window.UPDATE(11, "<Sales Shipment Header1>".FIELDCAPTION("Sell-to County"));
Window.UPDATE(12, "<Sales Shipment Header1>".FIELDCAPTION("Bill-to County"));
Window.UPDATE(13, "<Sales Shipment Header1>".FIELDCAPTION("Ship-to County"));
TimeStart := TIME;
END;
OnPostReport=BEGIN
MESSAGE('Time: %1', TIME - TimeStart);
END;
OnHyperlink=BEGIN
Window.CLOSE;
END;
}
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table110;
DataItemTableView=SORTING(Sell-to County,Sell-to Country Code)
WHERE(Sell-to Country Code=FILTER(DE),
Sell-to County=FILTER(''));
DataItemVarName=<Sales Shipment Header1>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(1, 0);
Window.UPDATE(2, 0);
Window.UPDATE(3, 9999);
END;
Window.UPDATE(10, 'Sales Shipment Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(1, Counter);
Window.UPDATE(2, RecordCount);
Window.UPDATE(3, (Counter * Factor) DIV 1);
IF "Sell-to County" = '' THEN BEGIN
SalesShipmentHeader := "<Sales Shipment Header1>";
IF Customer.GET("Sell-to Customer No.") THEN
SalesShipmentHeader."Sell-to County" := Customer.County;
IF SalesShipmentHeader. "Sell-to County" = '' THEN
SalesShipmentHeader."Sell-to County" := 'UNKNOWN';
SalesShipmentHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table110;
DataItemTableView=SORTING(Bill-to County,Bill-to Country Code)
WHERE(Bill-to Country Code=FILTER(DE),
Bill-to County=FILTER(''));
DataItemVarName=<Sales Shipment Header2>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(4, 0);
Window.UPDATE(5, 0);
Window.UPDATE(6, 9999);
END;
Window.UPDATE(10, 'Sales Shipment Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(4, Counter);
Window.UPDATE(5, RecordCount);
Window.UPDATE(6, (Counter * Factor) DIV 1);
IF "Bill-to County" = '' THEN BEGIN
SalesShipmentHeader := "<Sales Shipment Header2>";
IF Customer.GET("Bill-to Customer No.") THEN
SalesShipmentHeader."Bill-to County" := Customer.County;
IF SalesShipmentHeader. "Bill-to County" = '' THEN
SalesShipmentHeader."Bill-to County" := 'UNKNOWN';
SalesShipmentHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table110;
DataItemTableView=SORTING(Ship-to County,Ship-to Country Code)
WHERE(Ship-to Country Code=FILTER(DE),
Ship-to County=FILTER(''));
DataItemVarName=<Sales Shipment Header3>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(7, 0);
Window.UPDATE(8, 0);
Window.UPDATE(9, 9999);
END;
Window.UPDATE(10, 'Sales Shipment Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(7, Counter);
Window.UPDATE(8, RecordCount);
Window.UPDATE(9, (Counter * Factor) DIV 1);
IF "Ship-to County" = '' THEN BEGIN
SalesShipmentHeader := "<Sales Shipment Header3>";
IF PostCodeRegionAlloc.GET("Ship-to Country Code","Ship-to Post Code","Ship-to City") THEN
SalesShipmentHeader."Ship-to County" := PostCodeRegionAlloc.County;
IF SalesShipmentHeader. "Ship-to County" = '' THEN
SalesShipmentHeader."Ship-to County" := 'UNKNOWN';
SalesShipmentHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table112;
DataItemTableView=SORTING(Sell-to County,Sell-to Country Code)
WHERE(Sell-to Country Code=FILTER(DE),
Sell-to County=FILTER(''));
DataItemVarName=<Sales Invoice Header1>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(1, 0);
Window.UPDATE(2, 0);
Window.UPDATE(3, 9999);
END;
Window.UPDATE(10, 'Sales Invoice Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(1, Counter);
Window.UPDATE(2, RecordCount);
Window.UPDATE(3, (Counter * Factor) DIV 1);
IF "Sell-to County" = '' THEN BEGIN
SalesInvoiceHeader := "<Sales Invoice Header1>";
IF Customer.GET("Sell-to Customer No.") THEN
SalesInvoiceHeader."Sell-to County" := Customer.County;
IF SalesInvoiceHeader. "Sell-to County" = '' THEN
SalesInvoiceHeader."Sell-to County" := 'UNKNOWN';
SalesInvoiceHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table112;
DataItemTableView=SORTING(Bill-to County,Bill-to Country Code)
WHERE(Bill-to Country Code=FILTER(DE),
Bill-to County=FILTER(''));
DataItemVarName=<Sales Invoice Header2>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(4, 0);
Window.UPDATE(5, 0);
Window.UPDATE(6, 9999);
END;
Window.UPDATE(10, 'Sales Invoice Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(4, Counter);
Window.UPDATE(5, RecordCount);
Window.UPDATE(6, (Counter * Factor) DIV 1);
IF "Bill-to County" = '' THEN BEGIN
SalesInvoiceHeader := "<Sales Invoice Header2>";
IF Customer.GET("Bill-to Customer No.") THEN
SalesInvoiceHeader."Bill-to County" := Customer.County;
IF SalesInvoiceHeader. "Bill-to County" = '' THEN
SalesInvoiceHeader."Bill-to County" := 'UNKNOWN';
SalesInvoiceHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table112;
DataItemTableView=SORTING(Ship-to County,Ship-to Country Code)
WHERE(Ship-to Country Code=FILTER(DE),
Ship-to County=FILTER(''));
DataItemVarName=<Sales Invoice Header3>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(7, 0);
Window.UPDATE(8, 0);
Window.UPDATE(9, 9999);
END;
Window.UPDATE(10, 'Sales Invoice Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(7, Counter);
Window.UPDATE(8, RecordCount);
Window.UPDATE(9, (Counter * Factor) DIV 1);
IF "Ship-to County" = '' THEN BEGIN
SalesInvoiceHeader := "<Sales Invoice Header3>";
IF PostCodeRegionAlloc.GET("Ship-to Country Code","Ship-to Post Code","Ship-to City") THEN
SalesInvoiceHeader."Ship-to County" := PostCodeRegionAlloc.County;
IF SalesInvoiceHeader. "Ship-to County" = '' THEN
SalesInvoiceHeader."Ship-to County" := 'UNKNOWN';
SalesInvoiceHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table114;
DataItemTableView=SORTING(Sell-to County,Sell-to Country Code)
WHERE(Sell-to Country Code=FILTER(DE),
Sell-to County=FILTER(''));
DataItemVarName=<Sales Cr.Memo Header1>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(1, 0);
Window.UPDATE(2, 0);
Window.UPDATE(3, 9999);
END;
Window.UPDATE(10, 'Sales Cr.Memo Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(1, Counter);
Window.UPDATE(2, RecordCount);
Window.UPDATE(3, (Counter * Factor) DIV 1);
IF "Sell-to County" = '' THEN BEGIN
SalesCrMemoHeader := "<Sales Cr.Memo Header1>";
IF Customer.GET("Sell-to Customer No.") THEN
SalesCrMemoHeader."Sell-to County" := Customer.County;
IF SalesCrMemoHeader. "Sell-to County" = '' THEN
SalesCrMemoHeader."Sell-to County" := 'UNKNOWN';
SalesCrMemoHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table114;
DataItemTableView=SORTING(Bill-to County,Bill-to Country Code)
WHERE(Bill-to Country Code=FILTER(DE),
Bill-to County=FILTER(''));
DataItemVarName=<Sales Cr.Memo Header2>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(4, 0);
Window.UPDATE(5, 0);
Window.UPDATE(6, 9999);
END;
Window.UPDATE(10, 'Sales Cr.Memo Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(4, Counter);
Window.UPDATE(5, RecordCount);
Window.UPDATE(6, (Counter * Factor) DIV 1);
IF "Bill-to County" = '' THEN BEGIN
SalesCrMemoHeader := "<Sales Cr.Memo Header2>";
IF Customer.GET("Bill-to Customer No.") THEN
SalesCrMemoHeader."Bill-to County" := Customer.County;
IF SalesCrMemoHeader. "Bill-to County" = '' THEN
SalesCrMemoHeader."Bill-to County" := 'UNKNOWN';
SalesCrMemoHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemTable=Table114;
DataItemTableView=SORTING(Ship-to County,Ship-to Country Code)
WHERE(Ship-to Country Code=FILTER(DE),
Ship-to County=FILTER(''));
DataItemVarName=<Sales Cr.Memo Header3>;
OnPreDataItem=BEGIN
Counter := 0;
RecordCount := COUNT;
IF RecordCount > 0 THEN BEGIN
Factor := 9999 / RecordCount;
END ELSE BEGIN
Window.UPDATE(7, 0);
Window.UPDATE(8, 0);
Window.UPDATE(9, 9999);
END;
Window.UPDATE(10, 'Sales Cr.Memo Header');
END;
OnAfterGetRecord=BEGIN
Counter += 1;
Window.UPDATE(7, Counter);
Window.UPDATE(8, RecordCount);
Window.UPDATE(9, (Counter * Factor) DIV 1);
IF "Ship-to County" = '' THEN BEGIN
SalesCrMemoHeader := "<Sales Cr.Memo Header3>";
IF PostCodeRegionAlloc.GET("Ship-to Country Code","Ship-to Post Code","Ship-to City") THEN
SalesCrMemoHeader."Ship-to County" := PostCodeRegionAlloc.County;
IF SalesCrMemoHeader. "Ship-to County" = '' THEN
SalesCrMemoHeader."Ship-to County" := 'UNKNOWN';
SalesCrMemoHeader.MODIFY;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=846;
}
CONTROLS
{
}
}
}
}
}
REQUESTFORM
{
PROPERTIES
{
Width=9020;
Height=3410;
}
CONTROLS
{
}
}
CODE
{
VAR
SalesShipmentHeader@1000000010 : Record 110;
SalesInvoiceHeader@1000000012 : Record 112;
SalesCrMemoHeader@1000000013 : Record 114;
PostCodeRegionAlloc@1000000003 : Record 50088;
Customer@1000000011 : Record 18;
Window@1000000008 : Dialog;
Factor@1000000002 : Decimal;
Counter@1000000001 : Integer;
RecordCount@1000000000 : Integer;
TimeStart@1000000009 : Time;
BEGIN
{
HV100225 RPB 01.03.10 Laufzeit optimiert
}
END.
}
}