on 2022 Jun 14 10:20 AM
Greetings Everyone,
We try to load data from AWS (S3) into BW4HANA. We need to apply some logic in transformations and therefore require a python operator and then using the SAP Application Producer to write the entries directly into an adso on BW4HANA.
This is all working 100% when using any INT value, the moment a STRING value is used a data type mismatch error occur on the sap application producer.
Apologies for the lengthy details.
______________________________________________________________________
Sample Pipeline
Custom table created, to be able to map the fields in the structured operators.
A dynamic table option was tried, however as these tables are only “created” at runtime, the fields are not available for mapping for example in the Data Transform operator

Data Transform

SAP Application Producer

Python Script
counter=0
def gen():
global counter
tbl = []
tbl = [[counter+i,str(counter+i*1000000011)] for i in range(1,11)]
table = api.Table(tbl, "com.tbw.battery_part")
api.outputs.myDynamicPort.publish(table)
counter += 10
return 5
api.add_timer(gen)
Python Output Port

aDSO on BW4HANA

Error Message when executing

STEPS THAT are WORKING with only INT values
Data written into adso

Have anyone came across this, or have suggestions to try?
Thanks
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you James, I tried using the global tables, which did not had the options you suggested, when creating the table in the pipeline I could get the same options as in your screenshot with type string, that has worked.
Again thank you 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rudi -
Can you try to add the scalar type in the lower right panel of your graph then add it to the table definition?
See screenshot, it is located below the configuration panel on your source graph.

Once you define the scalar, you should be able to select it in your dropdown for Scalar Type ID in your version (I assume it is an on-premise version of DI)
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.