Tuesday 8 January 2019

How to save import parameter values to RFM from external system

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.

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

(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

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

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

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

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

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

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

(8) Click on the “Test data directory” button

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

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

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

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

SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Guides

No comments:

Post a Comment