[Scenario: In the simple example, we will be displaying the material and the material group of the material code passed as parameter in the HTTPS url. The output is a text output.
1) Create a function module if it is a new requirement else use the existing one.
The function module must have below parameters for this to work:
2) Release the function module.
3) Then release the function module for internet in transaction SMW0 using option displayed in below screenshot, (Internet release->Function Modules).
4) Activate WebRFC and provided login credentials in SICF: Path Server>SAP>bc>webrfc
Provide the user and password. This enables login to SAP system.
This step is not required if the node is already active and has the correct login credentials. This can be
achieved using SAML configuration as well.
5) The function modules can be called as explained below:
The function module must have below parameters for this to work:
2) Release the function module.
3) Then release the function module for internet in transaction SMW0 using option displayed in below screenshot, (Internet release->Function Modules).
4) Activate WebRFC and provided login credentials in SICF: Path Server>SAP>bc>webrfc
Provide the user and password. This enables login to SAP system.
This step is not required if the node is already active and has the correct login credentials. This can be
achieved using SAML configuration as well.
5) The function modules can be called as explained below:
http(s)://<your system>:<your port>/sap/bc/webrfc?
_FUNCTION=Z_WEBRFC_SAT&_Matnr=000000000008200006&_Name=<your userid>
For example
https://10.XX.XX.X/sap/bc/webrfc?
_FUNCTION=Z_WEBRFC_SAT&_Matnr=000000000008200006&_Name=SSHARMA.
_FUNCTION=Z_WEBRFC_SAT&_Matnr=000000000008200006&_Name=<your userid>
For example
https://10.XX.XX.X/sap/bc/webrfc?
_FUNCTION=Z_WEBRFC_SAT&_Matnr=000000000008200006&_Name=SSHARMA.
We can add additional parameters in the path using ‘&’ as separator after function module.
6) Output: The output on clicking the link will be as below if material passed as parameter exists.
7) We can use MIME for returning images or binary files.
7) We can use MIME for returning images or binary files.