cancel
Showing results for 
Search instead for 
Did you mean: 

SAP EXECUTE snap returning blank output

minalbakore
New Contributor

Hello

I am new to SnapLogic and trying to develop a pipeline that reads data from SAP BW with a BAPI call and loads into a database. Currently I am facing issues as SAP BW EXECUTE snap is not returning anything in output.

minalbakore_0-1712917604963.png

This is the snap configuration.

With Mapper snap I am passing the input structure to the SAP EXECUTE snap. This is the input to the EXECUTE snap -

[{
"I_S_VAR_01L_CURRENCY_001":{
"LOW": "CHF",
"OPTION":"EQ",
"SIGN":"I"
}
}
]

Please suggest what could be wrong here.

Thanks

Minal

9 REPLIES 9

minalbakore
New 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. 

minalbakore_0-1713252440723.png

Error view:

minalbakore_1-1713252469176.png

 

minalbakore
New 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?

minalbakore_0-1713447247451.png

minalbakore_1-1713447318538.png

 

 

 

 

 

SpiroTaleski
Valued Contributor

@minalbakore 

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.   

minalbakore
New 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

isauerzapf
Employee
Employee

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.