Wiki

Scale Your Enterprise

User Tools

Site Tools

mbstring extension must be loaded in order to run mPDF

app:app_how_to

This is an old revision of the document!


Table of Contents

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 image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the APP Server Configuration screen.

app_server_config_updated.jpg

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.

  • Click the Migrate APP Records button to initiate the process of migrating APP information from the TWBS_SBO-Common database to the SAP® Business One company database.

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.

  • When the process is complete the user will receive a message on the SAP® B1 satus bar that the process was successful.

How To Determine a Form Unique ID for Form Registration

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.

image182.jpeg

  • 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.

image183.jpeg

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.

image182.jpeg

  • 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.

image184.jpeg

image44.jpeg

How To Set Report Security

  • Click the User Roles menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the APP User Roles Definition screen.

image142.jpeg

  • Double click the Define New line. This will bring up the APP Role Properties screen.

image185.jpeg

  • Type the name you want to assign this role in the Role Name field.
  • Click the Add button to bring up the list of users.

image148.jpeg

  • 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.

image186.jpeg

  • Click the Update button to save the information.

image44.jpeg

How To Create Report Groups

  • Click the Report Maintenance menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg.

image188.jpeg

  • 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.

image44.jpeg

How To Set Up Report Queries

  • Click the Report Maintenance menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg.

image189.jpeg

  • Select the Query option button.
  • Enter the criteria required (Name, Category, Database, Query, etc.)
  • Click the Add button.

image44.jpeg

How To Set Up Report Queries with Linked Parameters

  • Click the Report Maintenance menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg.

image190.jpeg

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

image191.jpeg

  • Click the Add button.

image192.jpeg

  • Click the Query Parameters button. This will launch the Query Parameters Mapping screen.

image193.jpeg

  • Enter the text to be prompted to the user for the value of the parameter.

image194.jpeg

  • 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

image196.jpeg

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 user will be prompted to enter the value of the Sales Order #

image197.jpeg

  • Enter the parameter value.
  • Click the OK button.

The results of the Query based on the entered parameter will be visible to the user.

image198.jpeg

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.

image44.jpeg

How To Set Up Queries Not Linked to a Form

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg.

image199.jpeg

  • Select the Query option button.
  • Enter the criteria required (Name, Category, Database, Query, etc.)

Be sure to leave the Link To value as “None”.

  • Click the Add button.

image44.jpeg

How To Execute Queries in TWBS Query Viewer

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Report Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg 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.

image200.jpeg

  • The query will be executed and the data results will be loaded into the data tab of the TWBS Chart Viewer screen.

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.

image44.jpeg

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.

image44.jpeg

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 image35.jpeg Queries drop down menus to load the Query Generator screen.

image204.jpeg

  • Click the Execute button to load the Query Preview screen.

SAP® Business One variables are not supported in the TWBS Visual Query Builder.

image205.jpeg

  • Click the TWBS SQL icon image206.jpeg to launch the Visual Query Builder screen.

image207.jpeg

  • 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 image35.jpeg Queries drop down menus to load the Query Manager screen.

image208.jpeg

  • Select an existing query by highlighting the query name.

SAP® Business One variables are not supported in the TWBS Visual Query Builder.

  • Click the Ok button to load the query into the Query Preview screen.

image209.jpeg

  • Click the TWBS SQL icon image206.jpeg to launch the Visual Query Builder screen.

image210.jpeg

  • 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.

image211.jpeg

  • 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…

image212.jpeg

  • 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.

image213.jpeg

  • The Link Properties screen can be used to change the link through either the Select All From Left check box (change INNER JOIN the to a LEFT JOIN) or the Select All From Right check box (change INNER JOIN the to a RIGHT JOIN).

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.

image214.jpeg

  • The Aggregate column of the grid will allow the user to apply a variety of functions to the fields in the query (SUM as shown above).

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.

image215.jpeg

  • The Grouping column of the grid will allow the user to select a field in the query to be used for grouping.

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.

image215.jpeg

  • The Alias column of the grid will allow the user to designate an alias ID for a field in the query.

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.

image216.jpeg

  • The SQL Summary Pane will display the individual selection statements in different groups.
  • The SQL Graphical Display Pane will display one selection statement at a time. To switch between statements click on the query box icons image217.jpeg in the upper right corner of the pane.

How To Handle SAP Variables in the Visual Query Builder

  • Click the SAP menu option titled Query Manager under the Tools image35.jpeg Queries drop down menus to load the Query Manager screen.

image67.jpegimage218.jpeg

  • Select an existing query with SAP Variables by highlighting the query name.

