This is an old revision of the document!
Using APP Report Maintenance and Delivery
How To Migrate TWBS_SBO-Common Data If Required During Upgrade
The separate TWBS_SBO-Common database will no longer be used by the application. All APP information will be stored in SAP® Business One user-defined tables in the respective company databases. For existing customers upgrading to this new version, the application Server Configuration screen provides a method to migrate this information into the customer database.
A backup of the TWBS_SBO-Common from the previous SAP® Business One production environment must be present in order to perform the data migration.
The TWBS APP Server Configuration screen may only be accessed through SAP® Business One authorizations.
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
APP Server Configuration screen.
APP Report migration will only occur for reports assigned to the specific database name the migration is being performed in or reports assigned to ALL databases. APP data migration can be performed multiple times if adjustments are required.
This process may take a few minutes.
Once all of the APP information has been migrated to all required databases and verified, the TWBS_SBO-Common database is no longer required.
Every SAP® Business One or ISV add-on screen generated using the UI API has a unique ID associated with it. This value can be easily retrieved from within SAP® Business One through the following steps…
Open the screen in SAP® Business One that you wish to identify the unique ID for.
Click the SAP menu option titled System Information under the View drop down menu or use the Ctrl+Shift+I keyboard shortcut.
Hover your mouse over any control on the form or the form itself. The bottom left panel in SAP® Business One will display information regarding the form.
Note the Form= value from the panel. In the example below the Form= value is TWBS_RptMainEx.
How To Determine a Field Unique ID for Parameter Mapping**
Every field on an SAP® Business One or ISV add-on screen generated using the UI API has a unique ID associated with it. This value can be easily retrieved from within SAP® Business One through the following steps…
Open the screen in SAP® Business One that you wish to identify the field unique ID for.
Click the SAP menu option titled System Information under the View drop down menu or use the Ctrl+Shift+I keyboard shortcut.
Hover your mouse over the field. The bottom left panel in SAP® Business One will display information regarding the field.
Note the Item= value from the panel. In the example below the Item= value is txtrptName.
How To Set Report Security
Click the
User Roles menu option under the
Administration
Setup
APP Configuration menu groups to load the
APP User Roles Definition screen.
Select one or more users (use the Ctrl+Shift keys for multiple user selection).
Click the Ok button.
Select the Permissions tab. You will see a list of all available reports.
Uncheck any reports you do not want to Allow permissions.
How To Create Report Groups
Click the
Report Maintenance menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click the SAP icon menu option for
Add 
.
Select the Report Group option button.
Enter the criteria required (Name, Category, etc.)
After selecting a category in the Link To box, assign reports to the group by checking their boxes in the list that appears.
Click the Add button.
How To Set Up Report Queries
Click the
Report Maintenance menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click the SAP icon menu option for
Add 
.
Select the Query option button.
Enter the criteria required (Name, Category, Database, Query, etc.)
Click the Add button.
How To Set Up Report Queries with Linked Parameters
Click the
Report Maintenance menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click the SAP icon menu option for
Add 
.
Select the Query option button.
Enter the criteria required (Name, Category, Database, Query, etc.)
Verify that the Query selected contains parameters.
For the purpose of this example, the following query will be used
Click the Update button on the Query Parameters Mapping screen.
Click the Update button on the Reports Maintenance screen.
Execute the Report Query through the APP Reports menu option
This is only valid for execution through the APP application. Execution of the query through the SAP Query menu options will not display the specified parameter prompt text.
The results of the Query based on the entered parameter will be visible to the user.
Any charts associated with Queries that have parameters will also prompt for parameters when the chart is launched. If multiple panes of a dashboard contain objects based on the same query (a data display and a chart, for example) then the user will only be prompted once for the parameters by the dashboard. Each pane based on the query will share the entered parameter values.
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click the SAP icon menu option for Add

