BAPI Functionality in UI Path

Hi expert, I am not able to install the SAP BAPI Activity Package
Even I installed the prerequisite software SAP Connectors and Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
And I select the given option as mentioned in the documents. Can you please help on this.
@loginerror @StefanSchnell @Susana @venkat4u

image

@loginerror @Pablito

Hello Pawel and Maciej,

I tried your actual SAP BAPI Automation Activities 2.1.0 and it was great :star_struck:

The new interface is much more better as the additional button in the ribbon from the version before, and the generation of necessary variables is absolut easy. To use SAP BAPIs is now so simple.

Bring my best thanks to your developer team, fantastic work. :+1::+1::+1:

Best regards
Stefan

2 Likes

Dear Stefan,

I am trying to retrieve data from BAPI_CUSTOMER_CHANGEFROMDATA.

Could you please post an example how to do this? I looked hard but did not really found any examples with the newer version of the BAPI activities and I am quite new on these grounds.

Thank you in advance for any help!

Regards,
Bálint

1 Like

@Balint1367

Hello Balint,
welcome in the UiPath Community.

I don’t have an example for BAPI_CUSTOMER_CHANGEFROMDATA, but here an example with BAPI_BUPA_ADDRESSES_GET. At first it is necessary to set an application scope, in this scope place the Invoke SAP BAPI activity. Configure the scope and test your connection. In the password property set (new System.Net.NetworkCredential(“”, “YourPassword”)).SecurePassword. Configure now your BAPI Remote Function Module (RFM).

Parallel you can call in your SAP system the transaction code BAPI.

Choose your BAPI and double click on the function module.

Press F8 to execute the BAPI RFM.

Set in the input fields your parameters, in my case I use only the BUSINESSPARTNER number. Press F8 again.

Now you see the results of the BAPI call in the export parameters the STANDARDADDRESSNUMBER and GUID and in the tables section different entries.

Now set in your BAPI configuration your variables.

The call of the BAPI from UiPath delivers the same results.

You see the same STANDARDADDRESSNUMBER in the variable ADDRNUM. And in the data table ADDR you can find the same entries as in the table ADDRESSES from the SAP RFM call.

If you need an entry from the data table you can use this…

008

…or an ForEach loop.

Hope this tiny instruction helps you to understand better how the SAP BAPI activity from UiPath works.

Best regards
Stefan

3 Likes

Hi,

I am developing an example with FM RFC_READ_TABLE. Everything is working fine but I am not able to handle the exceptions.

If I use exception type “System.Exception” is catching the error. The problem is that the information provided, it is not the exception from SAP.

I have also tried with these ones but unfortunataly it doesn’t stop there.

Is there any way to catch an exception coming from SAP with the message info?

Thanks in advance,
Alejandro

@Alejandro_Montero

Hello Alejandro,
BAPIs and RFMs are different. It is not allowed to use exceptions in a BAPI interface. If an error occurs a BAPI offers the BAPIRET1 or BAPIRET2 structure in the return table. As far as I can see the exception message is written to the trace and a System.Exception is thrown, as you described. In my opinion it is not a valid way to call a RFM via an BAPI interface. Use NCo instead like I described here.
Best regards
Stefan

Hi @StefanSchnell,

thanks very much for your fast reply. I will try your suggestion.
Anyway I am fitter in ABAP so I think I would create a RFM wrapper for the RFM and I will pass the exception as string parameter.

Best Regards,
Alejandro

Hello everyone, how are you?

I have executed the process for install de UiPath SAP BAPI Functionality, but I have the resolt as follows:

I think that I’m doing something wrong, can anyone help me?

HI

Please follow the documentation https://docs.uipath.com/activities/docs/about-the-sap-bapi-activities-pack

Best regards, Lev

2 Likes

Hello Experts,
how are you al?

Do UiPath have some academi for BAPI Functionality in UI Path or more instructions?

Regards,

Hello Everyone,

I am unable to find SAP.BAPI.Activties package on Enterprise V 2019.1. Please help on how to get this package.

HI @Digendra_Singh

All packages are always available in Manage Packages

Choose any version you like.

I would recommend to use the latest one.

Best regards, Lev

Hi LevKushnir,

I want to know the link where I can download package directly instead of using Manage package option.

I gave you the official way to get the package

@StefanSchnell

Could you please send me this sample workflow. I am getting object reference error while executing this workflow with all necessary details. I am using 2.2 BAPI activity

Thanks in Advance,
Deepika Y

@Dpuraj

Hello Deepika,
here the sequence.xaml, I tried it with 2.2.1 BAPI activity and it works without any problems.

Best regards
Stefan

Sequence.xaml (20.4 KB)

2 Likes

Hi. I remember how much I struggled with BAPIs when I first started. I used the one for goods receipt posting and I created a step-by-step tutorial about it, with all prerequisites on both UiPath and SAP side, implementation steps and some of the encountered issues and errors - hope it helps:

4 Likes

hi @gabi_verzea

Amazing guide! Easy to use, easy to understand! Cool stuff!

Thanks for your effort

Best regards, Lev

1 Like

thx a lot ! hope it would help as many people as possible, that struggle with this topic

3 Likes

Hello Stefan,

I’m using uipath:

but i can’t find the package: UiPath.SAP.BAPI.Activities,