cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a BAPI from web page

Former Member
0 Kudos

Hi experts,

I have a requirement that the user enters the input he wishes to call from a web page. BAPI i'm calling Z_BAPI_FM_01. I'm using JCO connector. In my web page i have created on one label, text box and a command button. Now my requirement is on clicking the command button how can i connect it to the BLS for executing the transaction. Please guide me.

Regards

Vinodh

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Vinodh,

Use a command query on your webpage. Create an Xacute query (wrapper around a transaction) using the transaction you created. Use the Xacute query as the query template for your command query. Execute the commnand query with a submit button or something similar. There are a number of examples in the Function Module templates (check the MM ones for the javascript, html, xacute queries, and BLS transactions to use as templates) available in the SDN MII wiki. There are other examples there as well in other downloadable projects (Batch Manufacturing, for one).

Good luck,

Mike

jcgood25
Active Contributor
0 Kudos

Vinodh,

By command query, what Mike was trying to say was to use an iCommand applet on your page: http://help.sap.com/saphelp_mii121/helpdata/en/44/d908d1d06f3ee2e10000000a114a6b/frameset.htm

Although the example provided in the help documentation (http://help.sap.com/saphelp_mii121/helpdata/en/44/d91a15d06f3ee2e10000000a114a6b/content.htm) is for an SQL query, the concept is very transferrable to your needs.

Regards,

Jeremy

Former Member
0 Kudos

Hi Michael,

Thanks for your reply. You understood my query exactly. I want to know, how i could pass the value entered in text box to bls where i have a i/p variable. Kindly help me pl. And how to create a command query.

Former Member
0 Kudos

Hi,

Please have a look into SAP MII help.

[http://help.sap.com/saphelp_mii121/helpdata/en/43/e80b59ad40719ae10000000a1553f6/frameset.htm]

HTML Code for Command query

<APPLET NAME="Command" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="0" HEIGHT="0" MAYSCRIPT>

</APPLET>

Java script Code

//load query into command query

document.Command.setQueryTemplate(querypath);

//set parameter

setCommandParam(1, "value");

//execute your query

document.Command.executeCommand();

Regards,

Manoj Bilthare

Former Member
0 Kudos

Thank you all for the replies. I completed my work with the help of documentation and sample code given by Manoj.

0 Kudos

hi,

u can to select query templetes and u need to use sql query (select ,insert , update , delete ) or to do in command buttons use html or java script in ur front page , by that u can.

Answers (0)