Skip to main content

Dynamic Data Exchange Settings

This window helps you write a text that pulls an account balance, a material quantity or other values from alameen into another program, such as Excel, using Dynamic Data Exchange (DDE). The window does not show the result itself; it generates the text of a formula that you paste into a cell or a macro, and that cell then asks alameen for the value. The steps are in Set up Dynamic Data Exchange.

Opening the window​

  1. Open the company file, then click the File tab.
  2. Click Tools.
  3. Click Dynamic Data Exchange. The button description: "This window offers the possibility to exchange information between programs so it helps sharing information between Al-ameen and other programs such as Excel."

The button appears if a file is open and the licence includes accounting. It is available in every subscription plan. In Users Management, the permission that carries its name, under Operations, controls it; without it the button stays visible and nothing happens when you click it. See File tab: Tools and Import and Export for the page.

alameen registers an exchange service named Ameen when the file opens and removes it when the file closes. The generated formulas work only while alameen is running with the file open. While an exchange request is running the program does not let you close the file.

Category and functions​

FieldDescriptionRequiredValues and rules
CategoryA list that filters the functions by kind.NoThe first item shows all functions, then an item for each of accounts, materials, groups and customers. Functions that do not belong to a kind (such as cost center balance, bills count and the current user name) appear under the first item only. Changing the category selects its first function.
FunctionsA list of the available functions.YesChoose a function. The choice changes the fields shown and generates the formula again. The full table is at the end of the page.

Under the two lists are two read-only lines:

  • The general formula of the selected function, in the shape Ameen|function name!parameters, showing the names of the parameters the function asks for, such as Ameen|AcnBal!Acc, date1, date2.
  • A short explanation of the function, which is the "What it returns" column of the table.

Parameter fields​

Only the fields the selected function needs are shown. The program arranges them from top to bottom as they appear.

FieldDescriptionRequiredValues and rules
AccountThe account of the function.Yes for functions that start with an accountAn account card. It is passed by name or by code depending on the function (the "Fields you set" column).
Contra AccountThe contra account.Yes for functions that have "contra"An account card.
Cost CenterThe cost center.Yes when the function asks for itA cost center card.
CurrencyThe currency of the function.Yes when the function asks for itA list of currencies.
FromStart of the period.—A date. Shown with the functions that use a period. It must not be after To, otherwise the message "Beginning date is bigger than ending date" appears.
ToEnd of the period.—A date.
CustomerThe customer of the function.Yes for customer functionsA customer card. Passed by name.
MaterialThe material of the function.Yes for material functionsA material card. By name or by code depending on the function.
WarehouseThe warehouse of the function.Yes for material functions that ask for itA warehouse card.
GroupThe group of the function.Yes for group functionsA group card. By name or by code depending on the function.
FormA list of bill types (titled Form), with a box for each.Yes when the function asks for itTick one type or more. They all start unticked. If you tick none, the formula is Error followed by "Please specify" and the words for a bill type. The formula writes the abbreviations of the ticked types, separated by [].
UnitThe measurement unit of the material or group.NoA list: First Unit, Second Unit, Third Unit and Default unit (the default). Shown with the quantity and unit functions.
Account (the second one)A customer account that limits the bills.NoAn account card. If you leave it empty the formula writes an empty value. Shown with the functions for bill values, quantities and counts.
Show Unposted EntriesAdds the unposted entries to the balance.NoShown with the balance functions (AcnBal, AcnBalCont and AcnBalContCost), and ticked each time you choose one of them. The formula writes ShowUnPostedEnt="1" or "0".
Parity——Always hidden. The program does not show it.

If a required field is missing, the Format box shows the word Error with a second line, which is "Please specify" followed by the field name (for example "Please specify Account"). In the VBA type only Error appears.

Type and format​

FieldDescriptionRequiredValues and rules
TypeThe language of the generated text.YesA list: Excel (the default), VBA and C#.
FormatThe generated text, to read and copy.—It is generated automatically when you change the function, any field or Type. After generating, the program selects all the text so that you can copy it.