.
Select the Query option button.
Enter the criteria required (Name, Category, Database, Query, etc.)
Be sure to leave the Link To value as “None”.
How To Execute Queries in TWBS Query Viewer
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
Report Maintenance screen.
Click the SAP icon menu option for
Add 
or load an existing Query.
Select the APP Query option button.
Enter a Name value for the Query title.
Select a Category for the Query assignment.
Enter a Description value for the Query.
Select a Query to be executed.
Click the Add or Update button.
Click the Refresh APP Menu button to repopulate the SAP menu structure.
Click the SAP menu option for the query that you added/updated.
If you selected the Load Associated Charts option on the setup screen any charts associated with the query will also be loaded onto additional tabs when the query is executed.
Suggested Approach for Using Queries with APP
Avoid using * operator for multi table queries. It is okay to use * for queries for a single table. For example, SELECT * FROM ORDR (NOLOCK) is supported, but SELECT * FROM ORDR (NOLOCK) INNER JOIN RDR1 (NOLOCK) ON ORDR.DocEntry = RDR1.DocEntry is not supported. Always specify individual field names in multi table queries.
For more complex queries with joins, table and field aliases using GROUP BY or ORDER BY functions, we recommend the following approach…
Create a SQL view in the B1 company database to aggregate all the required data.
Create a simple query in B1 that just executes a select statement off the sql view. This approach enables the user setting this up to leverage all of the robust query features provided in Microsoft SQL server and at the same time simplified the implementation and support requirements for APP.
Avoid using aliases in saved B1 queries. Follow above suggestion to create view and then reference the view in the B1 saved query.
The table registered in the Form Registration Window must be at least one of the tables in the query. APP will filter the query based on the primary key field of this table provided in the Form Registration Window.
The minimum requirements for successful execution of a B1 saved query via APP are as follows:
Record Key DB field specified on Form registration window.
Business Partner DB field (if specified)
Contact Person DB field (if specified)
See the Query Tips and Tricks for APP Dashboards section of the User Guide for additional information.
How To User the Visual Query Builder
TWBS Advanced Productivity Pack (APP) incorporates a Visual Query Builder screen that allows the user to have a dynamic method to create and edit queries which can be used for reporting, query execution, or dashboards.
SAP® Business One variables are not supported in the TWBS Visual Query Builder.
How To Load a Blank Query into Visual Query Builder
Click the SAP menu option titled
Query Generator under the
Tools
Queries drop down menus to load the
Query Generator screen.
SAP® Business One variables are not supported in the TWBS Visual Query Builder.
Click the TWBS SQL icon

to launch the
Visual Query Builder screen.
The query data will be empty on the Visual Query Builder screen.
Edit the query as needed.
Click the Save & Close button to save the query and return it to the Query Preview screen the Visual Query Builder was launched from.
How To Load an Existing Query into Visual Query Builder
Click the SAP menu option titled
Query Manager under the
Tools
Queries drop down menus to load the
Query Manager screen.
SAP® Business One variables are not supported in the TWBS Visual Query Builder.
Click the TWBS SQL icon

to launch the
Visual Query Builder screen.
The query data will be preloaded into the Visual Query Builder screen.
Edit the query as needed.
Click the Save & Close button to save the query and return it to the Query Preview screen the Visual Query Builder was launched from.
How To Join Tables in the Visual Query Builder
The tables to be joined should be loaded into the SQL Graphical Display Pane of the Visual Query Builder screen.
Click on the field in the table for the left side of the JOIN and hold down the left mouse key (OCRD.CardCode above).
Drag the field to the table for the right side of the JOIN and position the mouse over the field to be joined to (CRD1.CardCode above).
Release the left mouse key.
A black line identifying the join between the table fields will appear.
The default JOIN will be an INNER JOIN.
To alter the JOIN type, right clicking on the black line connecting the fields will provide the user with the following options…
Selection of the Select all rows from OCRD menu option only will change INNER JOIN the to a LEFT JOIN.
Selection of the Select all rows from CRD1 menu option only will change INNER JOIN the to a RIGHT JOIN.
Selection of the Properties menu option only will load the Link Properties screen.
How To Use Aggregate Functions in the Visual Query Builder
The tables for the query should be loaded into the SQL Graphical Display Pane of the Visual Query Builder screen.
Select check box next to the field to be used in the aggregate function. This will display the field in the grid below the SQL Graphical Display Pane.
Aggregate functions available to the user include SUM, AVG, COUNT, MIN, and MAX among others.
How To Use Grouping in the Visual Query Builder
The tables for the query should be loaded into the SQL Graphical Display Pane of the Visual Query Builder screen.
Select check box next to the field to be used in the GROUP BY function. This will display the field in the grid below the SQL Graphical Display Pane.
How To Use Aliases in the Visual Query Builder
The tables for the query should be loaded into the SQL Graphical Display Pane of the Visual Query Builder screen.
Select check box next to the field to be assigned an alias. This will display the field in the grid below the SQL Graphical Display Pane.
How To Use Unions in the Visual Query Builder
The entire query (including individual selection statements and UNION keywords) should be loaded into the SQL Query Text Pane of the Visual Query Builder screen.
Click the Save button to refresh the other display panes of the Visual Query Builder screen.
How To Handle SAP Variables in the Visual Query Builder
Click the SAP menu option titled
Query Manager under the
Tools
Queries drop down menus to load the
Query Manager screen.

SAP® Business One variables are not supported in the TWBS Visual Query Builder.
How To Add Link To Arrows to TWBS Visual Query Results
The Document Entry (DocEntry) and Object Type (ObjType) fields must be included in the query results in order for the SAP Link To arrows to function properly.
The SAP® Document Object Type Reference Guide can be used to identify specific object type values.
The Production Order database table (OWOR) does not have a specific ObjType field that contains the value for the Production Order document header record. Refer to the How To Add Link To Arrows for Production Order to TWBS Visual Query Results section of the User Guide.
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click the SAP icon menu option for Add

.
The
DocEntry and
DocNum columns will each display SAP® Business One
Link To arrow

that will allow the user to drill back to the specific Invoice. The
CardCode column will display an SAP® Business One
Link To arrow