SAP® Business One variables are not supported in the TWBS Visual Query Builder.

  • Click the Ok button to load the query into the Query Preview screen.

image219.jpeg

  • Replace the existing SAP variables with hard coded values that will allow the SQL Query to be executed.

image220.jpeg

  • Click the TWBS SQL icon image206.jpeg to launch the Visual Query Builder screen.
  • The query data will be loaded into the Visual Query Builder screen.
  • Edit the query as needed.

image221.jpeg

  • Click the Save & Close button to save the query and return it to the Query Preview screen the Visual Query Builder was launched from.

image222.jpeg

  • Replace the hard coded values with the previous SAP variables.
  • Click the Execute button.

image44.jpeg

  • Set up the query in SAP through either the SAP screens or through the Visual Query Builder screen.

image223.jpeg

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 image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg.

image189.jpeg

  • Select the Query option button.
  • Enter the query definition details…
    • Name
    • Category
    • Select the Enabled check box
    • Select the APP Query option to load the query in the TWBS screen

image225.jpeg

  • Click the Add button.
  • Click the Refresh APP Menu button to reload the SAP® Business One menus.
  • 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 image35.jpeg Queries for Charts (the Category value you specified in the definition) menus to load the selected query into the TWBS Chart Viewer screen.

image226.jpeg

  • The DocEntry and DocNum columns will each display SAP® Business One Link To arrow image227.jpeg that will allow the user to drill back to the specific Invoice. The CardCode column will display an SAP® Business One Link To arrow image227.jpeg that will allow the user to drill back to the Business Partner Master Data screen for the BP.
  • Click the Link To arrow image227.jpeg for the Invoice to be viewed (Invoice #5 for this example).

image228.jpeg

  • The A/R Invoice screen will be displayed and the data for the Invoice document selected will be loaded.
  • To change the visibility of the columns to remove the DocEntry and ObjTypes from the view of the user, reopen the Report Definitions under the Administration image35.jpeg Setup image35.jpeg APP Configuration menus to load the Reports Maintenance screen.
  • Expand the category of the query to be modified.

image229.jpeg

  • Select the query to be modified. This will load the query definition data in the area below.

image230.jpeg

  • Click the Query Preferences button image231.jpeg. This will launch the Query Preferences screen.
  • Uncheck the visible column for the DocEntry and ObjType fields. This action will automatically resort the fields on the screen to move the non-visible columns to the top.

image232.jpeg

  • 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 image35.jpeg Queries for Charts (the Category value you specified in the definition) menus to load the selected query into the TWBS Chart Viewer screen.

image233.jpeg

  • The modifications to the query preferences will be visible on the TWBS Chart Viewer screen.

image44.jpeg

  • Set up the query in SAP through either the SAP screens or through the Visual Query Builder screen.

image234.jpeg

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 image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click the SAP icon menu option for Add image187.jpeg.

image189.jpeg

  • Select the Query option button.
  • Enter the query definition details…
    • Name
    • Category
    • Select the Enabled check box
    • Select the APP Query option to load the query in the TWBS screen

image236.jpeg

  • Click the Link To arrow next to the Link To object selection. This will launch the Form Registration screen.

image237.jpeg

  • 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 image35.jpeg Queries for Charts (the Category value you specified in the definition) menus to load the selected query into the TWBS Chart Viewer screen.

image238.jpeg

  • The DocEntry and DocNum columns will each display SAP® Business One Link To arrow image227.jpeg that will allow the user to drill back to the specific Production Order.
  • Click the Link To arrow image227.jpeg for the Production Order to be viewed (#6 for this example).

image239.jpeg

  • The Production Order screen will be displayed and the data for the order document selected will be loaded.
  • To change the visibility of the columns to remove the DocEntry and ObjTypes from the view of the user, reopen the Report Definitions under the Administration image35.jpeg Setup image35.jpeg APP Configuration menus to load the Reports Maintenance screen.
  • Expand the category of the query to be modified.

image229.jpeg

  • Select the query to be modified. This will load the query definition data in the area below.

image240.jpeg

  • Click the Query Preferences button image231.jpeg. This will launch the Query Preferences screen.
  • Uncheck the visible column for the DocEntry and ObjType fields. This action will automatically resort the fields on the screen to move the non-visible columns to the top.

image241.jpeg

  • 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 image35.jpeg Queries for Charts (the Category value you specified in the definition) menus to load the selected query into the TWBS Chart Viewer screen.

image242.jpeg

  • The modifications to the query preferences will be visible on the TWBS Chart Viewer screen.

image44.jpeg

How To Set Up SMTP Mails

  • Launch the APP Server Configuration screen by selecting the Server Configuration menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups.

  • Define the SMTP Server name or IP Address for the server in the SMTP Server field. If you need to specify the Port # or Enable SSL for your SMTP Server, you can use the fields provided.
  • Log into SAP® Business One.
  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg 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.

image243.jpeg

  • Click the Email Provider drop down menu and select the SMTP option. Click the Update button to save your changes for the Report/Query definition.

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.

image44.jpeg

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.

image245.jpeg

  • Three fields on the business partner's Ship To address need to be set with appropriate values
    • Email Address
    • Fax Number
    • Delivery Preferences
      • Email - Use Email
      • Fax - Use Fax
      • Both - Use both Email and Fax
      • Print - Print Only
      • EmailPrint - Print and Email
      • FaxPrint - Print and Fax
      • All - Print, Email and Fax
      • None - No Action
  • Click the Update button on the Business Partner Master Data screen to save the data.
  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg 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 image246.jpeg 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.

image44.jpeg

How To Set Up Print on Approve on Sales Order

VERIFY STILL EXISTS

  • Click the SAP menu option titled Report Definitions under the Administration -SetupTWBS 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…

  • Click the SAP menu option titled Sales Order under the Sales - A/R menu to load the Sales Order screen.
  • Load the Sales Order that you wish to automatically print on approval update.

image248.jpeg

  • Select the Approved checkbox option on the Logistics tab of the Sales Order.
  • Click the Update button.

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].

image44.jpeg

How To Customize Email Messages

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg 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.

image249.jpeg

  • Design your message content as needed.

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.
  • Click the Save button on the Message Editor screen.
  • Click the Update button on the Reports Maintenance screen.
  • Launch the marketing document window and deliver the report by clicking the deliver image246.jpeg button from the SAP® Business One tool bar.
  • APP will replace all the tags with the suitable values and compose a new email to the recipients.

image44.jpeg

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.
  • Once the SQL View is created (if needed), create a saved query in SAP® Business One to select data from the view.

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).

  • Set up the Report definition per normal procedures.

