Forum Discussion
Hi @darshthakkar,
After parsing the file try using a filter with the following expression $ != {}
.
Let me know if this helps,
BR,
Aleksandar.
- SpiroTaleski2 years agoValued Contributor
Looking at the BAPI, I assume it is a custom BAPI/function developed.
Have you tried to test the BAPI within SAP, by passing the same input parameters and check if the BAPI returns something?
- minalbakore2 years agoNew Contributor
Yes, the same function is used in another application where its working fine. We are now trying to replicate the same on Snaplogic. We are also using the same credentials that are used in other application to access SAP BW system. Is there anything wrong with the way input parameters are passed from SNaplogic? Is there any other format that should be followed when calling SAP BAPI ?
- SpiroTaleski2 years agoValued Contributor
It could be the input parameters, or it could be that there is no data for the given input parameters.
In terms of input parameters. If you connect the upstream Mapper Snap to SAP Execute and validate, you will be able to see the input schema/parameters that SAP Execute(BAPI) snap is requiring.
From there you will be able to properly construct the schema.
- JensDeveloper2 years agoContributor II
Hi minalbakore ,
What SpiroTaleski suggested could be the solution. when I work with SAP snaps I also use the validation to see what they expect from input schema/parameters.
What I happen to use also in some use cases is to enable the check box 'Commit after BAPI execute' , so we end the statefull session and commit. - minalbakore2 years agoNew Contributor
Thanks, I checked as per your suggestions and input parameters are correct.
There is another issue, in some cases the Snap is failing with error - com.snaplogic.snap.api.SnapDataException: Invalid data value(s)'.
Error view is enabled but again, its not returning anything in the output.
Error view:
- minalbakore2 years agoNew Contributor
Hi All,
Thanks for the suggestions provided so far. Its really helpful.
After further analysis, we found that the SAP BW system doesn't have data for the input selection that's the reason output was empty when called from SnapLogic. So its fine.
But now I am facing another issue, when calling one of the BAPIs, I am getting error as 'Invalid field value ORGUNIT_KEY for type Type Number'
One field is defined as 'Number' in BAPI definition, but it has some records with '#' value. Due to this SAP Execute snap is failing in SnapLogic. I tried using Type Converter snap but its not working.
What can be done in this case? Is there any other way to handle this?
- SpiroTaleski2 years agoValued Contributor
Glad to hear that you find the reason for the first "issue".
About this one, to me it looks like that the SAP Execute Snap is expecting String for the input parameter "ORGUNIT_KEY".
So, try to convert ORGUNIT_KEY as String either using Type Converter Snap or in a Mapper Snap, before the SAP Execute Snap, using to string function.
- minalbakore2 years agoNew Contributor
Hi All,
Issue was due to wrong data type of the data that was being returned by the BAPI. In this case field ORGUNIT_KEY was numeric however BAPI was returning it as # so this was failing in SnapLogic. It was resolved after correcting the code on SAP to return numeric data type value.
Thanks
Minal
- isauerzapf2 years agoEmployee
Like SpiroTaleski and JensDeveloper suggest putting a Mapper Snap in front and then validating will show you the interface of the RFC and you can do the mapping there as well. Your RFC is custom built, (starts with a Z*) and therefore replicating your issue somewhere else will not be possible.
If you can use Transaction SE37 in the SAPGui and execute the Function Module there to make sure you know what Input/Table fields have to be filled. Also, some input fields of RFC and BAPIs require leading zeros if you call them from outside.