### SAP RFC Quickstart Source: https://community.simplifier.io/doc/current-release/integrate/connectors/create-and-manage-connectors A quickstart example for setting up and making a basic call to an SAP RFC connector. ```javascript const rfcConnector = Connector.get("MySAPRFCConnector"); // Example: Calling a simple RFC function like STFC_CONNECTION const result = rfcConnector.call({ functionName: "STFC_CONNECTION", parameters: { REQUTEXT: "Hello from Connector!" } }); console.log(result.ECHOTEXT); // Should output the same string sent in REQUTEXT ``` -------------------------------- ### SAP RFC Quickstart Source: https://community.simplifier.io/doc/current-release/integrate/connectors/simplifier-sap/sap-document Provides a quick start guide for using the SAP RFC connector. This is useful for establishing initial connections and understanding basic call structures. ```markdown ## SAP RFC Quickstart This guide will help you get started with the SAP RFC connector. Follow these steps to establish a connection and make your first RFC call. ### Prerequisites * SAP system accessible from your environment. * SAP NetWeaver RFC SDK installed and configured. ### Steps 1. **Create a Connector:** * Navigate to the 'Connectors' section in your application. * Click 'Create Connector' and select 'SAP RFC' as the type. * Fill in the required connection details (e.g., Application Server Host, System Number, Client, User, Password). 2. **Configure RFC Destination:** * In your SAP system, ensure the RFC destination is correctly set up for the user you are using. 3. **Make an RFC Call:** * Create a new 'Connector Call' and select your SAP RFC connector. * Specify the RFC Function Module name you want to call. * Define the Import, Changing, and Export parameters as required by the Function Module. ### Example: Calling a simple RFC Function Module Let's assume you have a Function Module `STFC_CONNECTION` which is a simple test module. **Connector Configuration:** * **Type:** SAP RFC * **Host:** `your_sap_host.example.com` * **System Number:** `00` * **Client:** `100` * **User:** `RFC_USER` * **Password:** `your_password` **Connector Call Configuration:** * **Connector:** `MySAP_RFC_Connector` * **Function Module:** `STFC_CONNECTION` **Import Parameters:** | Parameter Name | Type | Value | | -------------- | ------ | ------------ | | REQUTEXT | STRING | `Hello SAP` | **Export Parameters:** | Parameter Name | Type | Variable Name | | -------------- | ------ | ------------- | | RESPTEXT | STRING | `response` | After executing this call, the `response` variable will contain the result from the `STFC_CONNECTION` Function Module. ``` -------------------------------- ### Get Repository Output (FileSystem) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/content-repository Example output for retrieving a specific repository's details using the FileSystem provider. Includes ID, name, description, and permission details. ```json { "id": 3, "name": "MyRepo", "description": "My repo description", "permissionObjectType": "App", "permissionObjectID": "DummyApp", "provider": "FileSystem" } ``` -------------------------------- ### Get Repository Output (ClearFileSystem) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/content-repository Example output for retrieving a specific repository's details using the ClearFileSystem provider. Includes ID, name, description, and provider. ```json { "id": 3, "name": "MyRepo", "description": "My repo description", "provider": "ClearFileSystem" } ``` -------------------------------- ### Create Configuration Files Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/keyvaluestore-json-store-plugin Navigate to the Simplifier data directory and create the `jsonStore_include.conf` and `keyValueStorePlugin_include.conf` files. ```bash __ Copynano jsonStore_include.conf nano keyValueStorePlugin_include.conf ``` -------------------------------- ### List Repositories (ClearFileSystem) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/content-repository Example of how to list repositories when using the ClearFileSystem provider. This output includes repository details like ID, name, description, and provider. ```json { "repositories": [ { "id": 3, "name": "MyRepo", "description": "My repo description", "provider": "ClearFileSystem" } ] } ``` -------------------------------- ### Start Application with Specific Language Source: https://community.simplifier.io/doc/current-release/applications/localization/translate-language To start an application with a specific language, add the 'sap-ui-language' query parameter to the application URL. This example shows how to start an application in English. ```html https:///appDirect//index.html?sap-ui-language=en ``` -------------------------------- ### Get Repository Input (FileSystem) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/content-repository Example input parameter for getting a specific repository by its ID using the FileSystem provider. ```json { "id": 3 } ``` -------------------------------- ### Create KeyValueStore and JSONStore Databases (Default Setup) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/keyvaluestore-json-store-plugin Run these SQL commands within the MySQL console to create the necessary databases and grant privileges for the KeyValueStore and JSONStore plugins in a default Simplifier setup. ```sql __ CopyCREATE DATABASE ${DB_NAME}_keyvalue; GRANT ALL PRIVILEGES ON `${DB_NAME}_keyvalue`.* TO `simplifier`@`%`; CREATE DATABASE ${DB_NAME}_jsonstore; GRANT ALL PRIVILEGES ON `${DB_NAME}_jsonstore`.* TO `simplifier`@`%`; FLUSH PRIVILEGES; ``` -------------------------------- ### List Repositories Input (FileSystem) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/content-repository Example input parameter for listing repositories with the FileSystem provider. If no provider is specified, all repositories are returned. ```json { "provider": "FileSystem" } ``` -------------------------------- ### Convert XML to JSON in JavaScript Source: https://community.simplifier.io/doc/current-release/integrate/business-objects/create-business-objects/convert-xml-json Utilize the `xml-js` library to convert an XML string to a JSON object. Install the library using npm (`npm install xml-js`). This example demonstrates a direct conversion. ```javascript const convert = require('xml-js'); const xmlString = ` Alice 30 Bob 25 `; const jsonString = convert.xml2json(xmlString, { compact: true, spaces: 4 }); console.log(jsonString); ``` -------------------------------- ### Token Generation Example Source: https://community.simplifier.io/doc/current-release/integrate/connectors/create-and-manage-connector-calls Illustrates how to generate a token, often used for authentication with external services. This snippet is part of WebSocket communication setup. ```javascript function generateToken(payload) { // Logic to generate a secure token const token = "generated_token_" + Date.now(); return token; } ``` -------------------------------- ### Hello World Example Source: https://community.simplifier.io/doc/current-release/integrate/business-objects/create-and-manage-functions A basic 'Hello World' example demonstrating how to read an input parameter, construct a greeting, and set output parameters including success status and error messages. It highlights the use of a try-catch block for error handling. ```javascript output.message = "Hello " + input.name + "!"; output.success = true; ``` -------------------------------- ### List Repositories Output (ClearFileSystem) Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/content-repository Example output for listing repositories with the ClearFileSystem provider. This includes repository details like ID, name, description, and provider. ```json { "repositories": [ { "id": 5, "name": "MyRepo5", "description": "My repo description 5", "provider": "ClearFileSystem" }, { "id": 6, "name": "MyRepo6", "description": "My repo description 6", "provider": "ClearFileSystem" } ] } ``` -------------------------------- ### PDF Generation Output Source: https://community.simplifier.io/doc/current-release/extend/plugins/list-of-plugins/pdf-plugin/technical-call-pdf-plugin/start-pdf-generation Example of the JSON response received after successfully starting a PDF generation job. It contains the generated job ID and a success status. ```json { "value": { "jobId": "a1ef6b46-1671-425a-947c-d9e552d4e755" }, "success": true } ```