Error when calling a Function Module or BAPI

Error:

When calling a Function Module (FM) or BAPI no error or no value is returned.

Reason:

This could have many reasons. Here are some of them:

  • No leading zeroes in FM Import Parameters 
  • Date Format is wrong
  • Missing Parameter
  • BAPI needs Commit
  • No authority to run FM

Solution:

  • Fill in the values with leading zeroes. E.g. MATNR (18 Chars). Wrong: 424642456. Correct: 000000000424642456.
  • Date Format must be in the SAP internal format. Wrong : 13.01.2014. Correct: 20140113.
  • Some BAPIs need a Commit after the call to finish the execution of the BAPI: You can find an example in the Knowledge Base Article Post Goods Movement.
  • Check if you have the authority to run this FM. Some FM in SAP return no error message after a not successful authority check.

We recommend also first to run the FM/BAPI in SAP in the T-CODE SE37 to check the needed parameters with the same user as in the .NET Code. But leading zeroes and other formats are not considered in the SE37.
Creation date: 5/26/2022 7:06 PM      Updated: 8/25/2022 2:03 PM