cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Passing Multiple values of Variable using URL

Private_Member_9643
Active Contributor
0 Likes
1,040

Hi Experts,

Just solved the issue of passing single value of variables using URL with referenec to reply of prakash darji's thread:

Now i am looking for passing multiple value or ranges for single variable, any idea what statement i have to add it for this?

Thanks in advance,

@KJ...

Accepted Solutions (1)

Accepted Solutions (1)

Private_Member_9643
Active Contributor
0 Likes

Still waiting for the reply.

Could someone can give any hint on it?

Thanks,

@KJ...

Former Member
0 Likes

Please look at this webinar:

https://www.sdn.sap.com/irj/sdn/webinar?rid=/library/uuid/416238bf-0e01-0010-6d96-d3bdcf87ab12

I describe how to get URL strings by using the command wizard and flattening the stucture of the XHTML. The rules are defined in this presentation.

Private_Member_9643
Active Contributor
0 Likes

I tried your presentation earlier, but was not able to solve it. It is working fine for me for single values, but not able to find URL to pass for multiple values.

Below is the sample example of URL for passing company code value as say '0001', now i like to pass both '0001' & '0002'.

http://sap-jpd1.xyz.com:50100/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fpl...

&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE

&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=ZVAR_CC

&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=0001

Could you help me in this?

Former Member
0 Likes

Is there any reason you have to concatenate into the URL instead of using the command wizard or the javascript command wizard? In general, I do not recommend using long URL query strings. Instead, the command wizard or javascript parameter passing is a lot better.

Private_Member_9643
Active Contributor
0 Likes

As of now we are not using Web Templates (WAD), we are just running our queries on Visual Composer, and it is demanding us to pass some dynamic URL to users. We are generating Dynamic URL in Portal, and need to pass parameters for it.

Could you provide me that long URL string for multiple values?

Thanks,

@KJ...

Former Member
0 Likes

You can pass parameter to web templates using this how-to guide:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b00657a4-c270-2910-079b-bf1187bf...

I have changed jobs and currently don't have time to run scenarios to give you this information. If I have time later this week, I'll try and get into a system and give you a URL string, but you will run into a URL limitation at 1028 characters if you use IE and are using HTTP get instead of POST. Therefore, the javascript way is generally nicer than the query strings.

Private_Member_9643
Active Contributor
0 Likes

Thanks Prakash for prompt replies, will try at my end, and if you have any simple soultion with you for this, do update me when you find time.

Private_Member_9643
Active Contributor
0 Likes

Prakash,

Just to update you, Command Wizard worked in the way I was expecting. Your hint really helped me lot, I also built the URL by using XHTML code of Command Wizard.

Thank You Very Much,

@KJ...

Former Member
0 Likes

Hi Guys,

I am working on a problem related to this thread and looking for some help. I am trying to build a URL to pass a value to both a variable and to filter a characteristic. I want to pass a value to 0fiscper and exclude an employee number.

I have been able to get each to work independently, but not working together. If I leave out either the variable part or the filter part it works, but it doesn't work with both together.

I followed the previous posts on this thread and used Web application designer instructions to view the XHTML I will have to parametrize for my URL:

This is how I have converted it:

Variable part:

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=010/2010&

BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER

data provider part

BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&

BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&

characteristic filter part

BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&

BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201

Then it gives me the following error when I attempt to run this...

" The metadata of "CMD" "SET_VARIABLES_STATE" are incorrect for parameter "CHARACTERISTICS_SELECTIONS"

If I set the debug=x flag to see what is generated in the error this is the info I get:

The parameter "CHARACTERISTICS_SELECTIONS" in the metadata of "CMD" "SET_VARIABLES_STATE is not correctly defined: 
<parameterList>
  <param name="BI_COMMAND_TYPE" value="SET_VARIABLES_STATE"/>
  <param name="CHARACTERISTICS_SELECTIONS">
    <param name="CHARACTERISTIC_SELECTIONS" index="1">
      <param name="CHARACTERISTIC" value="0EMPLOYEE"/>
      <param name="SELECTIONS">
        <param name="SELECTION" modification_type="delete_if_value_not_equal" index="1">
          <param name="SELECTION_INPUT_STRING" value="!201"/>
        </param>
      </param>
    </param>
  </param>
  <param name="TARGET_DATA_PROVIDER_REF_LIST">
    <param name="TARGET_DATA_PROVIDER_REF" value="DP_1" index="1"/>
  </param>
  <param name="TARGET_VARIABLE_CONTAINER_REF" value="DEFAULT"/>
  <param name="VARIABLE_VALUES">
    <param name="VARIABLE_VALUE" index="1">
      <param name="VARIABLE" value="BCURFPER"/>
      <param name="VARIABLE_TYPE" value="VARIABLE_INPUT_STRING" modification_type="delete_if_value_not_equal">
        <param name="VARIABLE_INPUT_STRING" value="010/2010"/>
      </param>
    </param>
  </param>
</parameterList>

Thanks for looking!

-Gary

Answers (1)

Answers (1)

Former Member
0 Likes

Thanks, this solution worked for me.