The text types:

  • Excel: a cell formula. Example, for a function named AcnGetCode about an account named Cash: =Ameen|AcnGetCode!'AccName="Cash"'. If the function needs no parameters, a space is written between the quotes.
  • VBA: macro code. It declares variables, opens a channel with Application.DDEInitiate, requests the value with Application.DDERequest, converts it to text, a number or an integer according to what the function returns, then closes the channel.
  • C#: the text "غير متوفر حالياً" appears, in Arabic in both languages.

Buttons​

ButtonWhat it does
GenerateGenerates the formula again. This also happens automatically when you change any field.
CopySelects the Format text and copies it to the clipboard.
CloseCloses the window.

If logging is on in the file, when you close the window the program writes a line for each successful generation of the formula, including the automatic ones, with the values you set (the account, material, group or customer, the dates and the currency). See Log details.

Table of functions​

The table shows all the functions in the list in their order. The "Function" column is the name in the list, and "Function name" is what is written in the formula.

FunctionFunction nameCategoryFields you setWhat it returns
Account CodeAcnGetCodeAccountsAccountGet account code
Account NameAccGetNameAccountsAccount (by code)Get account name
Account balance between two datesAcnBalAccountsAccount (by code), From, To, Show Unposted EntriesGet account balance within certain period
Total Debit Account between two DatesAcnDebitAccountsAccount (by code), From, ToGet Total Debit for account during Specific Period
Total Credit Account between two DatesAcnCreditAccountsAccount (by code), From, ToGet Total Credit for account during Specific Period
Accounts' count sub to accountAcnGetSonsAccountsAccountGet number of accounts connected to account
Final Account NameAcnGetFinalNameAccountsAccountGet final account name
Final Account CodeAcnGetFinalCodeAccountsAccountGet final account code
Customer debtCustDebtCustomersCustomer, From, ToGet customer debt
Customer account nameCustAccNameCustomersCustomerGet customer acccount
Customer account codeCustAccCodeCustomersCustomerGet customer account code
Customer Phone1 numberCustPhone1CustomersCustomerGet customer phone1 number
Customer Phone2 numberCustPhone2CustomersCustomerGet customer phone2 number
Customer's Telex numberCustTelexCustomersCustomerGet customer telex number
Customer's Fax numberCustFaxCustomersCustomerGet customer fax number
Notes written in customer cardCustNotesCustomersCustomerNotes written in customer card
Material quantity in warehousesMatQntMaterialsMaterial, From, To, WarehouseGet material quantity in warehouses
Material quantity in warehouses for invoices formsMatQntRepSrcsMaterialsMaterial, From, To, Warehouse, FormGet Material quantity in warehouses for Invoices Forms
Material Average PriceMatAvgPriceMaterialsMaterialGet material average price
Material last purchase priceMatLastPriceMaterialsMaterialGet last purchase price of material
Material Max. purchase priceMatMaxPriceMaterialsMaterialGet material Max. purchase price
Material Pricing PolicyMatPolicyMaterialsMaterialGet material pricing policy
Material SpecificationsMatSpecMaterialsMaterialGet material specifications
Material measurement unitMatUnityMaterialsMaterialGet material measure unit
Material groupMatGroupMaterialsMaterialGet material group
Wholesale priceMatNWholeMaterialsMaterialGet wholesale price
Semi wholesale priceMatNHalfMaterialsMaterialSemi wholesale price
Retail priceMatNRetailMaterialsMaterialRetail price
Consumer priceMatNEndUserMaterialsMaterialConsumer price
Export priceMatNExportMaterialsMaterialExport price
Distributor priceMatNVendorMaterialsMaterialDistributor price
Gifts quantity disbursed from warehouseMatOutBounsMaterialsMaterial, Warehouse, From, ToGifts quantity disbursed from warehouse
Groups count sub to groupGrpNGrpCntGroupsGroupGroups count sub to group
Materials count sub to groupGrpNMatCntGroupsGroupMaterials count connected to group
Account balance to contra accountAcnBalContAccountsAccount, From, To, Contra Account, Show Unposted EntriesAccount balance to contra account
Total debit account to contra accountAcnDebitContAccountsAccount, From, To, Contra AccountTotal debit account to contra account
Total credit account to contra accountAcnCreditContAccountsAccount, From, To, Contra AccountTotal credit account to contra account
Account balance to contra account with cost centerAcnBalContCostAccountsAccount, From, To, Contra Account, Cost Center, Show Unposted EntriesAccount balance to contra account
Total debit account to contra account with cost centerAcnDebitContCostAccountsAccount, From, To, Contra Account, Cost CenterTotal debit account to contra account
Total credit account to contra account with cost centerAcnCreditContCostAccountsAccount, From, To, Contra Account, Cost CenterTotal credit account to contra account
Account balance to cost centerAcnBalCostAccountsAccount, From, To, Cost CenterAccount balance to cost center
Total Debit Account to cost centerAcnDebitCostAccountsAccount, From, To, Cost CenterTotal Debit Account to cost center
Total Credit Account to cost centerAcnCreditCostAccountsAccount, From, To, Cost CenterTotal Credit Account to cost center
Cost Center balance between two datesCostBalNo categoryCost Center, From, ToCost Center balance between two dates
Material quantity for cost centerMatQtyCostMaterialsMaterial, From, To, Cost CenterMaterial quantity for cost center
Currency ledgerCurGLAccountsAccount, From, To, CurrencyCurrency ledger
Item value for invoices forms between two datesMatValueMaterialsMaterial (by code), From, To, Currency, Form, Account (customer account)Item value for invoices forms between two dates
Item quantity between two datesMatQntBillMaterialsMaterial (by code), From, To, Unit, Form, Account (customer account)Item quantity between two dates
Material Quantity of invoices Forms with Gifts between two datesMatQntBillBonusMaterialsMaterial (by code), From, To, Unit, Form, Account (customer account)Material Quantity of invoices Forms with Gifts between two dates
Item unit nameMatUnitNameMaterialsMaterial (by code), UnitItem unit name
Number of Invoices between two datesBillCountNo categoryFrom, To, Form, Account (customer account)Number of Invoices between two dates
Group value for invoices formsGroupValueGroupsGroup (by code), From, To, Currency, Form, Account (customer account)Group value for invoices forms
Materials' Total Quantities sub to bills' forms groupGroupQntBillGroupsGroup (by code), From, To, Unit, Form, Account (customer account)Materials' Total Quantities sub to bills' forms group
Number of bills of bills' forms between two dates for a materialBillCountMtMaterialsMaterial (by code), From, To, Form, Account (customer account)Number of bills of bills' forms between two dates for a material
Bill's forms count of bills for a GroupBillCountGrGroupsGroup (by code), From, To, Form, Account (customer account)Bill's forms count of bills for a Group
All accounts' count sub to a certain accountAccoutAllCountAccountsAccount (by code)All accounts' count sub to a certain account
Customers' count of invoice forms between two datesCustCountBillDtrRngNo categoryFrom, To, FormCustomers' count of invoice forms between two dates
Customers' count of invoices forms for materialCustCountBillDtrRngProductMaterialsMaterial (by code), From, To, FormCustomers' count of invoice forms between two dates
Customers' count of invoices forms for a groupCustCountBillDtrRngGroupGroupsGroup (by code), From, To, FormCustomers' count of invoice forms between two dates
Current user nameGetCurLoginNameNo category—Current user name

The last four (CustCountBillDtrRng, CustCountBillDtrRngProduct, CustCountBillDtrRngGroup and GetCurLoginName) appear only if the licence includes the cost centers feature.

Messages​

MessageWhen it appearsWhat to do
Beginning date is bigger than ending dateFrom is after To in a function that uses both dates.Correct the two dates.
Please specify (and the field name)Appears inside the Format box, not in a window. It means a required field is empty.Fill the field.
غير متوفر حالياًYou chose the C# type.Choose Excel or VBA.

This page applies to alameen ERP 10, version 10.1.79.764.