on 12-05-2005 6:11 PM
Hi,
I would like to execute SAP transaction as a new window in IAC objet which is composed of template and MODULE POOL.
I transferred personnel number to javascript function using `PERNR-PERNR`. But without PAI, I can't transfer changed value. For now user must hit enter to transfer another value since PBO and PAI. Is there any way not to hit enter key ?
For example, I know general web form supports this function. But I need to use search help at this input value. That's why I can't use form and input clause.
And I know SAP support ~searchhelp function. That does not look good to user.
To sum up, Problem is to transfer HTML template's SAP input value to javascript value. I transfer value `PERNR-PERNR` for now.
What I would like to transfer is the webguiform's value instead of `PERNR-PERNR` like webguiform.PERNR-PERNR[1].value.
This value "webguiform.PERNR-PERNR[1].value" comes up when I see template's source.
Thanks in advance.
Template source as follows:
`include(~service="system", ~language="", ~theme="dm", ~name="TemplateLibraryDHTML.html")`
`SAP_TopInclude()`
`function WebPathPrefix()
if (strncmp(wgateURL(), "/cgi-bin", 😎 == 0)
return("cgi-bin")
else
return("scripts");
end;
end;`
<html>
<head>
`SAP_PageTitle()`
`SAP_Stylesheet()`
`SAP_JavaScript()`
<style>.{font-size: 12pt;}</style>
<script language="JavaScript">
function new_win(){
var w_address ;
w_address = "http://`HTTP_HOST`/`WebPathPrefix()`/wgate/webgui/!?transaction=ZRXHR432_EP&~OkCode=EXEC&PERNR-PERNR=" + "`PERNR-PERNR`" ;
w_address = w_address + "&client=`write(client)`&language=`write(language)`" ;
win_prop = "left=0, top=0, height=600, width=800, status=no, menubar=no, resizable=yes, fullsize=yes, channelmode=no, scrollbars=yes";
window.open(w_address,'',win_prop);
};
</SCRIPT>
</head>
<body `SAP_BodyAttributes()` onload="`SAP_OnloadJavaScript()`">
`SAP_BodyContentBegin()`
`SAP_FormBegin()`
`SAP_DynproLayerBegin(002,001,010,001)`
`SAP_Button("EXEC", <b>onclick="new_win();")`</b>
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(004,004,015,001)`
`SAP_Label("PERNR-PERNR")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(024,004,015,001)`
`SAP_Inputfield("PERNR-PERNR")`
`SAP_DynproLayerEnd()`
`SAP_FormEnd()`
`SAP_BodyContentEnd()`
</body>
</html>
Message was edited by: Sunki Bae
Message was edited by: Sunki Bae
Hiya,
I can't see why this shouldn't work. However, I think the problem might be that you are using the SAP include templates for your styling (ie SAP_BUTTON), because these will automatically trigger the PAI for you.
Have you tried developing a template in Classic style for this to prove if it works?
Regards,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply !
I've been using Tempalte as a classic way like <input type="text" value="`PERNR-PERNR`">.
What I am curious is SAP TEMPLATE STYLE can cover this scripting or not.
When the page is generated dynamically,
it shows " webguiform.PERNR-PERNR[1].value " .
So I would like to know this variable is usable or not.
Thanks in advance.
> Thanks for your reply !
> I've been using Tempalte as a classic way like <input
> type="text" value="`PERNR-PERNR`">.
>
and did you manage to get it working?
> What I am curious is SAP TEMPLATE STYLE can cover
> this scripting or not.
> When the page is generated dynamically,
> it shows " webguiform.PERNR-PERNR[1].value " .
> So I would like to know this variable is usable or
> not.
>
I assume you mean if you can pick up webguiform.PERNR-PERNR[1].value as a DOM object.
Can't you just simply call a JS function in an event that fires when you submit your FORM, then passes it to your JS variables and then launches it in a new window. However, you need to think what you do with the ITS session that you have left, as on the R/3 side the transaction is still displaying something different.
But I am still not 100% sure if I understood what you mean. Do you maybe have some more coding examples?
Regards,
Michael
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.