All Projects → dhorions → jcoSon

dhorions / jcoSon

Licence: Apache-2.0 license
Json api for SAP JCO ( SAP Java Connector 3.x)

Programming Languages

java
68154 projects - #9 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to jcoSon

ydocker
[unofficial PoC] get, build, initialize and run SAP Hybris Commerce Suite inside Docker container
Stars: ✭ 28 (+33.33%)
Mutual labels:  sap
btp-business-application-studio
Markdown source for the SAP Business Application Studio documentation. Enables feedback and contributions to improve the documentation.
Stars: ✭ 16 (-23.81%)
Mutual labels:  sap
trento
An open cloud-native web console improving on the work day of SAP Applications administrators.
Stars: ✭ 35 (+66.67%)
Mutual labels:  sap
SITreg
SAP Event Registration app backend
Stars: ✭ 26 (+23.81%)
Mutual labels:  sap
openui5-tour
OpenUI5 Tour enables an user-friendly way to showcase products and features in your website.
Stars: ✭ 21 (+0%)
Mutual labels:  sap
ABAP-Library
Useful ABAP code snippets
Stars: ✭ 118 (+461.9%)
Mutual labels:  sap
cds-pg
PostgreSQL adapter for SAP CDS (CAP)
Stars: ✭ 84 (+300%)
Mutual labels:  sap
abap-data-validator
A data validation tool.
Stars: ✭ 28 (+33.33%)
Mutual labels:  sap
lumira-extension-viz
lumira
Stars: ✭ 84 (+300%)
Mutual labels:  sap
sapui5-cli
Simple CLI to scaffold SAPUI5 / OpenUI5 projects.
Stars: ✭ 17 (-19.05%)
Mutual labels:  sap
JSON2ABAPType
Creator of ABAP types on a base of JSON structure
Stars: ✭ 40 (+90.48%)
Mutual labels:  sap
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+126371.43%)
Mutual labels:  sap
CVE-2018-2380
PoC of Remote Command Execution via Log injection on SAP NetWeaver AS JAVA CRM
Stars: ✭ 55 (+161.9%)
Mutual labels:  sap
eui
Easy UI in SAP
Stars: ✭ 34 (+61.9%)
Mutual labels:  sap
abap mustache
Mustache template engine for ABAP
Stars: ✭ 14 (-33.33%)
Mutual labels:  sap
ABAPFavorites
ABAP Favorites Eclipse Plugin
Stars: ✭ 23 (+9.52%)
Mutual labels:  sap
fedramp-automation
FedRAMP Automation
Stars: ✭ 175 (+733.33%)
Mutual labels:  sap
Simple-Data-Explorer
Simple Data Explorer
Stars: ✭ 37 (+76.19%)
Mutual labels:  sap
SAP vulnerabilities
DoS PoC's for SAP products
Stars: ✭ 47 (+123.81%)
Mutual labels:  sap
cloud-sdk
The SAP Cloud SDK documentation and support repository.
Stars: ✭ 29 (+38.1%)
Mutual labels:  sap

jcoSon

Json api for SAP JCO ( SAP Java Connector 3.x )

This will allow you to call SAP BAPIs and function modules using json.
Both the parameters you pass to the function modules and the results you get back will be in json format.

Examples :

  1. Pass simple values to a BAPI
{
  "BANKKEY": "083000108",
  "BANKCOUNTRY": "US"
} 
jcoSon jco = new jcoSon(destination.getRepository().getFunction("BAPI_BANK_GETDETAIL"));
jco.setParameters("{\"BANKKEY\":\"083000108\",\"BANKCOUNTRY\":\"US\"}");
String resultJson = jco.execute(destination);
System.out.println("Results :"+ resultJson);
{
  "BANK_ADDRESS": {
    "BANK_NAME": "First Union Bank & Trust",
    "REGION": "IL",
    "STREET": "500 Main Street",
    "CITY": "Chicago",
    "SWIFT_CODE": "",
    "BANK_GROUP": "",
    "POBK_CURAC": "",
    "BANK_NO": "083000108",
    "POST_BANK": "",
    "BANK_BRANCH": "Main Office",
    "ADDR_NO": ""
  },
  "BANK_DETAIL": {
    "CREAT_DATE": "Fri Jan 03 00:00:00 CET 1997",
    "CREATOR": "GRAVEN",
    "METHOD": "",
    "FORMATTING": "",
    "BANK_DELETE": ""
  }
}

2.Pass Structure to a BAPI

{
  "USERNAME": "TESTUSER",
  "ADDRESS": 
  {
    "FIRSTNAME": "New First Name"
  },
  "ADDRESSX": 
  {
    "FIRSTNAME": "X"
  }
 } 
jcoSon jco = new jcoSon(destination.getRepository().getFunction("BAPI_USER_CHANGE"));
jco.setParameters("{\"USERNAME\":\"TESTUSER\",\"ADDRESS\":{\"FIRSTNAME\":\"New First Name\"},\"ADDRESSX\":{\"FIRSTNAME\":\"X\"}}");
String resultJson = jco.execute(destination);
System.out.println("Results :"+ resultJson);
{
  "RETURN": [
    {
      "TYPE": "S",
      "ID": "01",
      "NUMBER": "039",
      "MESSAGE": "User TESTUSER has changed",
      "LOG_NO": "",
      "LOG_MSG_NO": "000000",
      "MESSAGE_V1": "TESTUSER",
      "MESSAGE_V2": "",
      "MESSAGE_V3": "",
      "MESSAGE_V4": "",
      "PARAMETER": "",
      "ROW": 0,
      "FIELD": "",
      "SYSTEM": "XXXCLNT000"
    }
  ]
}

3.Pass Table to a BAPI

{
            "QUERY_TABLE": "USR02",
            "DELIMITER": ",",
            "OPTIONS": [
              {
                "TEXT": "BNAME LIKE 'TEST%'"
              }
            ],
            "FIELDS": [
              {
                "FIELDNAME": "BNAME"
              },
              {
                "FIELDNAME": "CLASS"
              }
            ]
          }
jcoSon jco = new jcoSon(destination.getRepository().getFunction("RFC_READ_TABLE"));
jco.setParameters("{\"QUERY_TABLE\":\"USR02\",\"DELIMITER\":\",\",\"OPTIONS\":[{\"TEXT\":\"BNAME LIKE 'TEST%'\"}],\"FIELDS\":[{\"FIELDNAME\":\"BNAME\"},{\"FIELDNAME\":\"CLASS\"}]}");
String resultJson = jco.execute(destination);
 System.out.println("Results :"+ resultJson);
{
  "DATA": [
    {
      "WA": "TESTUSER     ,DEVELOPER"
    },
    {
      "WA": "TEST_001    ,TEST"
    },
    {
      "WA": "TEST_001    ,TEST"
    }
  ]
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].