Dynamic URL Configuration using variable range - WAD
Hi,
I am trying to configure a URL dynamically using variable range values. There are two variables which I pass to the URL, Sales Document Number and Posting Date. Sales Document Number has a single value and Posting Date is a range variable. The single value for sales document is passed to the URL but the date range is not passed and hence the web template gets the blank value for the date and shows the variable screen as this is mandatory. The URL is as follows.
CONCATENATE
l_web_protocol
l_portal_server
Initial URL
'/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE='
l_web_template
'&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE'
'&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING'
'&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING='
l_var_value "variable value
'&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE='
l_var_name "Variable for info object
'&BI_COMMAND_2-BI_COMMAND_TYPE=SET_SELECTION_STATE_SIMPLE'
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR=INTERVAL_SELECTION'
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER-ATTRIBUTE_MEMBER_SELECTION-
INFO_OBJECT=0PSTNG_DATE'
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER=MEMBERS_EXIT'
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER-MEMBERS_EXIT='
l_range_var_name "Customer Exit Variable
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_LOW_MEMBER-MEMBER_NAME='
l_range-low "Variable Value - Low
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER-ATTRIBUTE_MEMBER_SELECTION- INFO_OBJECT=0PSTNG_DATE'
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER=MEMBERS_EXIT'
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER-MEMBERS_EXIT='
l_range_var_name "Customer Exit Variable
'&BI_COMMAND_2-RANGE_SELECTION_OPERATOR-INTERVAL_SELECTION-INTERVAL_SELECTION_HIGH_MEMBER-MEMBER_NAME='
l_range-high "Variable Value - High
'&BI_COMMAND_2-RANGE_SELECTION_SIGN=INCLUDING'
'&BI_COMMAND_2-TARGET_DATA_PROVIDER_REF_LIST=DP_TAB' "Tab in the Web Template
into l_url.
Can someone tell me asto what's going wrong with this URL? I passed single value for Posting Date and it worked fine.
Thanks and Regards,
Arya
Thanks for the reply. However I did not understand couple of things. Should I try the URL like below?
BI_COMMAND=&
BI_COMMAND-TARGET_DIALOG_REF=l_var_name&
BI_COMMAND-BI_ADVANCED=DLG_VARIABLE_vsc_DropdownVariants& "Which value to be passed?
BI_COMMAND-BI_COMMAND_TYPE=PASSIVE_VALUE_TRANSFER& "Which value to be passed?
BI_COMMAND-PASSIVE_ID=DLG_VARIABLE_vsc_DropdownVariants_combobox& "Which value to be passed?
BI_COMMAND-PASSIVE_VALUE=l_var_value&
BI_COMMAND_1=&
BI_COMMAND_1-TARGET_DIALOG_REF=l_range_var_name&
BI_COMMAND_1-BI_ADVANCED=DLG_VARIABLE_vsc_CommonVariablesList_VAR_1_VARINPUT& "Which value to be passed?
BI_COMMAND_1-BI_COMMAND_TYPE=PASSIVE_VALUE_TRANSFER&
BI_COMMAND_1-PASSIVE_ID=DLG_VARIABLE_vsc_CommonVariablesList_VAR_1_VARINPUT_inp& "Which value to be passed?
BI_COMMAND_1-PASSIVE_VALUE=l_range_low-l_range_high&
BI_COMMAND_2=&
BI_COMMAND_2-TARGET_DIALOG_REF=l_range_var_name&
BI_COMMAND_2-BI_COMMAND_TYPE=OK
Thanks and Regars,
Arya
Similar Messages
-
SOAP Receiver : Dynamic URL configuration vs. TAuthKey capability
Hello all,
I plan to use dynamic URL configuration of web service URL in SOAP Receiver CC. I got an idea, which is more or less described on SDN already. But one thing bothers me a lot.
In my scenario we talk about 10 and more WebServices' URLs to be called dynamically. The WS call will include also authorization username:passwd and it is expectable, that each WS will have different uname:passwd definition to be authorized with.
I made a capability analysis of SOAP Receiver CC - tab Advanced - Authetication keys and there are prepared only 10 possibilities to define password for authentication key (which I'll handle to CC via TAuthKey parameter).
In the help page http://help.sap.com/saphelp_nw04s/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm there is a note regarding authentication key:
If authentication is required for the receiver system, you can enter a password with confirmation for each key value. This means that you do not need to write passwords in the enhanced message header.
So in other words there should be a way, how to send to CC even the password with other adapter-specific message attributes. (or maybe I miss the meaning of this comment, like the other way is to develope own module for CC and process additional attribs from enhanced message header)
Does anyone have some experience with handling the authentication data in "enhanced message header" ?
Thanx for you info in advance.
Regards
TomHi all,
I got an idea that the solution could be to use "Enhanced receiver determination" and use a set of Services-CommChannels with special naming convention. With this (little bit complicated) scenarion I'll get a possibility to define more then one SOAP Receiver CC => I'll get more than 10 options to store the logon password.
What do you think ?
Points for ideas guaranteed.
Tom -
Dynamically creating file using variable
HI, i am facing an issue in creating file on run time using variable.
i have a variable FileName. In refresh tab i have written a query like SELECT TO_CHAR(SYSDATE,'YYYY,MM,DD') || 'TEST' FROM DUAL. i tested the variable and its value is correct.
i have created an interface to extract the data from table and store it in file. i have assigned variable FileName to the file.
Now when i run the interface...the file is created but the header is created in different file and its name is ambiguous e,g(19) and the data is placed in other file with the name which is the value of variable FileName.....
ISSUE is two ODI creates two files one for header only and other for data....
when i run my interface in a package the file created perfectly ..... but i dun want to use package i want to create file through running interface onlyone file name is some number like 19.txt and other filename is 20121211_TEST.txt (this name is coming from variable).....
however when i create a package with variable and interface,only one file is created 20121211_TEST.txt (header and data are not created in separate files.)
create header (ID,
NAME,
DEPT)
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=TARGET_FILESNP$CRLOAD_FILE=*E:\tempProj/19*SNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x007eSNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=NAMESNP$CRTYPE_NAME=STRINGSNP$CRORDER=2SNP$CRLINE_OFFSET=51SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DEPTSNP$CRTYPE_NAME=STRINGSNP$CRORDER=3SNP$CRLINE_OFFSET=101SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CR$$SNPS_END_KEY*/
Edited by: 975356 on Dec 11, 2012 10:57 PM
Edited by: 975356 on Dec 11, 2012 10:58 PM -
Dynamic url to use as link in a web template
Hello
I`ve git the following problem:
I want to define a hyperlink in a webtamplate (WAD), that referes to an existing query an my sap-system.
Of course, that link should point to the developement-system if achieved there, bit after beeing transported to q-system it should point to that.
I think, that there must only be a change to the first part of that url, a string that will be determined systembased.
Any solutions?
Thx a lot
TomYou can generate the string dynamically based on program, and store it in some table to pass it.
Get the prefix from field URL_PREFIX of table RSPOR_T_PORTAL.
Now create iView for that web template...say iView - test
use the below string say STRING
'/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.IviewModeProxy?iview_id=''
Now give the location of iView of portal: say LOC
For example if its in main folder of content admin role:
'pcd%3Aportal_content/com.abc.abc_content_folder/com.frx.ZDW_IVIEWS/'
Now give your iView id: TEST
now concatenate URL_PREFIX, STRING, LOC & TEST that's the string which you can pass dynamically on any portal server. -
Hi gurus
I have created variables for Calender Year and posting periods for the value ranging from and to. Now i have created a web template for this query and i want to see the variables in my web template.
Please can anyone tell me how to do this.
regards
vijyakumarhi vijaykumar
when u open the WAD u find a new template. On the left hand corner u find properties under which u have 2 tabs generic and web item. under web item u have the option force variable screen.
Drag the web item u want to display onto the new template. Now u can see the properties of that web item in the left hand corner. there u have two types of properties. Specific and general. under specific u find the properties u are looking for.
hope i m clear this time.
thanks
sairam -
Dear Friends,
I am trying to create a small applicaion using WAD.
i inserted one Drop down web item in my template and associate that
drop down web item with variable of my datasource. variable is year
Now when i run my template my drop down is showing year values like this.
2008, Number of Days: 365 , Number of workdays; 248, valid from; 01.01.2008, valid to: 31.12.2008
2009, Number of Days: 366 , Number of workdays; 251, valid from; 01.01.2009, valid to: 31.12.2009
but i would like to show only values
2008
2008
where to set this thing on WAD.
regards,
MalikDea Arun,
We are using
Business Explorer Web Application Designer
BI AddOn 7.x ( Based on 7.10)
support package 8
Revision 475
Thanks with regards,
Malik -
Tell Safari to open url using variables
Hi,
I need to be able to tell Safari to open a url using variables.
Example:
I type "Soul Men" (without the quotes) in MS Word Mac, then select it, then run the
script and Safari opens as if I had opened imdb.com and searched for "Soul Men".
The issue:
The format for that imdb.com search url is:
http://www.imdb.com/find?s=all&q=Soul+Men&x=12&y=12
Notice that each word in the search terms is followed by a "+", except the last.
So I would need to tell the script to create that url, and use variables for the search terms.
I would need to account for any number of words in the variable.
Hope that makes sense,
Any help appreciated,
CharlesHello
As for building imdb's query url, you may try something like the CODE1 below.
It includes code to handle characters in U+0080 and upper.
(The imdb's query looks like using iso-8859-1 encoding, not utf-8, so the code is written as such.)
--CODE1
set n to "Soul Men"
set u to imdbQueryUrl(n)
return u
on imdbQueryUrl(n)
set sh to "echo " & quoted form of n & ¬
" | iconv -f utf-8 -t iso-8859-1 " & ¬
" | perl -M-utf8 -MURI::Escape -lpe '$_ = uri_escape($_); s/(%20|%09)+/+/og;'"
return "http://www.imdb.com/find?s=all&q=" & (do shell script sh)
end imdbQueryUrl
--END OF CODE1
As for getting text in selection of Word document, you may try something like the CODE2 below. Not tested, though.
--CODE2
tell application "Word"
set t to content of selection
--set t to content of text object of selection -- if above fails
end tell
--END OF CODE2
As a whole, you may try something like this -
--SCRIPT
tell application "Word" to set n to content of selection
open location imdbQueryUrl(n)
on imdbQueryUrl(n)
set sh to "echo " & quoted form of n & ¬
" | iconv -f utf-8 -t iso-8859-1 " & ¬
" | perl -M-utf8 -MURI::Escape -lpe '$_ = uri_escape($_); s/(%20|%09)+/+/og;'"
return "http://www.imdb.com/find?s=all&q=" & (do shell script sh)
end imdbQueryUrl
--END OF SCRIPT
Good luck,
H -
Building arguments of URL when using HTTP Adapter
I am using the HTTP adapter in one of my interfaces and need to call an url that has arguments. For e.g.
http://dpw6716.roseville.mycompany.com:8058/accelis/servlet/publish?type=create&ItemId=1018&Name=Harshad&Desc=FromXI
In the above URL the <b>ItemID</b> and the <b>Description</b> are dynamic. Is it possible to build such dynamic urls and used in the http adapter configuration? if so how? Can context objects be used here for the dynamic part?
Thanks,
HarshadHi Harshad,
it is possible to build up dynamic URLs, but the way is quite complex. You have to configure a XI-mandant as "Application System" to use it as allocator. Your message will be received there in an inbound-proxy (ABAP), where you have to implement a dynamic WAS-Request (class CL_HTTP_CLIENT).
Regards Udo -
Dear Experts,
I am Using Entry Variable as ZFISCPER For FISCALPERIOD
IF User Enters 003.2008
The Output of the Report will be: 003.2008 ||| UPTO 003.2008
UPTO 003.2008 means 001.2008 to 003.2008
How Can we Get This By using variable Range.
What Can I Give in FROM :
where as TO is To : ZFISCPER
Can Any one suggest me what to DO.
Regards
Supraja.KHi,
You can achieve this by creating a user exit variable and populating the YTD value based on the entry. Restrict the key figures with this variable. Use the sample code below.
CLEAR ls_range.
LOOP AT lt_var_range INTO ls_var_range WHERE vnam = 'ZFISCPER'.
CONCATENATE ls_var_range-low+0(4) '001' INTO ls_range-low.
ls_range-high = ls_var_range-low.
ls_range-sign = 'I'.
ls_range-opt = 'BT'.
APPEND ls_range TO et_range.
ENDLOOP.
This code will populate values from 001.2009 to 008.2009 if you enter value for fiscal period year as 008.2009.
Hope this helps.
Regards,
Akhn -
Average of values in variable ranges
Post Author: Graybane
CA Forum: Charts and Graphs
I am trying to generate a trend values that use variable ranges. For instance, I want a 12 month trend developed from preceeding 1 year + 1 month average, then preceeding year + 2 months average, then preceeding year + 3 months average and so on. I only want the values for the report for the 12 monthly values. This is all complicated by being a group function. Basically I am looking at priorities for requests in a single field and developing how long it takes to resolve the request based on another field which is what is used to develoe the averages for the trend. I have tried several methods and never gotten a good trend. The total average is correct if I do not do any weighting. Has anyone had any success with this? Are there any examples I can look at. Does anyone have any recommendations? Thanks for any helpI'm not entirely following you, Visakh, but I have a SQL Task setup in which I have an expression that makes a call to a db2 database such as the abbreviated set example below. The list of IDs in the IN statement must come from another SQL Server
database. In the past I have gotten the list of IDs, put them in a recordset and then put that in a for loop to iterate and make one call to db2 for each and every ID. The single ID example can literally take days to run for 100,000 IDs.
Therefore, I want to pull the entire set of results back at one time via a single (or at least fewer calls than there are IDs) DB2 call using 'in' instead. Maybe I am overlooking something but I don't quite see how your example will get me where
I want to go.
Set Example
SELECT
A,
B
FROM
Table 1,
Table 2,
WHERE
Joins
AND PRSNEUP.ID in ( This is where I want a list of IDs )
Single ID Example
SELECT A,
B
FROM
Table 1, Table 2,
WHERE
Joins AND PRSNEUP.ID = ( VariableContainingASingleID -
Using variable in KM configuration
Hi,
I am using LKM that uses sqlldr oracle utility to load data. I don't want to use hard coded path in LKM configuration.
e.g defalut directory = /root/home/
I defined a variable V_SQLDR_DIR to store this path. The value for variable is not resolved while execution.
defalut directory = #V_SQLDR_DIRIn LKM there is a option called "default directory". I don't want to hard code this value in LKM configuration. How to use variable in LKM conf.?
This is the LKM code
SnpsSqlUnload "-driver=<%=snpRef.getInfo("SRC_JAVA_DRIVER")%>" "-URL=<%=snpRef.getInfo("SRC_JAVA_URL")%>" -user=<%=snpRef.getInfo("SRC_USER_NAME")%> -pass=<%=snpRef.getInfo("SRC_ENCODED_PASS")%> -file_format=variable -row_sep=<%=snpRef.getOption("ROW_SEPARATOR")%> "-date_format=dd-MMM-yy" -fetch_size=<%=snpRef.getOption("FETCH_SIZE")%> -field_sep=|~| "*-file=<%=snpRef.getOption("DEFAULT_DIRECTORY")%>*/<%=snpRef.getInfo("TARG_NAME")%>.dat"
select * from xyz -
Using variables in CURL for urls.
Hello, I am fairly new here and new to programming. I am trying to make a program that will ask for a url and store it in a character array and use that variable as the URL for the url argument, in quotations, using libcurl, of course.
curl_easy_setopt(curl, CURLOPT_URL, "<here>");
However, when I do it the way I would with printf()
curl_easy_setopt(curl, CURLOPT_URL, "%c", &...);
it says prg.c:12:53: error: macro "curl_easy_setopt" passed 4 arguments, but takes just 3
Is there a way to do what I am trying to do?
Last edited by fawx (2008-08-20 13:06:24)I don't know what u really want to do. And what I found is that there is not an overloaded function like the one you are trying to use, in fact there is no overloaded functions for that one.
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
If you want to pass a URL that dynamically fills the parameter variable you can first create a string and copy the info from another one then concatenate another.
Here is an example that maybe could help you.
char url[128];
char *page = "hello.html";
strcpy( url, "www.google.com" );
strcat( url, page );
for this you must include string.h, then you can use url to send as parameter in your function. -
Using javascript to read bex variables in WAD
Hello,
I'm using BI 7.0.
In Query Designer I defined a variable of type customer exit. The variable is called "TESTVAR". How can I access to the value of this variable in WAD by using javascript? I know I can use the Web Item "Script" or I can include the javascript code in an external file. But can you can give me some example code how I can access the variable "TESTVAR"?
thanks
bertlTry using the following
Suppose <b>TESTVAR</b> is having the value <b>A</b>
If TESTVAR is single value
var_name_1=TESTVAR
VAR_VALUE_EXT_1 = A
if TESTVAR is range
var_name_1=TESTVAR
VAR_VALUE_LOW_EXT_1 = A
VAR_VALUE_HIGH_EXT_1 = A -
How to use web services with Dynamic url behaviour
Hi,
IView created by me currently uses some web services whose url behavior is static but i want to give a dynamic url behavior. i.e. i want to use the url which user provides. So here are my questions
1. How I shall assign the url supplied by the user to IView?
2. If I want to set some config variables during runtimes how I shall do it?
Thanks in advance,
VishveshHi,
1. I'm guessing you mean the webservice's url the user provides is pointing to an identical webservice to what you used to create your proxy... otherwise I think it will be very hard to do (I can imagine creating the proxies using the wsdl tool in run time or using code dome.. but that can't be what you want, right?).
So if what you wanted is to use the same web service with a different url, then the web service's proxy class you created has API for doing this in code! (it inherits it)
2. you can't, simply since the portal application doesn't ever use the config file... it isn't even deployed to the portal... so dynamic properties are "out of the question" here, sorry... see 1 again
Regards,
Ofer -
I have this URL-variables: test.php?id=1&kw=lente. id and
cat_lev02 are dynamic placed.
Now I want to filter the content so only item id="1" with
cat_lev02 = "lente" are shown:
id and cat_lev02 are dynamic placed in the link above. How
can I do this? Look at the code I use to get id: How can I put
something like WHERE name_lev02 = %s AND cat_lev02 = %s... (because
this is not working)?
Thanks a lot for further help.Ullitasch wrote:
> Now I want to filter the content so only item id="1"
with cat_lev02 = "lente"
> are shown:
> id and cat_lev02 are dynamic placed in the link above.
How can I do this?
Build the SQL query in the Advanced mode of the Recordset
dialog box.
For each dynamic value, define a variable by clicking the
plus button
alongside Variables, and entering the details in the dialog
box.
For example, build the query like this:
SELECT * FROM ul_posts WHERE id = col1 AND cat_lev02 = col2
Define col1 like this:
Name: col1
Type: Integer (in older versions of Dreamweaver, this is
Numeric)
Default value: -1
Runtime value: $_GET['id']
Define col2 like this:
Name: col2
Type: Text
Default value: -1
Runtime value: $_GET['kw']
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com
Maybe you are looking for
-
Custom component not working properly
Hi all - I am trying to create a custom component. I have followed the suggested MVC architecture, and created the following classes: 1. SuperLineModel (the MODEL) 2. SuperLine (the actual component,e.g. the CONTROLLER) 3. BasicSuperLineUI (the UI De
-
Hi, I have a few questions about syncing. Since this is my first iphone and apple product, I'm not familliar with it. My mother bought the tomtom app for navigation. And she said that it has 3 uses (for 3 different devices). Now the app is in her lib
-
Screensaver source: Picture loading issue!
After upgrading my MacMini to Yosemite I started having this issue. The Screensaver source is loading for a while and then shows an error message on the screen telling that was not able to connect to the NAS (network drive). so no pictures are loade
-
Every time i want to view my page i have to click the "clear template cache now" is there a way to disable cache during developement.
-
Offline copy of SQL Database in Visual Studio Community Edition?
I'm using an Azure Mobile Service and SQL database, and I'm interacting with it via Visual Studio Community Edition (12.0.31101.00 Update 4). I'm often offline, but want to work on and test the SQL code. Is there a way to sync a local copy of the da