Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member182379
Contributor
2,780

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


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

And press enter.


Click ‘Yes’.

Save the function group.



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.


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



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

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

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

Now click on ‘changing’ tab.

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:


Maintain the table details as mention above.

Tables:

QUERY_STRING           LIKE W3QUERY

HTML                            LIKE  W3HTML

MIME                           LIKE   W3MIME

Click on Source Code Tab:

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

Execute:

  

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

Internet Release > Function Module

Enter the Function module name and click on Release.

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.


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.



3 Comments
former_member210661
Active Contributor
0 Kudos

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.

former_member182379
Contributor
0 Kudos

Hi Srinivas,

  Thanks, I have done the required addition.

Regards,

Zafar

parvez9khan
Explorer
0 Kudos
Hi Zafar,

FM Source code file is missing

Thanks,

Parvez