that will allow the user to drill back to the
Business Partner Master Data screen for the BP.
Click the
Link To arrow

for the Invoice to be viewed (Invoice #5 for this example).
Click the Update button on the Query Preferences screen.
Click the OK button on the Query Preferences screen.
Click the Update button on the Reports Maintenance screen.
Click the SAP menu option for
LinkTo Invoice Example query (the
Name value you specified in the definition) that you want to view the results for under the
APP Reports
Queries for Charts (the
Category value you specified in the definition) menus to load the selected query into the
TWBS Chart Viewer screen.
How To Add Link To Arrows for Production Order to TWBS Visual Query Results
The Document Entry (DocEntry) and Object Type (ObjType) fields must be included in the query results in order for the SAP Link To arrows to function properly.
The SAP® Document Object Type Reference Guide can be used to identify specific object type values. To account for the Object Type for Production Orders, be sure to include “'202' AS [ObjType]” in your query.
The Production Order database table (OWOR) does not have a specific ObjType field that contains the value for the Production Order document header record.
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click the SAP icon menu option for Add

.
Verify that the Form Object Type value is set to Standard SAP Objects.
Verify that the Object Code is set to 202.
Click the Update button on the Form Registration screen.
Click the OK button on the Form Registration screen.
Change the value of Link To back to None on the Reports Maintenance screen.
Click the Add button on the Reports Maintenance screen.
Click the Refresh APP Menu button to reload the SAP® Business One menus.
Click the SAP menu option for
LinkTo Production Order Example query (the
Name value you specified in the definition) that you want to view the results for under the
APP Reports
Queries for Charts (the
Category value you specified in the definition) menus to load the selected query into the
TWBS Chart Viewer screen.
The
DocEntry and
DocNum columns will each display SAP® Business One
Link To arrow

that will allow the user to drill back to the specific Production Order.
Click the
Link To arrow

for the Production Order to be viewed (#6 for this example).
Click the Update button on the Query Preferences screen.
Click the OK button on the Query Preferences screen.
Click the Update button on the Reports Maintenance screen.
Click the SAP menu option for
LinkTo Production Order Example query (the
Name value you specified in the definition) that you want to view the results for under the
APP Reports
Queries for Charts (the
Category value you specified in the definition) menus to load the selected query into the
TWBS Chart Viewer screen.
How To Set Up SMTP Mails
Launch the
APP Server Configuration screen by selecting the
Server Configuration menu option under the
Administration
Setup
APP Configuration menu groups.
Log into SAP® Business One.
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups.
Click on the Report or Query that you want to set up the SMTP mail for to load that definition into the screen.
Click on the Delivery Preferences tab.
There are limitations involved with the SMTP option. When using SMTP, the user can no longer send the document(s) as a draft, instead the email will be sent immediately. Furthermore, the user must specify where the email is coming from, the system cannot do it for the user.
How To Set Up Delivery Preferences from Ship To
Click the SAP menu option titled Business Partner Master Data under the Business Partner menu to load the Business Partner Master Data screen.
Load the existing Business Partner that you want to set up delivery preferences from the Ship To address for. Click on the Addresses tab.
Click the Update button on the Business Partner Master Data screen to save the data.
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups.
Select the report from the matrix to display the report definition data.
Click on the Delivery Preferences tab.
Click the Add Email Recipients button to launch the Additional Email Address Setup screen.
Click the Use Contact Persons Information of Business Partners option.
Click the Save button on the Additional Email Address Setup screen.
Click the Update button on the Reports Maintenance screen.
Launch the marketing document window, which is required in order to deliver emails. Please note that the Report definition that you just updated must be the same.
Select a valid Ship To address for the document.
Deliver the report by clicking the Email

button from the SAP® Business One tool bar.
The user can still use the manual e-mail CC List and BCC List fields in the Add Email Recipients window.
How To Set Up Print on Approve on Sales Order
VERIFY STILL EXISTS
Click the SAP menu option titled Report Definitions under the Administration -Setup →TWBS APP menus to load the Reports Maintenance screen.
Load the report definition data into the screen by selecting the appropriate report row from the matrix. The report must belong to a Sales Order marketing document.
Click on the Printing Preferences tab.
Select the Auto Print On Approve [Update Mode] checkbox
This option will work only for Sales Orders and in Update Mode. It will not work when the user adds a new Sales Order. For this purpose the user must select the Auto Print On Add checkbox option.
Click the Update button.
To use the functionality…
The default report of the selected customer must be the same as the one that the user updated with Auto Print On Approve [Update Mode].
How To Customize Email Messages
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click on the report to load that definition into the screen.
Click on the Delivery Preferences tab.
Click the Message ID drop down menu and select the Define New option to launch the Message Editor screen.
To insert HTML tabs into the context of your email message…
Select the Query customization type option.
Select the Query to be used for the
HTML tags.
Click the Select Tag drop down menu and select the tag you want to insert.
Click the Insert button to add the tag to the email.
How To Set Up Batch Processing
Set up the query as outlined in the How To Set Up Report Queries section of the User Guide. Setting up the query will serve two purposes…
Define the delivery criteria for APP - APP will send out the email/fax for each record returned by the query.
Message customization - All the fields from the query can be incorporated into the message for customization and personalization.
Once the query is set up, the next step is to create a SQL view in the SAP® Business One company database.
Creation of the SQL View is not required if your query is selecting data from just one table. This step is required if you are using a query with any of the following components…
Any JOINS between tables or DB objects.
Any table or field Aliases.
Any use of the GROUP BY clause.
Any use of the HAVING keyword.
The saved query should simply be SELECT * FROM [view name] (NOLOCK) or SELECT field1, field2… FROM [view name] (NOLOCK). If you were able to skip SQL View creation, the query should be SELECT * FROM [table] (NOLOCK) or SELECT field1, field 2… FROM [table name] (NOLOCK).
The report needs to be Document Specific.
Users now have additional flexibility in using their own forms. To take advantage of this flexibility the user should fill in every entry while registering a form. APP can handle these forms the same as it handles a standard SAP marketing document screen.
Clicking on the Define New option at the bottom of the Link To drop down list on the Report Maintenance screen will launch the Form Registration screen. APP allows you to attach custom crystal reports to any SAP® Business One or ISV add-on screen (i.e. you can launch a report from any SAP® Business One window by clicking the Print or Preview buttons). The first step in this process is to register the window in APP using the Form Registration screen.
The Form Registration screen is also accessible through the Form Registration menu option under the Administration
Setup
APP Configuration menus.
Table Name - Enter the database table name that the primary table is using to correspond to the form (i.e. ORDR for Sales Order).
Record Key - Item UID - Enter the Unique ID of the item which contains the record key value in the form.
Record Key - DB Field - Enter the field name of the item that keeps the record key value in the above specified table.
The Table Name, Record Key entries are very important for Batch Processing. If these fields are missing Batch Processing will not work.
Business Partner - Item UID - Enter the Unique ID of the item which contains the business partner in the form. Keep this field blank if not needed.
Business Partner - DB Field - Enter the field name of the item which keeps the business partner in the above specified table. Keep this field blank if not needed.
If the Business Partner fields are setup correctly, the user will be able to access the following features…
Set as Default – Set a specific report as a default for current business partners, series of business partners, or business partner group.
BP Activity Integration – APP can create activities when a report is printed or delivered (Contact Person DB Field is also important).
Recipients from Contact Persons/Addresses – You can set recipients for your form in report delivery settings.
Consolidated BP
If the Contact Person DB field is setup correctly, the user will be able to access the following features…
BP Activity Integration - APP can create activities when a report is printed or delivered (Business Partner fields are also important).
Contact Preference delivery of reports - Delivery of reports through the preferences set up on the BP contact person.
Document Contact – You can specify document contact recipient for delivery.
If this field is set-up correctly, the user can add their own email recipients when delivering a report. APP will collect the recipients from the database field corresponding to the currently processing record while performing the email delivery.
These features will not work for user defined forms…
Incorporation of Sales Employees in email delivery.
Print On Add/Delivery On Add.
Save as XML/Send as XML – APP is unable to save your report in XML format. So you cannot send an XML attachment in your email.
How To Refresh APP Report Data
How To Preview a Default APP Report
This example is for the Sales Order screen.
How To Preview a non-Default APP Report
This example is for the Sales Order screen.
Click the SAP menu option titled Sales Order under the Sales - A/R menu to load the SAP Sales Order screen.
Load the information for the Sales Order that you want to run the default report for.
Select the desired report to preview from the Reports menu group option from the right-click menu on the Sales Order screen.
How To Print a Default APP Report
This example is for the Sales Order screen.
How To Print a non-Default APP Report
This example is for the Sales Order screen.
Click the SAP menu option titled Sales Order under the Sales - A/R menu to load the SAP Sales Order screen.
Load the information for the Sales Order that you want to run the default report for.
Select the desired report to preview from the Reports menu group option from the right-click menu on the Sales Order screen.
How To Email a Default APP Report
This example is for the Sales Order screen.
How To Email a non-Default APP Report
This example is for the Sales Order screen.
Click the SAP menu option titled Sales Order under the Sales - A/R menu to load the SAP Sales Order screen.
Load the information for the Sales Order that you want to run the default report for.
Select the desired report to preview from the Reports menu group option from the right-click menu on the Sales Order screen.
How To Fax a Default APP Report
This example is for the Sales Order screen.
How To Fax a non-Default APP Report
This example is for the Sales Order screen.
Click the SAP menu option titled Sales Order under the Sales - A/R menu to load the SAP Sales Order screen.
Load the information for the Sales Order that you want to run the default report for.
Select the desired report to preview from the Reports menu group option from the right-click menu on the Sales Order screen.
How To Set Up Document Printing for Delivery of Marketing Documents
If there are no delivery settings selected for the report, APP will create a blank mail with attachment and subject name. The attachment will be in PDF format and the subject name will be the report name defined in the report definition window. This new email will be saved in the Draft folder. The user can then send them in the future.
In this version of APP the user has the ability to set the desired action corresponding to each and every customer contact person. To initiate this, the user should select the delivery preference in the Business Partner Master Data window.
Click the SAP menu option titled Business Partner Master Data under the Business Partner menu to load the Business Partner Master Data screen.
Load the existing Business Partner that you want to set up Document Printing for.
Click on the Contact Persons tab.
Click the APP Contact Type drop down menu and select the preferred type for each Contact Person…
MBT – Master Bill To
MST – Master Ship To
DBT – Document Bill To
DST – Document Ship To
None – None
Email – Use Email
Fax – Use Fax
Both – Use both Email and Fax
Print – Preferred action is Print
EmailPrint – Print and Email
FaxPrint – Print and Fax
All – Print, Email and Fax
None – No action.
APP will perform the actions assigned to each Contact Person while printing a Document only if you select the option Contact Preferences in the Document Action screen.
How To Set Up Batch Processing for Delivery of Customer Statements
Batch Delivery of BP Statements requires a report with the parameter name CardCode or @CardCode. Additional parameters or name variations will not be supported.
How To Print Checks for Payment
Click the
Report Definition menu option under the
Administration
Setup
APP Configuration menu groups to load the
Reports Maintenance screen.
Click on the Check Printing report to load that definition into the screen.
Click on the Print Preferences tab.
Specify the Printer Name and the # of copies to be printed.
Click the Update button to save the report definition modifications.
Click the SAP menu option for
Checks for Payment under the
Banking
Outgoing Payments menus to load the
Checks for Payment screen.
Load the check that you need to print.
Click the SAP icon menu option for
Print 
.
The user will be prompted to select a printer. Since APP already has a printer associated with the Check report, no other printer will be used for this purpose.
Click the Print button.
How To Batch Print Checks for Payment
Click the SAP menu option titled Document Printing under the Banking menus to load the Document Printing - Selection Criteria screen.
Click the Documents Type drop down menu and select the Checks for Payment option.
Complete the desired criteria for check printing.
Click the Ok button to launch the APP Document Action screen.
APP will prompt the user for the default action.
For more information on the default action options, refer to the How To Set Up Document Printing for Delivery of Marketing Documents section of the User Guide.
The Print Checks for Payment screen will be launched.
Select the checks to be printed.
Click the Print button.
The user will be asked to specify a printer. Since APP already has a printer associated with the Check report, no other printer will be used for this purpose.
Click the Print button.
How To Set Up Charts in APP
TWBS Advanced Productivity Pack (APP) provides tools to create charts from SAP Business One data and present them as either a stand-alone Chart or as an element of a Dashboard.
How To Create an SAP Business One Query
All APP charts are based on an SAP® Business One Queries. Queries can be developed using Query Generator, Query Wizard, or direct entry in the query editing window.
The use of screen field variables ($[$n.0.0] format) is supported. This allows a value such as a BP Code or Item Number to be passed from an SAP® Business One form (screen) as a parameter in the query.
The use of user parameter variables ([%0] format) is not currently supported.
If your query includes calculated or summary values be sure to use the AS operator to assign an alias to the value. Otherwise the value will not be available when defining the chart.
The query must exist (be saved in Query Manager) prior to opening the APP Report Definition function. Any changes made while the APP Report Definition function is open are not available until the function is closed and reopened.
Save the query in the standard fashion. It may be appropriate to create a special category in Query Manager as a common place to hold APP-related queries; however this is not a requirement.
In some cases the query execution process in APP can encounter issues with very complex queries. Therefore if your query utilizes multiple JOIN statements or includes multiple summary functions (SUM, AVG, etc.) we recommend that the actual query statement be created as a View in the SQL database. The query in SAP® Business One is then simply SELECT * FROM [SQL View Name] (NOLOCK).
How To Register the Query in APP
Select the Query option.
Enter a Name for the report. This name is displayed to the user when selecting the query or chart.
Select an APP Category to assign the query to. These categories are used for management of the queries and reports.
Select the Database where this query is stored. This selection is required in order for the query to be retrieved correctly.
Enter a Description value (optional).
Select the appropriate Query from the drop down list.
Link the report definition to the desired SAP® Business One screen.
Click the Enabled checkbox. This can be done at any time but is required for the query/chart to be available to users.
Click Add button to save the Report Definition.
How To Create an APP Chart Definition
The query statement for the report definition is displayed in the upper part of the screen. Any previously defined charts associated with the report definition are displayed in the list on the left side of the form. Click on an existing chart definition to modify it or click Define New to create a new/additional chart definitions.
APP can now support multiple Y-axis charts.
Name - This name is displayed to the user when selecting a chart. This value is required.
Chart Title - This title is displayed on the chart itself. This value is optional but strongly recommended.
Legend Text - This value is used as the header for the legend area of the chart. Optional but recommended, especially when the chart does not display the X and Y axes such as with a Pie chart.
Chart Type - This is the default chart type that is displayed when the chart is requested. The user can then select other chart types as desired. This value is required.
Some chart types are not appropriate for certain data sets. For example, if your data set contains both positive and negative values a Pie or Doughnut chart will not display correctly. If you are not sure if a particular chart type will work simply try it. If the results are not what you expected try a different chart type.
X-Value - These are the values that will be displayed along the horizontal axis of the chart, or the segments of a Pie chart. The values in the drop down list are the values selected in the underlying query.
Y-Value - These are the values that will be displayed along the vertical axis of the chart, or set the size of the segments in a Pie chart. The values in the drop down list are the values selected in the underlying query.
At least one of axis values must be numeric.
Legend - These are the values that will be displayed in the Legend area of the chart. The values in the drop down list are the values selected in the underlying query. Legend values are recommended when the chart does not display the X and Y axes such as with a Pie chart.
Label - These are the values that will be displayed for the data points in the chart itself. The values in the drop down list are the values selected in the underlying query.
Tooltip - A tool tip is an additional value that can be displayed when the user hovers the cursor over a data element in the chart. The values in the drop down list are the values selected in the underlying query.
Dimension - The options are 2D or 3D. This is the default display format that is used when the chart is requested. The user can then change the format as desired. This value is required.
X-Axis Text - This is the text that is displayed along the X (horizontal) axis of the chart when appropriate. Optional but strongly recommended for chart types that show the X and Y axis.
Y-Axis Text - This is the text that is displayed along the Y (vertical) axis of the chart when appropriate. Optional but strongly recommended for chart types that show the X and Y axis.
Legend Series - This value is used to label the individual elements in a chart. Optional but strongly recommended for chart types that do not show the X and Y axis.
Refresh Time (numeric only) - This value is used to automatically refresh the contents of the chart on a periodic basis while the chart is being displayed. This option should be used judiciously since it executes the underlying query for each refresh. Consider how often the information actually changes when considering the refresh period. A value of 0 means that the chart is not refreshed automatically.
Query Tips and Tricks for APP Charts
Dates
Assume that the current date is May 15, 2020 for the following examples.
Parenthesis () are required since this is a SQL function.
Parsing Dates - Use the SQL datepart function to determine the year, quarter, month, week, and day of a date. The value returned is an integer (number) and can be used in additional calculations.
Select datepart(year,getdate()) returns 2020.
Select datepart(quarter,getdate()) returns 2.
Select datepart(month,getdate()) returns 5.
Select datepart(week,getdate()) returns 21.
Select datepart(day,getdate()) returns 20.
Filtering by Date - The SQL datepart function can also be used to compare dates in order to automatically select a reporting period. In these examples we will use the SAP® Business One Order Header (ORDR) date and the current date of May 15, 2010.
Records where the order date is in the current week
Select t0.docnum, t0.docdate from ORDR where datepart(year,t0.docdate) = datepart(year,getdate()) AND datepart(week,t0.docdate) = datepart(week,getdate())
Records where the order date is in the prior week
Select t0.docnum, t0.docdate from ORDR where datepart(year,t0.docdate) = datepart(year,getdate()) AND datepart(week,t0.docdate) = datepart(week,getdate()) - 1
Records where the order date is in the current quarter
Select t0.docnum, t0.docdate from ORDR where datepart(year,t0.docdate) = datepart(year,getdate()) AND datepart(quarter,t0.docdate) = datepart(quarter,getdate())
Numbers
The user interface for SAP® Business One displays decimal numeric values based on the Display tab setup which can be accessed the SAP menu option for Display under the Administration -System Initialization -General Settings -Display menus.
the Administration
System Initialization
General Settings menu groups to load the General Settings screen.
However, decimal values are stored in the database to six-decimal precision. This means that a decimal value such as US Dollars that is displayed in SAP® Business One as 100.00 will be retrieved and displayed in the APP Charts as 100.000000. The number of decimals can be controlled by the SQL statement in the query. Combinations of cast and round can be used to arrive at a reasonable display value.
Display the database value 100.000000 for the column DocTotal with 2 decimals (100.00)
Display the database value 55.900000 for the column DocTotal rounded to a whole number (56.000000)
Display the database value 55.900000 for the column DocTotal rounded to a whole number (56.000000) and without decimals
How To Use APP Charts
Once an APP Chart has been created it is available for viewing via the right-click menu from the SAP® Business One form to which it is assigned.
Selecting a menu option in the Charts sub-menu will load the chart data into the TWBS Chart Viewer screen. The screen has a number of menu options available to the user.
Hover over a data element in the chart to display the Legend, Label, and Tool tip information.
Click the 2D or 3D buttons to change the rendering of the chart.
Click the Refresh button if needed.
Click the other chart type buttons to render the chart in a different way.
The complete list of chart types is not shown in this illustration. Additional chart types are added as buttons for this display session only.
Some chart types may not be appropriate for the data being reported and so may not display correctly.
Printing Charts
Delivering Charts
Chart Data Grid
The data in the grid can be filtered by clicking the funnel icon

in the header of any column. This will bring up the options for filtering according to the column on which the funnel icon was selected.
You can then choose specific values by using the check boxes, or you can do more advanced filtering using the Show rows with value that … options.
Click on the drop downs for more filtering options.
Once a filter has been applied you can return to the chart. The chart contents are refreshed using only the data found in the filtering process.
The data view can also be used to group data for review.
Click and drag a column header into the Grouped by area at the top of the grid.
Multiple data elements can be used for grouping by clicking and dragging them into the Grouped by area in the sequence by which they should be grouped.
If multiple data elements are used the grouping sequence can be changed by dragging the desired data element to a different position in the Grouped by area sequence.
Grouping function is available only in the Data view of a chart. The results are not used to change the presentation of the chart nor can the results be printed or exported.
How To Group Data in an APP Chart
Click the SAP menu option for the query that you want to create the Chart for under the
Tools
Queries
User Queries menus to load the selected query into the
SAP Query screen.
This example is for the Sales by Customer query.
Clicking on the down

or up

arrows will expand or contract the data group.
Information on both the Data and Chart tabs will update in real-time as columns are selected for grouping.
How To Filter Data in an APP Chart
Click the SAP menu option for the query that you want to create the Chart for under the
Tools
Queries
User Queries menus to load the selected query into the
SAP Query screen.
This example is for the Sales by Customer query.
To filter any data on the chart data tab, click the

icon to the right of the column title of the data that you wish to filter.
Information on both the Data and Chart tabs will update in real-time as values are selected for filtering.
How To Set Up APP Advanced Delivery
TWBS Advanced Productivity Pack (APP) includes functionality called Advanced Delivery. This functionality allows a user to select a group of records (e.g. a specific group of Business Partners) and deliver (e-mail or fax) and/or print associated documents for this group of records. This section describes the steps used to define and execute the APP Advanced Delivery functions.
There are three steps required to set up the APP Advanced Delivery functionality…
How To Create an Advanced Delivery Query
How To Create an APP Report Definition
How To Set Up Advanced Delivery Configurations
How To Create an Advanced Delivery Query
Create an SAP® Business One query to retrieve the data elements that you may want to use as filters in the document delivery process. The query must be saved before opening the APP Report Definition function. Otherwise the query will not be available for use.
Save the query in the standard fashion. It may be appropriate to create a special category in Query Manager as a common place to hold APP-related queries; however this is not a requirement.
In some cases the query execution process in APP can encounter issues with very complex queries. Therefore if your query utilizes multiple JOIN statements or includes multiple summary functions (SUM, AVG, etc.) we recommend that the actual query statement be created as a View in the SQL database. The query in SAP Business One is then simply SELECT * from [SQL View Name] (NOLOCK).
SAMPLE QUERIES
Customer List - including customer code, customer name, contact person name, customer group name, salesperson name, and customer balance.
SELECT T0.[CardCode], T0.[CardName], t0.groupcode as [CustGroupCode], T1. [GroupName] as [CustGroupName], T0.[SlpCode], T2.[SlpName], T0.[Balance], t0.groupnum as [PayGroupCode], t3.pymntgroup as [PayGroupName] FROM OCRD T0 INNER JOIN OCRG T1 ON T0.GroupCode = T1.GroupCode INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode inner join octg t3 on t0.groupnum = t3.groupnum WHERE T0. [CardType] = 'C'
QUERY LIMITATIONS
How To Create an APP Report Definition
General Tab
Create a basic Report Definition. The Report Definition for a sample Advanced Delivery setup is shown below.
Delivery Preferences Tab
Delivery Preferences is information about how a report/document is delivered. Click on the Delivery Preferences tab. Create a new E-mail Message ID. The message will be used to format the contents of the outgoing e-mail message and to assign the Query to be used to filter the Advanced Delivery selection list.
Create a new Message ID
Select Define New from the drop down list. The Message Editor form is displayed.
Enter a Message Description. This is displayed to the user so it should be descriptive.
Enter the Email Subject. This is the subject line of the e-mail.
Enter the Attachment Name . This is used as the name of the attachment sent with the e-mail.
Select the Query option for customization type. A list of queries in SAP® Business One is displayed. The first column shows the Query Category and the second column shows the Query Name.
Once a query has been assigned to the message the columns in the query are available for use in the e-mail body (called “tags”) from the Select Tag drop down list.
Standard data tags can also be selected by selecting the Standard customization type option.
Enter the text and tags needed to create the body of the e-mail.
When selecting a tag…
The Insert button will insert the tag text at the current cursor position.
The Copy button will copy the tag text to the Windows clipboard. You can the position the cursor as needed and right-click/paste (or Ctrl-V ) to insert the tag text.
Save the Message information - If you use both Standard and Query tags in your e-mail layout, be sure to re-select the Query option button before saving the message definition. Otherwise the tags will not be handled correctly when the e-mail body is created.
Update the Report Definition.
How To Set Up Advanced Delivery Configurations
Advanced Delivery Definitions can be added from the Report Maintenance screen.
The Use Default Report and Use Specific Report options are selected automatically based on the report definitions already set up.
Enter a Name for the delivery option. This name is displayed to the user for selection.
Assign the desired Additional Query Fields values as needed…
Select the desired Field to use as a filter from the drop down list. The fields shown here are columns in the associated query.
Select the desired filter Condition from the drop down list.
Enter the value to be used for comparison in Value 1.
Enter a second value to be used for comparison in Value 2. This can only be used when the Between filter condition is selected.
Select a Relationship option from the drop down list if appropriate. A relationship operator is required for every row except the last in any instance where there are more than one filter condition row.
Click the Update button to save the filter information.
Click the Ok button to close the Advanced Delivery Definition screen.
Click the Update button to save the report definition revisions.
Advanced Delivery Definitions can be created from the Advanced Delivery function of the APP Reports menu.
Select the SAP® Business One form that is the primary source for the delivery rules from the Select Form drop down list. Only those forms that are associated with queries are displayed.
Select the APP report definition that uses the desired query from the Use Specific Report drop down list. Only those report definitions associated with the SAP® Business One form selected are displayed.
Assign the desired Additional Query Filters (see above).
Click the Ok button to see the results of the filtering process and to execute the delivery process if desired.
Click the Save As Config button to save this configuration for future use.
Click the Refresh APP Menu button to refresh the APP menus so that the new configuration is displayed.
How To Edit an Advanced Delivery Configuration
Advanced Delivery Definitions can be edited from the Report Maintenance screen.
The data for the Delivery Definition will be loaded to the screen for editing. Make any necessary modifications.
Click the Update button to save the filter information.
Click the Ok button to close the Advanced Delivery Definition screen.
Click the Update button to save the report definition revisions.
How To Clone an Advanced Delivery Configuration
Advanced Delivery Definitions can be cloned from the Report Maintenance screen.
The data for the Delivery Definition being cloned will be loaded to the screen.
Enter a new name for the cloned definition and alter any data needed.
Click the Update button to save the filter information.
Click the Ok button to close the Advanced Delivery Definition screen.
Click the Update button to save the report definition revisions.
How To Remove an Advanced Delivery Configuration
Advanced Delivery Definitions can be removed from the Report Maintenance screen.
Click the SAP menu option for Report Definitions under the Administration -Setup -TWBS APP menus to load the Reports Maintenance screen.
Click on the Report that you want to remove the Advanced Delivery Definition from in order to load the report data to the Maintenance screen.

Click on the Advanced Delivery Definitions tab.
Highlight the definition row that you want to remove.
Click the Delete button.
The user will be prompted for confirmation to remove the Delivery Definition.
Click the Yes button to confirm definition removal.
Click the Update button.
Warning - Once a definition has been removed from the system, it cannot be recovered and must be recreated manually.
How To Execute APP Advanced Delivery Definitions
Execution of Previously Defined Advanced Delivery Definitions.
Click the SAP menu option for the Advanced Delivery Definition that you want to execute under the APP Reports -Advanced Delivery Definitions menus.
Select the desired delivery set.
Click Ok to execute the filtering process. A list of the records that will be processed is displayed.
Click the check boxes of the records to be processed further.All records are selected by default.
Click the header of the checkbox column to select or clear all records.
Note - To select a group of records…
Click the checkbox of the first record
Hold down the SHIFT key
Click the checkbox of the last record
All records between the two check boxes are selected.
Note - To select a mixed group of records…
Click the checkbox of the first record
Hold down the CTRL key while selecting the desired records.
Click Print button, Deliver button, or Both button to execute the delivery process.
You can continue with other tasks while the Advanced Delivery process is working. A progress bar is displayed to show you how many records have been processed.
Define and Execute an Advanced Delivery Definition.
A special or one time Advanced Delivery Definition can be created and executed from the Advanced Delivery function of the APP Reports menu. This definition can also be saved for reuse.
Click the SAP menu option for Advanced Delivery under the APP Reports menu to load the Advanced Delivery screen.
Select the SAP® Business One form that is the primary source for the delivery rules from the Select Form drop down list. Only those forms that are associated with queries are displayed.
Select the APP report definition that uses the desired query from the Use Specific Report drop down list. Only those report definitions associated with the SAP® Business One form selected are displayed.
Assign the desired Additional Query Filters (see above).
Click Ok to execute the filtering process. A list of the records that will be processed is displayed.
Click the check boxes of the records to be processed further. All records are selected by default.
Click the header of the checkbox column to select or clear all records.
Note - To select a group of records…
Click the checkbox of the first record
Hold down the SHIFT key
Click the checkbox of the last record
All records between the two check boxes are selected.
Note - To select a mixed group of records…
Click the checkbox of the first record
Hold down the CTRL key while selecting the desired records.
You can continue with other tasks while the Advanced Delivery process is working. A progress bar is displayed to show you how many records have been processed.
How To Use APP Pivot Grids and KPIs