cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Values or Parameters from BW to BSP page

Former Member
0 Kudos

I cannot for the life of me figure this out. I would like for a user to run a query on my sap portal. Put in a few restrictions, that could be multiples, example ZipCode 33333,45852,15454, CustomerAccounts = 'X', BusinessType = 'Y' etc etc...

When I use the RRI with a URL link it only sends one value per parameter at a time example

mybsppage.sample.htm?zip=33333%CustAcc=X&BusType=Y.

My problem is that I need all three Zipcodes, not just one. Has anyone found away to send values to BSP pages or anyother url, using a form post anything... Help...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Problem is getting the attributes out of the query, not getting them into a BSP page.

How from a BW query can I collect the parameter values?

athavanraja
Active Contributor
0 Kudos

data: p_genuniid type RSGENUNIID ,

wf_variables type ref to CL_RSR_VARIABLES ,

i_var type RRX1_T_VAR .

CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'

EXPORTING

input = 'cuybe/queryname'

IMPORTING

output = p_genuniid.

*create instance of cl_rsr_variables

CHECK NOT p_genuniid IS INITIAL .

CREATE OBJECT wf_variables

EXPORTING

i_genuniid = p_genuniid

EXCEPTIONS

query_not_found = 1

x_message = 2

OTHERS = 3 .

IF sy-subrc EQ 0 .

CALL METHOD wf_variables->get

RECEIVING

r_t_nvar = i_var.

i_var would hold all the variables of the query.

Is this what you want?

or did you mean getting the parameter values from the output of the BWquery so that you can build url to BSP and pass those along with the BSPs url?

if yes place TEXT_ELEMENTS in the webtemplate in hidden mode and using javascript you can read those values which can be passed to the BSP url.

Regards

Raja

Former Member
0 Kudos

Durairaj,

Thanks, would you have a sample of the javascript I could use. Also would it be possible to fill a form and post the information with say individual hidden inputs?

athavanraja
Active Contributor
0 Kudos

javascript sample to get the posting period variable value: (0P_FPER)

<script>
var period_val = '<object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="TEXTELEMENTS_PERIOD"/>
         <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS"/>
         <param name="DATA_PROVIDER" value="DP"/>
         <param name="GENERATE_CAPTION" value=""/>
         <param name="ELEMENT_TYPE_1" value="VARIABLE"/>
         <param name="ELEMENT_NAME_1" value="0P_FPER"/>
         <param name="ONLY_VALUES" value="X"/>
         ITEM:            TEXTELEMENTS_PERIOD1
</object>';
</script>

yes its possible to fill a form and post the info.

Regards

Raja

you may want to check out this weblog. its not directly connected to your question but covers your interest (BSP & webtemplate)

/people/durairaj.athavanraja/blog/2006/02/06/read-sap-table-data-from-bw-webtemplate-ajax-in-bw-webtemplate

Former Member
0 Kudos

If I wished to fill the form what would it look like. I tried using the Textelements and got no data?

athavanraja
Active Contributor
0 Kudos

<b><i>if I wished to fill the form what would it look like.</i></b>

Do you mean you wish to fill a form field in the BSP or in webtemplate?

<b><i> I tried using the Textelements and got no data?</i></b>

Can you post your code for checking

Regards

Raja

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Hubert,

What you can try is if ur Zipcode ha multiple values then try to have them concatenated as comma separated.

like: http://......?ZIPCODE=123,3456,123&Customer=abx.

On BSP side u can use page attributes type string to have the value and then use SPLIT statement to split them back at Comma.

Hope it'll help.

Thanks & Regards,

Ankur

athavanraja
Active Contributor
0 Kudos

you may have to concatenate those values with a separator and pass it in the url.

incase if the page you are navigating to is a BSP page, then to pass multiple values, have a page attribute of table type.

then from ur you can say <table type pageattribute>[1]=value1&<table type pageattribute>[2]=value2

if the auto of the page attribute is checked, then value1 will go as the first record of the itab and value2 will be the second record.

Hope this is clear.

Regards

Raja