HTTP Sender - how to read URL Parameter USER id into Mapping
Hi,
My scenario is HTTP - XI - ABAP Proxy.
I wanted to capture USER id of the person who posted(HTTP) into XI(Mapping). How to read/evaluate the value of sap-user from querystring of URL ?
http://HOST:8008/sap/xi/adapter_plain?namespace=http%3A//abc.com/sales_oa&interface=MI_sales_OA&service=DEV_D&party=&agency=&scheme=&QOS=EO&<b>sap-user=SM9999</b>&sap-password=xxxxx&sap-client=001&sap-language=EN
please help.
Mallik,
Try URL Parameters in HTTP sender communication channel.
In the sender communication channel set Adapter Specific Message Attributes. Click on Apply URL Parameters. In Parameter1 put sap-user (U can query any URL parameter by giving its name as in the HTTP URL).
Now in SXMB_MONI, in inbound payload SOAP Header, under Dynamic configuration u can see the value of the user. Query the same in Mapping using Dynamic Configuration using keyName as UrlParamOne.
Regards,
Sudharshan N A
Message was edited by:
Sudharshan Aravamudan
Similar Messages
-
How to read URL parameters of one wdp component into other WDP component?
Dear Experts,
Can anyone let me know how to read URL parameters of one wdp component into other WDP component?
My requirement is i have one standard WDP component with 3 URL parameters and i needto
read that URL parameters along with their values in my Z-WDP component.
Thanks
SKHi Santosh,
You can read parameters send from one WebDynpro Component to another component by adding code in "HANDLEDEFAULT" Event Handler method ( Window )of your target Web Dynpro Component.
data: lt_parameter type tihttpnvp,
ls_parameter type ihttpnvp.
lo_api_controller ?= wd_this->wd_get_api( ).
call method lo_api_controller->get_message_manager
receiving
message_manager = lo_message_manager.
clear : ls_parameter.
refresh : lt_parameter[].
* Read all URL parameters
wdevent->get_data( exporting name = if_wd_application=>all_url_parameters importing value = lt_parameter ).
if not lt_parameter[] is initial.
clear : ls_parameter.
read table lt_parameter into ls_parameter index 1.
if ls_parameter-name = 'ACTION' and
ls_parameter-value is initial.
lv_flag = 'X'.
clear : lo_msg.
lo_msg = 'Action Parameter Missing in URL Link !'.
* report message
call method lo_message_manager->report_error_message
exporting
message_text = lo_msg.
else.
endif.
Best Regards
Priyesh Shah -
Hi All,
How to read URL parameters in another WDA.
Thanks in advancehere is the sample code.
you can write this code in HANDLEDEFAULT method of Default Window of Application being called.
DATA:
wa_url TYPE LINE OF tihttpnvp,
int_url TYPE tihttpnvp.
wdevent->get_data(
EXPORTING
name = if_wd_application=>all_url_parameters
IMPORTING
value = int_url ). -
Reading url parameter in HANDLEDEFAULT method
Hi,
May be I am doing something very silly but I am trying to read URL parameter in my HANDLEDEFAULT method of MAIN window , and I am trying to define URL paramter as Method parameters but its gives me run time exception every time 'The ASSERT condition was violated.'
my simple paramter is like this HEADER_ID TYPE importing associated type STRING
Can any body help me why this error happens.
Regards,
GauravHello, Gaurav,
Have you tried something like this:
DATA: l_url_parameters TYPE tihttpnvp,
l_url_parameter TYPE ihttpnvp.
wdevent->get_data( EXPORTING name = if_wd_application=>all_url_parameters
IMPORTING value = l_url_parameters ).
READ TABLE l_url_parameters WITH KEY name = 'parameter_name'
INTO l_url_parameter.
IF sy-subrc EQ 0.
* your value treatment here
ENDIF.
There's no need to declare your parameters as method parameters.
Regards,
Andre -
How to read and write a string into a txt.file
Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
I hope someone can answer my question as soon as possible
Thank you very much.Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
Edited by: m0smith on Mar 12, 2008 5:18 PM -
How to read a whole text file into a pl/sql variable?
Hi, I need to read an entire text file--which actually contains an email message extracted from a content management system-- into a variable in a pl/sql package, so I can insert some information from the database and then send the email. I want to read the whole text file in one shot, not just one line at a time. Shoud I use Utl_File.Get_Raw or is there another more appropriate way to do this?
how to read a whole text file into a pl/sql variable?
your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
.... -
How do i combine two user accounts into one
how do i combine two user accounts into one
Drag one account's home folder from the Users folder to the other account's desktop, provide your administrator password, and then move your files from it.
(75344) -
[HTTP Sender]How to send different XML using static URL
Hi all,
I have a problem, my legacy system send XML messages to SAP XI by HTTP, I know that I need to use HTTP Sender adapter, the problem is that legacy system support only a static URL. I have more than one interface, how could I fix this problem?
Can I send the XML message to SAP XI without define INTERFACE on URL? How can I handle this?
Thank in advance,
Daniel TorresHi Srinivas,
The legacy system is a java application, that send XML messages to SAP XI server using HTTP protocol. So I just ask to legacy system team to change the application to add <b>server</b>, <b>namespace</b> and <b>interface</b> attributes to the URL querystring.
So for each XML message you should especify mesage interface that it belongs to. You do it by especifying on URL as message atribute for exemple:
HTTP://[SAPXISERVER]:80[SYSTEM ID]/sap/xi/adapter_plain?service=[BS SERVICE]&namespace=[MESSAGE INTERFACE NAMESPACE]&interface=[MESSAGE INTERFACE]
So if you have for example information belows:
<b>MESSAGE INTERFACE</b> = MI_MYMESSAGEINTERFACE_IB
<b>MESSAGE INTERFACE NAMESPACE</b> = urn:teste:mymessageinterface
<b>SERVICE</b> = MY_LEGACY
<b>SYSTEM ID</b> = 10
<b>SAPXISERVER</b> = MYSAPXI
Your url should looks like: http://MYSAPXI:8010/sap/xi/apadter_plain?service=MY_LEGACY&namespace=urn:teste:mymessageinterface &interface=MI_MYMESSAGEINTERFACE_IB
You should have a different message interface for each XML that you send to SAP XI.
Message was edited by:
Daniel Torres
Message was edited by:
Daniel Torres -
How to catch URL parameter from Portal URL in Web Dynpro iView
Hi All,
I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
Your urgent help will be highly appreciated.
Warm Regards,
ShubhoHi Shubhadip
Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
I hope you find a solution.
Regards
kk -
How to read url variable javascript problem
How to read the variable of latitude 1.22 and longitude 103.56.
This is my website: 127.0.0.1/1/map2.htm?latitude=1.22&longitude=103.56
function getUrl_Map()
//Get the variables in the URL
var vars = [], hash;
var latitude = getUrlVars()["latitude"];
//To get the second parameter
var longitude= getUrlVars()["longitude"];
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
alert('DEBUG: hashes= ' + hashes);
// read the file http://127.0.0.1/1/map2.htm
// read the file http://127.0.0.1/1/map2.htm? -->hashes
for(var i = 0; i < hashes.length; i++)
hash = hashes.split('=');
//alert('DEBUG: i= ' + i);
//i=0
alert('DEBUG: i= ' + i + 'hash = ' + hash );
vars.push(hash [0]);
vars[hash [0]] = hash [1];by the way you know that 127.0.0.1 is the address you use to get to your own computer right? It's the loopback address. so posting it doesn't really help anybody see the page, if that was what you were hoping.
-
Read URL parameter of my webDynpro application ?
Hi,
How to read the URL parameter of my webDynpro application from within the webDynpro Application code ??
Example : My application URL is : "http://ldai99wdd:50000/webdynpro/dispatcher/local/target/TargetApp?SAPtestId=38
&sap-wd-resumeurl=http%3A%2F%2Fldai99wdd%3A50000%2Fwebdynpro%2Fdispatcher%2Flocal%2Fplugs%2FTest%3Fsap-wd-cltwndid%3D1c175200265c11ddc21900300571b288%26sap-wd-appwndid%3D1c175201265c11ddaa3a00300571b288%26sap-wd-resume%3Dtrue"
I want to read the Parameter sap-wd-resumeurl.
Regards,
MaheshHi,
You can use the following code to get parameters from an URL
IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String paramValue1 = request.getParameter("<URL Parameter name>");
Re: Web Dynpro URL-Invocation with umlauts (like %FC) in the url
http://help.sap.com/saphelp_nw2004s/helpdata/en/44/be65751c743959e10000000a1553f6/content.htm
Thanks n Regards,
Jhansi Miryala -
How to pass url parameter string to a query
I need urgent help please, to pass a mysql query string from a master page to another details jsp page using a url parameter. The master page's url parameter looks like this;
<a href="Details.jsp?jobs=<c:out value="${row.actions_id}"/>"><c:out value="${row.action_title}"/></a>How can I query the mysql database using the url query string to get the query details.
Please help me out with detailed example please.You can get the parameter value using HttpServletRequest#getParameter():String jobs = request.getParameter("jobs");You can interact with databases using the JDBC API. This is a different topic. If you aren't familiar with it yet, then learn it. There is a very good JDBC tutorial here at Sun.com: [http://java.sun.com/docs/books/tutorial/jdbc/index.html]. Once you're familiar with that, create a DAO class which does the all the database interaction tasks. Create a method which takes the jobs value as parameter and let it return result(s) accordingly. You may find this article useful either: [http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html].
-
Hi friends,
I am using some parameters like crm-object-action, crm-object-value etc to launch the order directly.
while doing this, i want to read the parameter like crm-object-value - which has the guid in the do_init_context of bt115h_slso...
i am using server->request->get_form_field( name = 'crm-object-value' ), and i tried method get_header_fields too... but ai am not able to get the parameter value, this is getting blank value..
how to read these parameters...
kindly provide some inputs on this..
thanks in advance.
RDHi Hermiz,
thanks for replying
I did the same way
value type string,
value = request->get_form_field( name = 'crm-object-value' ).
but value has getting nothing.. its blank...
my url has
http://host:port/sap/bc/bsp/sap/crm_ui_frame/default.htm?crm-object-type=BT115_SLSO&crm-object-action=C&sap-client=020&sap-language=EN&crm-object-value=4D240235B73F8143E1008000116CCC
but value is getting nothing..
could you tell me how can i get these values
thanks
RD -
Dear Experts
I have created a webdynpro ivew, and added a Quick link to it and added to the workset. So that I can acccess the ivews form URL. I need to pass the URL paramenter also
like
http://<Server Name>:<portNumber>/irj/portal/Quick link?param1=Value, Now I need to read the param1 value in my Webdynpro code.
When i set the value in Application parameter I was able to get the value using the following code
path=WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("path");
My Question in how to get the value which is given in URL parameter
Regards
NoelHi
I think the code that you mentioned should works. I observe one thing that in getParameter you mentioned path as an argument. You need to mention the application parameter name.
Also, if you run the webdynpro application standalone you will not get its iView application parameter. You should only run the iView in portal or in preview mode to get the desired value.
Following code can help you in listing down all the application parameters that a webdynpro iview can contain. If you mentioned your parameter it will display the same too:
Enumeration enum =
WDProtocolAdapter
.getProtocolAdapter()
.getRequestObject()
.getParameterNames();
for (Enumeration e = enum; e.hasMoreElements();) {
wdComponentAPI.getMessageManager().reportSuccess(
"iView Params::" + e.nextElement());
Coming back to your problem, suppose you have application parameter set as ivuParam then you can get its value as
String ivuParam =
WDProtocolAdapter
.getProtocolAdapter()
.getRequestObject()
.getParameter(
"ivuParam");
Hope this helps.
Abhinav -
ABAP -WebDynpro - Read URL Parameter
Hi,
We have a Custom 'Catalog' that needs to be called from SRM using OCI (Open Catalog Interface). We are developing this custom catalog using ABAP Web Dynpro. We have following issues because of which we are unable to communicate back to Shopping cart from the Custom Catalog:
1. Unable to read the value of 'HOOK_URL' in WebDynpro application. We need this value so that it can be used as Exit URL. How and where do we read this URL parameter in ABAP WebDynpro ?
2. How can we return the 'HTML Form' to SRM with the values from Custom Catalog to fill the shopping cart ?
I would appreciate your help...
Thanks
MeenalHi Menal,
I had the same problem.
Did you define the HOOK_URL parameter in your webservice ? If not, do this 1st.
2nd
In you Webdynpro read the HOOK_URL in your handledefault method your window. Store it e.g. as attrribute in you assistance class.
method handledefault .
*&- Add FOF and HOOK_URL to assistanceclass attributes
wd_assist->hook_url = hook_url.
endmethod.
After this you can read your HOOK_URL e.g in a view via:
concatenate 'HOOK_URL=' wd_assist->hook_url zlv_hook_url into zlv_hook_url
I hope your question is answered.
What I want to now is: How to controll the HOOK_URL so that the formfields of the extenal catalog is added to the shopping card. Do you now that ?
John
Maybe you are looking for
-
How to set password in the form, request is coming from SPML with no pwd
Hi , Im using SPML request to create and modify users? I have 2 problems 1) Does anyone know, how to customize the form to call 2 different workflow depending on the request meaning, if SPML request is ADD, then it should call Create User workflow, a
-
I cannot activate facetime on my iphone4
i need facetime to work. i just bought this.. apple wont help...
-
Static list from table depending on user type
All i have a table where i define users and their roles, and i want to setup a static list that would display something like the following, but i want to filter depending on the users role so if the user is lets say part of dev then i want them to se
-
Flag a thread to moderators for moving
Suggest adding an option to flag threads which are in the wrong forum to make moderators aware of them. At the moment for those of us who are just normal users, if we spot a thread which is clearly in the wrong forum the only thing we can do it sugge
-
Does the iPad mini three have magnetic lock?
I Was wondering if this was a feature on the ipad mini. I wasn't so sure