Connector for SAP Business Suite - Developer's Guide, Part 2 - Integration Scenario: SAP External Data Group
Overview of a CRM Scenario with SAP ERP
In this example, data from an SAP ERP or R/3 system is integrated in real time with third-party data sets into an Intrexx CRM. This requires at least one View-Only license for the SAP Business Suite connector. Scenarios that write data require either the View & Write license (e.g., function calls) or the Developer API license (full data set functions such as create, update, and delete). The ERP Mini-CRM presented here will include the following features:
-
Searching the SAP Customer Master Data
-
Detailed information about the customer
-
Offers for Customers
-
Customer Contact Person
-
Correspondence Management
Create an Application
You can download our sample application here. Open the application to edit it. You can change the application title by double-clicking the application node in "Demo SAP Mini CRM." Save the application and place it in the portal's menu structure. Then open the application in your browser.
On the "Administration" page, the categories
-
Offer
-
Information
-
Contract
added.
SAP Customer Master View
Create an External Data Group
A new external data group is now being created. In the properties dialog for the external data group, select the database connection "saperp," which is already configured in our example. Since only data is read from SAP here and no data is written, the SAP table "KNA1" can be integrated using the "Generic View" data handler.
On the Data Fields tab, you can now select the following data fields from SAP:
-
LID
-
KUNNR
-
NAME1
-
LOCATION01
The "LID" data field is a generated auxiliary field that contains the complete SAP key for the data record (excluding the client). This field should always be selected. In this step, SAP determines the text for all languages configured in the Intrexx portal and imports the titles accordingly. Clicking "OK" creates the SAP external data group.
Create a Customer View Page
A new view page is now created via the application node 's context menu, and the title is changed to "Customers." A view table is created on the new page. In the table's Properties dialog box, select the SAP External Data Group and include the data fields as columns whose values you want to display in the table. Sort the table columns by name. Click "OK" to create the table.
The new view page should be accessible in the browser via the application menu. Double-clicking the application node opens the application's Properties dialog box. On the "Application Menu" tab, you can select and arrange the "Customers" page. Click "OK" to save the new setting. Now the application can also be saved and published. After saving the application, the SAP customer master data is available in the portal.
Searching the Customer Database
Filters are used to set up searches by customer number and the first letter of the name.
Filter Operator - Search by Customer Number
Create an operator filter above the table. In the Properties dialog box, switch to the "Comparison" tab. Here, the "Starts with" operator, the "SAP" data group, and the "Customer" data field are selected.
On the "Miscellaneous" tab, you can disable the "Show list of operators" setting. Click "OK" to create the filter. Now the dependency needs to be defined in the table. In the table's Properties dialog box, switch to the "Dependencies" tab. Add a new dependency. You can now add an event in the dependency's Properties dialog. Select "Operator" as the control and "onchange" as the event.
Then add the new filter expression "Customer is included in Operator." To do this, select the "Customer" field, the "Is contained in" operation, the "Operator" control (which serves as the search field), and the "Customer" comparison field. Click "OK" to apply the new settings.
Click OK in all open dialog boxes to create the new dependency.
Alphabetical Index Filter - Search by the customer's first letter
Now we'll set up the second filter to search by the customer's first letter. The "Alphaindex" filter is used for this purpose.
You can accept the settings here as they are by clicking "OK." You can create the additional filter expression by double-clicking the view table.
Click "Edit Dependency" here at
.
The Alpha Index filter is included here as the trigger control. The new filter expression is: Name begins with alpha-index. Here you can see the properties of the filter expression in detail:
Click "OK" to apply the new settings and save the application.
You can now also search in the browser for a combination of customer number and customer name, such as, for example, customer numbers starting with "0000" and customer names from A to D. Of course, there are other ways to filter by customer name as well. For example, you could also configure it in the same way as the filter by customer number to find all customer names that begin with a specific string of characters.
Detail View: Customer Master Record
Create a detailed view
The next step is to create a detailed view of the customer, which can be opened from the view table on the Customer page. By the way: The Customer page can be set as the application's home page via the main menu (Edit / Home ) if it is currently selected in the application structure.
Using the context menu option "New / View Page with Elements," you can create a view page that includes all the data fields from the SAP external data group. The title is changed here to "Customer Master Sheet."
View elements that are not needed can be deleted. If you want to display additional data on the page, such as the ZIP code and city, you must first add the corresponding data fields to the SAP external data group.
In the properties of the view table on the "Customers" page, clicking "
" adds a " " button that loads the details page. The "Customer Master Record" jump target is already selected correctly here. Click "Edit Column" in
while the buttons column is selected.
On the "Actions" tab, you can configure the system so that the customer master sheet loads in a tooltip when a user clicks the button in the table. Close all open dialog boxes by clicking "OK" and save the application.
In the browser, the customer master record is now displayed in the tooltip when you click the button.
View Orders in the Customer Master Sheet
To display customer orders in the customer master sheet, an additional external data group is created that links to the SAP table VBAK (SAP Order Information).
Go to the "Data Fields" tab.
Here, you can select the desired data fields from the order header. Click "OK" to apply all the new settings.
The external data group "SAP Orders" has been created. Now, a filtered view table of the customer orders is to be created in the customer master sheet.
In the view table properties, select the external data group "SAP Orders." Then select the desired data fields for the table columns by clicking "Add Column" at
and arrange them using the arrow buttons at ![]()
. You can then set up the filter dialog by clicking "Filter" under "
."
Click "Add New Filter Expression" here at
. The "Client" data field is compared here to the value of the "Customer" data field currently loaded on the page using the "Equals" operator. If the value matches, the table displays the orders for which the "Client" field contains the client number of the currently displayed client record. Click "OK."
The first part of the filter expression has been created. Now, the view should be further restricted to sales document type C. This type is used for orders. Without any restrictions, all documents in which the customer is listed as the client would still be displayed at this time. To do this, click "
" and then "Add New Filter Expression."
The second part of the filter expression must be created using an "AND" operator. An "OR" condition would display all document types for the client OR all document types C. With the "AND" operator, both conditions are applied together to the available data; in other words, only those documents are displayed where the customer is listed as the client AND the document type is C. The "Document Type" data field is entered here using the "Equals" operator with the character C—as a user-defined option. Click "OK."
The filter expression is now complete. Confirm all the new settings by clicking "OK" and save the application.
The orders are now displayed in the customer master sheet.
View Contact Person
SAP External Data Group for Customizing Table
A new SAP external data group, which contains the Customizing table for the "Department" field of the contact person, is created via the application node.
Here, too, the SAP database connection is selected. The Customizing table "TSAB" is included as a table.
The SAP Portal Plugin immediately maps Customizing tables to the associated text tables. For information on how to avoid this behavior, see the SAP API Developer's Guide.
On the "Data Fields" tab, you can select the desired data fields as usual.
SAP External Data Group for Contacts with a Reference
The "KNVK" master data table, which contains the SAP contact information, is now being integrated into the application.
On the "Data Fields" tab, you can select the desired data fields.
Click "OK."
The "ABTNR" or "Department" field is now created as a reference to the previously created data group "SAP Departments." To do this, double-click to open the properties of the new data group "SAP Contacts" and switch to the "References" tab.
You can create the reference by clicking "Add Reference" at
. The title of the reference is "Department." By clicking on "
" under "Multilingualism," this can also be entered in the other portal languages. The data group "SAP Departments" (which corresponds to the SAP Customizing table) is referenced. Click "Next."
Click "Make Assignment" here at
. You can then select the "ABTNR" data field, which contains the SAP code. Click "OK."
The assignment has now been created. Click "Next."
Here, you can select which fields in the Customizing table should be visible to the user. Select the field that contains the description text for the code. Click "Finish."
The reference has now been created. You can find general information on the topic of "References" here.
Adding a Contact Person to the Customer Master Record
An additional view table is now being added to the customer master sheet.
The referenced department can now also be included as a table column here. If you want to change the titles of the table columns, simply click "Edit Column" (
) for each one. You can change the order of the columns using the arrow buttons ![]()
. Access to the SAP contacts must now be restricted using a filter for the current customer (the "Customer" data field). To do this, click "Filter" at
.
Click "Add New Filter Expression" here at
. The "Customer" data field should be compared to the current value of the "Customer" field from the "SAP" data group using the "Equals" operator. This causes the table to load the records in which the same customer number is entered in both fields. Confirm all changes by clicking "OK" and save the application.
To make it easier to distinguish between tables in the browser, you can enter the table title in the Properties dialog box for each table and enable the "Show Title" setting.
After saving the application, the title appears in the browser.
Customer Correspondence
Extending the Application Template
On the "New Document" entry page, a new input field —and thus a new data field—is created. Click "Next."
This field will be used later to search for customers. The title is "Customer." The control type is Text, and the data type is String.
Click "Next" through the following dialog boxes and keep all the settings as they are until the item is completed and created.
Another input field is created for the SAP customer number. Users must not enter any data in this field. However, a record is valid only if a customer number is entered in this field.
Enter the title here. The control type is Text, and the data type is String. Click "Next," and then "Finish" in the next dialog box.
This is where the "Read-only" and "Input required" settings are configured. Click "OK."
Searching for Customers Using the Data Picker Button
The user should be able to search for customers by entering all or part of the name in the "Customer" field and then selecting the customer from a list of suggestions. The Button element performs this task using the Data Picker action. This means that once the customer is selected, the customer number is automatically entered into the customer number field.
The button type is set to "Image" here. By clicking "Edit" at
, you can select an appropriate image to display on the button with and without mouse contact.
Click "OK."
The link to the image has now been added here. Go to the "Actions" tab.
Here, you can select the "Data Picker" action type. The "Customer" field is selected as the search field. The search should be performed in the current application within the "SAP" data group, which contains the customer data. The "Name" field is selected as the data field. In the lower section, the "Customer Number" field can be mapped to the "Customer" field from the SAP external data group. This retrieves the customer number from the SAP external data group and copies it into the "Customer Number" input field on our input page. The data set selected for the search can be narrowed down by clicking "Filter" at
to avoid unwanted results (e.g., excluding data marked for deletion). Clicking "Advanced" at
opens another dialog box where you can customize the appearance of the list that displays the search results for selection. In the upper section here, you can specify which fields should later be visible to the user in the search list so that they can make a selection. You can limit the number of results displayed at the bottom of the page. The "Show Navigation Element" setting allows the user to navigate through a larger list of results. You can access all information about the settings in this dialog box by pressing the F1 key. Normally, the user must click the Data Picker button to trigger the search function. The search function can also be triggered automatically once a sufficient number of characters have been entered. This behavior is triggered by the setting "Results with an input length of ... characters or more." In SAP, this setting can affect performance, so it's better to set it too high and, if necessary, to narrow down the results further using filters. Confirm all new settings by clicking "OK."
The button's dimensions can be automatically adjusted to match the size of the selected image using the "Set Original Size" context menu option.
Adding the new fields to the view page and search
In the previous step, the new data fields "Customer" and "Customer Number" were created in the Intrexx data group "Documents" using the corresponding input fields. The data contained therein is now displayed on the "All Documents" view page and is also included in the search configuration.
On the "All Documents" view page, double-click to open the view table's properties.
Click "Add Column" at
to add the two fields to the table. Save the changes by clicking "OK," and then go to the "Search" page.
On the "Search" page, double-click the button to open its Properties. Then click
"Edit Search Configurations" and, in the dialog that appears, click
"Edit Search Configuration." For the "Customer" and "Customer Number" fields, select the "Search" option at the bottom of the dialog box. Confirm all the new settings by clicking "OK" and save the application.
Testing the Application
You can now create a test data record on the "New Document" page. In the "Customer" field, enter "Mega" and then click the Data Picker button. Since there are multiple search results, a list appears from which the customer can be selected.
Once the customer is selected, the correct name is automatically entered in the "Customer" field and the customer number in the "Customer Number" field. Click "OK" to save the new record.
The new record is now displayed on the "All Documents" page.
On the "Search" page, you can now search for a customer number, for example. Results are displayed below the search field after you click "Search." Clicking on the title link of a search result loads the record onto the "View Document" page for viewing.
Creating Simple Master Sheets with SAP Reports
The connector for SAP Business Suite's report integration offers a simple way to display SAP information as master sheets. To do this, follow the same procedure as shown in the previous chapters and create a separate external data group for SAP Reports.
In the properties of the external data group, select your SAP connection as usual. Use the "Generic Report" data handler here and enter the technical name of the report (e.g., "zz_demo_ixapi_report" in the code example below) as the table/view. Intrexx then accesses SAP via the Generic Report Data Handler and transfers the parameters and the generated text lines. The basic structure of SAP reports contains simple PARAMETERS statements, which are then available in Intrexx as filter criteria. The following example includes the material number as a parameter, for which information is then retrieved from SAP 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 code for this example here.
Possible Extensions
Filter criteria from the user context
In some scenarios, it makes sense to use additional filter criteria to limit the number of results for authorization purposes. Examples of such filter values from the user context include
-
Customer Number
-
Employee Number
-
Cost Center
-
Sales Organization
Additional attributes can be defined in the "Users" module of the portal. The values entered in the attributes are then assigned to the respective user account.
In a customer portal, for example, this could be used to automatically restrict the view of a customer's own orders to the customer number associated with their user account (filter expression: Client = current user - customer number).
Personalized Access
Access to an SAP system requires at least one system user, who is configured in the SAP data source settings. However, it is also possible to use the portal user's SAP user account. To do this, enter the login mode as an "Expert" attribute in the properties of the SAP external data group.
Advanced Search
Searches using the SAP customer master data, as implemented in the sample application, are currently case-sensitive (they distinguish between uppercase and lowercase letters). If this is not taken into account when entering the search term, or if the term being searched for is located in a different field—for example, when searching by ZIP code instead of the customer's name—no results will be returned. To optimize this behavior, you can implement a custom handler in the SAP Portal plugin. You can find a sample code here.
8.3 Displaying an Optimized Internal SAP Table
It is not always technically feasible to resolve SAP-specific codes by reference, as shown in the previous example. Parsing text into a large number of fields can also lead to a performance issue. In some cases, the data in SAP is spread across several dependent tables, making it virtually impossible to perform a join across all the required tables. In such cases, it is certainly possible to set up the data in SAP as a standard internal table and only then integrate it into the portal. For read-only access, the API methods GET_LIST and GET_DETAIL must then be implemented. You can find an example of how internal SAP tables can be made available here.
Replicating SAP Data to Intrexx Data Groups
As an alternative to using third-party data groups, SAP data can also be written to Intrexx data groups via a process.
To do this, a new Intrexx data group is created in our sample application. The data from the SAP external data group, into which the customer data from SAP is integrated, is to be replicated into the new Intrexx data group via a process. Before saving the application, you must change the data type of the "LID" key field to "string" here so that the SAP customer number can be used as the primary key in the Intrexx data group. To do this, go to the "Data Fields" tab.
Click "Edit Data Field" here at
. In the next dialog box, switch to the Expert tab. Change the value of the "datatype" attribute to "string" there. Save the application. Go to the Processes module and create a new process with a time-based event.
Click "Next."
The timer should be set so that all records in the Intrexx data group are deleted at a specified time (7:00 a.m.). Click "Next."
Here, the Intrexx data group "Customers" is selected. Click "Next" without defining a filter, and keep all the following settings as they are until you can confirm the new settings by clicking "OK." The timer is now already integrated into the " Timer Event " process element.
Now, a data group action is linked to the timer event. This action deletes the records. Click "Next."
Here, the application and the Intrexx data group "Customers" are selected. Click "Next" and keep all the following settings as they are.
Using the same principle, create a second global timer and set the automatic execution time to 8:00 a.m.
Here, the SAP external data group "SAP" is selected.
Create a new timer event and select the second timer here.
Next, create the data group action that transfers the data from the SAP external data group to the Intrexx data group. Here, the "Add Record" option is selected.
The Intrexx data group "Customers" is selected as the target data group.
This is where the primary key and the remaining fields are mapped. Once the process is saved, it is immediately activated. To prevent it from running without being tested, the process can be disabled for the time being. Both timers can be started manually.
In the Tools module, under Task Planning, all timer actions are listed along with other tasks. You can also start the timers from here using the respective context menu.
Writing Generic Data to a Z Table
There is often a need to implement a new business object for SAP. This means that Z-tables and a user interface (e.g., simple table maintenance) are implemented in SAP within the customer namespace. The approach described here is one way to implement the data model in SAP and map the user interface entirely in Intrexx. You can find sample code for the corresponding data handler (derived from `Generic View Handler`) here. The data handler is registered as "GENERIC_WRITE". A prerequisite is a table with a GUID key field of the technical type RAW(16). This can, for example, refer to the data element "ZIA_IXA_GUID" or "SYSUUID_X." Using a GUID is easier to manage than number ranges, since the Global Unique IDs (GUIDs) generated by the SAP function module "GUID_CREATE" are globally unique. Starting with SAPPOPI version 2010, the "GENERIC_WRITE" data handler is included in the package. With this version, the restriction on the GUID key field has also been removed. Records with a simple key can then be modified and deleted. However, inserting new records remains impossible without modifying the handler, since the handler has no knowledge of the logic behind 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 SAP Portal Plugin's mapping. Starting with SAPPOPI 2010, registration is no longer required.
After that, the table can be used immediately in Intrexx as an external data group of the Developer API with full access.
For the Developer API objects and the "Generic Write" handler, all functions—such as create, update, and delete—are available.
Viewing Documents in the Portal
In SAP, documents (e.g., drawings, correspondence, invoices) are available in three different ways:
-
as a document in the archive system (or in KPro)
-
as a file in the file system or accessible via an FTP server
-
as a document in the SAP database (e.g., cluster tables, BLOB fields)
If you wish to make these documents available to portal users, you must first determine whether external users can and are permitted to have direct access to the documents listed in points 1 and 2. Item 3 is excluded here, since direct read access to the SAP tables is generally not possible in this case. If direct access from outside is technically possible, you can use a URL. It doesn't matter whether the data comes from the archive system or is already stored in the file system. The only important thing is that a web server that serves the documents is available and accessible to portal users. The sole purpose of the SAP system is to generate the corresponding URLs, which are then displayed in the portal as buttons or links. You can find sample code for generating URLs for archive documents here. If the files are located on a network drive (Step 2), the code is similar. However, in this case, you'll need to generate the URL that corresponds to the network drive from the portal's perspective. The GENERIC_ARCLINK data handler can be used for this purpose. If technically possible (e.g., on Unix), the network drive can be mounted in a subpath of the portal, for example, as the "docs" directory under the portal directory "external/htmlroot". The documents will then be available to the user at "https://<host>:<port>/<portal>/docs/*". If the user cannot access the documents directly, the documents must be placed in a path that is accessible to the web server. Technically speaking, 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. Remote Services also allow you to exchange files between the SAP application server and the portal server using the RFC protocol. Of course, when it comes to many documents (e.g., all invoices for a single user), not all documents should always be replicated. In this case, it makes sense to separate the handler methods into "GET_LIST" and "GET_DETAIL." The list view would generate an overview of the available documents based on the filter criteria. Only after navigating to the detailed view should replication to the web server be triggered. To do this, the sample code must be expanded to include the "GET_DETAIL" API method, which not only formats the data but also initiates replication.--> For security reasons, the file names can be encrypted. The SAP function module "GUID_CREATE" is suitable for this purpose. An invoice named "1204387.pdf" is converted to "81C0C8484EB3A637E1000000C0A8DEE6.pdf". Security is further enhanced when these files are automatically deleted after a certain period of time.
Modifying SAP Objects
Although modifying access at the table level would be technically possible, it is not supported by the SAP Portal plugin. The plugin's developer guide includes an example that describes how to work with SAP objects. In principle, the SAP object must be representable in a transfer structure. Then, all the desired methods (e.g., Modify, Delete) must be implemented in the API. In these methods, the transfer structure is preferably mapped to and processed using available BAPI functions. The BAPI functions always include the lock concept.
Document Flow for Portal Objects
It is easy to map document flows in Intrexx. 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, portal pages can also be embedded in SAPGUI transactions. To do this, a specific URL is accessed, which redirects to a detail page for the object. The object's key is encrypted in the URL. To enable external objects to be called from SAPGUI transactions (e.g., document flow), a business object is required that implements a "DISPLAY" method and, when created by the SAP standard, generates a view of the portal. The document flow between SAP and non-SAP objects is generated using standard SAP functions. In SAP transactions, double-clicking is usually supported via the "DISPLAY" method of the business object.
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. You can find information about Expert Mode here. The "bia-handler" Expert attribute specifies, for example, the SAP data handler to be used (e.g., "GENERIC_VIEW"). The additional "bia-loginuser" expert attribute is used, for example, to control whether access to the SAP system should be personalized. You can find a list of other available attributes and their uses here. These expert attributes are used in 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, depending on the direction, with or without leading zeros to the specified length). If a setting is to refer to a data field, the Expert attribute must be entered using the naming convention "bia-<field name>-<option>." The expert attribute is then named "bia-<option>," since the data field name is specified in each case.
Generic View: Variant nolangtab
The most commonly used data handler, "Generic View," has been implemented so that when accessing Customizing tables, the associated text table is automatically determined, and when selecting data, only the texts in the portal login language are transferred. In most cases, this made the work easier. However, some Customizing tables contain interesting additional information that was no longer available as a result. Although there was a workaround that allowed these leading tables to be used anyway, it was cumbersome and had to be configured on the SAP system. To make matters more complicated, some very important tables in the SAP system technically resemble Customizing tables (e.g., table "MARA"). That's why the "Generic View" handler is used in the "nolangtab" variant. This option prevents access to the text tables, thereby allowing access to tables such as "MARA" with minimal effort.
Generic F4
The "mapcodefield" expert attribute can be used to map the codes used in certain SAP fields to descriptive text in the SAP F4 help. The "Generic F4" data handler provides these F4 help messages as a simple code-text table in the portal's login language. This makes it possible, for example, to populate list boxes with dynamic filters without any major problems. The expected format for a table here is "<SAP DDIC structure or table>-<table field>". Unfortunately, identifying the F4 texts isn't always easy. That is why this feature is not supported for every field. However, the inheritance concept of the SAP DataHandler class also allows you to handle special cases.
Generic ArcLink
This handler allows you to access archive documents that are assigned to an SAP object. The SAP Data Handler would identify the archive documents for the specified SAP business object and the associated object ID and make them available as a table. This table contains a field called "URL" that holds the URL to the archiving system (SAP server or external solution). This URL field can be transferred to a different view (e.g., a hidden or external view) using the "bia-mapurl" Expert attribute. The purpose of this handler is definitely to provide easy access to documents (e.g., order confirmations as PDFs) via a direct URL.
The handler expects the SAP business object (e.g., VBAK) as a table, or the character * for generic access. In any case, the ID of the SAP object (for "VBAK," this is the document number "VBELN") must be specified in the filter. With generic access (*), the SAP business object is also expected. You can easily specify the ID of the SAP object using dynamic filters. In the Expert attributes, the following is also configured here:
-
The object ID is automatically converted to 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 a table name (e.g., BUS2032). Generic access using the * character is possible here if the text object is available via filters. The Datahandler returns the table "STXH," supplemented with two fields that contain the actual text. A long text is automatically generated using the text without formatting (the "TEXT_NORMAL" field) and with HTML formatting ("TEXT_HTML"). These fields can then be integrated into a view page as usual.
Permissions for Own Data Records for SAP External Data Groups
When working with external data, it is not easy to determine which of the available data sets are your own. We will use SAP order header data (table "VBAK") as an example to illustrate this issue and its solution. Depending on the portal user's context, this SAP table contains fields that can be used to identify specific records. From a customer's perspective, this is, for example, the SAP field "KUNNR," which must be populated with the customer's own customer number for "internal records." From the perspective of an internal employee, however, it could be the SAP field "ERNAM," which contains the SAP user ID of the person who entered the order. The second challenge is to identify the values to be verified in SAP (e.g., customer number, SAP username, or employee ID). The necessary mapping between the user logged in to the portal and the SAP value to be checked can be established in a variety of ways. The easiest way is to create your own attribute value using the Schema Manager in the "Users" module and to maintain values such as the SAP customer number there.
Such an attribute can be used, for example, as a filter value for view tables. This allows you to control access to SAP data in lists. However, the application permissions for data groups are not yet being evaluated here. This does not prevent users from navigating directly to a restricted detail page. This is where a concept called the "Permission Filter" comes into play. You can think of this effect as a permanent filter applied directly to the external data group, which is also used when displaying the detail pages and thus prevents unauthorized pages from loading. As an example, we will use a simple application that provides access to the SAP table "VBAK." Access is restricted through application permissions, as shown above. Your own data records are interpreted as "SAP data records that have the value from the user attribute BIASAP_KUNNR in the Client (KUNNR) field."
The "VBAK" SAP table is displayed here on the "All Entries" page. To do this, select the external data group "SAP Order Data" and the desired data fields in the properties of the view table. Next, create a filter that compares the "Client" data field—which contains the customer number in SAP—with the value from the user attribute "BIASAP_KUNNR."
Save and publish the application in the menu structure. Then determine the following GUIDs:
-
Application GUID
-
GUID of the page containing the table with the filter you just defined
-
GUID of the table in which the filter was defined
-
GUID of the SAP External Data Group
You can easily determine the GUIDs by pressing the F4 key when the respective element (or application node) is selected.
In the Intrexx portal directory, navigate to the "internal/application/store" folder. Open the folder whose name matches the application's GUID. Then navigate to the "structure/pages" folder. Open the XML file there—whose filename is the page's GUID—in a suitable editor (e.g., Notepad++). Close the application now. Unless you close the application, the changes made in the next step cannot be saved. In the "viewpage" section, search for the filter you just created. You'll find it below the "tablecontrol" section.
Cut the entire <filter>...</filter> section and keep it in the clipboard. Save and close the modified file. Navigate to the "structure/datagroups" folder and open the XML file there whose filename is the GUID of the SAP external data group. Insert the new "<permission></permission>" section here, before the "datafield" section. Paste the copied filter into the Permissions section.
Save and close the modified XML file. Then reopen the application in Intrexx. The filter in the view table's properties should no longer be there. Use the context menu of the external data group "SAP Order Data" to display the data fields.
The permission filter should now be visible below the data group.
Double-click the application node to open the application's properties, and then switch to the "Permissions" tab. Set the "Read Record (Own)" permission here. Save the application. After saving, all access to the data group and all associated 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 - Implementing Custom Processing Modules
API Description, Part 4 - Sample Code
Developer's Guide, Part 3 - Integration Scenario: Scripting
Developer's Guide, Part 4 - Personalized SAP Access / Single Sign-On (SSO)





























































































