Skip to Content
author's profile photo Former Member
Former Member

Can you have multiple CMDs in a report with two structures?

I have written some code(detailed at the bottom) that will change all of the key fields within a report to zero decimal places. This works fine for reports with only one structure but when I try the same thing on a report with two structures the command doesn't appear to do anything.

Is there a reason for this or does my code need modifying in some way to account for the two structures.

Any advise will really be appreciated.




function decimal_zero() {

/* Get the optionnode */

optionnode =document.getElementById('keyfigures').firstChild;

i = 1;

myhtml = '<form name="MyDecimalZero" method="post" action="<SAP_BW_URL>">';

/* While node exist */

while (optionnode!= null) {

/* Check whether correct node type */

if ((optionnode.nodeType == '1') && (optionnode.nodeName == 'OPTION') ) {

kyf = optionnode.getAttribute('value');

if ((kyf!= '!ALL') && (i==1)){

myhtml = myhtml + '<input type="hidden" name="CMD" value="SET_VALUE_PROPERTIES">';

myhtml = myhtml + '<input type="hidden" name="DATA_PROVIDER" value="DP">';

myhtml = myhtml + '<input type="hidden" name="STRUCTURE_MEMBER_1" value="' + kyf + '">';

myhtml = myhtml + '<input type="hidden" name="DECIMAL_PLACES" value="0">';

i += 1;



if (kyf!= '!ALL'){

/* For keyfigure fire URL with NO_OUTPUT */

myhtml = myhtml + '<input type="hidden" name="CMD_' + i + '" value="CMD=SET_VALUE_PROPERTIES&DATA_PROVIDER=DP&STRUCTURE_MEMBER_1=' + kyf + '&DECIMAL_PLACES=0">';

i += 1;




optionnode = optionnode.nextSibling;


/* Fire URL */

myhtml = myhtml + '</form>';

document.getElementById('Mydecimalzero').innerHTML = myhtml;



<P id="keyfigures" style="DISPLAY: none; VISIBILITY: hidden">


<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="GET_ITEM"/>

<param name="NAME" value="DROPDOWNBOX_1"/>


<param name="DATA_PROVIDER" value="DP"/>

<param name="GENERATE_CAPTION" value=""/>


<param name="SHOW_LABEL" value=""/>

<param name="ONLY_VALUES" value="X"/>



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 20, 2004 at 04:16 PM

    Realised I'd forgotten the second structure in the command.....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.