Skip to Content

Objective:  The object of this document is to show how to create the webrfc with all the steps. The webrfc can be use in SAP personas.

In this part 1 I will create the webrfc and in part 2 I will use the same on personas screen

  • Create Function Group
  • Create Function Module
  • Activate webrfc service
  • Internet Release the Function Module
  • Test the webrfc in internet browser

FM : This Function module will take the Input as Sales Order and will display the all the line items in HTML format.


Transaction code : SE80

01_SE80.JPG


Select the Function Group from the drop down enter the Function group name e,g ZPERSONAS_WEBRFC.

And press enter.


02_se80.JPG

Click ‘Yes’.

03_se80.JPG

Save the function group.


04_se80.JPG


To activate the Function group right click on the FG and then select activate.

  • Create Function Module: Transaction SE80 or SE37.

Here we will continue with SE80 only.


05_se80.JPG

Place the cursor on the FG and then click Create >Function Module



06_FM.JPG

Enter the function module name, FG, function module text and then save.

07_Fulll screen.JPG

Click o n Full screen On/Off to see the FM in full screen mode.

attribute.JPG

In the attribute Tab we can see the details about Function module as shown above.

Now click on ‘changing’ tab.

08_Changing.JPG

Maintain the changing parameter as shown above.

CONTENT_TYPE                              TYPE W3PARAM-CONT_TYPE      default ‘application/json’

CONTENT_LENGTH        TYPE W3PARAM-CONT_LEN

RETURN_CODE              TYPE  W3PARAM-RET_CODE


Click on Tables Tab:

09_tables.JPG


Maintain the table details as mention above.

Tables:

QUERY_STRING           LIKE W3QUERY

HTML                            LIKE  W3HTML

MIME                           LIKE   W3MIME

Click on Source Code Tab:

10_source.JPG

Add the logic in the source code.

Refer the attach text file for source code.

  • Activate webrfc service: For using the webrfc the service should be active.

       Transaction : SICF

11_sicf.JPG

Execute:

sicf exc.JPG

   12_isf2.JPG

If the webrfc is not active activate it by right click on webrfc and then select Activate service.

  • Internet Release the Function Module :

Transaction: SMW0

13_smw01.JPG

Internet Release > Function Module

14_smw02.JPG

Enter the Function module name and click on Release.

15_smw03.JPG

System will give the confirmation message.

The output of the Function Module should be in HTML format and the web rfc display the data as HTML page.

  • Test the webrfc in internet browser :

url :  http(s):<host>:port/sap/bc/webrfc?_FUNCTION=Function Module&_VBELN=Order no.

16_browser.JPG


We can see the output of webrfc as an html page, in part 2 of this document I will use this webrfc on personas screen.


Regards,

Zafar


Note : for the Function module source code refer the attach text file.



To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. srinivas karri

    Hi Zafar,

    Nice document and very informative.. i think you forgot to post the t-code SICF to activate service some of them they don’t know how the screen will get.. Any way keep sharing this kind of documents..

    Thanks & Regards,

    Srinivas.

    (0) 

Leave a Reply