cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting field from subordinate context node

Former Member
0 Kudos

Hi everybody,

I have a quite tricky problem:

I like to create a table view which displays attributes from BuilHeader and from BuilAddress.

I created therefore a context node BuildHeader in my view and BuilAddress as subordinate context node, linked together by BuilAddressRel in creation assistent von context node BuilAddress.

When I open the structures view of context nodes, then the parent- and child relationship of both context nodes is visible.

As it is not possible to insert attributes to a table view from no other context node than the directly assigned one (here BuilHeader), I created a new attribute for the address field, which I wanted do add to the table (the field "REGION"). I created the new field with assistant also and it seems to work.

Unfortunately the GET_* method of the new attribute was generated false so that I had to change the coding. I fetched the reason from the BuilAddress related entity and selected the region text for the region code. The region text has finally also been displayed but now I have the problem that I cannot sort this added atrribute column for REGION. All other columns can be sorted properly but only the one i need for sorting can't be 😞

Can anybody tell me if some kind of workarround exists to make this added column also sortable?

Thanks an best regards,

Markus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Markus,


You might need to enhance the GET_P-method to make the field sortable end also eventually the EH_ONSORT-method as well.

I have created a thread about this in the past:

http://scn.sap.com/thread/3270416

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hello Thomas,

I tried you recommended way but it did not work again. I deleted the attribute then and created it again as value attribute instead of a model attribute, filled the fields manually in DO_PREPARE_OUTPUT and now the sorting works without any manual adaptions of the code. So maybe it was a problem of model attribute.

Best regards,

Markus

Answers (0)