The report needs to be Document Specific.

  • Associate the SAP® Business One query to APP through the Message Editor screen.
  • Define the email recipients through the Additional Email Address Setup screen.

image44.jpeg

How To Set Up a User Defined Form

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 image10.jpeg Setup image10.jpeg APP Configuration menus.

image121.jpeg

  • Complete the necessary fields…
  • 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
  • Contact Person DB Field - Enter the field name of the item which keeps the contact person code in the above specified table. Keep this field blank if not needed.

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.
  • Use Emails from the DB Field - Enter the field name of the item that keeps the email recipients (email addresses) in the above specified table. APP will use the value entered in this field while delivering the report. The recipients found here will be added to the To list. Keep this field blank if not needed.

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.

  • Click the Add button.

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.

image44.jpeg

How To Refresh APP Report Data

  • Launch the APP Report that you want to view .
  • On the toolbar of the Report Viewer window, click the refresh image262.jpeg button.

image263.jpeg

image44.jpeg

How To Preview a 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.
  • Click the Print Preview image264.jpeg button from the SAP® Business One tool bar. This will load the default report for the Sales Order in the APP Report Viewer screen.

image44.jpeg

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.

image265.jpeg

  • Clicking on the report will launch the APP - Report Options screen.

image266.jpeg

  • Select the Preview option from the Report Action section.
  • Click the Execute button.

image44.jpeg

How To Print a 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.
  • Click the Print image267.jpeg button from the SAP® Business One tool bar. This will print the default report for the Sales Order.

image44.jpeg

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.

image265.jpeg

  • Clicking on the report will launch the Report Options screen.

image268.jpeg

  • Select the Print option from the Report Action section.
  • Click the Execute button.

image44.jpeg

How To Email a 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.
  • Click the E-Mail image246.jpeg button from the SAP® Business One tool bar. This will deliver the report via email.

image44.jpeg

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.

image265.jpeg

  • Clicking on the report will launch the APP - Report Options screen.

image269.jpeg

  • Select the Deliver option from the Report Action section.
  • Click the Execute button.

image44.jpeg

How To Fax a 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.
  • Click the Fax image270.jpeg button from the SAP® Business One tool bar. This will deliver the report via fax.

image44.jpeg

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.

image265.jpeg

  • Clicking on the report will launch the APP - Report Options screen.

image271.jpeg

  • Select the Deliver Fax option from the Report Action section.
  • Click the Execute button.

image44.jpeg

How To Set Up Document Printing for Delivery of Marketing Documents

  • Click the SAP menu option titled Document Printing under the appropriate menu to load the Document Printing - Selection Criteria screen.

