Hi all,
I've been asked to add a Description to the Excel sheet that gets imported via the Budget -> Import From Excel function that can change line by line. So I've made a few mods.
In table 371 Budget Buffer I've added the field "Description" (text 50).
In report 81, I've added the Text constant "CN_Text001" and assigned it "Description"
In the Analyze Data function of Report 81, I've added the following code (I've included existing code so you can see where it was placed):
Text022:
TempBudgetBuf."Dimension Value Code 8" :=
COPYSTR(
ExcelBuf."Cell Value as Text",
1,MAXSTRLEN(TempBudgetBuf."Dimension Value Code 8"));
// >> CN1.78
CN_Text001:
BEGIN
booOK := CONFIRM('Description: %1', booOK, ExcelBuf."Cell Value as Text");
TempBudgetBuf.Description :=
COPYSTR(
ExcelBuf."Cell Value as Text",
1,MAXSTRLEN(TempBudgetBuf.Description));
END;
// << CN1.78
Text014:
BEGIN
IF TempBudgetBuf."G/L Account No." <> '' THEN BEGIN
In the OnAfterGetRecord of BudgetBuf, I've made this mod:
// >> CN1.78
// original - GLBudgetEntry.Description := Description;
GLBudgetEntry.Description := BudgetBuf.Description;
// << CN1.78
When I disable the Excel Buffer DELETEALL, I reviewed the data and it appears to be stored in the Excel Buffer table properly:
But the G/L Budget Description remains blank. And I don't get any CONFIRM dialogue. In the Excel spreadsheet, the column is called "Description".
Any advice greatly appreciated.
cheers,
Answers
I hope this proves useful to someone else.
cheers,