UI PATH BAPI activity issue

Hi, I am trying to load data to SAP using SAP Invoke BAPI Activity, BAPI using is BAPI_ACC_DOCUMENT_POST. I am getting below error on the activity.
BAPI_ACC_DOCUMENT_POST: Object reference not set to an instance of an object.

Attached is the xaml and input file. Please let me know if anyone has solution for this. Thanks in advance.


Hello Sri,
welcome in the UiPath Forum.

Sorry, but I can’t find an attachment.

Is it possible for you to open the Invoke SAP BAPI activity and to see the parameters of the BAPI function module?

Best regards

Hi Stefan, Thanks for your response. i might have missed to attach the xaml files, sorry about that. please refer to attached files and to your question, yes i can see the screen.

BAPI.zip (160.2 KB)


Hello Sri,
that’s great that you see the screen, so you are connected to the SAP successfully.
As far as I can say looks your workflow very good.
The error “Object reference not set to an instance of an object” occurs also if a data type or the content of an input variable is wrong, e.g. the string OBJ_KEY with length 20 is greater as 20 characters. I assume this is the error in your case.
To analyze the details I propose that you build an easy test workflow, only with SAP Application Scope and Invoke SAP BAPI activity with the UiPath.SAP.BAPI.Activities 2.1.0. I hope this version gives you better hints to find the reason. You can find a detailed explanation here.
Let us know your results.
Thanks and best regards

Thank you Stephan for your suggestions. the issue is resolved after fixing datatype discrepancies.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.