image272.jpeg

  • Complete the desired criteria for document printing.
  • Click the Ok button to launch the APP Document Action screen.

image273.jpeg

  • Select the desired document printing action…
    • Contact Preferences - This is a new feature of APP. While using this method, APP will automatically choose the action set by the corresponding contact person.
    • Print - APP will print the default reports selected in this criteria.
    • Deliver - APP will email or fax the default reports selected in this criteria.
    • Fax - APP will fax the default reports selected here. This action will be performed when a fax provider is set for the report.

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.

image44.jpeg

How To Set Up Document Printing Using Contact Preferences

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…

image275.jpeg

  • MBT – Master Bill To
  • MST – Master Ship To
  • DBT – Document Bill To
  • DST – Document Ship To
  • None – None
  • Click the APP Report Delivery drop down menu and select the preferred action for each Contact Person…

image276.jpeg

  • 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.

  • Click the Update button.

image44.jpeg

How To Set Up Batch Processing for Delivery of Customer Statements

  • Click the SAP menu option titled APP - Deliver BP Statements under the under the Business Partner menu to load the Deliver BP Statements screen .

image153.jpeg

  • Complete the desired criteria for BP statement delivery.
  • Click the button for the desired delivery action…
    • Print
    • Deliver
    • Print & Deliver

Batch Delivery of BP Statements requires a report with the parameter name CardCode or @CardCode. Additional parameters or name variations will not be supported.

image44.jpeg

How To Print Checks for Payment

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.

image277.jpeg

  • 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 image35.jpeg 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 image278.jpeg.
  • 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.

image44.jpeg

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.

image279.jpeg

  • 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

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Be sure that the form is in Add mode.

image281.jpeg

  • 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

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click on the desired Query-type report definition in the upper grid area of the form. The report definition information is displayed in the lower area of the form.

image282.jpeg

  • Click the Manage Charts button. The Chart Definition form is displayed.

image283.jpeg

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.

  • Click on the desired chart definition in the upper left grid area of the form. The chart definition information is displayed in the right grid area of the form.
  • 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.
  • Click Update button to save the chart definition.
  • Click Preview button to view the chart output.

image44.jpeg

Query Tips and Tricks for APP Charts

Dates

Assume that the current date is May 15, 2020 for the following examples.

  • Current Date - Select getdate() will return the current system date & time.

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 image35.jpeg System Initialization image35.jpeg 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)
    • Select cast(t0.DocTotal as decimal(16,2))
  • Display the database value 55.900000 for the column DocTotal rounded to a whole number (56.000000)
    • Select round(t0.DocTotal,0)
  • Display the database value 55.900000 for the column DocTotal rounded to a whole number (56.000000) and without decimals
    • Select cast(round(t0.DocTotal,0) as int)

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.

image286.jpeg

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.

image287.jpeg

  • 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.
    • Additional chart types can be selected using the drop down arrow found at the right-hand end of the chart type buttons.

image288.jpeg

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

  • A chart may be printed using the Print button. The output is controlled by the setup on the Printing Preferences tab for the query in APP Report Definition screen.

Delivering Charts

  • A chart may be sent via e-mail using the Deliver button. The output is processed using the setup on the Delivery Preferences tab for the query in APP Report Definition screen.

Chart Data Grid

  • The data used for the chart can be displayed by clicking the Data tab of the TWBS Chart Viewer screen, or by double-clicking on any data element in the chart. The underlying data is displayed in a grid format.

image290.jpeg

  • The data in the grid can be filtered by clicking the funnel icon image291.jpeg 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.

image292.jpeg

  • 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.

image293.jpeg

  • 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.

image44.jpeg

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 image35.jpeg Queries image35.jpeg User Queries menus to load the selected query into the SAP Query screen.

This example is for the Sales by Customer query.

image161.jpeg

  • The button to the immediate right of the Close button will allow the user to view existing charts associated with the query or to create a new chart.

image162.jpeg

  • Click the Total Sales by Customer button option to create a new chart. This will load the Chart Viewer form for the selected chart.

image294.jpeg

  • Clicking on the Data tab will give visibility to the data set that is used for the chart.

image295.jpeg

  • To group any data on the chart data tab, click and drag the column title of the data that you wish to group by into the area above the column titles.

image165.jpeg

  • The data view will be refreshed and the data will be grouped according to the field selected.

image166.jpeg

  • Clicking on the down image167.jpeg or up image168.jpeg 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.

image44.jpeg

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 image35.jpeg Queries image35.jpeg User Queries menus to load the selected query into the SAP Query screen.

This example is for the Sales by Customer query.

image161.jpeg

  • The button to the immediate right of the Close button will allow the user to view existing charts associated with the query or to create a new chart.

image162.jpeg

  • Click the Total Sales by Customer button option to create a new chart.
  • This will load the Chart Viewer form for the selected chart.

image294.jpeg

  • Clicking on the Data tab will give visibility to the data set that is used for the chart.

image295.jpeg

  • To filter any data on the chart data tab, click the image169.jpeg icon to the right of the column title of the data that you wish to filter.

image170.jpeg

  • A form will be displayed which will list all values of that field in the data set. This will allow the user to select only those values that will be displayed either by selecting the individual values or a range of values. The user will also be able to clear any existing filters through the Clear Filter button.

image171.jpeg

  • Select the data that you want to filter for the column.

image172.jpeg

Information on both the Data and Chart tabs will update in real-time as values are selected for filtering.

  • Any columns for which the data has been filtered will display the image173.jpeg icon colored to indicate filtering has been applied.
  • Clicking on the Chart tab will display the updated chart.

image296.jpeg

image44.jpeg

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

image44.jpeg

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

  • There are certain limitations while creating a query.
    • The ORDER BY clause is invalid in views, inline functions, derived tables, sub-queries, and common table expressions, unless TOP or FOR XML is also specified. So while creating a query with the ORDER BY clause, you must specify the TOP keyword. For example the query Select * from ORDR (NOLOCK) ORDER BY CardCode is not a valid query. So specify the TOP keyword like this - Select TOP 100 * from ORDR (NOLOCK) ORDER BY CardCode.
    • Repetition of columns is not valid. For example Select CardCode, * from ORDR (NOLOCK) is not a valid query. Because the field CardCode will be repeated twice. While specifying the * keyword, do not add field names separately. If you need to add the field name separately, specify an alias for the column. For example Select CardCode AS [Alias1], * from ORDR (NOLOCK), but make sure that there is no field with the same name as Alias1.

image44.jpeg

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.

image298.jpeg

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.

image299.jpeg

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.

image44.jpeg

How To Set Up Advanced Delivery Configurations

Advanced Delivery Definitions can be added from the Report Maintenance screen.

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click on the Report that you want to add an Advanced Delivery Definition to in order to load the report data to the Maintenance screen.

image300.jpeg

  • Click on the Advanced Delivery Definitions tab.
  • Click the New button.

image301.jpeg

  • 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.

  • Click the SAP menu option for Advanced Delivery under the APP Reports menu to load the Advanced Delivery screen.

image302.jpeg

  • 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.
    • Enter a Name for this new delivery option.
    • Click the Update button to save the new configuration.
  • Click the Refresh APP Menu button to refresh the APP menus so that the new configuration is displayed.

image44.jpeg

How To Edit an Advanced Delivery Configuration

Advanced Delivery Definitions can be edited from the Report Maintenance screen.

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click on the Report that you want to edit the Advanced Delivery Definition for in order to load the report data to the Maintenance screen.

image303.jpeg

  • Highlight the definition row that you want to edit.
  • Click on the Advanced Delivery Definitions tab.
  • Click the Edit button.

image304.jpeg

  • 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.

image44.jpeg

How To Clone an Advanced Delivery Configuration

Advanced Delivery Definitions can be cloned from the Report Maintenance screen.

  • Click the Report Definition menu option under the Administration image35.jpeg Setup image35.jpeg APP Configuration menu groups to load the Reports Maintenance screen.
  • Click on the Report that you want to edit the Advanced Delivery Definition for in order to load the report data to the Maintenance screen.

image303.jpeg

  • Highlight the definition row that you want to edit.
  • Click on the Advanced Delivery Definitions tab.
  • Click the Clone button.

image305.jpeg

  • 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.

image44.jpeg

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.

image67.jpeg

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.

image67.jpegimage300.jpeg

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.

image306.jpeg

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.

image307.jpeg

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.

image253.jpeg

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.

image79.jpeg

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.

image302.jpeg

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.

image308.jpeg

Note - To select a group of records…

image309.jpeg 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.

image253.jpeg

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.

image34.jpeg

How To Use APP Pivot Grids and KPIs

A detailed video highlighting the process of setting up Pivot Grids, manipulating Pivot Grids in real-time for extensive data analysis, and setting up key performance indicators (KPIs) is available on our TWBS YouTube Channel. A direct link to the video is provided below.

TWBS APP How To Set Up Pivot Grids and Utilize KPIs

image44.jpeg

app/app_how_to.1564362733.txt.gz · Last modified: 2019/07/28 21:12 by dtucker