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

Using URL to Sort Values

Former Member
0 Likes
1,228

Hi,

I am using Web Application Designer. I have a table which has a column of numbers (these numbers are derived using a formula in the query). I want to sort (ascending/descending) this column of numbers using the SAP_BW_URL so that I can make links to sort by asc or desc.

I tried following this help doc: http://help.sap.com/saphelp_bw30b/helpdata/en/50/0a433ab9fb960ee10000000a11402f/content.htm

But I can't get it to work. I use sort_type = 'V' but when you do that, it ignores the iobjnm characteristic value. Instead, it expects value for structure_member. This doesn't make sense to me. I don't want to sort an entire structure... just one characteristic in the structure. Can someone clarify that?

OR (alternative solution????)

In the context menu of the column, I can choose sort, then sort in Ascending Order or sort in Descending Order. Is there a way to get the URL of that link in the context menu?

Thanks!!!!!

View Entire Topic
Former Member
0 Likes

Hi Audrey,

I just saw the link that you posted and it does mention that IOBJNM is only for characteristics and is omitted when you sort by values.

About Structure Member, I can only make a guess...If you look into your query, you notice that all Key Figures are always in a structure. By the structure member ID (as also shown in the Actual Sales example), I think they are referring to the key figure by its technical ID in the structure.

One way to see this is in the formula builder (I don't know if there is an easier way)...if you start creating a new formula in your KF structure, you can see a technical name / ID for the key figures that are part of the structure. So if you put the ID of the KF that you want to sort in the URL, I think it might work...

I am still not clear what they mean by the second structure member ID (if you have 2 structures in your query), but if you have just one structure you may want to try the above.

Hope this helps...

Former Member
0 Likes

Thanks for replying.

I tried putting the technical name of my formula column in the structure_member parameter. But it didn't work. I don't understand why you'd reference a structure. How does it know which characteristic's value you want to sort if you only pass it the structure name???? I'm confused!!

Any ideas about the alternate solution that I proposed? How can I get the URL for the "Sort in Ascending Order" and "Sort in Descending Order" links in the context menu? this seems to be the most straightforward way but I can't find any documentation.

Thanks!!!!!!!!!!!!!

Former Member
0 Likes

My terminology is bad. I should have said...

How does it know which KEY FIGURE's value you want to sort if you only pass the structure name???

Former Member
0 Likes

No...see. You are not putting in the structure name. You are putting in the technical ID that represents the key figure in the structure. I think this is required because for a characteristic, you can include each only once in a query, so you can identify it by the object name.

But you can include the same key figure more than once, may be for different calculations, or restrictions etc...lets say you have Sales in 2 columns restricted to different Sales Orgs, then how do you decide which one you want to sort...I guess this is where the technical ID comes into action...

Former Member
0 Likes

Hi Audrey,

and to get the UIDs of the structure member (which you have to provide with your URL) read

the hint in chapter

http://help.sap.com/saphelp_nw04/helpdata/en/76/80a1393e3a6942e10000000a11402f/frameset.htm

Heike

Former Member
0 Likes

I followed these instructions...

"In the Web application designer, drag the Web item Dropdown Box into your Web template. Assign the desired data provider to the Web item. Under the attribute Characteristic/Structure for the Web item Dropdown Box, select the respective structure. Here you can see the UID. If you execute the Web template, you can copy this UID from the HTML code."

...from the link you provided. Under the attribute Characteristic/Structure for the web item, I have 2 entries. 1) Person of Interest 0BP_EMPLO (which is in my rows) and 2) Report Key Figures (which is the strucutre in my columns; in this structure is my formula which i need to sort). Should I have expected to see my formula?

Anyway, I got the 25 char number for my formula field (FYI, it's call Total Tickets) by going to the transport connector. You can see the number there. And I put that number into my URL tag. My tag looks like this:

<SAP_BW_URL DATA_PROVIDER='DP' CMD='SORT' SORT_TYPE='V' SORT_DIRECTION='A' STRUCTURE_MEMBER_1='3WWA4FB5R1K1YDEPYWXEHR91A'>

When I run this web app and click on my link, it does NOT sort the Total Tickets column. Instead, it sorts Person of Interest (remember, this is what I have in the rows).

So, I'm all confused and I don't know what to do now.

Hope someone can help.

Thanks!!!