cancel
Showing results for 
Search instead for 
Did you mean: 

how to trigger function codes from the web

Former Member
0 Kudos
111

Hi

I am using integrated ITS i have developed a simple module pool and an internet service for the transaction . I have modified the standard HTML tempate generated by system and inlcuded my code. The program contains only one screen where i input two data and click on "FIND" button. in the same screen results will be displayes. I will enter the year and category fields in the screen. the result will be the winner and nominees for the category.

the HTML code for the screen is as below.

`include(~service="bbpglobal", ~name="bbpfunctions.html")`

<html>

<head>

</head>

<body>

<form action=&#8221;`wgateUrl()`&#8221; method = "POST">

year : <input type = "text" name = "YMOVIE-YYEAR" value= "`YMOVIE-YYEAR`" size = "`YMOVIE-YYEAR.maxsize`"/>

<br>

category : <input type = "text" name = "YMOVIE-CATEGORY" value = "`YMOVIE-CATEGORY`"/>

<br>

<br>

<INPUT TYPE="submit" name="~OkCode(FIND)" value = "FIND">

<input type = "text" name = "YMOVIE-WINNER" value= "`YMOVIE-WINNER`" size = "`YMOVIE-WINNER.maxsize`"/>

<input type = "text" name = "YMOVIE-NOMINEE1" value= "`YMOVIE-NOMINEE1`" size = "`YMOVIE-NOMINEE1.maxsize`"/>

<input type = "text" name = "YMOVIE-NOMINEE2" value= "`YMOVIE-NOMINEE2`" size = "`YMOVIE-NOMINEE2.maxsize`"/>

<input type = "text" name = "YMOVIE-NOMINEE3" value= "`YMOVIE-NOMINEE3`" size = "`YMOVIE-NOMINEE3.maxsize`"/>

</form>

</body>

</html>

The code in the PAI of the screen is as follows:

if sy-ucomm = 'FIND'.

SELECT SINGLE * FROM YMOVIE

WHERE YYEAR = YMOVIE-YYEAR

AND CATEGORY = YMOVIE-CATEGORY.

endif.

ENDMODULE.

when I clcick on FIND button from the web the system is giving an error saying that the template not found. But I have created the template and inlcuded the service in SICF. I think the problem lies in how i am trigerring the fcode FIND from the web.

Please adivse.

thanks

sankar

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

it should be something like below

<html>
<head>
  <title>`~windowtitle`</title>
</head>
<body>
  `~messageline`
  <form method="post" action="`WGateURL()`">
  <p>
  <input type=submit name="~OKCode=FIND" value="FIND">
  </form>
</body>
</html>

Raja

Answers (3)

Answers (3)

Former Member
0 Kudos

HI raja

i have downloaded the http watch from the link given by you but it seems it is a trail version . when i tried to record it is saying that "extended information for this URL is not supported".

thanks

sankar

athavanraja
Active Contributor
0 Kudos

just start httpwatch and run your transaction and you will see all the http requests are being made just copy those portion and mail it to me (my mail id is the SDN business card) if the log is small post it here else mail it to me

Regards

Raja

Former Member
0 Kudos

HI

I am able o execute the module pool perfectly. I have removed the susyem generated HTM code and want to design my own template . In this process I need to trigger the function code FIND in the module pool from the web and pass the input values to the corresponding R/3 screen .

Hoe do i achieve that . what code needs to be eritten??

Please advise

thanks

sankar

athavanraja
Active Contributor
0 Kudos

install HTTPwatch and in your browser before clicking the FIND button activate the HTTPwatch and see what URL the system is trying to access. that may give some clue.

http://www.httpwatch.com/download/

Regards

Raja

Former Member
0 Kudos

Hi Raja

thanks for your reply

I followed your instructions but it did not work the system is thrwing the error saing that " Template interpretation failed. Template does not exist ". is there anything wrong in the PAI of the screen . I have given the code in my first posting.

Please advise.

thanks

sankar

Former Member
0 Kudos

Hi Sankar,

Are you able to execute the module pool program successfully?

Regards,

Krishna