Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
gregorw
Active Contributor
0 Kudos

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.
  • I've filled in PARTNERCATEGORY = 1 and CENTRALDATAPERSON-FIRSTNAME = 'Gregor' CENTRALDATAPERSON-LASTNAME = 'Wolf'
  • 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.