Pushing IDocs from S3 to SAP
This project demos an upload from an S3 object into and SAP system as IDoc.
Connecting AWS resources to external systems (like SAP) requires some integration. To achieve this, we are using the following integration compontents.
- AWS S3 bucket to store the IDoc and trigger an upload event
- AWS Lambda to receveive the event, and push the IDoc data to Callable
- Callable to translate the incoming API request into JCO communication
To ease the setup steps, we are proving a AWS CloudFormation template, which already sets the required resources up.
The full project can be downloaded from GitHub https://github.com/callable-cloud/S3toIDoc.
How to deploy
Requirements before deploying:
- a running instance of Callable
- see deployment instruction AWS Fargate
- see deployment instruction GCP Cloud Run
- see deployment instruction Azure ACI
- an AWS account where you can deploy AWS CloudFormation templates
- an S3 bucket to host the deployment artifacts
- get the Idoc Reference from Callable
- open the Callable Resource Index in your browser
- the URI presented here is the Idoc reference used late on. e.g. “BUPAFS_FS_CREATE_FRM_DATA01/BUPA_FS_CREATE_FRM_DATA”
Proceedings:
- checkout the repository
- deploy the cloudformation template
aws cloudformation create-stack --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND --stack-name s3idoc \ --template-body=file://template.yml \ --parameters \ ParameterKey=CallableEndpoint,ParameterValue={Callable endpoint} \ ParameterKey=CallableUser,ParameterValue={Callable authentication user} \ ParameterKey=CallablePassword,ParameterValue={Callable authentication password} \ ParameterKey=IdocReference,ParameterValue={Callable IDoc reference}
How to use it
First, fetch the S3 bucket that is attached as Source Bucket.
aws cloudformation describe-stacks --stack-name s3idoc
{
"Stacks": [
{
"StackId": "arn:aws:cloudformation:eu-west-1:714738665598:stack/s3idoc/2b7deb10-3472-11ea-be5b-06ac9a67575a",
"StackName": "s3idoc",
...
"Outputs": [
{
"OutputKey": "IdocBucket",
"OutputValue": "s3idoc-idocbucket-12omcw159qbmq"
}
],
...
}
]
}
Now you can upload an Idoc in JSON format into the bucket.
The sample provided is a JSON which target the BUPAFS_FS_CREATE_FRM_DATA01/BUPA_FS_CREATE_FRM_DATA
IDoc.
aws s3 cp sampleidoc.json s3://s3idoc-idocbucket-12omcw159qbmq/
Now you can check in cloudwatch for the following log entries.
2020-01-15T09:45:45.036Z 87f8f67d-e0c4-4f43-a8e8-083f3f52f8ca INFO STATUS: 200
2020-01-15T09:45:45.037Z 87f8f67d-e0c4-4f43-a8e8-083f3f52f8ca INFO
{
"TID": "AC1F241E1CD05E1EDF480146"
}
That is it for now. If you need more integration let us know under contact@callable.cloud.