Skip to content

Add SAP JCo connector documentation - #2364

Open
thuva9872 wants to merge 1 commit into
wso2:mainfrom
thuva9872:sap
Open

Add SAP JCo connector documentation#2364
thuva9872 wants to merge 1 commit into
wso2:mainfrom
thuva9872:sap

Conversation

@thuva9872

Copy link
Copy Markdown
Contributor

Purpose

$subject

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary

  • Added SAP JCo connector documentation covering prerequisites, installation, configuration, connection parameters, and supported operations.
  • Documented RFC/BAPI calls and IDoc exchange capabilities with usage examples.
  • Added the SAP JCo connector to the documentation navigation.

Walkthrough

Adds complete SAP JCo connector documentation covering its overview, compatibility, prerequisites, proprietary library installation, connection configuration, and execute, sendIDoc, and close operations. The new pages include XML examples and are linked from the connector reference navigation in mkdocs.yml.

Suggested reviewers: chanikag, anupama-pathirage, arunans23

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is still a template with placeholders and lacks the required concrete details for purpose, goals, approach, testing, and links. Replace the placeholders with real content for each required section, including purpose, goals, approach, user stories, release note, docs, tests, and security checks.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: adding SAP JCo connector documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md (2)

98-98: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use "Username" instead of "User Name".

Consider using the single-word compound "Username" as it is the more common convention.

📝 Proposed fix
-- **User Name** — your SAP user account name.
+- **Username** — your SAP user account name.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md`
at line 98, Update the “User Name” label in the SAP JCo connector configuration
documentation to the single-word “Username,” preserving the existing description
and formatting.

Source: Linters/SAST tools


45-47: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Specify a language for the fenced code block.

Specify a language (e.g., text) for this code block to improve rendering and resolve the markdownlint warning.

📝 Proposed fix
-```
+```text
 java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path: ...
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md
around lines 45 - 47, Specify the text language on the fenced code block
containing the UnsatisfiedLinkError example, changing the opening fence to use
text while preserving the error content.


</details>

<!-- cr-comment:v1:4c663cb88380b004eccbbf62 -->

_Source: Linters/SAST tools_

</blockquote></details>
<details>
<summary>en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md (1)</summary><blockquote>

`31-31`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_

**Hyphenate "open-source" when used as an adjective.**

Consider hyphenating "open-source" to improve grammar.





<details>
<summary>📝 Proposed fix</summary>

```diff
-As an open source project, WSO2 extensions welcome contributions from the community.
+As an open-source project, WSO2 extensions welcome contributions from the community.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`
at line 31, Update the adjective in the introductory sentence to use the
hyphenated “open-source” form, while preserving the rest of the sentence
unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`:
- Line 25: Resolve the broken SAP JCo Connector Example reference in the
overview documentation: either create the missing example page at the linked
destination with the expected content, or update/remove the link so it targets
an existing connector documentation page.

In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-reference.md`:
- Around line 149-165: Update the XML sample’s return-type element in the
sap_jco.execute configuration to use the documented returnType parameter name
instead of returnTypeDataType, keeping the sample consistent with the parameter
table.

---

Nitpick comments:
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md`:
- Line 98: Update the “User Name” label in the SAP JCo connector configuration
documentation to the single-word “Username,” preserving the existing description
and formatting.
- Around line 45-47: Specify the text language on the fenced code block
containing the UnsatisfiedLinkError example, changing the opening fence to use
text while preserving the error content.

In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`:
- Line 31: Update the adjective in the introductory sentence to use the
hyphenated “open-source” form, while preserving the rest of the sentence
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45f6fd24-fe73-4cf9-8709-6e924ea4325d

📥 Commits

Reviewing files that changed from the base of the PR and between 4bc4718 and 9f004c3.

📒 Files selected for processing (4)
  • en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md
  • en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md
  • en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-reference.md
  • en/mkdocs.yml


* **[Set up the SAP JCo Connector]({{base_path}}/reference/connectors/sap-jco-connector/sap-jco-connector-configuration/)**: This documentation explains how to obtain the SAP middleware libraries, install the native SAP JCo library, and configure a connection to an SAP system.

* **[SAP JCo Connector Example]({{base_path}}/reference/connectors/sap-jco-connector/sap-jco-connector-example/)**: This example explains how to use the SAP JCo Connector to call an RFC-enabled function module and to send an IDoc to an SAP system.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if the SAP JCo connector example page exists.

fd 'sap-jco-connector-example.md'

Repository: wso2/docs-mi

Length of output: 150


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== search for example page references =="
rg -n --hidden --glob '!**/.git/**' 'sap-jco-connector-example|SAP JCo Connector Example' .

echo
echo "== list matching markdown files =="
fd -t f 'sap-jco-connector-example.*|sap-jco-connector.*' en docs . 2>/dev/null || true

echo
echo "== inspect relevant connector docs files =="
fd -t f 'sap-jco-connector.*\.md$' en docs . 2>/dev/null | sed -n '1,20p'

Repository: wso2/docs-mi

Length of output: 1562


Remove or add the missing SAP JCo Connector Example link
en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md:25 points to sap-jco-connector-example/, but no corresponding page exists in the connector docs. Either add the page or update/remove the link.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`
at line 25, Resolve the broken SAP JCo Connector Example reference in the
overview documentation: either create the missing example page at the linked
destination with the expected content, or update/remove the link so it targets
an existing connector documentation page.

