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: 

Introduction:


The intent of this blog is to show how to save the values being imported to parameters of a remote-enabled function module (RFM) as Test Data when it is called by an external system. Saved data can then be retrieved via the "Test Data Directory" screen of the function module. Note that this could also be done for a function module that is being called internally; however, this blog will outline an example of data coming from WebMethods to BAPI_PO_CREATE1 in an S/4 system.

Intended Audience:


Understanding that the functionality exists to capture values being imported to a RFM is good knowledge for all SAP resources to have... ABAP, configuration specialist, tester, et al. So, this blog is intended for everyone to read; however, some users may not be able to carry out all the necessary steps due to limited authority.

Prerequisites:


Setting a Break-point

Before attempting to capture the import parameter values from an external system, you will need to stop the processing on the RFM being called. This can be done by stopping a work process in SM50 and debugging the program, or in some cases by simply setting an external break-point on the RFM. (An ABAP resource can help this step.)

♦ Tip: If debugging via SM50, and if dynamic RFC load distribution for a logon group has been activated, then each application server in the logon group will need to be monitored for the incoming call. Transaction SM51 will allow you to see and navigate to each of the active application servers.

Authorization

The following authorization will be required:

  • Authorization object S_TCODE, Field TCD, Value = SE37 (ABAP Function Modules)

  • Authorization object S_DEVELOP, Field ACTVT, Values = 03 (Display), 16 (Execute)


If stopping the inbound interface via SM50 is necessary, then the some additional authorization is required:

  • Authorization object S_TCODE, Field TCD, Value = SM50 (Work Processes of AS Instance)

  • Authorization object S_ADMI_FCD, Field S_ADMI_FCD, Value = PADM (Process administration using trans. SM04, SM50)


Steps:


(1) Trigger external interface so that the external break-point in the RFM is hit. (Or debug via SM50 to get into the RFM.)

(2) Ensure that the Variable Fast Display tool screen is visible.



(3) Click on the "Services of the Tool" icon (wrench and hammer) on the Variable Fast Display screen to get the "Variable Fast Display Services" popup

(4) Select the "Save Parameters as Test Data (SE37)" option, and click on the green continue button



(5) Give the Test Data a name, and click on the green continue button



 

(6) Allow the RFM to complete by pressing F8, and then return to the SE37 screen.

(7) Click on the Test/Execute icon (F8)



(8) Click on the "Test data directory" button



(9) Double-click on the Short Text of the test



(10) The values sent from the external system are now visible in the Import Parameters and Tables sections of the RFM.



 

Conclusion:


Learning how to capture the incoming parameters to a RFM can be extremely helpful; especially if you are having trouble with an interface and need to debug. So instead of running an interface over and over, and continually changing parameters in the source system to see if it changes the end results in SAP, just follow the above steps, and then practice changing the values via SE37 and re-running the function module. Once the problem is figured out in SE37, then return to the source system and make the changes.