Multiple BPS variables in Bex web report

Hi Guys,
I am trying to have a Bex report use the BPS variables in the web interface. I have managed to do so with 1 variable, but we have a number of variables.
I have created the code below to get the result. however this doesn't seem to work.
Can anyone help me with this issue.
Gert van de Vreede
<iframe
id ="Z_WA_BPS_GRSALPR001"
src="/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=Z_WA_BPS_GRSALPR001"
style="width:1200;height:300">>
</iframe>
<script language="JavaScript" type="text/javascript">
function varValueConvert(dispValue){
/* Expected formatting of variable selector: Text(Key) or Key
If there are more than one (...) expression the first is taken.
var keySection = dispValue.match(/\(.*?\)/);
if (keySection){
var keyValue = keySection[0].replace(/\(|\)/g,"");
alert(dispValue + ' : ' + keySection + " : " +keyValue);
return keyValue;
} else {
alert(dispValue);
return dispValue;
var frame = document.getElementById( 'Z_WA_BPS_GRSALPR001' );
var url = '/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=';
var queryVar1 = '&VAR_NAME_1=0SALESORG&VAR_VALUE_EXT_1=';
var queryVar2 = '&VAR_NAME_2=ZZHOUSE&VAR_VALUE_EXT_2=';
var queryVar3 = '&VAR_NAME_3=ZZBRAND&VAR_VALUE_EXT_3=';
var queryVar4 = '&VAR_NAME_4=ZZLINE&VAR_VALUE_EXT_4=';
var queryVar5 = '&VAR_NAME_5=ZCOREC&VAR_VALUE_EXT_5=';
var queryVar6 = '&VAR_NAME_6=ZSUBCAT&VAR_VALUE_EXT_6=';
var queryVar7 = '&VAR_NAME_7=ZZMARCAT&VAR_VALUE_EXT_7=';
var queryVar8 = '&VAR_NAME_8=0VERSION&VAR_VALUE_EXT_8=';
var appl = 'Z_WA_BPS_GRSALPR001';
var bpsVarvl1 = '<%=descr(salesorg_var/value)%>';
var bpsVarvl2 = '<%=descr(House_var/value)%>';
var bpsVarvl3 = '<%=descr(Brand_var/value)%>';
var bpsVarvl4 = '<%=descr(Line_var/value)%>';
var bpsVarvl5 = '<%=descr(Core_cat_var/value)%>';
var bpsVarvl6 = '<%=descr(Sub_cat_var/value)%>';
var bpsVarvl7 = '<%=descr(marcat_var/value)%>';
var bpsVarvl8 = '<%=descr(VarvlSel7/value)%>';
bpsVarvl1 = varValueConvert(bpsVarvl1);
bpsVarvl2 = varValueConvert(bpsVarvl2);
bpsVarvl3 = varValueConvert(bpsVarvl3);
bpsVarvl4 = varValueConvert(bpsVarvl4);
bpsVarvl5 = varValueConvert(bpsVarvl5);
bpsVarvl6 = varValueConvert(bpsVarvl6);
bpsVarvl7 = varValueConvert(bpsVarvl7);
bpsVarvl8 = varValueConvert(bpsVarvl8);
// create URL
url = url + appl + 0SALESORG + bpsVarvl1 + ZZHOUSE + bpsVarvl2 + ZZBRAND + bpsVarvl3 + ZZLINE + bpsVarvl4 + ZCOREC + bpsVarvl5 + ZSUBCAT + bpsVarvl6 + ZZMARCAT + bpsVarvl7 + 0VERSION + bpsVarvl8;
// remove possible white spaces
url = url.replace(/ /,"");
// alert('Generated URL: ' + url);
// set source attribute of iframe to new URL
frame.src = url;
</script>

Hi Gert,
the following line is wrong:
url = url + appl + 0SALESORG + bpsVarvl1 + ZZHOUSE +
bpsVarvl2 + ZZBRAND + bpsVarvl3 + ZZLINE +
bpsVarvl4 + ZCOREC + bpsVarvl5 + ZSUBCAT +
bpsVarvl6 + ZZMARCAT + bpsVarvl7 + 0VERSION +
bpsVarvl8;
Try this:
url = url + appl + '0SALESORG' + bpsVarvl1 + 'ZZHOUSE' +
bpsVarvl2 + 'ZZBRAND' + bpsVarvl3 + 'ZZLINE' +
bpsVarvl4 + 'ZCOREC' + bpsVarvl5 + 'ZSUBCAT' +
bpsVarvl6 + 'ZZMARCAT' + bpsVarvl7 + '0VERSION' + bpsVarvl8;
Regards
Marc
SAP NetWeaver RIG

Similar Messages

  • Sort variable values in selection box in BEx web report.

    Hello friends,
    In my BEx web report I have cal/month selection. When I do dropdown to select values it starts with 01/1960 and I have to click 10 times to get to 01/2006, 02/2006 and so forth.
    Is there a way to sort these values so I can get most current cal/month in first list?
    Thanks in advance.
    Regards,
    BJ

    I would consider changing the read mode for the dropdown box.  Are all of those dates actually relevant?  Check out the properties of the dropdown box in WAD. 
    Thanks,
    Jeff

  • Importing a text file with variable values into web reporting

    Hello,
    I'm looking for a possibility to import values from a text file into a variable selection in Web reporting.
    With BEx reporting in Excel this is possible, by clicking on the multiple selection button in the variable popup screen, and subsequently selecting the "Import from Text file" button.
    However, this function seems not to be available for web-reporting...
    It would be great if someone could help me out with this!
    Thanks & regards,
    Arvid

    Hi,
    we could resolve this issue, so i thought it may also be helpful for others:
    In our example we used a file with numbers for materials. This file is stored somewhere in a directory, to which SAP BI must have authorization to read.
    The file looks something like this:
    4711
    4712
    4713
    4714
    The file is named "import.txt" and lays in directory "/usr/sap/EC6/files/bi/"
    *&  Include           ZXRSRU01
    * global variables
    Data: intern_range LIKE LINE OF i_t_var_range,
          l_s_range    TYPE rsr_s_rangesid,
          line(100)    TYPE c,
          p_file(128)  TYPE c,
          length_rangelow  type i,
          tmp_rangelow     like l_s_range-low.
    * internal tables for selection-transfer from transaction
    * Data: BEGIN OF it_file occurs 0,
    *        it_p_file(128) TYPE c,
    *      END of it_file.
    IF i_step = 1.
    ** variables can be changed or set before pop-up appears
      CASE i_vnam.
    * take material from external file to selection-list
         WHEN 'ZSD_UPMA'.
    ** call of transaction, with which the path can be set
    *CALL TRANSACTION 'ZBW_VARIABLE' using it_file
    *MODE 'A'      " call should be visible, so that variable can be set
    *UPDATE 'S'.   " first transaction, then processing
    ** Der Pfad, der in dem Selektionsbild eingegeben wird, wird an die Variable übergeben
    ** Der Set-Parameter ist in Report ZSD_SELECT_VARIABLE
    *  get parameter id 'VAR' field p_file.
    p_file = '/usr/sap/EC6/files/bi/import.txt'.
    * further handling of variable in BI
          OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc = 0.
            READ DATASET p_file INTO line.
            WHILE sy-subrc = 0.
              IF line(2) <> '//'.
                l_s_range-sign = 'I'.
                l_s_range-opt  = 'EQ'.
                l_s_range-low  = line.
    * fill with leading Zeros
    * in variable tmp_rangelow the value from l_s_range-low is taken
        tmp_rangelow    = l_s_range-low.
    * read the length
        length_rangelow = strlen( tmp_rangelow ).
    * in our case: material has 18 characters
        while length_rangelow lt 18.
          CONCATENATE '0' tmp_rangelow INTO tmp_rangelow.
          length_rangelow = length_rangelow + 1.
        endwhile.
    * initialize l_s_range-low
        clear l_s_range-low.
    * set with filled values
        l_s_range-low = tmp_rangelow.
    * transfer to structure
                APPEND l_s_range TO e_t_range.
              ENDIF.
              READ DATASET p_file INTO line.
            ENDWHILE.
          ENDIF.
          CLOSE DATASET p_file.
        ENDCASE.
    ELSEIF i_step = 2.
    ** in step 2 all variable values from pop-up input can be processed or
    ** User Exit variables can be derived
    * UserExit Ende.
    ENDIF.
    Hope i could help!
    Best regards,
    Tobias

  • BEx web report selection screen entries retain when closing and opening the report again

    Hello all,
    please help me in the below query.
    Till last month the entries we made in BEx web report selection screen are retained in the selection screen even when we close the web report and open it again from portal without logging off. But recently this functionality is missing and the entries in selection screen are not remembered when we close and open the same report again. It is a good feature for the users. Have you come across this issue?

    No...I think i can reframe the question very clearly......For ex:  we are opening a Bex Web report...so initally we would be prompted by the variable selection screen...in which we have to give the entries(Values) for those variables like Cal month, Sales org, Company code, etc.....Later on the report will get open based on the values we have given......
    Now if we close the particular report without logging off then if i try to open the same report that selected values are missing.....earlier it used to remember the values we have given until we log off....But now that functionality is missing....It was very useful feature.....Can you please tel me what can be done to resolve this??
    I hope the explanation would be clear now.

  • How to see selection variable in BEX WEB ANALZYER

    Hi,
    I'm not able to see the  values of selection variables in bex web analyzer report. pls help.

    Thank you for your response. But it didn't work.
    I am able to go to 'lay out' option in bex analyzer and set 'display text variables' to All so that I can display all the variables in report.  Is there any similar option available in bex web analyzer.
    I am able to see the variable selection parameters I have selected in 'INFORMATION' tab of web analyzer. But I would like to see the same variables on 'data analysis' tab.
    Do I need to change any setting in order to display filter values that are entered during run time of the report.

  • Launching a Bex web report in KM in a new window

    Hi All,
    I am trying to figure out how to configure KM so that it would launch a Bex web report in a new window
    instead of being displayed in the innerpage area.  The Bex web report is stored in a KM folder.
    Can someone point me in the right direction?
    Thanks.
    Regards,
    Mel Calucin
    Bentley Portal Architect

    Hi Mel,
    If you have already assigned the Bex report to a role, then you can open the  bex iview and edit the property "Launch in New Window" to Display in separate portal window
    If the report is still not created and is existing in the KM you can create a KM navigation iview or KM document iview and specify the document path where the iview is exisiting OR you can open the bex report, capture the URL of it and create a URL iview for the same... you might want to refer to this thread for more details.
    https://www.sdn.sap.com/irj/scn/thread?threadID=1260067&tstart=0
    And when the iview is ready and the content is getting displayed accordingly, if you want to open the iview in a new window instead of the portal content area, you would have to follow the instructions given above ie to edit the property of iview "Launch in New Window" to Display in separate portal window
    Good Luck!
    Sandeep Tudumu
    Edited by: Sandeep Tudumu on Mar 9, 2009 10:57 AM

  • Display variable values in Web report

    Hi Bw Mates,,,
    I am trying to display the variable values in Web Report.
    I put one text Item in Template and checked the Variable Display and entered the variable name in List.
    still I cannot see the variable values in the report.
    Thanks for your help.
    RSB

    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TEXTELEMENTS_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="GENERATE_LINKS" value=""/>
             <param name="GENERATE_CAPTION" value="BORDER"/>
             <param name="SHOW_COMMON_ELEMENTS" value=""/>
             <param name="ELEMENT_TYPE_1" value="VARIABLE"/>
             <param name="ELEMENT_NAME_1" value="Z_CP_018"/>
             ITEM:            TEXTELEMENTS_1
    </object>
    as the other poster mentioned the variable name has to be in upper case.
    if only_values = 'X' you will just get the value other wise
    you will get something like below.
    variable description = variable value
    Regards
    Raja
    Reward the helpful answers and close the thread once its answered.
    sorry for the delay in answering, it was weekend for us

  • BPS variable in BeX

    Hi!
    I have a question.
    May I use BPS variable in BeX?

    Hi,
    You dont have that functionality in BPS.  You can find this functionality in Integrated Planning.
    Regards,
    Ravi Kishore

  • BEx Web report returns 500 Internal Server Error

    Hi all,
    a user says that he can't run a BEx Web report (query BEx embedded in a WAD web template) because it returns the generic error "500 Internal Server Error". In the screenshot below some more informations about this issue:
    Some other informations:
    - says he can run others BEx Web report (which use the same WAD template on different queries)
    - says he can run the query via RSRT (so I guess there are no authorization problems)
    - says he can run this specific report with another user on his PC
    - says he can't run this specific report with his user on another PC
    - I copied his user and I can run this specific report.
    - browser used: internet explorer 8
    Any suggestions?
    Thanks,
    Michele

    Hi Michele
    Could you refer the SAP Notes
    1722983 - Recommendations to resolve 'NO ESID FOUND' error
    1801130 - How to troubleshoot issues in BICS Remote Web Service for Xcelsius/Dashboard Designer
    Regards
    Sriram

  • BEx Web Reports: Print only Results area??

    Hi gurus,
    I know that it is quite messy printing BEx Web reports with 3.5. ....
    Is there the possibility to print only the results area of a BEx Web report, e.g. without the menus (e.g. Rows, Columns, Free Characteristics)??
    Thanks a lot for your answers,
    Sabine

    Try this link:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bc4fa990-0201-0010-588e-ca4e63050d6d">How To Enhance Web Printing</a>
    Rgds

  • Display of variable value / Bex Web Apllication Designer

    Hello everyone,
    I am using the Bex Web Application Designer to broadcast a report in PDF format.
    In my WebTemplate, in the Info_Field_Item, i have to display a variable value : Company code.
    My problem is in the PDF generated.
    When the number of company code is 4, the result in the PDF is like this:
    Company code : Company1; Company2; Company3; Company4.
    But, when the number of companies is more than 4, for example 8, the result in the PDF is displayed like this:
    Company code : Company1
    Company code : Company2
    Company code : Company3
    Company code : Company4
    Company code : Company8
    It makes a problem of harmonization of reports, i tried many tests, but the result still the same.
    Please, can somone knows how to change it, the PDF result must be like this way (watever the number of companies):
    Company code : Company1; Company2; Company3; Company4; Company5; ...; Company8
    Thank you and have a nice day,
    Best regards.
    Amine

    I found an interesting link about creating Print versions of BI Applications.
    Here, the link, hope it helps:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/68ce8391886e47e10000000a422035/content.htm
    I made many tests in the Bex Broadcaster, but always the same issue.
    Also, i modified the size of the INFO FIELD ITEM, but it changes nothing in the final result.
    May be, there is a solution by modifiying the XHTML generated code in the Bex Web Applicatin Designer, especially the concerned line, but i don't knwo how to do, may be somone?
    the concerned line is like this:
    <bi:INFORMATION_ELEMENT_LIST type="ORDEREDLIST" >
                            <bi:INFORMATION_TYPE type="CHOICE" index="1" value="VARIABLE" >
                                <bi:VARIABLE value="AB_COMPANY" text="Company Code" />
    I am waiting your answers
    Best regards,
    Amine

  • How to transport the BW query's variable to BO  webi report

    Hi all
    I'd like to know how to transport the BW query's variable to BO 's webi . today ,I created a sap customer varible in my bw system to get the max calmonth in the active table.The varible in the BW side run's well ,but I use this query to build a new univers ,and created a new webi report base on this univers ,but the question is the webi report can't get the varible's value I wann to know how to transport the bw varible value to BO webi report
    Thanks and regards,
    Peter .zhu

    I have changed my variaable in my bw query ,I found if you use SAP default variable it is ok in BO side . So I get a guidline by SAP default variable ,I changed my customer variable in variables edite ,don't use 'ready for input' .And then the variable can be useful in BO side .
    Edited by: peter zhu on Jun 16, 2008 11:43 AM

  • Input Variable in BO Webi Report

    Hi,
    We have BW-Query and have defined BO Webi-Report using Universe on this query.
    When we execute BW-Query direct in BW, we can see all plants from
    master data table in the input Variable (Input help/F4).
    When we execute BO-Report in BO, it shows only plants in the input variable, for which there are transaction data
    in InfoCube. I expect here to see all plants from the master data table (like BW Query).
    Is it normal? Or is there some other issue?
    Thanks

    Hi,
    as the webi report will contain only transactional data anyway (webi MDX statement will ask for non empty records), this is the normal behavior what you are experiencing.
    What settings do you have on the infoObject, on which you have the variable set?:
    -Query Def Filter Value Selection
    -Query Execution Filter Val. Selection
    There you should be able to choose between "Only Values in InfoProvider" and "master data".
    Best regards

  • How to include text lable in Variable selection screen (Web Reporting)

    Hi Experts,
    I have created one query and in Web Report-->variable selection screen I have one Date field for that field I have to display a label stating that user to input date in the format YYYY.MM(like a text label).Actually I have created 10 to 12 report . I need u r suggestion such that a single change will reflect my requirement in all the reports and I have created all the reports for same multiprovider.
    Thanks in Advance
    Yours,
    Bala

    Bala,
    Prompts can originate from one of two places:  either via Designer and using the @prompt functionality or while creating the report building a prompt in the Query Filters panel.  If the prompt was built using the @prompt method, and all 10-12 reports are using that particular @prompt, then one change via Designer will cause all reports to reflect the new verbiage.  If you built the 10-12 reports using the prompt in the second scenario, then each individual report needs to be opened, modified and then saved.  If you must use the latter method, then you can open the first report, modify the prompt verbiage, then highlight the new verbiage with your mouse and hit Control-C (which copies that text to the Clipboard of your Windows system).  Then go to the second report, locate the verbiage that needs to be changed, delete it, then Control-V (which pastes), and voila, some keyboarding strokes are saved....
    Thanks,
    John

  • How to hide some variables on variables screen in web report (in WAD)

    I need to hide some optional variables (not all of them) on variables screen in web template.
    Hiding the whole selection screen is not an option, since users have to populate other variables and some variables are mandatory.
    Web template is based on a query that can be run in BEx Analyzer by superusers - and there they need all variables. I want to use the same query both in BEx Analyzer for superusers and on the Portal for regular users. For portal version though I need to hide some of the variables on the selection screen. Is it possible at all?
    I would like to avoid creating two separate queries - one for Analyzer and one for Portal.

    if the variables are optional and mandatory both avaialble
    then there is no chance that u can hide them
    the only option is to create a save as QUERY and remove those variable.
    it is not possible to just hide the variable screen...
    if u hv used they will be displayed....
    if u dont want it dont use it...
    and if really using another query is not advisable as u said
    the only thing i can say is that... try to interact with ur security person
    ask him u need to create several authorization objects for several variables
    if that is possible
    let him create those
    assign those specific authorization object to specific user id
    use it for specific variables u need
    tat way super users with specaial authorization can acess the same query and can see specific variables
    regular users withouts authorization of variables can see rest of variables.

Maybe you are looking for

  • Adobe Acrobat 9 Standard Install with all Updates - Transform Issues

    I'm new here so forgive me if this has already been answered someplace and I missed it. I am running windows XP SP3 and have Adobe Acrobat 8 Standard installed on my system. I am attempting up install version 9 standard with all the updates (9.1 thro

  • Unable to connect to server

    unable to connect to server when trying to update software. I also cannot purchase and download any songs. When i hit the buy button nothing happens. I did buy and download songs in mid sept, dont know why this happen  thanks Jim

  • Invalid key for Quicktime Pro

    Okay, I'm feeling pretty irate right now after paying out £20 for a product key which was emailed to me for 'instant access' but doesn't bleeding work... Having followed the simple steps, I pasted in my key and got the message 'invalid key' instead o

  • The OnCommand API Services 1.0 is now GA.

    To learn more OnCommand API Services, read http://community.netapp.com/t5/Technology/Too-Many-Management-Tools-Giving-You-A-Headache-OnCommand-API-Services-Might-Be/ba-p/103125 on the NetApp Technology blog. For more details on this GA release, read

  • Fill deep output Structure of Enterprise Service

    Hello at all, I created an Enterprise Service which contains an Input and Output Structure. My Problem is, that the Output structure is very deep and this structure contains tabletyps and further structures. How can I fill a field of the Output struc