Retrieve parameters from url
Hi All,
I'll call my webdynpro using this url
http://server_url:8012/sap/bc/webdynpro/sap/zhrtm_job_description?STELL=50106480&sap-client=040&sap-language=EN
How can I retrieve the value of STELL ???? thanks in advance!
Message was edited by:
Stephan Kaminski
Hello, Stephan,
In your WINDOWS there's na inbound plug called DEFAULT. Insert the following code into it's methd:
METHOD handledefault .
DATA: l_url_parameters TYPE tihttpnvp,
l_url_parameter TYPE ihttpnvp,
l_stell TYPE stell.
wdevent->get_data( EXPORTING name = if_wd_application=>all_url_parameters
IMPORTING value = l_url_parameters ).
READ TABLE l_url_parameters WITH KEY name = 'STELL'
INTO l_url_parameter.
IF sy-subrc EQ 0.
l_stell = l_url_parameter-value.
ENDIF.
ENDMETHOD.
Regards,
Andre
Similar Messages
-
How do I use the Parameters from URL to filter on Content Query in ItemStyle.xsl?
Hi, I might need your help with code that Content Query under <xsl:Template...> that I need a filter for 3 parameter from url (from date, to date(for date range) and type.
eg: www.mywebsite.com/pages/Filter.aspx?DateFrom=01/01/2012&DateTo=01/01/2013&Type=sports
I've google for help and not sure they seem working so far.Hi,
If you want to filter a Content Query Web Part with the parameters from URL, we can achieve it with OOTB of Content Query Web Part by adding "Additional Filters" in "Web Part Properties"->"Query". We can add
three filters like:
date is greater than [PageQueryString:DateFrom]
And
date is less than [PageQueryString:DateTo]
And
type is equal to [PageQueryString:Type]
Then redirect to the URL: www.mywebsite.com/pages/Filter.aspx?DateFrom=01/01/2012&DateTo=01/01/2013&Type=sports, the query results will be filtered.
Please reply freely if I misunderstand your meaning or there any other questions.
best regards
Patrick Liang
TechNet Community Support -
How to retrieve data from URL or querystring in bsp pages
hi
how to retrieve data from URL or querystring in bsp pages.
thanks
Edited by: Vijay Babu Dudla on Mar 23, 2009 7:35 AMHello Friend,
Vijay is correct.
REQUEST is a system object available in runtime of BSP application.
It is the object of interface IF_HTTP_REQUEST.
Use methof REQUEST -> GET_FORM_DATA( )
Regards
Krishnendu -
Passing parameters from URL to multiple iViews on a page.
Hi Everyone,
Could you please point me to a guide or howto, which explains on passing parameters from URL to multiple iViews on a page. I already know how to pass parameters from URL to a single iView (wiki).
Thanks!
IndyHi Indy,
Currently, passing parameters to the page which contains VC iViews is not supported, only directly in the iView's URL.
Regards,
Natty -
Getting parameters from URL: use of Special Chars
I'm unable to retrieve the Special Chars from URL parameters. Does someone have an idea where to look for?
Examples where no Special Chars is retrieved :
...App?param=Aménagement
...App?param=Am<é>nagement
...App?param=Am%E9nagement
I'm using this code :
IWDProtocolAdapter protocolAdapter =
WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String param = request.getParameter("param");
Thanks!okay, So if I use :
...App?param=Am%E9+nagement
How would you then integrate URLDecoder.decode in the following code?
IWDProtocolAdapter protocolAdapter =
WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String param = request.getParameter("param"); -
Extracting parameters from URL for forms 6i
Is there a way to get the portal logged in user
in a 9ias forms 6i web form. Also if I pass user-defined
parameters through a link to forms 6i is there a way
I can extract these parameters from the URL and get
forms 6i to read them?
Any ideas will be greatly appreciated.
Thanks,
SuzanneHi Suzanne,
all that you need to do is parse the url string
It is made up of:
?[Parameter Name]=[Parameter]
&[Parameter Name]=[Parameter]
&[Parameter Name]=[Parameter]
&[Parameter Name]=[Parameter]
I have some code that converts a url string into a form and then submits the form.
you could use this as a base to work from.
Regards Michael
CREATE OR REPLACE PROCEDURE FORWARD_TO_URL_P (P_URL IN VARCHAR2) IS
vParameter VARCHAR2(4000);
vValue VARCHAR2(4000);
vProcedure VARCHAR2(1000);
vString VARCHAR2(4000);
vLength NUMBER(10);
vQ VARCHAR2(4) := '?';
vE VARCHAR2(4) := '=';
vA VARCHAR2(4) := '&';
BEGIN
htp.p('<HTML><HEAD><TITLE>ASP 3</TITLE>');
htp.p('<META HTTP-EQUIV="PRAGMA" CONTENT="No-Cache"></HEAD><BODY bgcolor="#f1f1f1">');
vString := p_url;
IF INSTR(vString, vQ) > 0 THEN
vProcedure := SUBSTR(vString, 1, INSTR(vString, vQ) - 1);
vString := SUBSTR(vString, INSTR(vString, vQ) + vLength);
ELSE
vProcedure := vString;
END IF;
vQ := vA;
htp.p('<FORM METHOD=POST action="' || vProcedure || '">');
WHILE NVL(INSTR(vString, vE), 0) > 0 LOOP
vParameter := SUBSTR(vString, 1, INSTR(vString, vE) - 1);
vString := SUBSTR(vString, INSTR(vString, vE));
IF INSTR(vString, vE) = INSTR(vString, vE, -1, 1) THEN
vValue := SUBSTR(vString,vLength+1);
vString := '';
ELSE
vString := SUBSTR(vString,vLength+1);
vValue := SUBSTR(vString, 1, INSTR(vString, vQ) - 1);
vString := SUBSTR(vString, INSTR(vString, vQ) + vLength);
END IF;
htp.p('<INPUT TYPE=hidden name="' || vParameter || '" Value="' || vValue || '">');
END LOOP;
htp.p('</FORM>');
htp.p('<SCRIPT>');
htp.p('document.forms[0].submit();');
htp.p('</SCRIPT>');
htp.p('</BODY></HTML>');
END; -
Unable to retrieve parameters from RFC Function Module
Hi All,
I have created a model for the RFC Enabled function module BAPI_BUPA_CENTRAL_GETDETAIL within my webdynpro program. I am passing parameters to the function module BAPI_BUPA_CENTRAL_GETDETAIL and I have validated that this is being passed correctly by displaying the passed value from the node of the input parameters.
Code used to pass input parameters -
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
size = wdContext.nodeCentraldataperson().size();
wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
wdContext.nodeOutput().invalidate();
catch(WDDynamicRFCExecuteException e)
manager.reportException(e.getMessage(), false);
I also see that it returns 1 record by using the code below:
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
size = wdContext.nodeCentraldataperson().size();
wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
wdContext.nodeOutput().invalidate();
catch(WDDynamicRFCExecuteException e)
manager.reportException(e.getMessage(), false);
But, when I try to retrieve the value returned it does not fetch that value -
Bapi_Bupa_Central_Getdetail_Output getdata = wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().currentOutputElement().modelObject();
Bapibus1006_Central_Person[] getres = new Bapibus1006_Central_Person[size];
for(int i=0; i<size; i++){
wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(i));
getres<i> = getdata.getCentraldataperson();
//String fullname = wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().getElementAt(i).getAttributeValue("Fullname").toString();
String fullname = getres<i>.getFullname();
fullname += Integer.toString(i);
wdContext.currentContextElement().setFullname(fullname);
wdComponentAPI.getMessageManager().reportSuccess("fullname:" + fullname);
It always returns 0 or null. Can someone please help me with this issue. The BAPI returns values in structure format and not internal table and hence I dont see the issue there as well.
What can be the problem?
Thanks for all your help in advance.
Best regards,
DivyaNikhil / Srihari,
I changed my code and it now looks like - I am trying get the return value into the context fullname but i still cant get the value although the size of nodeCentraldataperson() is thrown as 1 and the input is being passed correctly as i have validated this in this line of code [wdContext.nodeBapi_Bupa_Central_Getdetail_Input().currentBapi_Bupa_Central_Getdetail_InputElement().getBusinesspartner();]
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
size = wdContext.nodeCentraldataperson().size();
wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
wdContext.nodeCentraldataperson().invalidate();
catch(WDDynamicRFCExecuteException e)
manager.reportException(e.getMessage(), false);
for(int i=0; i <size; i++){
String name = "FullName: ";
wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().setLeadSelection(i);
name += wdContext.nodeBapi_Bupa_Central_Getdetail_Input().currentBapi_Bupa_Central_Getdetail_InputElement().getBusinesspartner();
name += wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().currentCentraldatapersonElement().getFullname();
wdContext.currentContextElement().setFullname(name);
Any idea what could be wrong?
Thanks,
Divya -
Retrieve parameters from LDAP using authentication module
I have existing LDAP that contains organization people and their attributes. I have several web applications that use existing LDAP for authentication and authorization. My goal is to deploy single sign-on with openSSO so that users are authenticated against existing LDAP. Changing of the existing LDAP is forbidden.
I deployed newest stable OpenSSO and Apache2 + newest policy agents to web service servers.
OpenSSO server uses LDAP authentication module to authenticate users against existing LDAP. It uses flat file data repository and realm attributes -> user profile is ignored.
This basic setup works fine. The next step is to integrate existing web applications to single sign-on system. The authentication part works fine. I just disabled old mechanism from web applications that did the LDAP authentication. OpenSSO and Apache Policy agent are handling that part.
The existing web applications are still querying existing LDAP other attributes there than uid and userpassword. Is it possible to configure OpenSSO to forward LDAP attributes to web application as cookie or header value? Or is the forwarding feature only for attributes in Data Store?
If the forwarding is not possible what is the next best alternative ?OpenSSO forum is quite silent so I'm back with you guys.
I managed to solve the agent error log problem I mentioned before. The problem was about nonexisting attributes in AMAgent.properties com.sun.am.policy.agents.config.profile.attribute.map. I removed extra attributes and the authentication against LDAP started to work again.
The problem is that no attributes are forwarded from LDAP to web application. I have tried HTTP_COOKIE and HTTP_HEADER settings in AMAgent.properties and com.sun.am.policy.agents.config.profile.attribute.map is set to cn|common-name,mail|email.
My LDAP looks like this:
# testuser, pollo.fi
dn: cn=testuser,dc=pollo,dc=fi
cn: testuser
objectClass: organizationalPerson
objectClass: inetOrgPerson
givenName: Test
sn: User
ou: People
uid: testuser
mail: [email protected]
And my datastore configuration:
LDAP server->localhost:389
LDAP bind DN->cn=admin,dc=pollo,dc=fi
LDAP organization DN->dc=pollo,dc=fi
Attribute name mapping->empty
LDAP3 Plugin supported types and operations->agent,group,realm,user all read,create,edit,delete
LDAP3 Plugin search scope->scope_sub
LDAP Users Search Attribute->uid
LDAP Users Search Filter->(objectclass=inetorgperson)
LDAP User Object Class->organizationalPerson
LDAP User Attributes->uid, userpassword
Create User Attribute Mapping->empty
Attribute Name of User Status->inetuserstatus
User Status Active Value->Active
User Status Inactive Value->inactive
LDAP Groups Search Attribute->cn
LDAP Groups Search Filter->(objectclass=groupOfUniqueNames)
LDAP Groups container Naming Attribute->ou
LDAP Groups Container Value->groups
LDAP Groups Object Class->top
LDAP Groups Attributes->cn,description,dn,objectclass
Attribute Name for Group Membership->empty
Attribute Name of Unqiue Member->uniqueMember
Attribute Name of Group Member URL->memberUrl
LDAP People Container Naming Attribute->ou
LDAP People Container Value->people
LDAP Agents Search Attribute->uid
LDAP Agents Container Naming Attribute->ou
LDAP Agents Container Value->agents
LDAP Agents Search Filter->(objectClass=sunIdentityServerDevice)
LDAP Agents Object Class->sunIdentityServerDevice,top
LDAP Agents Attributes->empty
Identity Types That Can Be Authenticated->Agent,User
Authentication Naming Attribute->uid
Persistent Search Base DN->dc=pollo,dc=fi
Persistent Search Filter->(objectclass=*)
Persistent Search Maximum Idle Time Before Restart->0
Should I enable some setting still to get the forwarding going on? Any ideas for debugging? -
Passing parameters from URL to Forms 9i
Hi,
Can anyone tell me how I can pass a user-defined parameter into an Oracle 9i form running within a browser? I have tried passing it in the URL, by itself and as 'otherparms' parameter (otherparms=parm1=xxxx), but it does not seem to work. The documentation has no mention on how to do this (at least that I have seen). I'm sure there is a simple, obvious way to do this that I have completely missed!Anthony,
it work the way you say it. The problem may be because you are running Oracle9iAS on Windows2000. There is a bug in accepting parameters passed in the request URL, requiring you to apply patch 1 (see metalink for patch 2705870).
If you are on iDS then this should work. So let me knwo if this problem occurs on iDS or iAS
Frank -
Clearing / deleting parameters from url
hello, my servlet shows a table with customers. each customer has a link that calls the customer servlet with the parameter customerid, like this
so when the user clicks on the customer the url in the browser becomes
http://localhost:8080/customer?customerid=7
after the user edits and saves the customer the url remains the same, is there a way to make the url "http://localhost:8080/customer" after the user saves the customer data?
thank youIf you want to replace a table with 20 links, you can write inside a FORM like this one ...
<form name="planningForm" method="post" action="/gco/MOPO">
... the following code
<% int teller = 0;
for (Iterator i = rondeLijst.iterator(); i.hasNext(); )
%>
Meterronde meterronde = (Meterronde) i.next();
%>
<tr class="mopoTekst">
<td><input name="radioRonde" type="radio" value="<%=meterronde.getWijkRonde()%>"></td>
<td><div align="right"><%=meterronde.getWijknummer()%></div></td>
<td><div align="right"><%=meterronde.getRondenummer()%></div></td>
<td><div align="left"><%=meterronde.getOmschrijving()%></div></td>
<td ><div align="right"><%=meterronde.getAantalContractueleLeidingen()%></div></td>
<td ><div align="right"><%=meterronde.getAantalActieveMeters()%></div></td>
<td><div align="right"><%=meterronde.getAantalTeLezen()%></div></td>
</tr>
<% teller++;
} %>
The radiobutton which contains a number called "wijkronde" is used to let the servlet know which record has been chosen by the user to see the details of this record. -
How to hide request parameters from URL
Hi ,
I do not want to have userId of the logged on user in the URL as the request parameter.What options do i have ?Then, I do not need to build the URL as below
http://localhost:80/app/something?userId=123
and the URL would like:
http://localhost:80/app/something -
Hi,
I have a got a URL like http://<Machine Name>/dev60cgi/ifcgi60.exe?form=Test&P1=1 to access a web form.
I need to access the value of P1 as a parameter in When-New-Form-Instance Trigger of my Test form. Is there any way I can do that.
Awaiting early reply.
Regards.You can use the otherParams= url argument. I think that some examples of this have been given on the forum before - run a search
-
How to retrieve parameters from API
Hi Gurus,
I have to call an API in the loop as i need to pass more then one values of Route ID. How to do that thing in loop??
And that API will return me values of operation IDs which i need to display on other page... Can u please help me with that.
I am using this below mentioned code,,but it is giving me some errors.
Method in AMImpl
public Serializable[] Merge()
OAViewObject vo =(OAViewObject)getRoutesTabVO1();
if (vo!= null)
Row[] arow = vo.getFilteredRows("Select","Y");
int len = arow.length;
System.out.print("Length is "+len);
HashMap querySql = new HashMap(1);
//String[] querySql = new String[];
if(arow!= null && arow.length>0)
for(int i=0;i<arow.length;i++)
System.out.println("Value of i is"+i);
String RouteId = (String)arow.getAttribute("RouteId");
OADBTransaction txn =(OADBTransaction)getDBTransaction();
OracleCallableStatement cs = (OracleCallableStatement)txn.createCallableStatement("begin apps.apps.xxgahl_get_unq_opr_id(:1, :2); end;",1);
try
cs.setString(1, RouteId);
cs.registerOutParameter(2, Types.VARCHAR, 0, 2000);
cs.execute();
querySql[i] = cs.getString(2);
cs.close();
catch (SQLException sqle)
try
cs.close();
catch(Exception e)
return querySql;
In Controller PFR
if (pageContext.getParameter("Merge")!=null)
Serializable[] parms = (Serializable[])am.invokeMethod("Merge");
String[] temp = (String[])parms[1];
pageContext.putSessionValue("NRParams", (String)temp);
pageContext.setForwardURL("OA.jsp?page=kal/oracle/apps/xxgahl/ump/webui/OPERATIONS_ROUTES_PG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
false, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
OAWebBeanConstants.IGNORE_MESSAGES);
But when i m compiling it is giving me 4 errors
Error(47,27): method does not return a value
Error(70,19): array type required but class com.sun.java.util.collections.HashMap found
Error(84,25): incompatible types; found: class com.sun.java.util.collections.HashMap, required: array java.io.Serializable[]
Error(68,59): cannot cast array java.lang.String[] to class java.lang.String
Please help me with that as it is very urgent...Thank you very much. it is true that basic are vey
important but as i can say books like all this are
very limited resources. It would be better if i can
learn how to implement the method in there. Haha.
Please don't feel offended if i am say something
wrong.You don't need to implement the methods listed in the API. They already are implemented. It tells you how to use them. -
Getting parameters from text and file input tag. . canyou help me ?
Hello!
Is there anyway of getting parameters from an
text field input in a form like :
<form name="signinForm" method="post" action="uploadFile.jsp" enctype="multipart/form-data" >Actually I would like to insert the parameters and make the upload of an file
on the same form. It is something likethis :
Form.jsp
<form name="signinForm" method="post" action="uploadFile.jsp" enctype="multipart/form-data" >
<input type="text" id="name" name="signinName" />
<input name="signinFile" id="fileUp" type="file" />
<input type="submit" id="submit_btn" name="signinSubmit"/>uploadingFile.jsp
<%@ page import="java.io.*,javax.servlet.http.HttpServletRequest,javax.servlet.ServletInputStream" %>
<%@ page import="java.io.FileWriter,java.io.IOException" %>
<%
.//upload the file
String email = request.getParameter("signinName").trim(); //this line is bringing me an NullPointerException
%>Thanks in advance for any suggestion!!
All the best!You cannot use the HttpServletRequest object to retrieve parameters from a multipart form. You'll have to use a package that can parse such a form. I suggest Apache commons FileUpload.
http://jakarta.apache.org/commons/fileupload/
Using this package you can get both the file upload and any other parameters. -
Methods of passing parameters from servlets to servlets
Hi all,
Im new to Java servlets. After doing some read-up, I understand that parameters can be passed using request.getSession().setAttribute(). The other method is using hidden element as shown below:
out.println("<form method=POST>");
out.println("<center>");
out.println("<input type=submit value=Next>");
out.println("</center>");
out.println("<input type=hidden name=passpage value=" + passpage + ">");
out.println("</form>)");I just want to find whether there is other alternatives and is there any security implications of using hidden element? Any advice will be much appreciated.
RegardsHttpServletRequest#setAttribute() is commonly be used to set some object references inside a Servlet before forwarding the request to a JSP. In the JSP you can access it using EL.
E.g. in a Servlet:String foo = "bar";
request.setAttribute("name", foo);
request.getRequestDispatcher("page.jsp").forward(request, response);and in page.jsp:${name} <!-- prints 'bar' -->which only works if you use Servlet 2.4/JSP 2.0. If older, then use JSTL:<c:out value="${name}" /> <!-- prints 'bar' -->HttpServletRequest#getParameter() is commonly used to retrieve parameters from the request. Those parameters can either be set using a query string (e.g. http://foo.com/page.jsp?name1=value1&name2=value2&name3=value3) or by submitting a form with any input fields.
Having said that, HTML code belongs in a JSP file, not in a Java class. I highly recommend you to reconsider your design.
Maybe you are looking for
-
The App Store want allow me to download new apps because I have not set up security questions.But I share an iTunes account with my friend. So if I set up the questions will my friend have to use and answer the same thing?
-
Strobe Media Playback 1.6.328 not working in Firefox
Hi All, latest version of SMP 1.6.328 works fine in Chrome, Safari & Explorer however in Firefox the player does not appear. I am re-skinning the player via xml and using RTMP dynamic video stream source via f4m file. All browsers are upto date and a
-
Need a copy of my purchase receipt
On June 23rd, 2014, around 8pm, at the store near Florida Mall (Orlando, Fl), I bought 1 playstation network card ($50 or $20, don't recall) and 1 Sandisk microSD 64gb card, using my VISA credit card, for a total of $135,18 and I need a copy of the r
-
Receiving Unknown Byte Messages in JMS Queues from MDM 2.0
I am receiving unknown Byte messages in JMS CCB MDM Queue from MDM 2.0. It keeps on increasing. Please let me know how to avoid this. and what may be the error.
-
Find and Replace dialog box issue
When I am in split mode, I get the Find and Replace dialog box up "Edit -> Find and Replace..." When I run a "Find and Replace" clicking the "Find All" the dialog box disapears and I have the Results checked in the Windows menu. When I go down to the