cancel
Showing results for 
Search instead for 
Did you mean: 

how to call the next screen from HTML page

Former Member
0 Kudos

Hi guys,

I have craeted a module pool which has two screens (9000 and 9001 ). In 9000 PAI module I have written "leave to screen 9001" statement . I have included a button "FIND " in the screen so that when i click on this button the logic goes to 9001 screen,I have generated the HTML templates for two screens by going to utilities--> internet service template, of the each screen . I was able to execute this tcode from the web successfully.

Now what i did was i removed all the HTML code generated by the system and started writing my own HTML code for the screen 9000. I have used the input tag to create the input fields of the screen 9000. the code is as shown below

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

year : <input type = "text" name = "`YMOVIE-YYEAR`"/>

<br>

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

<br>

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

</p>

</form>

when i clcik on FIND button in the wen it gicing an error. when i analysed the dump in st22 it is saying that the template for the screen 9001 is not found. I think the function code "FIND" is not triggered in the screen 9000 when i clcik on the FIND button in the web. how do i trigger the next screen 9001 and pass the values to the screen 9001.

thanks in advance

sankar

Accepted Solutions (0)

Answers (3)

Answers (3)

ChrisSolomon
Active Contributor
0 Kudos

(1) yes

(2) All that means is you have a basic HTML "submit" button to submit (ie. send) your form back to ITS/SAP to take action on. In this case, it would send back the values the user inputted along with the FIND value for okcode. The backend program would then act accordingly (via some User Command like PAI function) and do it's thing.


<form name="formFind" action=”`wgateUrl()`” method="POST"> 
   year : <input type = "text" name = "`YMOVIE-YYEAR`"/> 
   category : <input type = "text" name = "`YMOVIE-CATEGORY`"/> 
   <INPUT TYPE="hidden" name="~okcode" value="FIND">
   <INPUT TYPE="submit" name="btnSubmit" value="Find"> 
</form>

If you do not understand the form, input, and/or submit tags and types, I suggest reading/studying a basic web development class/tutorial...that's just classic web dev 101 stuff.

Former Member
0 Kudos

Hi Christopher,

thanks for your reply

(1) make a hidden input field named ~OKCODE with a value of FIND

for the first point i have written the code like this

<INPUT TYPE= "hidden" name="~OkCode" value = "FIND"> ( is it Ok??)

(2) Make your button a simple SUBMIT type button named "Submit" or whatever you want to call it (ie. "Find)

I could not understand it. Please give me the sample code for the second point.

ChrisSolomon
Active Contributor
0 Kudos

You should change your logic somewhat....

(1) make a hidden input field named ~OKCODE with a value of FIND

(2) Make your button a simple SUBMIT type button named "Submit" or whatever you want to call it (ie. "Find)

Then, when your form is submitted, it will pass the okcode of FIND to your screen 9000 as PAI that will then act accordingly.