Code Generator for the Invoke Code Activity to use SAP RFC Function Modules Easily

@robert.wagner

Hello Robert,
thank you very much for your suggestions.

The current release contains …

  1. a cancel search button, to break a search as fast as possible.
    image

  2. a file called RFMCodeGen.Connection.xml to persist your connection data.

  3. in the status bar of the window the status of proceeding.
    image

  4. No, it is an AND clause, otherwise it would not make sense.

Best regards
Stefan

1 Like

A new release of RFM Code Generator is available. The new features are …

… the data element from a component of a structure is additionally determined now. This is on the one hand interesting to know and on the other hand necessary to know if the structure contains nested tables or structures.

… the possibility to export the information and structures as Microsoft Excel file.

Here e.g. the interface of RFC_READ_TABLE.

@LevKushnir Here I add the DefaultValue :slightly_smiling_face:

And here the different tables.

This structure follows exactly that of the UiPath SAP Accelerators.

You can find the link to the RFM Code Generator at the end of the first post of this thread.

3 Likes

I :heart: the new “Export to Excel” feature! Looks really good!

1 Like

After the global event about SAP API Automation with the help of UiPath I had a lot of discussions about the most common API use case in relation with SAP. It seems to be reading data from tables. Therefore I decided to extend the RFM Code Generator to support this possibility in a simple way.

The current release of the RFM Code Generator contains the possibility to generate code for the RFM RFC_READ_TABLE. In the tab ReadTable it is possible to select an SAP transparent table or an SAP view to get the data from it. Type the table or view name in the search field, wildcards are supported, and select with a double click the object you need.

After the double click you can find the name and available descriptions in the text field. And you see development class or package of the table. Below the list the sum of the length of all fields is displayed and the hint, that the RFM RFC_READ_TABLE return value must not exceed a length of 512 characters. In the list you see the fields of the table with its details.

It is possible to select the fields you need. This means that only the selected fields are considered when generating the code.

To generate code to use the table choose the programming language you want to use, C# or VBdotNET. Press the button “Generate Code” and now in the tab Code a code sequence is available.

With this option there is the possibility to create C# or VBdotNET code, for the Invoke Code activity, to read SAP data direct into a data table. On this way, with a few mouse clicks, a code sequence can be generated that reads data from an SAP table which can be used with UiPath.

You can find the link to the RFM Code Generator at the end of the first post of this thread.

3 Likes

Great evolution of the tool. Completely agree “Extract Data from Table” is the most required discipline. Thanks, @StefanSchnell !

1 Like

Thank you very much @LevKushnir :slightly_smiling_face:

The current version of the RFM Code Generator generates now, with the export of an Excel, an additional code frame, to handle the data in the Excel file. With this feature it is now possible to build your own SAP Accelerator fast.

The combination of the code to handle the RFM and the code to handle the data in the Excel file can be put together like two puzzle pieces.

2 Likes

Hello STefan! great tool!!! i love it! but unfortunately i can’t use because i use SS0 to login in SAP.
Exist a way to use it with ss0??

Thanks again Loris

1 Like

@StefanSchnell
Could you also please let us know how get excel workbook template for BAPI.
Like below.


Thank you.

@happyfeat87

Hello Happy,
sure, open the application and insert your RFM, in your case BAPI_PROFITCENTERGRP_CREATE.

image

Double click on the name in the list and press the button Generate Excel.

And therewith you get an Excel sheet with all preparations to use it as an SAP accelerator.

Best regards
Stefan

2 Likes

Thank you @StefanSchnell

1 Like

Hi @StefanSchnell .

Once we extract the Excel template for the BAPI, Can we use it in SAP foundation pack accelerators?

@happyfeat87

Hello Happy,
I had never tried that. Try it and post your results, sounds very interesting.
Best regards
Stefan

1 Like

Hi @StefanSchnell I tried it.
Getting this error.

My input template is
SRC_BAPI_KEYFIGURE_CREATEMULTIPLE.xlsx (13.1 KB)

Hi,

My organization requires signing in to the SAP system via SSO. Is there any example on what parameters that I should include in the Secure Network Communications fields:

Many thanks.
Regards,

Jordan C

Hello @Chang_Jordan,
you can find a detailed description of the parameters in the SAP .NET Connector Programming Guide. E.g. on page 43 the SNC Mode (SNC_MODE), SNC Library Path (SNC_LIB) or SNC My Name (SNC_MYNAME) and on page 45 the SNC SSO (SNC_SSO) etc. Also take a look at the discussion here.
Best regards
Stefan

Hi @StefanSchnell,

I have input the following information and i’m getting the below error as well. Are you able to advise what that error means?

Hello @Chang_Jordan,
it seems that you can not reach that remote IP and there can be a few reasons for that:

  • Wrong application server
  • Settings of the firewall
  • Ports are not open

Hint: As far as I know is it necessary to set the SNC Library Path to the sapcrypto.dll for outbound communication.

Best regards
Stefan

Hello @StefanSchnell .
We have a similar requirement.
We want to extract this templates/Excel but with data( Already existing in the SAP system).

This is for migration.
Is that possible?

Hello @dinesh.s1,
if I understand your requirement correctly you want to export data from SAP and save it in Excel so that it can be imported again, in the context of a migration. This code generator creates a program frame for the use of SAP remote enabled function modules. It is not possible to export data with it.
Best regards
Stefan