cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Values of Variables

former_member378832
Participant
0 Kudos

Hi Expert,

I am interesting in Changing the Values of Variables Screen that I parse from text field,

when I execute the script the next page is error,

as far as I know the problem is the VAR_VALUE_EXT_1 become empty.

can we joint tag BW with JS variable ?

here my code

.

.

<SCRIPT LANGUAGE="JavaScript">

function ChangeVariable()

{

var strval = document.getElementById('dt_name').value;

SAPBWOpenURL('<SAP_BW_URL CMD="PROCESS_VARIABLES" SUBCMD="VAR_SUBMIT" VAR_NAME_1="ZVPCLW07" VAR_VALUE_EXT_1="'+ strval +'">');

}

</SCRIPT>

.

.

<FORM NAME="test_form" METHOD="post" onSubmit="ChangeVariable()">

Calendar Year/Week: <INPUT TYPE="text" NAME="dt_name" SIZE="20"> <BR>

<INPUT TYPE="submit" name="send" VALUE="Submit">

</FORM>

regards

supriatna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

this is not possible.

Try instead this:

SAPBWOpenURL('<SAP_BW_URL CMD="PROCESS_VARIABLES" SUBCMD="VAR_SUBMIT" VAR_NAME_1="ZVPCLW07">&VAR_VALUE_EXT_1='+ strval);

Heike

former_member378832
Participant
0 Kudos

Hi Heike,

I was change my script like yours, when I execute that script calling up the variable screen and in the variable ZVPCLW07 contain strval value.

Is there away to run query without calling up the variable screen? And the variable value is not in fixed text.

Could u give explanation why this is not possible?

regards

supriatna

Former Member
0 Kudos

Hi,

the variable screen will popup when the values for the variable are not correct.

are you really sure that the value inside your strval is a correct variable value? External non compounded presentation of the characteristic value?

Dependent on variable type the command has to be different. Did you look on http://help.sap.com/saphelp_nw04/helpdata/en/07/ff413a3ace7022e10000000a11402f/frameset.htm to get the correct syntax for your variable?

Heike

Answers (0)