Skip to Content
Author's profile photo Gregor Wolf

From Function Module to JCo Application – Part 2 of 3

Another discussion which was an initiator for this Weblog series was this BAPI_BUPA_CREATE_FROM_DATA + PARTNERCATEGORY in the Java Development about problems with a SAP Java Connector (JCo) application. So here is the next part of find, test and use RFC enabled Function Modules with JCo. I will cover now how we can test the function module in the SAP ABAP System before we start using it with JCo.

Test environment

Transaction SE37 is our test environment. We have used this transaction before to find our function module. Let’s go one step ahead and test it.

First test

  • Start the transaction SE37
  • Enter the function module name or select it via the search help (F4). We use BAPI_BUPA_CREATE_FROM_DATA for our example.
  • Press F8 for single test
  • Now enter the required Data. This function module’s mandatory fields are PARTNERCATEGORY and the structure CENTRALDATAPERSON.
  • Press F8 to execute
  • On the next screen you will get the result. In our case the Output Parameter BUSINESSPARTNER is filled with the new Business Partner Number.
  • Open a new SAP GUI session to check if the Business Partner was created
  • Start transaction BP
  • Enter the Business Partner Number which was the result of our function call

You will note that there was no Business Partner created. Why? This function call needs a transaction commit. This commit is done via the function module BAPI_TRANSACTION_COMMIT. The important point is, that this must be done in one session. So how can I do this in SE37?

Test sequence

  • Go back to the start screen of SE38
  • Press Shift+F8 and you will enter the test sequence modus of SE37
  • Now enter function modules you want to test in this sequence. I used BAPI_BUPA_CREATE_FROM_DATA and BAPI_TRANSACTION_COMMIT.
  • Press Enter to execute
  • Enter the required data for the Module BAPI_BUPA_CREATE_FROM_DATA
  • Press F8 to execute
  • If you like the result press F3
  • Now the next module is started
  • Run it with F8
  • Go to transaction BP again and search for the new number

Tip:If you want to save time entering test data, use the save icon on the data entry screen for the function module.

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.