Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem to activate a hierarchy via URL

Hello everybody!

I have a big problem. I try to start some reports via javascript.

templink = "&cmd=ldoc&template_id="+encodeURIComponent(report[gup('rep')]);
if(country[gup('cty')]['description'] != "all_countries") { 
templink += "&filter_iobjnm_1=zc_ldbkrs&filter_value_1="+encodeURIComponent(country[gup('cty')]['description']);
}
templink += "&cmd_1=" + encodeURIComponent('data_provider=*&multi=x&filter_iobjnm=0calmonth&filter_value=0cml12lm&filter_value_type=variable_exit&filter_collaps=');

The code works fine. Now I would like to activate a hierarchy for infoobject zc_prov but I don't find the correct syntax.

templink = "&cmd=ldoc&template_id="+encodeURIComponent(report[gup('rep')]);
if(country[gup('cty')]['description'] != "all_countries") {
templink += "&filter_iobjnm_1=zc_ldbkrs&filter_value_1="+encodeURIComponent(country[gup('cty')]['description']);
}
templink += "&cmd_1=" + encodeURIComponent('SET_HIERARCHY&DATA_PROVIDER=DP1&IOBJNM=ZC_PROV&HIERARCHY_NAME=SP_FRANCE&ACTIVE=X');
templink += "&cmd_2=" + encodeURIComponent('data_provider=*&multi=x&filter_iobjnm=0calmonth&filter_value=0cml12lm&filter_value_type=variable_exit&filter_collaps=');

If I generate a link on the page and reload the link by clicking the link everything works fine.

SAPBWOpenURL(SAP_BW_URL_Get() + '&CMD=SET_HIERARCHY&DATA_PROVIDER=DP1&IOBJNM=ZC_PROV&HIERARCHY_NAME=SP_FRANCE&ACTIVE=X')

Any ideas?

Regards, Thomas

Former Member
Not what you were looking for? View more on this topic or Ask a question