Comment on lines +149 to +165
<td>returnType</td>
<td>The data type of the operation response. Accepted values: <code>RfcRecord</code>, <code>xml</code>, <code>json</code>. The default value is <code>RfcRecord</code>.</td>
<td>No</td>
</tr>
</table>

**Sample configuration**

```xml
<sap_jco.execute configKey="SAP_CONNECTION">
<functionName>TEST_FUNCTION</functionName>
<importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters>
<returnTypeDataType>json</returnTypeDataType>
<responseVariable>sapExecuteResult</responseVariable>
<overwriteBody>false</overwriteBody>
</sap_jco.execute>
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Ensure consistency between the parameter table and the XML sample.

The parameter table defines the parameter as returnType, but the XML sample uses <returnTypeDataType>. Please update the sample to match the parameter name if this is a typographical error.

📝 Proposed fix
-        <returnTypeDataType>json</returnTypeDataType>
+        <returnType>json</returnType>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<td>returnType</td>
<td>The data type of the operation response. Accepted values: <code>RfcRecord</code>, <code>xml</code>, <code>json</code>. The default value is <code>RfcRecord</code>.</td>
<td>No</td>
</tr>
</table>
**Sample configuration**
```xml
<sap_jco.execute configKey="SAP_CONNECTION">
<functionName>TEST_FUNCTION</functionName>
<importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters>
<returnTypeDataType>json</returnTypeDataType>
<responseVariable>sapExecuteResult</responseVariable>
<overwriteBody>false</overwriteBody>
</sap_jco.execute>
```
<sap_jco.execute configKey="SAP_CONNECTION">
<functionName>TEST_FUNCTION</functionName>
<importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters>
<returnType>json</returnType>
<responseVariable>sapExecuteResult</responseVariable>
<overwriteBody>false</overwriteBody>
</sap_jco.execute>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-reference.md`
around lines 149 - 165, Update the XML sample’s return-type element in the
sap_jco.execute configuration to use the documented returnType parameter name
instead of returnTypeDataType, keeping the sample consistent with the parameter
table.


## Obtain the SAP middleware libraries

The SAP JCo (`sapjco3.jar`) and SAP IDoc (`sapidoc3.jar`) libraries are proprietary software owned by SAP SE. They **cannot be distributed publicly** and are therefore **not** bundled with this connector. You must obtain them yourself from the [SAP Support Portal](https://support.sap.com/en/product/connectors/jco.html).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The SAP JCo (`sapjco3.jar`) and SAP IDoc (`sapidoc3.jar`) libraries are proprietary software owned by SAP SE. They **cannot be distributed publicly** and are therefore **not** bundled with this connector. You must obtain them yourself from the [SAP Support Portal](https://support.sap.com/en/product/connectors/jco.html).
The SAP JCo (`sapjco3.jar`) and SAP IDoc (`sapidoc3.jar`) libraries are proprietary software owned by SAP SE. You must obtain them yourself from the [SAP Support Portal](https://support.sap.com/en/product/connectors/jco.html).


### Step 1: Add the JAR files to the classpath

Copy `sapjco3.jar` and `sapidoc3.jar` into the `<MI_HOME>/lib` directory. This folder is on the Micro Integrator classpath, so the SAP JCo Java classes are picked up automatically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copy `sapjco3.jar` and `sapidoc3.jar` into the `<MI_HOME>/lib` directory. This folder is on the Micro Integrator classpath, so the SAP JCo Java classes are picked up automatically.
Copy `sapjco3.jar` and `sapidoc3.jar` into the `<MI_HOME>/lib` directory.

- `sapjco3.jar` — Java classes, resolved via the **classpath** (Step 1 above).
- `libsapjco3.so` / `sapjco3.dll` / `libsapjco3.dylib` — the **native** library, resolved via the JVM's **`java.library.path`**, *not* the classpath.

Placing the native library in `<MI_HOME>/lib` is **not** sufficient — that folder is on the classpath but not on `java.library.path`. If the native library is missing from `java.library.path`, initialization fails with:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In docs, do we have to mention these internal details?

java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path: ...
```

In the instructions below, `<NATIVE_LIB_DIR>` is the directory where you extracted the downloaded native library. The native library architecture (for example, arm64 vs x86_64) must match the JVM's architecture. Pick **one** option per OS, then **fully restart** the Micro Integrator — native libraries load only once at JVM startup.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this as a note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants