Connector for SAP Business Suite - Developer's Manual part 2 - Integration scenario: SAP external data group
Overview of CRM scenario with SAP ERP
In this example, data from an SAP ERP system, or rather R/3 system is integrated into an Intrexx CRM using external data groups. At least a ""View Only"" license for the Connector for SAP Business Suite is required for this. Write scenarios require the View & Write (e.g. functional calls) or Developer API (complete data group functions such as create, change, delete) licenses. The ERP Mini-CRM demonstrated here will have the following functions:
-
Research in the SAP customer base
-
Detailed information about the customer
-
Offers for the customer
-
Contact person from customer
-
Correspondence management
Create an application
You can download our sample application here. Open the application for editing. The application title can be changed to "Demo SAP Mini CRM" by double-clicking on the application node. Save the application and arrange it in the menu structure of the portal. Then open the application in the browser.
On the "Administration" page, the categories
-
Offer
-
Contract
-
Contract
were added.
View SAP customer base
Create external data group
A new external data group is now created. The database connection "saperp", which is already configured in our example, is selected in the properties dialog of the external data group. As data is only read from SAP here and not written, the SAP table "KNA1" can be integrated via the "Generic View" data handler.
The following data fields can now be selected from SAP on the Data fields tab:
-
LID
-
KUNNR
-
NAME1
-
ORT01
The data field "LID" is a generated auxiliary field that contains the complete SAP key of the data record (without client). This field should always be selected. The texts for all languages configured in the Intrexx portal are determined in SAP in this step and the titles are transferred accordingly. Click on "OK" to create the SAP external data group.
Create customer view page
A new view page is now created via the context menu of the application node and the title is changed to "Customers". A view table is now created on the page and the SAP external data group is selected in the properties dialog. In the table properties dialog, select the SAP external data group and add the data fields whose values are to be displayed in the table as a column. Sort the table columns by name. Click on "OK" to create the table.
The new view page should be available via the application menu in the browser. Double-click on the application node to open the application properties dialog. The "Customers" page can be selected and arranged on the Application menu tab. Click on "OK" to save the new setting. The application can be saved and published. Once the application has been saved, the SAP customer base is available in the portal.
Research in the customer base
Filters are used to search by customer number and first letter of the name.
Operator filter - Search by customer number
On the ""Customers"" view page, a dynamic filter (Operator) is added above the table. Switch to the "Comparison" tab in the properties dialog. The operator "Starts with", the data group "SAP" and the data field "Customer" are selected here.
The "Show list with operators" setting can be deactivated on the "Other" tab. Click on "OK" to create the filter. The dependency must now be defined in the table. Switch to the "Dependencies" tab in the table properties dialog. Add a new dependency. An event can now be added in the properties dialog of the dependency. Select "Operator" and the "onchange" event as the control.
Then add the new filter expression "Customer is contained in operator". The "Customer" field, the "Is contained in" operation, the "Operator" check, which serves as a search field, and the "Customer" comparison field are selected for this purpose. Click on "OK" to apply the new settings.
The dependency is now created. The dialog is closed by clicking on ""OK"".
Alpha-index filter - Search by customer's first letter
Now, the second filter for searching by the customer's first letter will be defined. The "Alpha index" filter is used for this purpose.
The settings here can be accepted as they are by clicking on "OK". The additional filter expression can be created by double-clicking on the view table.
Click here on "Edit dependency".
The Alpha-index filter is now added as a triggering control here. The new filter expression is: Name begins with alpha index. You can see the details of the filter expression's properties below:
The new settings can be accepted by clicking on "OK" and the application can be saved.
In the browser, you can now also search for a combination of customer number and customer name, e.g. customer numbers beginning with "0000" and customer names from A to D. Of course, there are also other options for filtering by customer name. You could, for example, configure this like the customer number filter so that all customer names are found that begin with a specific character string.
Detailed view - Customer data sheet
Create detailed view
In the next step, we will created a detailed view for the customers which can be opened from the view table on the customer page. By the way: the customer page can be set as the start page of the application via the main menu Edit / Start page if it is currently selected in the application structure.
The "New / View page with elements" context menu can be used to create a view page that creates all the integrated data fields of the SAP external data group. The title is changed here to "Customer master data sheet".
Redundant view elements can be deleted. If you want to display additional data on the page, such as zip code and city, the corresponding data fields must first be included in the SAP external data group.
In the properties of the view table on the "Customers" page, click on "Add column" to add a button that loads the detail page. The jump target "Customer master data sheet" is already correctly selected here. Click on
"Edit column" while the button column is highlighted.
Here, on the "Actions" tab, you can set that the customer master data sheet is loaded in the tooltip when a user clicks on the button in the table. Close all open dialogs by clicking on "OK" and save the application.
In the browser, the customer data sheet will be displayed in a tooltip by clicking on the button.
Display orders in the customer data sheet
To display orders for the customer in the customer data sheet we will create another external data group that integrates the SAP table VBAK (SAP task information).
Switch to the "Data fields" tab.
All of the required data fields from the order header can be selected here. Accept all new settings by clicking on "OK".
The external data group "SAP orders" has been created. Now, a filtered view table for the customer orders should be created on the customer data sheet.
The external data group "SAP orders" is selected in the properties of the view table. Then select the desired data fields for the table columns by clicking on "Add column" and arrange them using the
arrow buttons. The filter dialog can then be set up by clicking on
"Filter".
Click here on "Add new filter expression". The "Customer" data field is compared with the value of the "Customer" data field currently loaded on the page using the "Equal" operator. If the value matches, the table displays the orders for which the customer number of the currently displayed customer data record is saved in the "Customer" field. Click on "OK".
The first part of the filter expression has now been defined. Furthermore, the results displayed should be restricted to the sales document category C. This category is used for orders. Without this restriction, every document would be shown where the customer is defined as the sold-to party. To do this, click on "Add new filter expression".
The second part of the filter expression has to be created with an AND join. An OR join would display every document category of the sold-to party OR every document with the category C. With the AND join, both conditions are applied to the available data, meaning that only documents with the current customer as the sold-to party AND with the category C are displayed. The data field "Occupancy type" is entered here with the operator "Equals" with the character C - as a user-defined option. Click on "OK".
The filter expression is now finished. Confirm all new settings by clicking on "OK" and save the application.
The orders are now shown in the customer data sheet.
Display contact persons
SAP external data group for customizing table
A new SAP external data group containing the customizing table for the "Department" field of the contact person is created via the application node.
Our SAP database connection is selected once more. The customizing table "TSAB" is integrated as a table.
The SAP Portal Plugin immediately resolves customizing tables into the linked text tables. Information on how to avoid this behavior can be found in the SAP API developer manual.
The desired data fields can be selected as usual on the "Data fields" tab.
SAP external data group for contact persons with reference
The master data table "KNVK", which contains the SAP contact person data, is now integrated into the application.
The desired data fields can be selected on the "Data fields" tab.
Click on "OK".
The field "ABTNR" or "Department" is now created as a reference to the previously created data group "SAP Departments". To do this, open the properties of the new "SAP contact person" data group by double-clicking on it and switch to the "References" tab.
The reference can be created by clicking on "Add reference". The title of the reference is "Department". By clicking on
"Multilingualism", this can also be entered in the other portal languages. The "SAP Departments" data group is referenced (corresponds to the SAP Customizing table). Click "Next".
Click here on "Make assignment". The data field "ABTNR", which contains the SAP coding, can then be selected. Click "OK".
The assignment is now created. Click "Next".
Here, you can select which fields from the customizing table should be visible to the users. Select the field that contains the description text for the coding. Click "Finish".
The reference is now complete. General information on the subject of "References" can be found here.
Adding the contact persons to the customer data sheet
We will now added another view table to the customer data sheet.
The referenced deparment field can also be integrated as a table column. If you want to change the titles of the table columns, simply click on "Edit column". The order of the columns can be changed using the
arrow buttons. Access to the SAP contact persons must now be restricted to the current customer ("Customer" data field) using a filter. To do this, click on
"Filter".
Click here on "Add new filter expression". The "Customer" data field is to be compared with the current value of the "Customer" field from the "SAP" data group using the "Equal" operator. This means that the table loads the data records where the same customer number is stored in both fields. Confirm all changes with "OK" and save the application.
To make it easier to distinguish the tables in the browser, you can enter the table title in the properties dialog and activate the "Show title" setting.
Once the application is saved, the title will be shown in the browser.
Customer correspondence
Enhancing the application template
A new input field is created on the "New document" input page, which also creates a new data field. Click "Next".
This field will be used for the customer search later. Its title is ""Customer"". The control type is text, the data type is string.
Click "Next" through the following dialogs and keep all the following settings until the element is completed and created.
Another edit field for the SAP customer number is now created. Users may not enter data into the field. However, a data record is only valid when a customer number is in this field.
Its title is ""Customer number"". The control type is text, the data type is string. Click "Next" and "Finish" in the next dialog.
The settings "Read-only" and "Input required" are set here. Click "OK".
Customer search via Data Picker
The user should be able to search for a customer by typing their name, either entirely or in part, in the customer field and then by selecting them from a suggestion list. The Button element performs this task with the Data Picker action. Once the user selects the customer, the customer number is automatically written to the customer number field.
The button is defined as an image here. Click on "Edit" to select a suitable image for displaying the button with and without mouse contact.
Click "OK".
The image for the button has now been defined. Switch to the "Actions" tab.
The "Data Picker" action type can be selected here. The customer field is selected as the search field. The search is to be carried out in the current application in the "SAP" data group, which contains the customer data. The "Name" field is selected as the data field. In the lower area, the "Customer number" field can be assigned to the "Customer" field from the SAP external data group. This takes the customer number from the SAP external data group and copies it to the "Customer number" input field on our input page. The data group selected for the search can be restricted by clicking on "Filter" to avoid unwanted hits (e.g. exclusion of data marked for deletion). A click on
"Advanced" opens another dialog in which the appearance of the list that displays the search results for selection can be set. At the top, you can specify which fields should be shown to the user in the search list so that they can make their choice. The number of results shown can be restricted at the bottom. With the "Show navigation element" setting, the user can navigate in a larger hit list. More information about the settings in this dialog can be reached by pressing F1. Usually, the user has to click on the Data Picker button to trigger the search function. The search function can also be triggered automatically when a specific number of characters have been entered. This behavior is triggered by the setting "Results from an input length of ... characters". In SAP, this setting can be performance-relevant and is better set too high and, if necessary, changed. with filters. Confirm all new settings by clicking on "OK".
The dimensions of the button can be automatically adjusted to the size of the selected image using the "Set original size" context menu.
Adding the new fields to the view page and search
In the previous step, the new data fields "Customer" and "Customer number" were created with the corresponding input fields in the Intrexx data group "Documents". The data contained is now displayed in the "All documents" view page and is also included in the search configuration for the search.
On the "All documents" view page, double-click to open the properties of the view table.
Click on "Add column" to add the two fields to the table. Save the changes by clicking on "OK" and then switch to the "Search" page.
On the "Search" page, open the properties of the button by double-clicking on it. Then click on "Edit search configurations" and in the subsequent dialog on
"Edit search configuration". Activate the "Search" setting in the "Customer" and "Customer number" fields at the bottom of the dialog. Confirm all new settings with "OK" and save the application.
Test the application
A test data record can now be created on the "New document" page. Enter "Mega" in the customer field and then click on the data picker button. Because there are multiple hits, a list will be shown from which the correct customer can be selected.
When you select a customer, the correct name is automatically in the Customer field and the correct number in the Customer number field. Click on "OK" to save the new data record.
The new data record is now displayed on the "All documents" page.
On the "Search" page, you can now search for a customer number, for example. Hits are displayed below the search field after clicking on "Search". By clicking on the title link of a hit, the data record is loaded for viewing on the "Call up document" page.
Create simple master data list with SAP Reports
A simple method of presenting SAP information as master data sheets is provided by the report integration of the Connector for SAP Business Suite. Proceed in exactly the same manner as shown earlier in the previous chapters and create an external data group for SAP Reports.
In the properties of an external data group, select your SAP connection as usual. Use the "Generic Report" data handler here and enter the technical name of the report as the table/view (e.g. "zz_demo_demixapi_report" in the code example below). Intrexx accesses SAP via the Generic Report data handler and transfers the parameters and generated lines of text. The scaffolding of the SAP reports contains simple PARAMETERS instructions that are then available in Intrexx as filter criteria. The following example contains the material number as the parameter for which information in SAP will be acquired in the START-OF-SELECTION section.
report zz_demo_ixapi_report no standard page heading line-size 256.
* ------- interface
parameters matnr type matnr.
start-of-selection.
You can find the complete coding for this example here.
Possible extensions
Filter criteria from the user context
In some scenarios it makes sense to use additional filter criteria to restrict the number of hits for authorization reasons. Examples for filter values from the user context are
-
Customer number
-
Personnel number
-
Cost center
-
Sales organization
Additional attributes can be defined in the "User" module of the portal. The values entered in the attributes are then assigned in the respective user account.
In a customer portal, for example, the view of your own orders could be automatically restricted to the customer number from the user account (filter expression: Sold-to party = Current user - Customer number).
Personalized access
An SAP system is accessed by at least one system user, who is configured in the settings of the SAP data source. However, it is also possible to work with the SAP user of the portal user. To do this, the login mode must be entered as an expert attribute in the properties of the SAP external data group.
Improved search
The search via the SAP customer master, as implemented in the example application, has so far been case-sensitive (case-sensitive). If this is not taken into account in the search term, or if the search term can be found in another field, e.g. when searching for the zip code instead of the customer's name, no hits will be returned. To optimize this state, you can implement your own handler in the SAP portal plug-in. You can find a sample code here.
8.3 Display an optimized internal SAP table
Resolving SAP-typical codes by reference, as in the previous example, is not always technically feasible in this way. The resolution of texts for a large number of fields can also lead to performance problems. In some cases, the data in SAP is distributed across several dependent tables, so it is hardly possible to form a join across all the tables required. In such cases, it is quite possible to build the data in SAP as a typical internal table and only then integrate it into the portal. The API methods GET_LIST and GET_DETAIL must then be implemented for read-only access. An example of how internal SAP tables can be made available can be found here.
Replicate SAP data in Intrexx data groups
As an alternative to external data groups, SAP data can be written to Intrexx data groups via a process.
To begin with, a new Intrexx data group is added to our example application. The data from the SAP external data group SAP, in which the customer data from SAP is integrated, is to be replicated in the new Intrexx data group using a process. Before the application is saved, the data type of the key field "LID" must be changed to "string" in order to be able to use the SAP customer number as the primary key in the Intrexx data group. To do this, switch to the "Data fields" tab.
Click here on "Edit data field". In the next dialog, switch to the Expert tab. Change the value of the "datatype" attribute to "string". Save the application. Switch to the Processes module and create a new process with a time-controlled event.
Click "Next".
The timer should be set so that all data records in the Intrexx data group are deleted at a set time (7.00 am). Click "Next".
The Intrexx data group "Customers" is selected here. Click "Next" without defining a filter and keep all the following settings until you can confirm the new settings with "OK". The timer is now already integrated in the Timer event process element.
A data group action is now linked to the timer event. The action will delete data records. Click "Next".
The application and the Intrexx data group "Customers" are selected here. Click "Next" and keep all the following settings.
Use the same principle to create a second global timer and set the automatic execution to 8.00 am.
The SAP external data group "SAP" is selected here.
Add a new timer event handler and select the second timer here.
Connect a data group action to the handler. This will transfer the data from the SAP external data group to the Intrexx data group. The "Add data record" option is selected here.
The Intrexx data group "Customers" is selected as the target data group.
The primary key and the remaining fields are assigned here. The process is immediately activated once the process is saved. To prevent it from running untested, the process can be deactivated first. The two timers can be started manually.
In the Tools module, in the task planning, all timer actions are also listed among other tasks. Use the context menu to start the corresponding timer manually.
Generic writing to a Z table
There is often a requirement to convert a new Business Object for SAP. This means that Z tables and a user interface (for example, simple table maintenance) are implemented in SAP in the customer namespace. The method described here is one way of implementing the data model in SAP and mapping the user interface completely in Intrexx. A sample code for the corresponding data handler (derived from Generic View Handler) can be found here. The data handler is registered as "GENERIC_WRITE". A table with a GUID key field of technical type RAW(16) is required. This can, for example, refer to the data element "ZIA_IXA_GUID" or "SYSUUID_X". The use of a GUID is easier to handle than number ranges, as the globally unique IDs (GUID) generated with the SAP function module "GUID_CREATE" are unique worldwide. As of SAPPOPI version 2010, the data handler "GENERIC_WRITE" is part of the package. This version also removes the restriction of the GUID key field. Data records with a simple key can then be changed and deleted. However, it is impossible to insert new data records without adjusting the handler, since the handler has no knowledge of the logic of new keys.
If you have created such a table with the GUID key field (and the client field), the table must be registered in the mapping of the SAP Portal plugin. As of SAPPOPI 2010, registration is no longer required.
The table can then be used immediately as an external data group of the Developer API with full access in Intrexx.
All functions such as create, change and delete are available for the Developer API objects and the "Generic Write" handler.
Display documents in the portal
In SAP, documents (for example, drawings, correspondence, invoices) are available in three different ways:
-
As a document in the archive system (or in KPro)
-
As a document in the file system or accessible via an FTP server
-
As a document in the SAP database (for example, cluster tables, BLOB fields)
If you want to make these documents available to the portal user, it must first be generally clarified whether direct access by external users to the documents from points 1 and 2 can and may be enabled. Point 3 is excluded here, since direct read access to the SAP tables is generally not possible here. If direct access from outside is technically possible, you can work via a URL. It does not matter whether the data comes from the archive system or is already in the file system. It is only important that a web server that delivers the documents is available and can be accessed by the portal user. The task of the SAP system is solely to generate the corresponding URLs, which are then displayed in the portal as buttons or links. A sample code for generating the URL for archive documents can be found here. If the files are located on a network drive (point 2), the coding is similar. In this case, however, the URL must be generated that corresponds to the network drive from the portal's point of view. The GENERIC_ARCLINK data handler can be used for this purpose. If technically possible (e.g. under Unix), the network drive can be integrated into a sub-path to the portal, e.g. as the "docs" directory under the portal directory "external/htmlroot". The documents are then available to the user at "https://<host>:<port>/<portal>/docs/*". If the documents cannot be accessed directly from the user's perspective, the documents must be made available on a path accessible to the web server. Technically, the documents must then be read on the SAP application server and copied to the externally accessible path. The easiest way to do this is with the SAP ABAP command "OPEN DATASET ... TRANSFER". If only FTP is available for file transfer, the SAP programs "RSFTP*" demonstrate how to use the FTP protocol. It is also possible to exchange files between the SAP application server and portal server via the RFC protocol using Remote Services. For many documents (e.g. all invoices for one user), not all documents should always be replicated. The separation of the handler methods into "GET_LIST" and "GET_DETAIL" is suitable here. The list view would create an overview of the available documents based on the filter criteria. Only branching to the detail view must trigger replication to the Web server. To do this, the pattern coding must be extended by the API method "GET_DETAIL", which also initiates replication in addition to preparing the data --> For security reasons, the file names can be encrypted. The SAP function module "GUID_CREATE" is suitable for this. An invoice "1204387.pdf" thus becomes "81C0C8484EB3A637E1000000C0A8DEE6.pdf". Security is further enhanced if these files are automatically deleted after a certain period of time.
Edit SAP objects
Change SAP objects Changing access at table level would be technically possible, but is not supported by the SAP Portal plugin. The developer manual for the plugin uses an example to describe how to proceed with SAP objects. In principle, it must be possible to represent the SAP object in a transfer structure. Then all desired methods (e.g. Modify, Delete) must be implemented in the API. In these methods, the transfer structure is mapped and processed to available BAPI functions. The BAPI functions always contain the lock concept.
Document flow to portal objects
Document flows can be mapped in Intrexx without any problems. However, if document flows are also to be mapped to external objects in the SAP system, a different approach must be taken here. In principle, pages of the portal can also be included in SAPGUI transactions. To do this, a special URL is called that branches to a detail page for the object. The key of the object is encrypted in the URL. So that external objects can be called from the SAPGUI transactions (e.g. document flow), a business object is required that implements a "DISPLAY" method and generates a view of the portal when it is created by the SAP standard. The document flow between SAP and non-SAP objects is generated using standard SAP functions. In SAP transactions, a double-click via the "DISPLAY" method of the business object is usually supported.
Special concepts
Expert attributes for SAP external data groups
Expert attributes are used in Intrexx applications to provide additional configuration options that are not or not yet available in the properties dialog. Information on Expert mode can be found here. The expert attribute "bia-handler", for example, specifies the SAP data handler to be used (e.g. "GENERIC_VIEW"). The additional Expert attribute "bia-loginuser" is used, for example, to control whether access to the SAP system should be personalized. A list of other available attributes and their use can be found here. These Expert attributes are used with reference to the data group (e.g. "bia-forcefilter = <true|false>" enforces one or more filter criteria) or to the contained data field (e.g. "bia-KUNNR-numkeylen = <len>" maps the data with and without leading zeros in the specified length depending on the direction). If a setting is to refer to a data field, the expert attribute must be entered in the naming convention "bia-<name of field>-<option>". The expert attribute is then called "bia-<option>", as the data field name is given in each case.
Generic View: Variant nolangtab
The most frequently used data handler "Generic View" has been implemented in such a way that the linked text table is automatically determined when accessing customizing tables and only the texts in the portal logon language are transferred when selecting the data. In most cases this has made work easier. However, some Customizing tables contain interesting additional information that was no longer available. There was a workaround to use these leading tables, but it was cumbersome and had to be configured in the SAP system. To make matters worse, some very important tables in the SAP system technically look like customizing tables (e.g. table "MARA"). Therefore the handler "Generic View" in the variant "nolangtab". With this variant, access to the text tables is prevented and thus access to tables such as "MARA" is possible without major effort.
Generic F4
The expert attribute "mapcodefield" can be used to map the codes used in certain SAP fields to the SAP F4 help texts. The "Generic F4" data handler provides this F4 help as a simple code text table in the logon language of the portal. This means that list boxes of dynamic filters, for example, can be filled without major problems. The table expected here is "<SAP DDIC structure or table>-<table field>". Unfortunately, determining the F4 texts is not always easy. Therefore, this cannot be supported for every field. However, you can also support special cases using the inheritance concept of the SAP data handler class.
Generic ArcLink
This handler enables access to archived documents that are assigned to an SAP object. The SAP data handler would determine the archive documents for the specified SAP BusinessObject and the corresponding object ID and make them available as a table. This table contains a "URL" field, which contains the URL to the archive system (SAP server or external solution). This URL field can be converted to a different (e.g. hidden or external) display using the Expert attribute "bia-mapurl". The purpose of this handler is in any case to provide easy access to documents (e.g. order confirmation as PDF) via the direct path of the URL.
The handler expects the SAP BusinessObject (such as VBAK) as the table or the character * for generic access. In any case, the ID of the SAP object (i.e. the document number "VBELN" for "VBAK") must be entered in the filter. The SAP BusinessObject is also expected for generic access (*). You can provide the ID of the SAP object very easily using dynamic filters. In the expert attributes, you can also set here that
-
The object ID is automatically converted into a 10-digit numeric key (option "bia-OBJECT_ID-numkeylen = 10")
-
the data group requires a filter ("bia-forcefilter = true")
Generic text
This data handler provides generic access to long texts in SAP (table STXH). The text object must be specified as the table name (e.g. BUS2032). Generic access with the * character is possible here if the text object is available via filters. The data handler returns the "STXH" table, supplemented with two fields containing the actual text. A long text is automatically generated with the text without formatting ("TEXT_NORMAL" field) and with HTML formatting ("TEXT_HTML"). These fields can then be included as usual on a view page.
Permissions for own data records in SAP external data groups
In conjunction with external data, it is not easy to determine when the available data records are your own data records. This problem and the solution will be demonstrated using the example of SAP order header data (table "VBAK"). Depending on the context of the portal user, there are fields in this SAP table that can be used to identify your own data records. From a customer's point of view, this is, for example, the SAP field "KUNNR", which must be filled with the customer's own customer number for "own data records". From the perspective of an internal employee, however, it could be the SAP field "ERNAM", which contains the SAP user of the person entering the order. The second challenge is to determine the values to be checked in SAP (for example, customer number, SAP user name or personnel number). The required mapping between the user logged in to the portal and the SAP value to be checked can be performed in many different ways. The simplest option is to create your own attribute value via the schema manager in the "User" module and maintain values such as the SAP customer number here.
Such an attribute can be used as a filter value for view tables, for example. This allows you to control the permissions for SAP data in lists. However, the application permissions for data groups are not yet evaluated here. This therefore does not prevent direct navigation to a detail page that is not permitted. A concept called "permission filter" is used here. You can imagine the effect as a permanent filter directly applied to the external data group, which is also used when displaying the detail pages and thus prevents the loading of non-permitted pages. A simple application that implements access to the SAP table "VBAK" is used here as an example. Access will be restricted via application permissions. Own data records are interpreted as "SAP data records that have the value from the BIASAP_KUNNR user attribute in the Customer (KUNNR) field".
The SAP table "VBAK" is displayed here on the "All entries" page. To do so, select the external data group ""SAP order data"" and the desired data fields in the properties of the view table. Then create a filter that compares the data field "Customer", which contains the customer number in SAP, with the value from the user attribute "BIASAP_KUNNR".
Save the application and publish it in the menu structure. Afterwards, determine the following GUIDs:
-
GUID of the application
-
GUID of the page that contains the table with the filter defined earlier
-
GUID of the table where the filter is defined
-
GUID of the SAP external data group
The GUIDs can be easily determined with the F4 key if the respective element (or application node) is selected.
Navigate to the "internal/application/store" folder in the Intrexx portal directory. Open the folder with the same name as the application GUID. Then navigate to the "structure/pages" folder. Close the application now. The changes in the next step cannot be saved unless the application has been closed. In the section ""viewpage"", search for the filter we just created. Search for the filter you have just created in the "viewpage" section. You will find it below the "tablecontrol" section.
Cut out the entire <filter>...</filter> area and keep it in the clipboard. Then, open the folder ""structure/datagroups"". Go to the "structure/datagroups" folder and open the XML file that has the GUID of the SAP external data group as the file name. Insert the new section "<permission></permission>" before the "datafield" section. Paste the copied filter section into this permission section.
Save the modified XML file. Then reopen the application in Intrexx. There should now no longer be a filter in the properties of the view table. Show the data fields via the context menu of the external data group "SAP order data".
The permission filter should now be shown under the data group.
Open the properties of the application by double-clicking on the application node and switch to the "Permissions" tab. Set the "Read data record (own)" right here. Save the application. Afterwards, all accesses made to the data group and its detail pages will be restricted accordingly.
More information
SAP Trust Manager SSO configuration
API Description Part 1 - Overview
API Description Part 2 - SAP Portal Plugin
API description part 3 - Implementation of own processing modules
API description part 4 - sample coding
Developer's Guide Part 3 - Scripting integration scenario
Developer Manual Part 4 - Personalized SAP Access / Single Sign On (SSO)